Files
vt1200/dwt/evidence/pc_probe.lua
T

26 lines
891 B
Lua

-- pc_probe.lua -- print the PC at selected emulated frames while the bare
-- (no VT1200_SKIP_LEVEL1) boot runs, so a MOP probe sent at the same time can
-- be tied to the known diagnostics-menu park PC (3FDCE400).
--
-- stdbuf -oL <mame> vt1200 ... -debug -debugger none \
-- -autoboot_script dwt/evidence/pc_probe.lua -autoboot_delay 0
local machine = manager.machine
local cpu = machine.devices[':maincpu']
local pc = cpu.state['PC']
local frames = 0
local marks = { [100]=true, [200]=true, [400]=true, [600]=true,
[1200]=true, [2400]=true, [3600]=true }
emu.register_frame_done(function()
frames = frames + 1
if marks[frames] then
print(string.format("PC_PROBE frame=%d PC=%08X", frames, pc.value))
end
end, "vt1200-pc-probe")
if machine.debugger then
machine.debugger.visible_cpu = cpu
machine.debugger.execution_state = 'run'
end