-- Watchpoint probe on the TMS34010's interrupt registers: does the firmware -- ever write INTENB or INTPEND? The driver cannot see CPU-internal register -- writes, so this uses the debugger's watchpoints. -- -- WP_FRAMES=400 vt1200 ... -autoboot_script harness/mame/wp.lua local machine = manager.machine local cpu = machine.devices[':maincpu'] local dbg = machine.debugger if not dbg then print("ERROR: debugger not enabled; pass -debug") machine:exit() return end -- INTENB = 0xc0000110 (index 0x11), INTPEND = 0xc0000120 (index 0x12), -- length 0x10 (one register). 'w' = watch writes. dbg:command('wpset c0000110,10,w,{ printf "W INTENB pc=%08X\\n", pc ; g }') dbg:command('wpset c0000120,10,w,{ printf "W INTPEND pc=%08X\\n", pc ; g }') dbg:command('wpset c0000080,10,w,{ printf "W DPYCTL pc=%08X\\n", pc ; g }') print("watchpoints armed on INTENB / INTPEND / DPYCTL") local maxframes = tonumber(os.getenv("WP_FRAMES") or "400") local n = 0 emu.register_frame_done(function() n = n + 1 if n >= maxframes then print("done (" .. n .. " frames)") machine:exit() end end, "vt1200-wp") dbg.visible_cpu = cpu dbg.execution_state = 'run'