Skip to content

South Park: The Fractured But Whole (01008F2005154000): profile for 1.05, bare zlib Snowdrop shader caches - #843

Open
nuno5645 wants to merge 1 commit into
seedds:mainfrom
nuno5645:south-park-profile
Open

nuno5645 wants to merge 1 commit into
seedds:mainfrom
nuno5645:south-park-profile

Conversation

@nuno5645

@nuno5645 nuno5645 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

What and why

South Park: The Fractured But Whole (update 1.05, v327680; Snowdrop on NVN, SDK 3.5.1) had no profile. Its build stopped twice: the shader split found no shaders, and the address region check showed a 12 GB reservation. The game note is dm/games/01008F2005154000/README.md.

  • Shader split (dm/gfx/tools/shader_split.py). The game's camel/shadercache/nx/*.mcache files are bare zlib streams (a 1 KB window, 64 KB blocks), without the 20-byte record header of the Mario + Rabbids games.
    • snowdrop_zlib finds them, checks the decoded 0xabcd00d4 head and decodes the chained blocks. A file cut short is reported in red.
    • The split finds 4,614 stages: 4,072 vertex, 467 fragment and 75 compute.
    • Reference entry: docs/reference/shaders.md, Shader records in Snowdrop SDF data slices, "Bare zlib cache files".
  • Memory (dm/games/01008F2005154000/patches.py). Snowdrop's three-pool page allocator reserves 12 GB. The cuts keep the layout in 4 GB: 1.5 GB large, 512 MB of 512 KB pages, 2 GB of 64 KB pages.
    • The sizes come from the pools' use, measured on the Mac with the original layout and a 64 GB alias region: 64 KB pages reached 848 MB after 90 s.
    • A cut with 512 MB of 64 KB pages ran that pool out in 2 s, and the bump path then asks for a fixed-address 4 GB range that the SDK aborts on.
    • Reference entry: docs/reference/memory.md, Separate virtual ranges in Snowdrop's page allocator.
  • SDK (dm/tools/sdk_patches.py). SDK 8bb65519… takes Kingdom Battle's cuts: the node area goes from 1 GB to 64 MB, with 32 MB alignment.
  • Adds the games table row and the regenerated docs/agents/game-patches.md.

The same change is carried in NX2Apple as a patch (LNPANDY/NX2Apple#379, issue LNPANDY/NX2Apple#377).

Checked

  • Tests: on this branch, dm/gfx/tests/test_snowdrop.py passes, with two new tests: bare zlib cache files, and a cut-short file that is reported in red. Both fail on the old code. dm/tools/tests/test_docs.py passes. docs_patches.py and docs_symptoms.py change nothing. The GPU tests (make -C dm/gfx/tests) were not run.
  • Games run, with title ID and version: 01008F2005154000 v327680 with its six DLC, on the Mac.
    • Headless with DM_CTL input, it played from boot through the title, the main menu, New Game, the opening cinematics, character creation and the prologue cutscenes, to the first interactive scene, where the L / R prompt reacts to input.
    • The regions reach alias +4.23 GB of 4.375 GB.
  • Not checked: audio (the run was headless), play past the first scene, pool use over long play, and iOS. nvnCommandBufferGetControlMemoryFree is reported as unimplemented, with no effect seen so far. All of these are under Open in the game note.
  • Devices and OS: Apple-silicon Mac, macOS 27.2.
  • scripts/regress.py check --games was not run. The shader_split.py change only adds a path for files that hold no record header, and the Kingdom Battle tests in test_snowdrop.py still pass. shader_split.py is not a chain tool, so dmsh_chain.h is unchanged.
  • No gallery screenshot yet.

Docs

  • The finding is in its game note or its docs/reference/<subsystem>.md entry, and python3 dm/tools/docs_symptoms.py was run (the symptom index)
  • A chain tool changed: not applicable
  • No game files, keys or data extracted from a game in the change or the attachments. The profile holds only the shader tables that every profile carries.

nuno5645 added a commit to nuno5645/NX2Apple that referenced this pull request Nov 1, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… zlib Snowdrop shader caches

- shader_split: South Park stores its .mcache files as bare zlib streams (a 1 KB window, 64 KB blocks) without the
  20-byte record header of the Mario + Rabbids games; snowdrop_zlib finds and decodes them (4,614 stages).
- Profile for update 1.05 (v327680): Snowdrop's three-pool page allocator reserves 12 GB; the cuts keep its layout in
  4 GB (1.5 GB large, 512 MB of 512 KB pages, 2 GB of 64 KB pages), sized from the pools' use measured on the Mac.
- sdk_patches: SDK 8bb65519 takes the 64 MB node area and 32 MB alignment cuts.
- Docs: shaders.md, memory.md, the games table and the generated patch list.

Tested on the Mac: title, menus, New Game, cinematics, character creation and the prologue to the first interactive scene.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) rewriter The NSO rewriter and per-build patches packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts) docs Documentation game: 01008F2005154000 A game profile new game Adds a game profile that main does not have yet labels Nov 3, 2026
@ishtiaq156

Copy link
Copy Markdown
Contributor

Thanks for working on the South Park port. I've closed my overlapping PR #662 in favor of this one so there's one profile to review. I appreciate the direct Snowdrop shader-cache extraction you've added here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 01008F2005154000 A game profile new game Adds a game profile that main does not have yet 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 rewriter The NSO rewriter and per-build patches tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants