Files

20 lines
719 B
Lua

dofile(os.getenv("M4_LOADER_LUA"))
local frames = 0
emu.register_frame_done(function()
frames = frames + 1
if frames == tonumber(os.getenv("LOADER_END") or "2700") - 1 then
local prog = manager.machine.devices[':maincpu'].spaces['program']
local a_mul = prog:read_u32(0x018A8000)
local a_add = prog:read_u32(0x018A8020)
local b_sub = prog:read_u32(0x018A8040)
local b_mul = prog:read_u32(0x018A8060)
print(string.format("DEBUG MULTI: a_mul=%d a_add=%d b_sub=%d b_mul=%d",
a_mul, a_add, b_sub, b_mul))
if a_mul == 22 and a_add == 14 and b_sub == 9 and b_mul == 36 then
print("DEBUG MULTI MAME: PASS")
else
print("DEBUG MULTI MAME: FAIL (want 22/14/9/36)")
end
end
end, "debug-multi-check")