./scripts/check-gcm.py dvd.iso
Checks the header (DVD magic, game/maker code, title, DOL/FST offsets,
apploader), parses the FST, then READS EVERY FILE -- because a dump that lost
data still has a perfect header, so structure alone proves nothing. Also
reports how much of the image the filesystem accounts for, which is where a
truncated or zero-filled tail shows up, and prints SHA-1 for comparison
against a reference or a second dump.
⚠️ The zero-run heuristic was wrong in its first form and the fix is the
interesting part. Flagging any zero run >= 32 KiB as a dropped transfer gave
7 false positives on a known-good Wind Waker dump, all in
Audiores/Stream/*.afc: streamed audio legitimately begins with silence right
after its 16-byte header.
What a dropped transfer actually looks like is a run ALIGNED to the transfer
granularity -- whole 2048-byte disc sectors, because nothing reads or writes a
fraction of a sector. Structural silence starts and ends wherever the audio
does. So alignment is the discriminator, not length. Sector-aligned runs are
now a failure; unaligned ones are reported as structural with that reasoning
spelled out.
.gitignore: *.iso and *.gcm, so a 1.4 GB dump sitting in the workspace cannot
be committed by accident.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>