local machine = manager.machine local cpu = machine.devices[":maincpu"] frames = 0 limit = 1800 if false then local dbg = machine.debugger dbg.visible_cpu = cpu dbg:command('trace cpu.trace,,noloop,{logerror "%X %X %X %d\\n",pc,sr,a7,totalcycles}') dbg:command('go') end if false then local dbg = machine.debugger dbg.visible_cpu = cpu dbg:command('wpset EFE000,2000,r,1,{logerror "R %X %X %d\n",wpaddr,wpdata,totalcycles; go}') dbg:command('wpset EFE000,2000,w,1,{logerror "W %X %X %d\n",wpaddr,wpdata,totalcycles; go}') dbg:command('go') end notifier = emu.add_machine_frame_notifier(function() frames = frames + 1 if frames == limit then if true then machine.video:snapshot() end print(string.format("MACSTOP frames=%d", frames)) machine:exit() end end)