mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 18:25:35 -04:00
b23bd9a889
Loads in recompiled code route through cpu->read_word/half/byte
(= psx_read_word/half/byte), so a read hook is a pure runtime change
(no emitter edit, no regen). Adds debug_server_trace_read_check() called
from the RAM branch of each reader in memory.c (guarded by
PSX_NO_DEBUG_TOOLS), plus an armed-range read ring + commands:
rtrace_arm {addr_lo,addr_hi} / rtrace_disarm_all / rtrace_reset /
rtrace_stats / rtrace_dump {addr_lo,addr_hi,count,newest}. Entries carry
addr,val,func,ra,frame,w. Disarmed cost is a single range_count==0 test.
Mirrors the existing wtrace pattern; used to hunt "what code READS a value"
(e.g. the canonical option-config global behind per-frame display mirrors).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>