local machine = manager.machine local cpu = machine.devices[':maincpu'] local dbg = machine.debugger if not dbg then print("ERROR: need -debug"); machine:exit() return end local function bp(addr, msg) dbg:command(string.format('bpset %s,,{ printf "%s\\n", pc, a7, a9, a11, a13 ; g }', addr, msg)) end bp("3fa761e0", "SRA-highnibble pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X") bp("3fa76f30", "CSRA-WRITE pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X") bp("3fa76f50", "CSRA-WRITTEN pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X") bp("3fa76340", "RHRA-READ pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X") bp("3fa76390", "RHRA-CMP pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X") bp("3fa76010", "CRA-0A-pre pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X") -- also the registry writes by the wrapper bp("3fa71f00", "CRA-3A pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X") bp("3fa721f0", "CSRA-tbl-write pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X") print("probe armed") local n=0 emu.register_frame_done(function() n=n+1 if n >= tonumber(os.getenv("CAP_MAX") or "1400") then print("done "..n); machine:exit() end end, "duart-probe2") dbg.visible_cpu = cpu dbg.execution_state = 'run'