Skip to content

South Park: The Fractured But Whole (01008F2005154000): profile for 1.05 - #379

Closed
nuno5645 wants to merge 2 commits into
LNPANDY:mainfrom
nuno5645:feat/south-park-profile
Closed

nuno5645 wants to merge 2 commits into
LNPANDY:mainfrom
nuno5645:feat/south-park-profile

Conversation

@nuno5645

@nuno5645 nuno5645 commented Nov 1, 2026

Copy link
Copy Markdown

Fix or feature

  • Fix
  • Feature

What and why

Closes #377. 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.

Patch 0055-south-park-profile.patch:

  • 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 that the Mario + Rabbids games have. The new snowdrop_zlib finds them, checks the decoded 0xabcd00d4 head and decodes the chained blocks. A file that is cut short is reported in red. The split finds 4,614 stages (4,072 vertex, 467 fragment, 75 compute).
  • Memory (dm/games/01008F2005154000/patches.py). Snowdrop's three-pool page allocator reserves 12 GB. The cuts keep its layout but shrink it to 4 GB: 1.5 GB for large allocations, 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: 64 KB pages reach 848 MB after 90 s.
    • A first cut with 512 MB of 64 KB pages ran that pool out within 2 s, and the SDK then aborted on a second fixed-address 4 GB request.
  • SDK (dm/tools/sdk_patches.py). SDK build 8bb65519… takes Kingdom Battle's cuts: the node area goes from 1 GB to 64 MB, with 32 MB alignment.
  • Profile tables and docs. Adds the game's profile tables, a game README, rows in docs/reference/shaders.md and memory.md, the games table, and the regenerated docs/agents/game-patches.md.

Checked

  • Tests: python3 tools/engine.py check passes. 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. test_docs passes.
  • Visual QA: not applicable.
  • Run on a Mac (M-series Mac, macOS 27.2), with 01008F2005154000 v327680 and its six DLC:
    • It ran headless from boot through the title screen, the main menu, New Game, the opening cinematics, character creation and the prologue cutscenes, up 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 test was headless), play past the first scene, pool use over long play, iOS. nvnCommandBufferGetControlMemoryFree is reported as unimplemented, with no effect seen so far. These are listed under Open in the game README.

Screenshots

None, no visible change.

Scope

  • No engine file (dm/, scripts/, docs/, ref/) is added to the repository: a change there is a patch in patches/ (a commit in engine/, then tools/engine.py export, and tools/engine.py check passes), with its Upstream-Status
  • A fix to the engine or a game profile also goes to seedds/nxnative as a PR in parallel: this PR's patch says forwarded seedds/nxnative#..., or pending until that PR is open. It is pending: there is no upstream PR yet.
  • A change to a launcher view has before and after screenshots above (no launcher view changes)
  • No keys, game files or data extracted from a game in the change or the attachments. The profile holds only the shader tables (hashes and pairings) that every profile in dm/games carries.

This PR and #378 each add one line at the end of patches/series, so whichever merges second needs a one-line rebase.

🤖 Generated with Claude Code

…000) profile (LNPANDY#377)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the patch-queue Changes the patch queue or the upstream pin label Nov 1, 2026
@v0lumehi

v0lumehi commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

@nuno5645 Thanks for the PR. The profile patch is marked pending and the Reason says it is meant for upstream. Could you open the matching PR at seedds/nxnative as well? Then the patch header can say forwarded seedds/nxnative#N, and the next engine bump drops the patch once it lands there.

The change itself is the same in both places, only without the patches/ wrapper. Please read their contribution notes first. I did not review the code here yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nuno5645

nuno5645 commented Nov 1, 2026

Copy link
Copy Markdown
Author

Done: the matching upstream PR is seedds/nxnative#843 (the same commit cherry-picked onto seedds/main; test_snowdrop and test_docs pass there, and docs_patches.py / docs_symptoms.py change nothing). The patch header now says forwarded seedds/nxnative#843.

@v0lumehi

v0lumehi commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the profile. The patch waits for seedds/nxnative#843, which is still open. When seedds takes it, the next engine bump brings it here and the patch is dropped. It stays in v1.1.3.

@v0lumehi v0lumehi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nuno5645 for the South Park profile and the bare zlib cache support. The header is valid (forwarded seedds/nxnative#843), and the two new tests cover the cut-short case as well.

  1. The PR conflicts with main in patches/series, and number 0055 is taken. Please update with main. I renumber at merge.
  2. game.tsv and the sdk_patches.py comment say the memory is cut to 3 GB, but the patch cuts to 4 GB (1.5 GB, 512 MB and 2 GB). Please fix the comments.
  3. snowdrop_zlib scans the whole data slice for every byte that can start a zlib stream. On multi-GB .sdfdata slices that may be slow, and it now also runs for the other Snowdrop games. Please measure the time on a large slice and put the number in the PR.
  4. Please remove the Co-Authored-By: Claude Opus 5.5 line from the patch message.

Next: I wait for seedds/nxnative#843 as planned. After that and the changes above I will ask @LNPANDY for the go. It stays in v1.1.3.

@v0lumehi v0lumehi added the enhancement New feature or request label Nov 5, 2026
@v0lumehi v0lumehi modified the milestones: v1.2.2, v1.2.5, v1.3.2 Nov 6, 2026
@v0lumehi

v0lumehi commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

@nuno5645 this PR conflicts with main in patches/series, and the number 0055 is taken. Please update your branch with main. I renumber at merge.

My review from Nov 5 still has three open points.

  1. Fix the 3 GB comments in game.tsv and sdk_patches.py, because the patch cuts to 4 GB.
  2. Put the time of snowdrop_zlib on a large .sdfdata slice in the PR.
  3. Remove the Co-Authored-By line from the patch message.

The patch also waits for seedds/nxnative#843, which is still open.

@v0lumehi v0lumehi modified the milestones: v1.3.2, v1.4.0, v1.5.0 Nov 12, 2026
@LNPANDY

LNPANDY commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Per CONTRIBUTING.md (Helping with games), new game profiles belong in upstream seedds/nxnative first. Please open a pull request there. Thank you!

@LNPANDY LNPANDY closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request nice-to-have Goes into the next release if it is ready in time patch-queue Changes the patch queue or the upstream pin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

South Park: The Fractured But Whole (01008F2005154000): profile for 1.05

3 participants