mirror of
https://git.k-space.ee/arti/vt1200.git
synced 2026-10-31 12:05:05 +02:00
26 lines
891 B
Lua
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
|