mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-28 19:07:47 -04:00
ccbdcad653
When the top-level psx_dispatch returns with cpu->pc==0 (the guest published a null PC — abnormal boot/run exit), shutting down loses the live state. With PSX_EXIT_HALT set, halt-and-serve instead so the still-loaded overlays + full guest state are inspectable over TCP. Default off; zero impact on normal runs. Used to pin the Tomba 2 frame-1997 exit: the guest's hooked interrupt handler (installed via B0:0x19 HookEntryInt) calls B0:0x17 ReturnFromException (overlay thunks at 0x80086200/0x80086220); the EPC-sentinel + host-longjmp exception model resolves the RFE to cpu->pc=0. See docs/TOMBA2_WHOOPEE_BAIL.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>