local dbg = manager.machine.debugger dbg.visible_cpu = manager.machine.devices[":maincpu"] dbg:command('trace T.trace,:maincpu,noloop,{logerror "T %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %X %d\\n",pc,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16,r17,r18,r19,r20,r21,r22,r23,r24,r25,r26,r27,r28,r29,r30,r31,hi,lo,totalcycles}') dbg:command('go') frames = 0 subscription = emu.add_machine_frame_notifier(function() frames = frames + 1 if frames >= 1 then dbg:command('trace off') manager.machine:exit() end end)