| 1492 | } |
| 1493 | |
| 1494 | static int rom_gethash(lua_State *L) { |
| 1495 | const char *type = luaL_checkstring(L, 1); |
| 1496 | MD5DATA md5hash = GameInfo->MD5; |
| 1497 | |
| 1498 | if (!type) lua_pushstring(L, ""); |
| 1499 | else if (!stricmp(type, "md5")) lua_pushstring(L, md5_asciistr(md5hash)); |
| 1500 | else if (!stricmp(type, "base64")) lua_pushstring(L, BytesToString(md5hash.data, MD5DATA::size).c_str()); |
| 1501 | else lua_pushstring(L, ""); |
| 1502 | return 1; |
| 1503 | } |
| 1504 | |
| 1505 | static int rom_readbyte(lua_State *L) { |
| 1506 | lua_pushinteger(L, FCEU_ReadRomByte(luaL_checkinteger(L,1))); |
nothing calls this directly
no test coverage detected