Repository navigation
Select NRR layouts from header bytes and report unsupported CRA containers - #1102
oliverames wants to merge 1 commit into
Conversation
|
Thanks. The [RED] line for a |
|
@seedds, replaced the plausible-table search with deterministic header selection. In Fever SDK build The regression constructs a valid-looking table at both locations and verifies that the header-selected table wins. Unknown tuples and malformed/truncated bounds fail with a named header error. Both Fever NRR samples and the 17 NRO tests pass; the Python ratchet and 11 docs tests also pass. The description and services reference document the evidence and its limits, including the newer count field's sample-based support. No claim that the whole word at +4 is a version remains. |
46f7659 to
c13cccc
Compare
c13cccc to
e8ee2fb
Compare
e8ee2fb to
2b920e6
Compare
|
Closing: main's nro_collect.py now selects the NRR table offset by header version (0x340, or 0x4c0 for version 1), which covers the Mario Tennis Fever layout this PR fixed. The extra header validation and unsupported-CRA error here are not needed for any game we have, so I'm dropping them rather than asking for review. |
What and why
nro_collect.pycould read signature bytes as hash-table metadata in Mario Tennis Fever's newer NRR layout, producing a huge count and an invalid scan. The parser now selects the layout from the header rather than taking the first plausible table.The SDK accessor checks
NRR0and the byte tuple at offsets(0x06, 0x05, 0x20). Tuple(0, 0, 0)selects metadata at0x330;(1, 1, 1)selects0x4b0. Other tuples stop with an error naming the header. The collector reads the table offset/count at metadata+0x10/+0x14and checks the declared file size, minimum header length and table bounds. It retains theCRA.container diagnostic, which identifies a reader gap without claiming the archive is supported.The selector is traced to Fever SDK build
32a9ac1480a6f0e9e2e8a813ae9cd73181897bb0, accessor+0x158660; caller+0x156458reads the table offset from metadata+0x10. SDK SHA-256:e8a2c5852508f330663d8ad639d4c20609e636c1bc6d5fcf7b01cd4bd3e0428f. Base and update SDK copies are identical, so this is one independent implementation. The newer count field is supported by the legacy structure and two Fever NRR samples, not independently proven by that accessor trace. Field names, additional layouts and signature authentication are outside this change.@seedds, this addresses your header-selection request. It is part of the upstream reconciliation for Switch 2 games running on iPhone, alongside the DKB work on iPhone 17 Pro Max. This contribution changes extraction only; it does not claim a DKB rendering, pacing or fur-shimmer improvement. Fresh hosted CI and maintainer review remain pending.
Updated to main a70f071. The maintainer landed the equivalent mesh-stage fix in e556f7a, so #1154 is closed as superseded and no longer appears in this diff. The NRR diff is again limited to its parser, tests and services reference. Updated branch: 19 NRO tests, 11 documentation tests and full Python ratchet pass. Hosted CI remains pending.
Checked
python -m unittest discover -s dm/tools/tests -p 'test_nro_*.py',python -m unittest discover -s dm/tools/tests -p test_docs.py, andpython dm/tools/lint_python.pyusing the repository's documented Python dependencies. Hosted CI remains pending.scripts/regress.pyline: not stated. The change is todm/tools/nro_collect.pyonly.Front ends
None: no front end has to act on this.
Docs
docs/reference/<subsystem>.mdentry, andpython3 dm/tools/docs_symptoms.pywas run. Note: the diff changes onlydm/tools/nro_collect.pyanddm/tools/tests/test_nro_collect.py. The description says the diff includes a services reference entry, but none is in the current file list, so this cannot be ticked.dmsh_chain.py --headerwas run anddm/gfx/nvn/dmsh_chain.his part of the change. Not applicable: no chain tool changed.