mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-28 02:56:36 -04:00
c496dc1db1
Pig-into-pig crash (TombaRecomp issue #1, v0.1.5): when a cached-DLL native overlay function called uncached overlay code, the dirty interp's overlay local-flow chained the callee's jr-ra straight past the nested dispatch's return point (the target page is always dirty for overlays), executing the native caller's tail in the interpreter. The suspended native host frames then resumed and double-executed those tails against a moved guest stack, restoring garbage callee-saved registers — main loop's s1 mode-switch constant destroyed -> zombie loop (blue screen, music on IRQs) or wild pointer -> fatal MMIO READ16. Thread stop_addr (psx_dispatch_call's return_addr) through dirty_ram_dispatch; local flow exits when any transfer or straight-line fall-through reaches it, handing control back to the dispatch loop's existing pc==stop_addr return. Signature change is deliberate: stale generated dispatch fails to compile, forcing regen (BIOS + Tomba regenerated; other titles regen on their own branches). Sibling of the Bug A call-contract fix, on the return side. Root-caused live via always-on rings on a wedged instance; user-verified fixed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>