dbg = manager.machine.debugger if 300 == 0 then dbg:command('trace /data/emu/arm60-python/tests/mame_traces/shell-300.trace,maincpu,noloop,{tracelog "CPSR=%08X ",CPSR}') end dbg:command('go') frames = 0 sub = emu.add_machine_frame_notifier(function() frames = frames + 1 if frames == 300 and 300 > 0 then dbg:command('trace /data/emu/arm60-python/tests/mame_traces/shell-300.trace,maincpu,noloop,{tracelog "CPSR=%08X ",CPSR}') end if frames == 310 then dbg:command('trace off,maincpu') print(string.format("STOP %.6f s", manager.machine.time:as_double())) manager.machine:exit() end end)