mirror of
https://github.com/sp00nznet/xboxrecomp.git
synced 2026-12-05 18:13:13 +00:00
5c1947da72
tools/fusion/coverage_oracle.py has sat in the tree unrunnable. It grades our function-boundary detection against Microsoft's PrecompiledSymbolTable, and its second argument is our detection for the *donor* title -- which means you need that title's original Xbox default.xbe to run the pipeline over. The XBE is not in the recompiled DLL. It is inside the BC package's SVOD container, which everyone had assumed was sealed. It is not: it is a plain XDVDFS filesystem with SHA-1 hash blocks interleaved at a fixed stride, and the stride is self-proving because the hashes check. tools/fusion/svod.py reads it -- ls, extract, verify -- in the shape of module.py. Verified by extracting default.xbe from all four shipped BC titles and comparing sha1 against independent extractions: byte-identical on all four (Fuzion 2,834,432 / Crimson 3,219,456 / Blinx 44,728,320 / Conker 7,774,208 bytes). Two things in the format bite, and both are why this is more than forty lines of seek arithmetic. The sector base is per title. Filesystem sectors are sectors of the original disc; the SVOD stream is a slice of it. For Fuzion and Crimson that slice is the whole game partition and the base is the XDVDFS constant 32. For Blinx it is 880,036 and for Conker 956,202, and assuming 32 there does not fail -- it reads the wrong data, quietly. So derive_base() solves for it and proves the answer: the root table must parse, it must name default.xbe, and that entry must resolve to XBEH under the same base. Parsing alone is not enough, which Conker demonstrates: its directory tables are packed into consecutive sectors and bases 956,201 through 956,207 all parse into plausible entry lists. The other is that a bad extraction still looks right. A flat contiguous copy of the Data files -- hash blocks and all -- parses as a valid XBE and reports the correct title, build date, base address, section names and even the correct XDK library version, because that all lives in the first 0x1000 bytes and the first data block is genuine. Three extractions passed a header-only check during this work and were wrong. xbe_gate() carries the tells that do fire: the 0x8000xxxx kernel-thunk run must be at the VA the header declares, and the TLS zero-fill must be a few bytes rather than the ~1.9 billion a displaced read produces. Limits, honestly: - The tests are arithmetic, the directory parser against a handcrafted table, and base derivation against a synthetic image with Conker-shaped decoys. None of them touch a package, because the repository ships none and should not. The four sha1 comparisons are recorded in the doc; CI cannot re-run them. - The PIRS header at +0x379 carries a data-block offset that gets within two sectors of the base on all four titles, but the two-sector gap on the two enhanced-GDF-layout titles is unexplained and four samples is not a rule. It is used as a search hint that shortens the candidate list, never as an answer -- the gate still has to pass. - Read-only. The hash blocks are used as a witness that the stride is right, not validated as a tree, so this will not tell you a package is damaged. - Measured on the four shipped BC packages only. Other SVOD content may lay out differently; verify first, and svod.py verify is that command. docs/technical/svod-extraction.md is a new file rather than a section in ms-fusion-corpus.md: the corpus doc is about what the recompiler does versus what a game is, and a container format with a per-title table and a validation gate is a different subject. Linked from there and from the README. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X8ULfUvyuk8K69chXaNFM9