mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 10:19:47 -04:00
4cc757f0c9
Root cause of MMX6 "A game data could not be found" (weeks-old, cross-backend): the game's save-scan calls memset through the kernel A0 jump table; entry A0:2B points into BIOS ROM at 0xBFC02B8C (one of the entries the kernel never patches into RAM). Transitive discovery can never find it (reachable only via the data table, no jal), so the dispatch missed and psx_unknown_dispatch silently no-op'd — killing the scan before firstfile ever ran. Every card layer (SIO, IRQs, SwCARD events, sector data, kernel directory parse) was verified correct along the way; the sole defect was the undiscovered ROM function plus the silent miss. - recompiler/seeds: enumerate the post-init A0/B0/C0 tables (kernel RAM 0x200/0x874/0x674) and seed every ROM-pointing entry with no dispatch coverage — 30 functions (memset, memcmp, memmove, strncat, rand-family, card/dev services...). memset was merely the one MMX6 called; the rest were identical latent bugs. BIOS regen: 4406 -> 4439 dispatch entries. MMX6 CONTINUE now lists and loads saves (user-validated + scripted run: full FILE SELECT, 1093 card txns, unknown_dispatch_log total=0). - traps.c: an unresolvable dispatch target now dumps a crash report and halts BY DEFAULT (PSX_FAIL_FAST_UNKNOWN_DISPATCH=0 opts out for diagnostic sessions; the miss is ring-recorded either way). The old silent-no-op default left stale registers and a severed call chain, and masked this bug for weeks. Deliberately NO interp fallback: the dirty-RAM interpreter is for runtime-written code (Rule 18); interpreting around a static-discovery hole would hide it exactly like the no-op did. - runtime.cmake: EXE_NAME option — per-game process names (mmx6-runtime.exe) so one game's `taskkill /IM psx-runtime.exe` dev sweep no longer kills every other game's instance. - debug rings (the tooling that found this): HLE call ring gains consecutive-duplicate collapse w/ repeat counts (a 4-way TestEvent poll at 175K calls/s no longer flushes the ring in 0.1s), per-entry TCB + in_exc (thread attribution), a "since" paging param and 8MB dump buffer; card-trace EvCB watch widened to all 7 card event slots (slot 0 = SwCARD-IOE, the success event, was previously invisible). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>