mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 10:19:47 -04:00
963a87a327
The CD DMA hook (overlay_log.c) could not distinguish code overlays from FMV streaming data — Tomba buffers FMV through the same physical address range and DMA channel. Ripped it out entirely. Replace with overlay_dump TCP command in debug_server.c: scans the dirty_ram bitmap for contiguous dirty pages above a configurable physical threshold (default 0x98000), writes <crc32>.bin files to a caller-supplied directory, and returns a JSON manifest. dirty_ram IS the oracle for "executed as code" — no false positives from data transfers. tools/dump_overlays.py queries overlay_dump post-session and appends new entries to logs/<game_id>/overlay_map.jsonl with (crc32, load_addr, size, bytes_file). First run on Tomba captured 4 regions (8KB, 264KB, 356KB, 748KB) matching the known dirty_ram miss clusters. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>