Skip to content

The NSP script builds a Switch 2 game from a dump with only an update, and surveys a dump with no profile - #973

Open
capibawa wants to merge 1 commit into
seedds:mainfrom
capibawa:nsp-dump-update-only
Open

capibawa wants to merge 1 commit into
seedds:mainfrom
capibawa:nsp-dump-update-only

Conversation

@capibawa

@capibawa capibawa commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What and why

This is split out of #957, as offered in its closing comment. Fire Emblem Fortune's Weave's dump holds updates/131072/ alone, and that update is the whole game. The NSP script had two problems with it: it took base/ as the mark of a dump, and it refused a dump with no profile instead of surveying it.

  • pack_dump.py: takes a dump with base/ or with updates/<version>/ folders that hold code and a RomFS. It reads the title ID from the base game, or else from the newest update. It refuses version 0 without base/, and lists the versions there.
  • The script: lists v0 only when there is a base, and looks up the build by the newest version's main. A dump with no profile is surveyed from its own files: the code modules are copied, the RomFS is read in place instead of from the manifest, and the folder's name names the game, since a dump has no control data.
  • The provisional profile (profile_guess.py) had two errors for a Switch 2 game:
    • The SDK version pattern didn't take a variant (nnSdk-Generic_22_2_0), so the survey showed no SDK.
    • The pool was a Switch 1 one. An sdk built for the Switch 2 (Ounce) now gets a 9 GB pool and a heap region that holds it, as Donkey Kong Bananza's profile has.

Checked

  • Tests, with Python 3.14 (the script needs 3.12 or newer, and test_nsp_dump.py fails on main too with 3.9):
    • dm/tools/tests/test_nsp_dump.py: a dump with only an update, and a dump with no profile surveyed until its 32-bit NPDM stops it.
    • test_profile_guess.py: the pool and the variant.
    • test_nsp_scan.py, test_nsp_romfs.py, test_docs.py.
  • Games: on this branch, the script found Fire Emblem Fortune's Weave's (04007EF01F8AE000) update-only dump, packed v131072 from the update alone, and built all 16,888 shaders, the host and the pipeline prebuild. Before the rebase, it also surveyed the dump with no profile and wrote the provisional one.
  • Devices and OS: MacBook Pro M3 Pro, macOS 27.0.1.
  • regress.py: not run. This changes packing, not the host or the chain.

Docs

  • docs/development.md describes the dump layout the script takes
  • No game files, keys or data extracted from a game in the change or the attachments

🤖 Generated with Claude Code

…, and surveys a dump with no profile

Fire Emblem Fortune's Weave's dump holds updates/131072 alone, and the update is the whole game, but the script took base/ as the mark of a dump and refused one with no profile. pack_dump.py now takes a dump with base/ or with updates/<version>/ that hold code and a RomFS, and reads the title ID from the base game, else from the newest update; version 0 without base/ is refused with the versions there. The script lists v0 only when there is a base, looks up the build by the newest version's main, and surveys a dump with no profile from its own files: the code modules are copied, the RomFS is read in place in place of the manifest, and the folder names the game, a dump having no control data.

The provisional profile was wrong for a Switch 2 game in two ways. The SDK version string names a variant (nnSdk-Generic_22_2_0), which the pattern did not take, so the survey showed no SDK. And the pool was the Switch 1 one; an sdk built for the Switch 2 (spec: Ounce, as loader.c's dm_sdk_ounce reads it) now gets a 9 GB pool and a heap region that holds it, as Donkey Kong Bananza's profile has.

Checked, on the current main: test_nsp_dump.py (a dump with only an update, and a dump with no profile surveyed until its 32-bit NPDM stops it) and test_profile_guess.py (the pool and the variant) pass with Python 3.14, as do test_nsp_scan.py and test_nsp_romfs.py. Before the rebase, the script built Fire Emblem Fortune's Weave from its dump on the Mac, survey and provisional profile included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added 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 labels Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant