Skip to content

Parse NDVE network archives using declared member bounds - #1416

Open
givethesourceplox wants to merge 1 commit into
seedds:mainfrom
givethesourceplox:fix/ndve-archive-bounds
Open

givethesourceplox wants to merge 1 commit into
seedds:mainfrom
givethesourceplox:fix/ndve-archive-bounds

Conversation

@givethesourceplox

Copy link
Copy Markdown
Contributor

What and why

Add a structured reader for NDVE v5 video-enhancement archives. The outer file contains parameter pairs, a separate NDSR pack and a trailing 1ALR archive index. Searching for control-header magic can mistake weights or adjacent members for shaders and does not establish their bounds.

Validate declared lengths, index and member extents, non-overlapping weight/control/code ranges, compute-stage control headers and matching code lengths. Recognize NDVE in both blob scanning and the loose-file prefilter, including compressed files. The embedded NDSR pack uses the existing reader; the NDSR odd-entry record walk remains separate in #1388.

Reference finding. Extracted from the Ocarina bring-up work in #1299; no game profile, assets or shader-chain changes are included.

Checked

Python 3.14 on macOS 26.5.2:

  • Nine new synthetic NDVE tests pass: key/stage preservation, blob and loose/compressed discovery, truncated headers/payload/footer, unsupported version, invalid parameter/index/member ranges, overlapping weights/shaders and inconsistent control/code lengths.
  • Existing test_split_*.py suite: 57 tests pass.
  • Documentation tests: 11 pass; chain tests: 17 pass; git diff --check passes.
  • Python lint reports no findings in either changed Python file. The repository-wide ratchet still exits nonzero for three additional baseline findings in unchanged dm/tools/tests/test_nso_match.py; its baseline was not widened.

This reader's reach is NDVE files; no standalone game run or five-game harness report is claimed. No game shader rebuild was needed or performed, since the translation chain and existing shader libraries are unchanged. Full Ocarina bring-up still depends on #1299 and other open fixes.

Docs

  • Reference finding added and symptom index regenerated.
  • Shader chain unchanged.
  • Tests contain synthetic data only; no game files, keys or extracted data included.

@github-actions github-actions Bot added nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers docs Documentation labels Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants