Repository navigation
Switch 2 (1/8): read a game folder in NXCore - #603
Merged
Merged
Conversation
A Switch 2 game comes as a folder of its files (base/, updates/<version>/, dlc/<title ID>/), not as NSP or XCI. GameFolder reads it with the rules of the engine's pack_dump.py and build_ipa_from_nsp.py: the title ID from main.npdm, the updates and DLC, and the first reason the script would refuse the folder, with the missing piece named. Nothing calls it yet.
5 of 6 tasks
This was referenced Nov 3, 2026
4 of 6 tasks
v0lumehi
pushed a commit
that referenced
this pull request
Nov 4, 2026
The seven texts of the Switch 2 games (#603-#607) came in as a machine translation with "motore". The rest of it.json says "engine" (l'engine, masculine), as chosen in #528, so the app used two words for one thing. Now "engine" is the word in all 36 texts that name it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Fix or feature
Part of #445 and #512. Both maintainers want Switch 2 support in v1.1.0. This is the bottom of stack #611 (8 PRs). It sits on the engine bump #598 (pin
641d1480021a), which the NUP part needs. The stack tool set this PR's base tomain, so until #598 merges this diff also shows #598's commit. Review only commit11486001here, and merge #598 first.What and why
A Switch 2 game does not come as NSP or XCI. It comes as a folder of its files (
base/,updates/<version>/,dlc/<title ID>/) or, with the new pin, as one NUP file. The launcher only knew packages, so a Switch 2 folder showed "No NSP/XCI in this folder" (#512).This PR adds
GameFolderin NXCore and nothing calls it yet. It reads a folder with the rules of the engine'spack_dump.py(is_dump,scan) andbuild_ipa_from_nsp.py(dump_folder): the title ID from the ACI0 program ID inbase/exefs/main.npdm, the update versions, the DLC folders. It returns the first reason the script would refuse the folder, with the missing piece named. It also has the engine checks the next PRs use:scripts/pack_dump.pypresent, a profile for the title ID, and the profile's name. It reads only names and the first bytes ofmain.npdm, never game data.What I found (the gap list)
I read #445, #417 and #512, upstream at
641d148(README,scripts/build_ipa_from_nsp.py,pack_dump.py,pack_nup.py, the five Switch 2 profiles) and the facts the engine bump wrote in #598. #265 does not exist in this repository.What the engine has. There is no Switch 2 switch, setting or profile key. A Switch 2 game is an ordinary profile, and the host sees it from the
sdkmodule (spec: Ounce). Five profiles: Donkey Kong Bananza040074A01BF12000, Splatoon Raiders0400380020056000, Fire Emblem Fortune's Weave04007EF01F8AE000, Pokémon Pokopia0400A3A01EE4C000, Hyrule Warriors: Age of Imprisonment04003F40232DE000. Upstream says all play on the Mac and iPhone and iPad are untested. Splatoon Raiders' note says its memory layout is over iOS's limit for now. @LNPANDY played Bananza once on an iPhone 17 Pro Max from the command line (#445). Input: a folder of files (pack_dump.py, already in our old pin) or one.nupfile, or a folder that holds one (pack_nup.py, new in641d148). Neither needsprod.keys, and both build only a game with a profile. The script's stages arepack <version>,pack DLCandunpack <version>.zstdfor NUPs is already in the launcher's Python probe (Toolchain.swift:compression.zstdorbackports.zstd).What blocked a Switch 2 game in the launcher, and where it is fixed in this stack:
-kis always passedpack <version>,pack DLC,unpack <version>show in English.nupfile is not accepted anywhereNot built, and why:
romfs.idand the settings rows work the same. A "Switch 2" mark or a memory warning there needs a field ingame.manifest.json, which the engine writes (patch 0050), so that is engine work. I note it in Switch 2 games: what nxnative supports now and how the launcher integrates it #445.consoleandtested(Switch 2 games: what nxnative supports now and how the launcher integrates it #445 step 6) would be better. Not done here.Checked
cd frontend && swift testpasses. New:GameFolderTests(the layout, each refusal, the DLC rules, the engine checks).641d148.Screenshots
None, no visible change.
Scope
dm/,scripts/,docs/,ref/) is added to the repository: a change there is a patch inpatches/(a commit inengine/, thentools/engine.py export, andtools/engine.py checkpasses), with itsUpstream-Statusforwarded seedds/nxnative#..., orpendinguntil that PR is open