dbg = manager.machine.debugger if 0 == 0 then dbg:command('trace /data/emu/ee-python/tests/mame_traces/iop-boot.trace,iop,noloop,{tracelog "SR=%X Cause=%X ",SR,Cause}') end dbg:command('go') frames = 0 t0 = 0 sub = emu.add_machine_frame_notifier(function() frames = frames + 1 if frames == 0 and 0 > 0 then t0 = manager.machine.time:as_double() dbg:command('trace /data/emu/ee-python/tests/mame_traces/iop-boot.trace,iop,noloop,{tracelog "SR=%X Cause=%X ",SR,Cause}') end if frames == 2 then dbg:command('trace off,iop') print(string.format("WINDOW %.6f s", manager.machine.time:as_double() - t0)) manager.machine:exit() end end)