print("lua loaded") local n = 0 emu.register_frame_done(function() n = n + 1 if n == 300 or n == 900 then manager.machine.video:snapshot(); print("snap", n) end if n == 1000 then manager.machine:exit() end end, "f")