+
+
+===============================================================================
+Automatic Redump DAT verification and evidence report
+===============================================================================
+
+FriiDump 0.5.3.10 adds a state-aware GDR-8050L metadata-entry flow. The
+bridge reads entry capacity first. An already-unlocked game view skips the
+redundant initial handshake and tray cycle; a locked/video view receives one
+direct full handshake with READ CAPACITY verification. A tray-cycle retry is
+retained only as an explicitly logged recovery path. The later media transition
+that restores the locked/video view for VIDEO-L0/VIDEO-L1 capture remains, as
+does the final handshake for game/XDVDFS data.
+
+FriiDump 0.5.3.9 also closes the Xbox live-summary boundary: the copied GDR-8050L path now returns title, media ID, finalized output sectors, and elapsed evidence to the final validation summary, and final STOP UNIT ownership is singular.
+
+FriiDump 0.5.3.10 checks each successfully completed ISO against the canonical
+Redump DAT selected for the detected or forced disc type. Verification begins
+only after CRC32, MD5, SHA-1, and SHA-256 have been finalized.
+
+Stable DAT paths:
+
+- `redump_dat/Nintendo - GameCube.dat`
+- `redump_dat/Nintendo - Wii.dat`
+- `redump_dat/Microsoft - Xbox.dat`
+
+The verifier is active for GameCube/Wii ISO dumps and for full-disc Xbox ISO
+outputs. On Windows, the copied GDR-8050L reference-dumper bridge now returns its
+actual finalized output path, byte count, CRC32, MD5, SHA-1, and SHA-256 to the
+shared verifier. FriiDump therefore reuses the reference path's existing
+full-file hash pass rather than reading the 7.29 GiB image a second time.
+
+Xbox `-X` output remains intentionally excluded: an XISO is a game-partition
+representation, not a full Redump disc image.
+
+An exact archive verification requires all four Redump identity fields to agree
+with one DAT entry:
+
+- output byte size
+- CRC32
+- MD5
+- SHA-1
+
+SHA-256 is retained as local integrity evidence in the JSON report even though
+the supplied Logiqx DAT records do not contain SHA-256.
+
+The console now presents the evidence directly:
+
+```text
+Redump verification
+------------------------------------------------------------
+DAT redump_dat/Nintendo - GameCube.dat
+Entries scanned 2019
+Matched entry Sonic Mega Collection (USA)
+ROM Sonic Mega Collection (USA).iso
+Image size PASS
+CRC32 PASS
+MD5 PASS
+SHA-1 PASS
+Overall VERIFIED AGAINST REDUMP
+Confidence Exact archive match
+```
+
+For a non-match, FriiDump shows the closest candidate only when at least one
+hash correlates. It then prints PASS/FAIL for size, CRC32, MD5, and SHA-1. When
+no hash-correlated candidate exists, it reports aggregate per-field match counts
+instead of presenting an arbitrary same-size disc as meaningful evidence.
+
+`--redump-report <file>` writes schema-2 JSON containing the observed hashes,
+SHA-256, hash source, representation note, expected DAT fields, per-field
+PASS/FAIL evidence, match counts, overall conclusion, and confidence statement. The report is written to
+`<file>.tmp`, flushed and synchronized, closed, and then atomically replaces the
+final path. A failed write never exposes a partial final JSON document and does
+not overwrite a previous complete report.
+
+The JSON writer uses unlogged file output. Report contents therefore remain in
+the JSON artifact and are no longer mirrored into the human-readable run log as
+an incomplete object with missing string values.
+
+For the GDR-8050L/cross-flashed GDR-8163B full-ISO path, the report identifies
+`GDR-8050L reference finalized full-file hashes` as the hash source. FriiDump
+also records that XGD1 acquisition success and exact Redump hash identity are
+separate claims. The current reconstruction contains documented synthetic
+ranges, so a clean physical read can legitimately produce `NO EXACT MATCH`.
+That result must not be promoted to archive identity.
+
+Options:
+
+- `--redump-dat-dir <dir>` selects another directory containing the three stable
+ DAT filenames above.
+- `--redump-report <file>` writes the atomic machine-readable evidence report.
+- `--no-redump-verify` disables DAT lookup for a run.
+- `--nohash` also prevents DAT verification because the required hashes are not
+ calculated.
+
+Example:
+
+```powershell
+.\friidump.exe `
+ -d E: `
+ -T 0 `
+ -8 `
+ -s `
+ -i "sonic.iso" `
+ --redump-report "docs\debug\sonic.redump.json"
+```
+
+The DAT files are data inputs, not compiled into the executable. Replace the
+three files in `redump_dat` with newer Redump exports while keeping the stable
+filenames, or point `--redump-dat-dir` at an alternate set.