local dbg = manager.machine.debugger dbg.visible_cpu = manager.machine.devices[":maincpu"] dbg:command('trace Z.trace,:maincpu,noloop,{logerror "Z %X %X %X %X %X %X %X %X %d\\n",pc,af,bc,de,hl,sp,ix,iy,totalcycles}') dbg:command('wpiset 0,10000,w,1,{logerror "IO %X %X %d\\n",wpaddr,wpdata,totalcycles; g}') dbg:command("go") count = 0 notifier = emu.add_machine_frame_notifier(function() count = count + 1 if count == 3 then manager.machine.video:snapshot() manager.machine:exit() end end)