Files
vt1200/dwt/probe_cfg.lua

17 lines
594 B
Lua

-- read two config cells at several frames (diagnostic only)
local machine = manager.machine
local cpu = machine.devices[':maincpu']
local dbg = machine.debugger
local space = cpu.spaces['program']
if not dbg then machine:exit(); return end
local f = 0
emu.register_frame_done(function()
f = f + 1
if f==200 or f==600 or f==1200 or f==2000 or f==3000 or f==4000 then
print(string.format("frame %4d @0xaecd0=%04X @0xaecd2=%04X", f, space:read_u16(0xaecd0), space:read_u16(0xaecd2)))
end
if f>=4000 then machine:exit() end
end, "cfg")
dbg.visible_cpu = cpu
dbg.execution_state='run'