From 8b323ffe927124cd5c2f91e72db1c56a0280561d Mon Sep 17 00:00:00 2001 From: tetrisgm <30949000+tetrisgm@users.noreply.github.com> Date: Wed, 19 Aug 2026 03:41:22 -0700 Subject: [PATCH] coverage_vault: 8 MB dev-RAM aware bounds Titles running the 8MB enhancement stream code into the extended banks (0x200000..0x7FFFFF). The vault's 2 MB mask corrupted those capture addresses and its bound rejected legitimate regions ("capture exceeds PSX RAM"), which blocked compacting WipEout 3's merged capture history. Co-Authored-By: Claude Fable 5 --- tools/coverage_vault.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/coverage_vault.py b/tools/coverage_vault.py index d49c444e..079140cf 100644 --- a/tools/coverage_vault.py +++ b/tools/coverage_vault.py @@ -162,9 +162,12 @@ def _compact_region(region, drop_invalid_evidence=False): if len(image) != size: raise ValueError("capture size mismatch at 0x%08X: size=%d bytes=%d" % (load, size, len(image))) - phys_lo = load & 0x1FFFFF + # 8 MB dev-RAM aware: titles running the 8MB enhancement stream code into + # the extended banks (0x200000..0x7FFFFF); the old 2 MB mask corrupted + # their capture addresses and the bound rejected legitimate regions. + phys_lo = load & 0x7FFFFF phys_hi = phys_lo + size - if phys_hi > 2 * 1024 * 1024: + if phys_hi > 8 * 1024 * 1024: raise ValueError("capture exceeds PSX RAM at 0x%08X" % load) parsed = {} @@ -178,7 +181,7 @@ def _compact_region(region, drop_invalid_evidence=False): entries = [] for value in values: address = _address(value, field) - phys = address & 0x1FFFFF + phys = address & 0x7FFFFF if phys < phys_lo or phys >= phys_hi or (phys & 3): if not drop_invalid_evidence: raise ValueError(