mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
6e760748c2
Make a bare interpreted PC explainable from the session-long per_pc snapshot alone. DirtyRamPcEntry gains occ_crc / occ_ok (the static overlay variant whose code ranges span the PC, via a per-PC scan of the static-match cache, and whether it validated at that moment) and last_ext_ra (gpr[31] at the most recent external entry, i.e. the caller that reached this interior). Both are stamped only on external entries -- arrivals from native dispatch, not interp block chaining -- and emitted per row in dirty_ram_stats.per_pc as occ_crc, occ_ok and ext_ra. Reading the pair: occ_ok=1 is an interior gap inside live native code (an alias seed fixes it); occ_ok=0 with a CRC means the spanning piece is resident but CRC-missing, so it was compiled from another section's bytes or rewritten at run time and no seed helps; 0 means nothing compiled spans the PC. psx_overlay_resident_crc_at() records each static-match cache entry's code span (lo_min/hi_max) so the scan is a range test; DLL-path titles fall back to the loader's last residency hash. The debug-server reply buffer grows 32 -> 64 KiB for the wider rows; the tail reserve still cuts between rows. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>