mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 18:25:35 -04:00
2edce1b66f
pc=0 from the same-thread-restore epilogue means "the interrupted native frame is still on the host stack below - return and it continues". At dispatch depth <= 0 no such frame can exist and the 0 reaches the main loop as a bogus GUEST_EXIT, so prefer the compiled interrupt resume PC there (the same remedy the scheduler top-level-resume case already uses). Honest scope note: this closes a real hole by construction, but does NOT fix the observed WipEout 3 static-bake boot exit (deterministic "execution completed, PC=0", ra=0x800D7FC0, epc=0x8015FAEC) - that death reproduces unchanged, so its escape route is elsewhere; investigation continues. Also: the top-level exit path now prints the exit registers (ra/sp/epc/sr/func/last_store_pc/v0/a0/t9), which is how the crash was attributed on play builds without debug tools. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>