Skip to content

Add South Park: The Fractured But Whole (01008F2005154000) - #631

Open
Unknown15u wants to merge 1 commit into
igawa6:mainfrom
Unknown15u:south-park-01008F2005154000
Open

Unknown15u wants to merge 1 commit into
igawa6:mainfrom
Unknown15u:south-park-01008F2005154000

Conversation

@Unknown15u

Copy link
Copy Markdown

PR title

Add South Park: The Fractured But Whole (01008F2005154000)

PR body (English, paste into the PR description)

Adds South Park: The Fractured But Whole (title ID 01008F2005154000, update 1.05 / v327680, Snowdrop engine on NVN). The profile is imported from nxnative upstream (seedds/nxnative, dm/games/01008F2005154000) and is the first Android test of the game. Fixes issue #619.

The crash

On first launch the game crashed in DT_INIT with SIGSEGV writing to 0x8000ffff (pc=main+0x17fb4b0). Root cause: the Snowdrop allocator reserves one 4 GB address range via AllocateAddressRegion and splits it (large pool, 512 KB pages, 64 KB pages starting at base+0x80000000). The profile's alias region was 4.375 GB (mem_alias 0x118000000), but about 1 GB was already used before the allocator ran (log: alias region mapped up to +1.00 GB (alias region 4.38 GB)), leaving about 3.3 GB free, so the 4 GB reservation did not fit, AllocateAddressRegion failed (base 0, unchecked), and the first use wrote to 0x8000ffff. Same failure mode as Mario + Rabbids (docs/reference/memory.md). Confirmed by DM_ALIAS_SIZE=0x200000000 (8 GB), which let the game open.

Fix in the profile: mem_alias 0x118000000 -> 0x218000000 (4.375 -> 8.375 GB), mem_reserve 0x140000000 -> 0x240000000 (5 -> 9 GB), keeping the 128 MB heap cap.

The shader reader

This game's shaders are bare zlib streams (1 KB window, header bytes 28 15) inside SDF data slices (.mcache), not the 20-byte-header Snowdrop records, so the pack found 0 shaders without a reader. Ports snowdrop_zlib and snowdrop_objects (plus SNOWDROP_CACHE, ZLIB_HEADERS, and the snowdrop_shaders hook) from nxnative into dm/gfx/tools/shader_split.py, marked PEANUTS(upstream-candidate). With it: 4,614 shaders (4,072 vertex, 467 pixel, 75 compute), all valid for spirv-val --target-env vulkan1.3. shader_split.py is not in the DMSH_CHAIN tool list, so no chain-header bump is needed.

Test results

Device: POCO X7 Pro (Dimensity 8400 Ultra, Mali-G720 MC7, 12 GB RAM), Android 15, Peanuts Native 0.1.8-1, PanVK faux123 v1.1.8 (Mesa 26.3.0-devel).

  • Opens and plays from the 1.05 update pack; ~29-31 fps real in normal scenes, ~50 fps presented with frame generation (x2); no crash in a 17-minute run.
  • One dense area runs at ~5-15 fps (about 2,500 draws/frame vs 38 normally); the fps recovers on leaving the area. Not a host bug: the draw count rises and falls with the location.
  • System driver: black screen. Readiness check fails (missing Placed memory maps), the guest memory alias export is unavailable, and the game runs at ~35-48 fps but draws only 2-5 items/frame (38 on PanVK), so the scene never renders; no crash. PanVK is required on this GPU.
  • Frame generation: transient title-screen corruption (green/red/yellow) on first open with framegen on; gone on re-entry.

What ran, and what did not

  • Ran: check-profiles.sh (186 titles, exit 0), gen_runtime_profile.py check-all (186 profiles, exit 0), test_docs.py (11/11), docs_symptoms.py (1017 symptoms), docs_patches.py (50 games). Phone runs on PanVK and on the system driver (see above).
  • Not run: no Mac/iOS run (Android work only); the host unit tests do not cover this game-specific change.

Files

  • dm/games/01008F2005154000/ (new profile: game.tsv, shader tables, patches.py, README.md)
  • dm/gfx/tools/shader_split.py (bare-zlib Snowdrop reader, PEANUTS(upstream-candidate))
  • dm/games/README.md (games-table row)
  • docs/reference/memory.md, docs/reference/shaders.md, docs/reference/frame-rate.md, docs/reference/rendering.md (South Park entries)
  • docs/agents/symptoms.md, docs/agents/game-patches.md (regenerated indexes)
  • peanuts/UPSTREAM-EDITS.md, peanuts/upstream-unmarked.txt

Source only: no binaries, no keys, no firmware, no game files, no download links.

Fixes #619.

First Android test of the game (POCO X7 Pro, Mali-G720, PanVK
faux123 v1.1.8). The profile is imported from nxnative upstream
(seedds/nxnative) with the Android memory fix: the Snowdrop
allocator's 4 GB reservation did not fit the 4.375 GB alias region
(~1 GB already used), so AllocateAddressRegion failed unchecked and
the game crashed in DT_INIT (SIGSEGV at 0x8000ffff). The profile
now sets mem_alias 8.375 GB and mem_reserve 9 GB.

Also ports the bare-zlib Snowdrop shader reader (snowdrop_zlib,
snowdrop_objects) from nxnative: this game's shaders are bare zlib
streams in SDF data slices, not the 20-byte-header format, so the
pack found 0 shaders without it. With it: 4,614 shaders, all valid.

Tested on Android: opens and plays on 0.1.8-1, ~29-31 fps real,
~50 fps with frame generation; on the system driver it stays black
(readiness fails: missing Placed memory maps), so PanVK is required
on this GPU. See issue igawa6#619.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

South Park: The Fractured But Whole crashes at startup (DT_INIT SIGSEGV) on Android — 4 GB reservation does not fit the 4.375 GB alias region

1 participant