local f = 0 emu.addEventCallback(function() f = f + 1 if f == 300 then local s = {} for i = 0, 15 do s[#s+1] = string.format("%02X", emu.read(i, emu.memType.snesWorkRam)) end print("frame300 wram0-15: " .. table.concat(s, " ")) local ok, err = pcall(function() local h = io.open("/tmp/claude-1000/mesen_io_test", "w"); h:write("ok"); h:close() end) print("io: " .. tostring(ok) .. " " .. tostring(err)) emu.stop(0) end end, emu.eventType.endFrame)