local m = type(manager.machine) == "function" and manager:machine() or manager.machine local space = m.devices[":maincpu"].spaces["program"] emu.register_frame_done(function() if space:read_u8(0x2280) == 0xA5 then local out = {} for i = 0, 63 do out[#out + 1] = string.format("%02x", space:read_u8(0x2200 + i)) end local f = io.open("result.txt", "w"); f:write(table.concat(out)); f:close() m:exit() end end)