doesn't keep backups to allow maximum speed (for automatic rom corruptors and stuff) keeping them might be an option though, just need to use memview's ApplyPatch() that'd also highlight the edits in hex editor
| 1532 | // keeping them might be an option though, just need to use memview's ApplyPatch() |
| 1533 | // that'd also highlight the edits in hex editor |
| 1534 | static int rom_writebyte(lua_State *L) |
| 1535 | { |
| 1536 | uint32 address = luaL_checkinteger(L,1); |
| 1537 | if (address < 16) |
| 1538 | luaL_error(L,"rom.writebyte() can't edit the ROM header."); |
| 1539 | else |
| 1540 | FCEU_WriteRomByte(address, luaL_checkinteger(L,2)); |
| 1541 | return 1; |
| 1542 | } |
| 1543 | |
| 1544 | static int memory_readbyte(lua_State *L) { |
| 1545 | lua_pushinteger(L, GetMem(luaL_checkinteger(L,1))); |
nothing calls this directly
no test coverage detected