dbg = manager.machine.debugger dbg.visible_cpu = manager.machine.devices[":mcu"] count = 0 dbg:command("go") notifier = emu.add_machine_frame_notifier(function() count = count + 1 manager.machine:logerror(string.format("FRAME %d\n", count)) if count == 900 then dbg:command('trace T.trace,:mcu,noloop,{logerror "T %X %X %X %X %X %d\\n",curpc,pc,acc,psw,sp,totalcycles}') end if count == 903 then manager.machine.video:snapshot() manager.machine:exit() end end)