Repository navigation
Mac app carries the launcher settings; shader_split.py reports its progress - #352
Conversation
…gress go to seedds The launch-settings list for the Mac app (settings.py, settings.tsv, pack_app.py --settings, its step in the NSP script) and the shader split's progress lines are engine changes. The fork takes those files from upstream on every sync (build_ipa_from_nsp.py and shader_split.py are patch carriers, checked for drift), so carried here they would block the sync or be reverted by it. They are proposed upstream instead (seedds/nxnative#352), and come back with the sync once merged. The launcher works without them: an app without dm/launcher.json shows no launch options, and a step without a count shows its stripes and its clock.
e221f2a to
5769477
Compare
The IPA carries dm/launcher.json, the game's settings from settings.tsv, which the iOS launcher draws its screen from. The Mac app had no such list, so a Mac front end could not offer a game's settings. The NSP script now writes the Mac app's list (settings.py with SETTINGS_PLATFORM=mac) and pack_app.py --settings puts it at Contents/Resources/dm/launcher.json. The two settings only the iOS front end reads (the frame-rate counter in front_ios.m, touch feedback in DmGamepad.m) are marked platform:ios, a new condition in settings.tsv, and left out of the Mac list; build_ipa.sh keeps the iOS list as it was (ios is the default).
The shader split printed nothing until it ended, so the NSP script showed the stage as a spinner although shader_split.py knows how many files and archive ranges it hands to its pool. It now prints 'progress: done/total' at most twice a second, which split_shaders forwards as the stage's count. The count is of the jobs finished in any order: pool.map yields in job order, so counted that way it would stand still behind one slow archive range while the other workers go on. The jobs are submitted as futures and the results are still collected in job order, so the tables do not change (checked against the previous version on Breath of the Wild's packs).
5769477 to
28c60fe
Compare
#35 Display mode: Window or Fullscreen for a Mac game, under the render scale. The host starts fullscreen when DM_FULLSCREEN is set at all (front_mac.m), so Window leaves the variable out instead of setting it empty. A list from settings.tsv will carry the row once it has a platform condition (seedds/nxnative#352); until then the launcher adds it to a list that has none. #36 Render scale in pixels: with the game's base size, the row shows 0.75 as 1200x675 and says what it is a share of ("75% of 1600x900 docked"), for the console mode chosen (1280x720 handheld for Breath of the Wild). The base size comes from the row's base (seedds/nxnative#399: a profile's render_base, written by settings.py), else from the game's profile in the repository, so apps packed before still show pixels. A game without one keeps the percentage. Play goes through the same list, so Display mode reaches the app. LaunchOptionsTests: Display mode's place and its unset Window, the pixels docked and handheld from the profile, and the percentage without a base size.
|
Local review and validation of
Full local regression command: python3 scripts/regress.py --root /Volumes/S790/nx-harness --games-dir /Volumes/S790/nsp check --baseline 75065df74762d8277c4a93277d560429c2d43a7e --candidate 28c60fef7e7e09d2539a46a3d5bb2259a8e1765e --jobs 4 --out /private/tmp/nx352-regress-reportStatus: stopped before the first game comparison; no game comparison or gameplay pass claimed. The harness detected 29 Mac builds; none has a committed smoke route. Their NVN maps contain roughly 437,000 shader rows in total, and the run was rebuilding the first baseline despite the unchanged chain. Game-derived outputs remain in each game's external-drive work folder. The maintainer explicitly chose to merge after the focused checks and document this full-run limitation; the baseline rebuild was stopped on that basis. There is no completed full-game regression report. |
Mac launcher metadata inherited the iOS defaults for Metal 4 pipelines and deferred encoding. A frontend applying those values could disable the Mac pipeline archive and enable its normally disabled encode thread. Resolve ios|mac defaults in the shared table before profile macros, and check both native defaults across profiles with Metal 4 on and off. Release the shader-progress test's blocked worker directly from the observed progress line, with bounded failure and executor cleanup. Document and test argparse's exit 2 and stderr-only error path before JSON progress starts. Record the metadata finding in the packing reference and Wonder's note. Follow-up to #352 and #387. Co-authored-by: v0lumehi <[email protected]>
|
The review follow-up is on main in 6138a54, co-authored with v0lumehi. Mac metadata now matches the native host: Metal 4 pipelines default on, and the encode thread defaults off. The progress test now releases its blocked worker directly when it observes Validation on this follow-up:
The host and shader chain are unchanged. The maintainer's explicit full-game/shader-rebuild waiver remains in effect; no new gameplay pass or completed full-game regression is claimed. The impact tool's runtime manifests do not capture frontend consumption of metadata, so its zero-match result is not evidence that Mac apps are unaffected. regress.py impact HEAD^..HEADregress.py impact
|
| game | status | what it uses of the change (kind: name ×count; for broad, the broad rows) |
|---|---|---|
Hades 0100535012974000 |
not affected | |
The Legend of Zelda: Breath of the Wild 01007EF00011E000 |
not affected | |
Pokémon Scarlet 0100A3D008C5C000 |
not affected | |
The Legend of Zelda: Tears of the Kingdom 0100F2C0115B6000 |
not affected |
Unknown (no usage.tsv): 77 profiles (--all lists them).
Why
profile← dm/games/settings.py: one game's profileprofile← dm/games/settings.tsv: one game's profile
…ON Schema front ends read Draft for the discussion in seedds#388. Two open PRs want the ninth column of settings.tsv for different things (seedds#355: needs, seedds#399: level), and seedds#379 brings its own metadata. This makes the ninth column one optional meta column of key=value pairs, so any number of optional fields fit: - settings.py's META lists the keys with the pattern each value must match (level=basic, needs=<VAR>=<value>); an unknown key, a key given twice, a value that does not match, or needs naming a variable no row sets stops settings.py. The fields go into the row of launcher.json. - launcher.json gets "schema": 1. Schema 1 grows only by optional fields: a reader ignores fields it does not know, and a field keeps its meaning. docs/launcher.schema.json describes the file as a JSON Schema, so a front end can check it and generate types from it. - The five settings a front end shows first carry level=basic, and Rumble strength carries needs=DM_RUMBLE=1, as seedds#355 has it. The platform split stays the shown column's platform:<ios|mac> (seedds#352). test_launcher_settings.py: the fields and the version in a written list, the strict meta parsing, META agreeing with docs/frontends.md and the schema, and every list written for Breath of the Wild, Wonder and Hades (iOS and Mac) conforming to the schema (a small validator for the keywords the schema uses, as CI has no jsonschema package). test_docs, test_lint_python, test_launcher_storage, test_nsp_mac_app and test_pso_offline pass.
The Mac .app now shows the launcher settings from dm/games/settings.tsv before it starts dmhost: a Basic view with an Advanced settings disclosure, resolution in real pixels, and a Window / Fullscreen row. Skip it with the check box, --no-launcher or DM_LAUNCHER=0; hold Option to show it again. Builds on seedds#352.
Mac app carries the launcher settings; shader_split.py reports its progress
Mac launcher metadata inherited the iOS defaults for Metal 4 pipelines and deferred encoding. A frontend applying those values could disable the Mac pipeline archive and enable its normally disabled encode thread. Resolve ios|mac defaults in the shared table before profile macros, and check both native defaults across profiles with Metal 4 on and off. Release the shader-progress test's blocked worker directly from the observed progress line, with bounded failure and executor cleanup. Document and test argparse's exit 2 and stderr-only error path before JSON progress starts. Record the metadata finding in the packing reference and Wonder's note. Follow-up to seedds#352 and seedds#387. Co-authored-by: v0lumehi <[email protected]>
…ON Schema front ends read Draft for the discussion in seedds#388. Two open PRs want the ninth column of settings.tsv for different things (seedds#355: needs, seedds#399: level), and seedds#379 brings its own metadata. This makes the ninth column one optional meta column of key=value pairs, so any number of optional fields fit: - settings.py's META lists the keys with the pattern each value must match (level=basic, needs=<VAR>=<value>); an unknown key, a key given twice, a value that does not match, or needs naming a variable no row sets stops settings.py. The fields go into the row of launcher.json. - launcher.json gets "schema": 1. Schema 1 grows only by optional fields: a reader ignores fields it does not know, and a field keeps its meaning. docs/launcher.schema.json describes the file as a JSON Schema, so a front end can check it and generate types from it. - The five settings a front end shows first carry level=basic, and Rumble strength carries needs=DM_RUMBLE=1, as seedds#355 has it. The platform split stays the shown column's platform:<ios|mac> (seedds#352). test_launcher_settings.py: the fields and the version in a written list, the strict meta parsing, META agreeing with docs/frontends.md and the schema, and every list written for Breath of the Wild, Wonder and Hades (iOS and Mac) conforming to the schema (a small validator for the keywords the schema uses, as CI has no jsonschema package). test_docs, test_lint_python, test_launcher_storage, test_nsp_mac_app and test_pso_offline pass.
Mac app carries the launcher settings; shader_split.py reports its progress
Mac launcher metadata inherited the iOS defaults for Metal 4 pipelines and deferred encoding. A frontend applying those values could disable the Mac pipeline archive and enable its normally disabled encode thread. Resolve ios|mac defaults in the shared table before profile macros, and check both native defaults across profiles with Metal 4 on and off. Release the shader-progress test's blocked worker directly from the observed progress line, with bounded failure and executor cleanup. Document and test argparse's exit 2 and stderr-only error path before JSON progress starts. Record the metadata finding in the packing reference and Wonder's note. Follow-up to seedds#352 and seedds#387. Co-authored-by: v0lumehi <[email protected]>
Update (2026-10-27): rebased on
main75065df. The Mac app now takes the RomFS asrfs.source(game)(the streamed images from e09ff95), and the split's progress sits beside the new unreadable-file handling (5623c9a). Launcher, Mac app, incremental and split-progress tests pass, the lint ratchet reports 0 new. NX2Apple's launch options already read thislauncher.json(its front end README), and #387 documents it for front ends.Two small pipeline changes that a Mac front end needs, kept apart from any UI so they hold for the command line too.
Mac app: the launcher settings go into the app, as in the IPA
The IPA carries
dm/launcher.json(settings.pyfromsettings.tsv), which the iOS launcher draws its screen from. The Mac app had no such list, so a Mac front end could not offer a game's settings.settings.pywithSETTINGS_PLATFORM=mac), andpack_app.py --settingsputs it atContents/Resources/dm/launcher.json.front_ios.m) and touch feedback (DmGamepad.m), are marked with a new conditionplatform:iosinsettings.tsvand left out of the Mac list. Every other row is read by the Mac host as well (checked:DM_FPS_TARGET,DM_RENDER_SCALE,DM_OPMODE,DM_PRESENT_UPSCALE,DM_LANG,DM_RUMBLE*,DM_PRESENT_SNAP,DM_PSO_*,DM_NVN_ENC_THREAD,DM_FPS_HOLD,DM_METAL_HUD).build_ipa.shis unchanged:iosis the default, so the IPA's list stays as it is.dm/games/README.mdanddocs/settings.mdsay where the Mac list is.shader_split.py: report its progress, counting jobs as they finish
The shader split printed nothing until it ended, so its stage was a spinner for minutes, although
shader_split.pyknows how many files and archive ranges it hands to its pool.progress: done/totalat most twice a second, whichsplit_shadersforwards as the stage's count (files).pool.map's order it would stand still behind one slow archive range (Breath of the Wild'sBootup_Graphics.pack) while the other workers go on. The jobs are submitted as futures; the results are still collected in job order, so the tables do not change. Checked on Breath of the Wild's three shader packs and 200 event packs: the package and the four tables are byte-identical to the previous version's.Tests
test_launcher_settings.py(theplatform:condition),test_nsp_mac_app.py(--settings,launcher.jsonin the bundle, the NSP script's command line),test_nsp_incremental.py, and a newdm/gfx/tests/test_shader_split_progress.py(a slow first job does not hold the count; batches and an offset count every job once; the results keep the job order).test_docs.pypasses.Context
These come from the Mac launcher I worked on for the NX2Apple fork (a library of the built games with Play and per-game launch options from this list; LNPANDY/NX2Apple#27). Upstreaming them here means the fork does not have to carry engine changes, and any front end can use them.