print("lua start") dbg = manager.machine.debugger print(dbg) dbg.visible_cpu = manager.machine.devices[":soundcpu"] print("cpu set") dbg:command("trace S.trace,:soundcpu,noloop,{logerror \"S %X %d\\n\",pc,totalcycles}") dbg:command("go") count = 0 notifier = emu.add_machine_frame_notifier(function() count = count + 1; if count == 3 then manager.machine:exit() end end)