Skip to content

Switch 2 (1/8): read a game folder in NXCore - #603

Merged
v0lumehi merged 2 commits into
mainfrom
v0lumehi/switch2-wiring
Nov 3, 2026
Merged

v0lumehi merged 2 commits into
mainfrom
v0lumehi/switch2-wiring

Conversation

@v0lumehi

@v0lumehi v0lumehi commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Fix or feature

  • Fix
  • 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 to main, so until #598 merges this diff also shows #598's commit. Review only commit 11486001 here, 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 GameFolder in NXCore and nothing calls it yet. It reads a folder with the rules of the engine's pack_dump.py (is_dump, scan) and build_ipa_from_nsp.py (dump_folder): the title ID from the ACI0 program ID in base/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.py present, a profile for the title ID, and the profile's name. It reads only names and the first bytes of main.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 sdk module (spec: Ounce). Five profiles: Donkey Kong Bananza 040074A01BF12000, Splatoon Raiders 0400380020056000, Fire Emblem Fortune's Weave 04007EF01F8AE000, Pokémon Pokopia 0400A3A01EE4C000, Hyrule Warriors: Age of Imprisonment 04003F40232DE000. 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 .nup file, or a folder that holds one (pack_nup.py, new in 641d148). Neither needs prod.keys, and both build only a game with a profile. The script's stages are pack <version>, pack DLC and unpack <version>. zstd for NUPs is already in the launcher's Python probe (Toolchain.swift: compression.zstd or backports.zstd).

What blocked a Switch 2 game in the launcher, and where it is fixed in this stack:

Gap Fixed in
A game folder is walked like a folder of packages (8,000 entries, then "No NSP/XCI") this PR (reader), PR 2 (wiring)
The keys row is required, and -k is always passed PR 2
Staging, the work folder and the app name come from the base package's file name PR 2
No message when the engine lacks the packer or a profile for the game PR 2 (before the build), PR 3 (the script's own stop)
The stages pack <version>, pack DLC, unpack <version> show in English PR 3
No Switch 2 mark, no note about how far the support goes PR 4
The library scan does not find a game folder or a NUP PR 4, PR 6
The new "keys older than the game" stop of the engine has no failure row PR 5
A .nup file is not accepted anywhere PR 6
The Qt launcher has none of this PR 7
GAMES.md and the README say nothing about Switch 2 PR 8

Not built, and why:

  • iOS shell. Nothing in the shell blocks a Switch 2 game: the manifest, romfs.id and the settings rows work the same. A "Switch 2" mark or a memory warning there needs a field in game.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.
  • A machine-readable Switch 2 marker. No profile key says Switch 2. The launcher reads the profile's first line, which says it for all five (PR 4). Upstream keys console and tested (Switch 2 games: what nxnative supports now and how the launcher integrates it #445 step 6) would be better. Not done here.
  • Blocking iPhone and iPad for Switch 2. I did not block them: Bananza ran on an iPhone. The Builds page says they are barely tested (PR 4).
  • Onboarding. The first-run flow still asks for keys. A Switch 2 only player can skip that step. Not changed.

Checked

  • Tests: cd frontend && swift test passes. New: GameFolderTests (the layout, each refusal, the DLC rules, the engine checks).
  • Test for a fix: not a fix.
  • Visual QA: no view changes in this PR.
  • Run on a device or Mac: not run. Nobody here has a Switch 2 dump, and I have no keys or game files. The rules follow the engine's code at 641d148.

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
  • A change to a launcher view has before and after screenshots above
  • No keys, game files or data extracted from a game in the change or the attachments

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.
@v0lumehi v0lumehi added this to the v1.1.0 milestone Nov 3, 2026
@v0lumehi v0lumehi added enhancement New feature or request launcher The NX2Apple launcher app mac Mac labels Nov 3, 2026
@v0lumehi
v0lumehi changed the base branch from v0lumehi/engine-bump-1.1.0 to main November 3, 2026 18:11
@v0lumehi
v0lumehi added this pull request to stack #611 November 3, 2026 18:11
@v0lumehi
v0lumehi merged commit 52df32e into main Nov 3, 2026
16 checks passed
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]>
@v0lumehi
v0lumehi deleted the v0lumehi/switch2-wiring branch November 20, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request launcher The NX2Apple launcher app mac Mac

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant