Repository navigation
Conversation
Guacamelee! STCE (0100BAE00B470000) and Guacamelee! 2 (01007E100456C000) both stop the NSP script at the split gate: no shaders in main or the RomFS. Their RomFS carries a single container, shaders.dat.nx, opening with SHADERS\0: a {version, u16, u16} header, a name table of one NUL-terminated pair per shader (its .vsh/.psh source and its entry, main), uniform metadata, and one block per shader {code area, control section, 24-byte record}. The control sections are ordinary NVN (0x838 bytes here) and the code areas ordinary SPH, but the block stores the CODE BEFORE the control section (its +0x704 holds that code's length) — the opposite adjacency from the NVN dump the scan walks — and no known magic opens the file, so the generic prefilter never passed it to scan_blob and no reader ran.
dbx_shaders() walks the control sections (ctl_len at +0x20) and takes each code area at ctl - field(ctl+0x704), checked by its 78563412 header; the stage and the key come from the code area, as everywhere. The name table is not read: every block is self-checking. The file head SHADERS\0 dispatches it in scan_blob and scan_file_in. New reference entry (DrinkBox's SHADERS container) and symptom index line.
Checked: test_split_dbx (new: a synthetic container read block by block in order with its stages, the file scanner's dispatch on the magic, and a control section whose code area is absent, wrong-sized or has no code header named in a red line); the fuzz harness with a dbx seed (1.67M runs, no finding) and test_fuzz_corpus; all test_split_*, test_docs, lint_python.py (no new finding); regress.py impact main..HEAD: 0 games use what the change touches, 3 only through the broad shader-table rule. End to end on the two real games: 165/165 and 444/444 blocks well formed, both Mac apps built in under a minute and boot to their launcher (163 and 425 unique shaders). Not run: regress.py check (the reader runs only on files that open with this magic, as for the Blizzard and Criterion readers; neither game has a profile); the iPhone. On this machine dm/gfx/tests and the Swift tests fail identically at origin/main (no Xcode toolchain), so they were not a gate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Guacamelee! STCE (0100BAE00B470000) and Guacamelee! 2 (01007E100456C000) both stop the NSP script at the split gate: no shaders in main or the RomFS. Their RomFS carries a single container,
shaders.dat.nx, opening withSHADERS\0: a{u32 version, u16, u16}header, a name table of one NUL-terminated pair per shader (its.vsh/.pshsource and its entry,main), uniform metadata, and one block per shader{code area, control section, 24-byte record}. The control sections are ordinary NVN (0x838 bytes here) and the code areas ordinary SPH, but the block stores the code before the control section (its+0x704holds that code's length) — the opposite adjacency from the NVN dump the scan walks — and no known magic opens the file, so the generic prefilter never passed it toscan_bloband no reader ran.dbx_shaders()walks the control sections (ctl_lenat+0x20) and takes each code area atctl - field(ctl+0x704), checked by its78563412header; the stage and the key come from the code area, as everywhere. The name table is not read: every block is self-checking. The file headSHADERS\0dispatches it inscan_blobandscan_file_in. New reference entry and symptom index line, new fuzz seed.Checked:
test_split_dbx(new: a synthetic container read block by block in order with its stages, the file scanner's dispatch on the magic, and a control section whose code area is absent, wrong-sized or has no code header named in a red line); the fuzz harness with adbxseed (1.67M runs, no finding) andtest_fuzz_corpus; alltest_split_*,test_docs,lint_python.py(no new finding);regress.py impact main..HEAD: 0 games use what the change touches, 3 only through the broad shader-table rule (shader:stage:*). End to end on the two real games (one cartridge holding both, via the NSP script's--title-id): 165/165 and 444/444 blocks well formed, both Mac apps built in under a minute each and boot to their launcher (163 and 425 unique shaders after dedup).Not run:
regress.py check— the reader runs only on files that open with this magic (as for the Blizzard and Criterion readers), neither game has a profile, andimpactnames no game the change reaches except through the shader-table rule; the iPhone; the games' own routes. On the machine this was written there is no Xcode 27.2 toolchain: thedm/gfx/testsand Swift-compiling tests fail identically atorigin/mainthere, so they were checked as unchanged-against-baseline, not as passing.Both games remain on provisional profiles: the reader makes the split pass and the apps boot; playtesting and a registered profile are someone's next step.