Repository navigation
Conversation
…ves its title ID from its own meta NCA title_of took the title ID only from the ticket's file name or a [title ID] tag in the file name. An NSP without a ticket (a standard-crypto dump, a repack) and without a tag ended the scan with 'no NSP with a readable title ID', although the keys open it. With neither, title_of now asks nx_extract --title, which reads the meta NCA's header (header_key) and prints the lowest title ID. NSP, NSZ, XCI and XCZ all work. The ticket and the tag keep their precedence and cost nothing more.
This was referenced Oct 29, 2026
NSP script: read the title ID from the package when it has no ticket and no tag
LNPANDY/NX2Apple#217
Merged
seedds
added a commit
that referenced
this pull request
Oct 30, 2026
…ves its title ID from its own meta NCA (PR #666) title_of took the title ID only from the ticket's file name or a [title ID] tag in the file name. An NSP without a ticket (a standard-crypto dump, a repack) and without a tag ended the scan with 'no NSP with a readable title ID', although the keys open it (LNPANDY/NX2Apple#177). With neither, title_of now asks nx_extract --title, which reads the meta NCA's header (header_key) and prints the lowest title ID. NSP, NSZ, XCI and XCZ all work. The ticket and the tag keep their precedence and cost nothing more. On landing: nx_extract's usage lists --title; without dotnet the reader stops with a BuildError that says what to do instead of a Python traceback (tested); the reference entry links Tears of the Kingdom's note, which lists it under "Found on this game". Co-authored-by: v0lumehi <[email protected]>
Owner
|
Thank you @v0lumehi, this is landed on main as 85578fc, with you as co-author. Reading the title ID from the meta NCA is the right fix, and it applies to every game. I checked it on real packages: base, update and DLC NSPs, two XCIs, and ticketless DLC packages behind untagged names. Three small additions on landing:
Closing since it went in as a separate commit. |
ZhaowTao
added a commit
to ZhaowTao/nxnative
that referenced
this pull request
Nov 7, 2026
…off (Persona 5 Royal) A program's shader libraries are loaded in the background as soon as the game makes the program (nvn_mtl.m mtl_prog_prefetch, from nvnProgramSetShaders), whether or not a draw uses them. It had a switch, DM_NVN_PREFETCH=0, but no front end could offer it: dm/ios/Sources/player_env.h filters the DM_NVN_ prefix as a diagnostic, so it cannot be saved from Documents/env.txt either. On iOS a loaded library is a mapping the process keeps for good: NvShader holds the MTLFunction, the function holds the library, and the shader table keeps the shader by key. A game with a very large shader tree fills the process's mapping limit that way and is ended with vnode-limit. Persona 5 Royal is 24,826 pipelines, 88,792 metallib and 30,646 json (119,439 files, 1.3 GB) and was ended after 60-100 s in every configuration tried on an iPhone 17 Pro, while Breath of the Wild (4,829 pipelines) and Rhythm Heaven Groove (100 metallib) run for hours on the same device and build (LNPANDY/NX2Apple#665, seedds#666). Off, one run held 30 fps for 34 minutes: 61,200 presents, p50 33.34 ms, 1,773 MiB, 410,000 audio callbacks with no underrun, no crash; with it on the same build aborted in a prefetch worker at 5 min 33 s. - settings.tsv gains the row for every NVN game, in Performance, with the iOS default from the profile and the Mac default on (the shape DM_PSO_MTL4 has). - player_env.h carries the exception DM_NVN_ENC_THREAD already has, so a player build keeps the launcher's value. - game.py takes the profile key nvn_prefetch (on / off) and writes DM_GAME_NVN_PREFETCH, which settings.py resolves as the iOS default. - Persona 5 Royal's profile sets it off, so a player never has to find the row. - The test covers the row's graphics API, both platforms' defaults and the Mac. Off bounds nothing by itself: the mappings still grow, from what is drawn instead of what is in the program, and a long session still ends somewhere. The prefetch staying unbounded is seedds#665's subject.
Know-It-All-Brother
pushed a commit
to Know-It-All-Brother/nxnative
that referenced
this pull request
Nov 9, 2026
…ves its title ID from its own meta NCA (PR seedds#666) title_of took the title ID only from the ticket's file name or a [title ID] tag in the file name. An NSP without a ticket (a standard-crypto dump, a repack) and without a tag ended the scan with 'no NSP with a readable title ID', although the keys open it (LNPANDY/NX2Apple#177). With neither, title_of now asks nx_extract --title, which reads the meta NCA's header (header_key) and prints the lowest title ID. NSP, NSZ, XCI and XCZ all work. The ticket and the tag keep their precedence and cost nothing more. On landing: nx_extract's usage lists --title; without dotnet the reader stops with a BuildError that says what to do instead of a Python traceback (tested); the reference entry links Tears of the Kingdom's note, which lists it under "Found on this game". Co-authored-by: v0lumehi <[email protected]>
lucaszhongsj
pushed a commit
to lucaszhongsj/nxnative
that referenced
this pull request
Nov 19, 2026
…off (Persona 5 Royal) A program's shader libraries are loaded in the background as soon as the game makes the program (nvn_mtl.m mtl_prog_prefetch, from nvnProgramSetShaders), whether or not a draw uses them. It had a switch, DM_NVN_PREFETCH=0, but no front end could offer it: dm/ios/Sources/player_env.h filters the DM_NVN_ prefix as a diagnostic, so it cannot be saved from Documents/env.txt either. On iOS a loaded library is a mapping the process keeps for good: NvShader holds the MTLFunction, the function holds the library, and the shader table keeps the shader by key. A game with a very large shader tree fills the process's mapping limit that way and is ended with vnode-limit. Persona 5 Royal is 24,826 pipelines, 88,792 metallib and 30,646 json (119,439 files, 1.3 GB) and was ended after 60-100 s in every configuration tried on an iPhone 17 Pro, while Breath of the Wild (4,829 pipelines) and Rhythm Heaven Groove (100 metallib) run for hours on the same device and build (LNPANDY/NX2Apple#665, seedds#666). Off, one run held 30 fps for 99,600 frames (about 55 minutes) with the switch in Documents/env.txt, the path a player takes: no jetsam, no vnode-limit, no argument buffer abort. 34 minutes / 61,200 presents was the same switch set as a launch environment; with it on the same build aborted in a prefetch worker at 5 min 33 s. - settings.tsv gains the row for every NVN game, in Performance, with the iOS default from the profile and the Mac default on (the shape DM_PSO_MTL4 has). - player_env.h carries the exception DM_NVN_ENC_THREAD already has, so a player build keeps the launcher's value. - game.py takes the profile key nvn_prefetch (on / off) and writes DM_GAME_NVN_PREFETCH, which settings.py resolves as the iOS default. - Persona 5 Royal's profile sets it off, so a player never has to find the row. - docs_patches.py classifies the new key (`game` to `host`, memory), or it exits on a switch it cannot classify and `tools/engine.py sync` fails once the patches apply. The generated docs/agents/game-patches.md is left alone: on this pin the generator's own profile-switch table is down to one row (game.py's header_one split left `switches()` reading the four lines of header()), so a hand-edit would fight the next regeneration. - The test covers the row's graphics API, both platforms' defaults and the Mac. The tests pass (17 in test_launcher_settings.py). Off bounds nothing by itself: the mappings still grow, from what is drawn instead of what is in the program, and a long session still ends somewhere. Upstream-Status: forwarded seedds#1209 Reason: Persona 5 Royal fills the iOS mapping limit and is ended after 60-100 s; the prefetch switch existed but no front end could reach it, and the game ships it off in its profile Issue: LNPANDY/NX2Apple#665
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.
What and why
An NSP with no ticket (a standard-crypto dump, a repack) and no
[0100…]tag in its file name ended the build with[RED] no NSP with a readable title ID, although the keys open the package.title_ofread a title ID only from the ticket's file name or from a tag in the package's file name. Renaming the file with its title ID worked around it, which pointed at the cause.With neither,
title_ofnow reads the title ID from the package:nx_extract <prod.keys> --title <package>opens it, decrypts each meta NCA's header with the keys'header_keyand prints the lowest title ID (the base game's before its update's or a DLC's). The ticket and then the tag keep their precedence and cost what they did, since the fallback runs only when both are missing. NSP, NSZ (the meta NCA is not compressed), XCI and XCZ take the same path.nx_extractis built into a temporary folder for it, because the build folder is named after the title ID. No key value is printed.Reported in LNPANDY/NX2Apple#177 by @ericklobet-beep. @1upbyte's rename of the file pointed at the cause. Reference entry: docs/reference/packing.md.
Checked
dm/tools/tests(612 tests, OK, 17 skipped).test_nsp_scan.pygains tests for the precedence (ticket, tag, package, the reader is never called when a ticket or tag names the package), forscan_nspswith ticketless untagged base, update and DLC packages, for the unchanged[RED]stop when nothing reads, and for the reader's command line and output handling. The reader's C# side needs real keys, so the tests stub it at its boundary and do not exercise it./Volumes/NX/keys/prod.keys,nx_extract --titleprinted the right title ID for the Tears of the Kingdom base NSP (no ticket in it), its update, three Hades and Smash packages including a DLC, and the Smash and Batman NSZ files. Through symlinks without a tag,title_ofreturned None for the ticketless base andscan_nspswith the reader resolved base and update to0100F2C0115B6000. No XCI or XCZ was at hand, they go through the sameOpenNspcode.dm/tools/lint_python.pyreports 0 new findings.Docs
docs/reference/packing.mdentry, andpython3 dm/tools/docs_symptoms.pywas run (the symptom index)