MCPcopy Create free account
hub / github.com/TASEmulators/fceux / rom_writebyte

Function rom_writebyte

src/lua-engine.cpp:1534–1542  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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
1534static 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
1544static int memory_readbyte(lua_State *L) {
1545 lua_pushinteger(L, GetMem(luaL_checkinteger(L,1)));

Callers

nothing calls this directly

Calls 3

luaL_checkintegerFunction · 0.85
luaL_errorFunction · 0.85
FCEU_WriteRomByteFunction · 0.85

Tested by

no test coverage detected