local cpu=manager.machine.devices[":maincpu"]; local dbg=manager.machine.debugger; local fr=0; local seen=0; local inst=false local lf=io.open(os.getenv("FOUT"),"w") emu.register_frame_done(function() fr=fr+1 if fr==1500 and not inst then inst=true cpu.debug:bpset(0x2001DE,"1",'printf "CHK f004=%x",w@fff004 ; go') cpu.debug:bpset(0x2004CA,"1",'printf "FIGHT" ; go'); cpu.debug:bpset(0x2001E6,"1",'printf "PASS" ; go') cpu.debug:bpset(0x14828,"1",'printf "GOAL" ; go') end if inst and dbg.execution_state~="run" then dbg.execution_state="run" end local log=dbg.consolelog; for k=seen+1,#log do local l=log[k]; if l:match("^[CFGP]") then lf:write(fr," ",l,"\n") end end; seen=#log if fr%3000==0 then lf:flush() end if fr%4000==0 then manager.machine.video:snapshot() end end)