-- hp_snap.lua -- ISR SRA snapshots (struct[index].0x3b0) and the transmit sequence. local machine = manager.machine local cpu = machine.devices[':maincpu'] local dbg = machine.debugger if not dbg then print("ERROR: no debugger"); machine:exit(); return end local function bp(addr, body) local cmd = 'bpset ' .. addr .. ',,{ ' .. body .. ' ; g }' print("CMD " .. cmd) dbg:command(cmd) end -- ISR TxRDYA path: snapshot store, and transmit store. bp("3fa79e20", 'printf "SNAP a7=%08X idx=%d SRA=%04X s320=%04X\\n", a7, (a7-270860)/16, d@6400010, d@270BB0') bp("3fa79ed0", 'printf "TX a7=%08X idx=%d SRA=%04X\\n", a7, (a7-270860)/16, d@6400010') bp("3fa7a390", 'printf "SNAP5 idx5 SRA=%04X\\n", d@6400010') local n = 0 emu.register_frame_done(function() n = n + 1 if n >= tonumber(os.getenv("HP_FRAMES") or "700") then print("done "..n); machine:exit() end end, "vt1200-hp-snap") dbg.visible_cpu = cpu dbg.execution_state = 'run'