Skip to content

Restore the Metal HUD option in Mac app builds - #376

Open
thehobbit85 wants to merge 1 commit into
seedds:mainfrom
thehobbit85:codex/mac-bundle-show-fps
Open

thehobbit85 wants to merge 1 commit into
seedds:mainfrom
thehobbit85:codex/mac-bundle-show-fps

Conversation

@thehobbit85

@thehobbit85 thehobbit85 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Mac apps use the resolved FPS build option as the Metal HUD default. One DM_METAL_HUD row and one preference store remain; saved/window choices and explicit environment values keep precedence.

Rebased 25d50ee5c115e9996e182bc29d4d0910fe606919 onto 90b7cefd1d572ab05859c73930b436c4040cd25c, producing 09357d9e0439e95b8ac53215ded1e660d57ef1e8. The launch conflict keeps main's cloud-save setup and DM_SYSTEM_DIR while applying the build default after choices. The packer integration retains main's prebake option and propagation. Removing only the three HUD-default lines from launcher.c reproduces main exactly. The earlier shared-settings feedback is addressed by the existing schema1/store and Mac-only HUD row.

Fresh exact-head validation: 95 tests passed, zero skips, using native Python3.14.6 and Xcode27.2/Metal.922: test_nsp_mac_app, test_launcher_settings, test_docs. These compile and sign temporary synthetic apps, verify the HUD default reaches the stand-in host, saved/env-file/process overrides, reuse invalidation, settings and current prewarm packing. They do not establish visual HUD or gameplay behavior. Pinned Python lint passed321/321, zero new/stale. Generated symptoms, full remaining diff/range-diff, ancestry, source preservation and whitespace checks passed.

Impact is the Mac-app pack/launch path for every graphics API; Z-A is the reported HUD use case. No shader translation, game rebuild or launch was required for this metadata/default change. Visual Metal HUD/menu interaction and real-game/device coverage remain unavailable. No game was signed or installed. Remote CI is separate; local checks do not establish its current-head status.

Historical description, validation limitations and original commit context

Mac apps use the resolved FPS build option as the Metal HUD default. The launcher still uses one settings store and one DM_METAL_HUD row. Saved or window choices and explicit environment values retain precedence.

Current rebase

25d50ee5c115e9996e182bc29d4d0910fe606919 rebases 2a03d5293ae56d968de645596b12d7e72ac82ccf directly onto main bbea4c90f136f478e25228bc3d4ab33c77420f2e. The conflicts were confined to the packing reference and generated symptom index. Both the new shader package/key mismatch entry and the HUD entry remain. The feature patch and original commit message are unchanged. Main's Bluetooth usage permission and save-sync capability are preserved.

Current validation

  • 139 focused tests passed, zero skips, on 82b0ebc6 with native arm64 Python 3.14.6 and Xcode 27.2 (27B52). Main then advanced with a Star Fox texture-copy and documentation change. Those changes leave the tested launcher and Python sources unchanged. All six docs tests passed on the final head. Ran the native Mac app saved-choice and HUD environment-override tests, Mac app reuse and CLI fixtures, NSP Mac/incremental suites, and documentation tests. Generated symptoms and git diff --check passed.
  • Pinned Python lint reported 339 findings against 336 baseline entries, three new findings and zero stale. All three are in the unchanged main dmsh_build.py HMMA scan. The diagnostic log matches the isolated exact-main check on 5e1c1aec, whose Python and lint inputs are unchanged on bbea4c90. The lint baseline is unchanged.

The static impact scan gives four broad packer matches and 149 profiles without manifests. Hades, Breath of the Wild, Scarlet and Tears of the Kingdom represent the shared bundle path. A visual HUD/menu check and gameplay remain outstanding.

Front-ends: interface: --show-fps and --no-show-fps also choose the Mac app HUD build default. Explicit DM_METAL_HUD and saved choices retain precedence.

Prior description, validation and original commit context

Earlier results below apply to their named revisions and environments.

The Mac app now carries the resolved FPS option as its Metal HUD default. The launcher's existing settings store and one DM_METAL_HUD row remain the source of saved choices. Explicit environment values and saved or window choices retain precedence.

Current rebase

2a03d5293ae56d968de645596b12d7e72ac82ccf rebases 2e25eae954f48532d5a40038b17b37cf4523ac5f directly onto main 413e8808e0799eab8730688f082835aeeaca84c5 with the original feature commit and message. The packer and developer guide combine DMShowFPS with main's Bluetooth usage permission and save-sync capability. Removing just the HUD additions restores the exact main packer, including shader-image handling, multi-program packing and reuse. The symptom index was regenerated. The existing shared-schema response to #388 still applies.

Current validation

  • 145 focused tests passed with native arm64 Python 3.14.6, Xcode 27.2 (27B52), and macOS SDK 27.2. Command python3 -B -m unittest -v dm.tools.tests.test_nsp_mac_app dm.tools.tests.test_launcher_settings dm.tools.tests.test_settings dm.tools.tests.test_shader_lib dm.tools.tests.test_nsp_mac dm.tools.tests.test_docs. The temporary Mac app fixtures compile the real C and Swift launcher and exercise the HUD setting, environment and saved choice precedence, archive layout, and save-sync plist flag.
  • Pinned Python lint reports 339 findings against 336 baseline entries and zero stale entries. Its three excess findings in unity_bucket.py reproduce with identical diagnostics on isolated exact main. The lint baseline is unchanged. Generated docs and git diff --check passed.

Static impact reports four broad packer matches and 149 profiles without usage manifests. Hades, Breath of the Wild, Scarlet and Tears of the Kingdom represent the affected bundle and settings paths. Current validation is synthetic. A visual HUD/menu check, gameplay, and iOS device validation remain outstanding.

Front-ends: interface: --show-fps and --no-show-fps also choose the Mac app HUD build default. Explicit DM_METAL_HUD and saved choices retain precedence.

Prior description, validation and original commit context

The earlier results below apply to their named revisions and environments.

Rebased onto main 865cc35fad7034d17c2190f8ce349f61f5bcaba1; exact candidate 2e25eae954f48532d5a40038b17b37cf4523ac5f. Main still lacks the Mac bundle's FPS build default. The prior #388 shared-settings feedback is addressed by the existing single schema/store and single DM_METAL_HUD row; this adds no parallel preference store. Saved/window choices and explicit environment overrides retain precedence.

The packer conflict combines this PR's HUD-default write with main's new shader-library image path (copy_msl). Removing only the original HUD comment/plist/settings-default/CLI additions yields byte-for-byte main pack_app.py, including image selection, subset copying, reuse and multi-program behavior. Range-diff changes only the adjacent upstream archive-copy context. Canonical build/reference docs and game finding links are retained; the symptom index was regenerated.

Fresh validation on this exact candidate (native Python 3.14.6 arm64, Xcode 27.2/27B52, macOS SDK 27.2):

  • DM_GAME=010015100B514000 DOTNET_ROOT=/usr/local/share/dotnet /opt/homebrew/bin/python3 -B -m unittest -v dm.tools.tests.test_nsp_mac_app dm.tools.tests.test_shader_lib dm.tools.tests.test_launcher_settings dm.tools.tests.test_settings dm.tools.tests.test_docs dm.tools.tests.test_nsp_mac dm.tools.tests.test_nsp_incremental: 213 tests passed, including all 19 native temporary-App cases, launcher C/Swift compilation, signatures, archive payloads, saved/environment precedence and incremental packaging.
  • Four additional production-packer/archive-reader fixture cases (compiler/icon/signing tools mocked) cover folder/image input × FPS off/on: image bytes, omitted sources, HUD default, unrelated raw settings/metadata and unchanged-input reuse all pass. git diff --check passes.
  • Initial sandboxed native suite stopped before tests at iconutil: Invalid Iconset. The same generated JPEG and unchanged icon path succeed outside the sandbox; the unchanged complete suite above then passed. This is an execution-environment failure, retained as such, rather than a product test pass.
  • Pinned Python ratchet reports 390 findings, 387 baseline and 3 new in unchanged dm/tools/tests/test_nso_match.py (six annotated reportIndexIssue locations, source blob 042bc4320b0d2a1c22bf296c9877ece03108fb51). Root ran the identical pinned interpreter on tracked-clean exact main 865cc35f: exit 1 with an identical log and zero stale baseline findings. This is an inherited main failure, not a green check; no unrelated source/baseline fix is included.

Static regress.py impact reports four broad profiles (Hades, Breath of the Wild, Scarlet, Tears of the Kingdom), 141 without usage manifests, and zero reached host entry points. The remaining feature affects Mac bundle/settings behavior across titles, not runtime host/chain/profile inputs. Synthetic app/packing fixtures exercise that integration; no gameplay, game shader rebuild or iOS device validation was performed, and a visual HUD/menu observation is not claimed. Earlier results and all original commit-message context remain historical below.

Front-ends: interface: --show-fps and --no-show-fps also choose the Mac app HUD build default; explicit DM_METAL_HUD and saved choices retain precedence.

Historical PR description and original commit context (preserved)

Refreshed onto main f8a5618d5f505a4c0a0bcac7c413872d3a53c009; candidate a86d8e9c3af722af1410a247ebb574cfb4818a5c. Main still does not forward the FPS build choice into the Mac bundle. This retains the shared settings schema/store, explicit environment and saved/window precedence, current Game Mode behavior, and multi-program packing.

The only conflict was the packing reference and its generated symptom index. Both main's shader-table diagnostics and this PR's Mac HUD finding are retained; the index was regenerated. The range-diff has documentation context changes only; feature sources are unchanged.

Fresh validation on this exact candidate: 152 focused packaging/settings/incremental/docs tests passed; Python ratchet passed (389 baseline findings, zero new and zero stale); git diff --check passed. Earlier 19 native temporary Mac-app tests are historical, not a fresh run: packer, Swift launcher/shared model, native launcher and relevant fixture/recipe inputs have identical blob IDs to tested head 642e84fc43c445a50864de816ad2463ed8c24a25 (the previous tested pre-squash tree is retained below). No game launch, shader rebuild, signing of game/device builds, or iOS validation was performed. Packaging/settings is the affected path for all Mac app titles; runtime host/chain/profile inputs did not change, so an additional gameplay campaign was not repeated. Prior runtime limitations remain below.

Front-ends: interface: --show-fps and --no-show-fps also choose the Mac app HUD build default; explicit DM_METAL_HUD and saved choices retain precedence.

Historical PR description and original commit context (preserved)

Restore the Metal HUD build default in Mac apps while retaining the existing shared settings row/store and explicit override precedence.

Current revision and validation

642e84fc43c445a50864de816ad2463ed8c24a25 is exactly one commit directly atop main 975bb4c14456d145eb3d969814534eecdd996ce9. The rebase preserves the net feature from e7eedf3f1c4f36a0aca130f5ce2faaca6a39eac9, including main's LSSupportsGameMode=False, multi-program/control parameters, HTML packaging and --seen-shaders. The pre-squash tested revision 89b99e59dca9fbb6f999fdb88c5125edb41bc2a8 has exactly the same tree (c028ee2380b3e3a468192cb8445098758ae7da27); squash changed history only. Range-diff and the complete main diff were reviewed.

  • 167 tests passed, no skips: 148 packaging/settings/docs/incremental checks plus the unchanged 19-test native temporary Mac app fixture. The latter verifies actual HUD defaults and process/player/bundled/saved override precedence, bundle layout, relocation and synthetic ad-hoc fixture signatures. No game/device build was signed or installed.
  • Commands: DM_GAME=010015100B514000 DOTNET_ROOT=/usr/local/share/dotnet python3 -m unittest -v over test_nsp_mac_app (non-App classes separately, then App), test_launcher_settings, test_docs, test_nsp_mac, and test_nsp_incremental.
  • Pinned Python lint fails on one inherited main finding: dm/games/settings.py B023, offered() closes over n (389 baseline, 1 new, 0 stale). This PR's entire settings.py blob is identical to main, proving attribution. No baseline increase or unrelated source fix is included. git diff --check, docs/generated index and parent/tree/count checks pass.
  • This reaches Mac app packing for every API; synthetic fixtures cover the bundle/launch mechanism. Renderer, shader profile/chain and lock are unchanged. Live HUD/menu visualization, game comparisons and gameplay remain unvalidated. Earlier shader/native/full-game results below remain historical; no cache was reused as current coverage.

The #388 feedback is respected through the stable DM_METAL_HUD key, existing launcher.json schema and preferences store; optional #780 metadata survives the HUD-default update. Canonical build docs and the Z-A durable finding/reference link are retained; there are no agent planning artifacts in this diff.

Front-ends: interface: --show-fps and --no-show-fps now also choose the Mac app HUD build default; explicit DM_METAL_HUD and saved choices retain precedence.

Earlier description and historical validation/feedback

This restores the Metal performance HUD default when packing a double-clickable Mac app. The NSP script forwards --show-fps / --no-show-fps; the bundle records the default and the existing DM_METAL_HUD settings row reflects it. Saved/window choices and process/player/bundled environment overrides retain precedence. No additional settings schema or preference store is introduced.

Current validation

Candidate e7eedf3f1c4f36a0aca130f5ce2faaca6a39eac9 rebases df6954efe3cbb588c9592eb6e484c00840bd6e38 onto main bd98317eecfe832b40d401219c15207a398e78dd. Both feature commits remain. The packer conflict keeps both main's LSSupportsGameMode and the HUD's DMShowFPS; AppleDouble filtering/signing behavior is retained. Documentation conflicts preserve both reference entries, and the symptom index is regenerated.

  • Fresh native arm64 run: 159 tests passed, zero skips, covering real synthetic Mac app packing/launcher execution, HUD defaults and override precedence, signing/relocation, shared launcher settings, incremental packaging and documentation. Command: DM_GAME=010015100B514000 DOTNET_ROOT=/usr/local/share/dotnet python3 -m unittest -v dm.tools.tests.test_nsp_mac_app dm.tools.tests.test_launcher_settings dm.tools.tests.test_docs dm.tools.tests.test_nsp_mac dm.tools.tests.test_nsp_incremental.
  • Pinned lint_python.py --against bd98317eecfe832b40d401219c15207a398e78dd: 391 baseline findings, zero new and zero stale. Source review confirms main's packing helpers and the shared settings model/store are unchanged; git diff --check, complete diff, range-diff and docs checks pass. No agent artifacts are in the diff. Canonical build docs and the Z-A durable finding/reference link remain in place; run evidence is here.
  • This reaches Mac app packaging for NVN, Vulkan and OpenGL games; synthetic app fixtures cover those bundle forms. Z-A is the reported HUD case. No host renderer, shader chain/profile, compiler lock or game files change. A live visual check of Apple's HUD/menu and gameplay remains unavailable in this pass. No runtime or shader comparison is claimed; historical results below apply to their stated revisions.

The earlier #388 feedback is addressed through the existing launcher.json, stable environment key and saved-choice store. #780's optional localization metadata remains compatible: this packer changes only the HUD row's default and preserves other JSON fields.

Earlier description and historical validation/feedback

Mac app packaging returns before the iOS-only SHOW_FPS resolution, so --show-fps never reaches the Mac host. Carry the resolved choice through DMShowFPS in the bundle to the startup DM_METAL_HUD default and the existing launcher HUD setting. --no-show-fps disables that build default; changing the choice invalidates bundle reuse. Process/environment-file values and saved/window choices retain their precedence.

The existing shared settings schema and choice store satisfy the settings-schema feedback. Main's runtime HUD-menu fix remains separate from this missing build/startup preference. The documentation explains the option and retains the open visual-validation limit; main's content-based archive key and shader-extraction reuse behavior are preserved.

Current revision. Commit df6954efe3cbb588c9592eb6e484c00840bd6e38 includes main e70fd69d5c828c906905991872c2eeead435dd4e. Main now checks the TXQ opcode match before indexing it. The fixture matches main byte for byte. Both launcher commits retain their original patches.

Local validation. On macOS with Xcode 27.2, the following command passed all 176 tests, including seven synthetic TXQ cases and Mac app packaging. Pinned Ruff and Pyright matched all 391 baseline findings, with zero new or stale findings.

DMSH_TEST_XLATE="$PWD/dm/gfx/tools/dmsh_xlate_bin/dmsh_xlate" python3 -B -m unittest dm.tools.tests.test_txq_type dm.tools.tests.test_docs dm.tools.tests.test_settings dm.tools.tests.test_launcher_settings dm.tools.tests.test_nsp_incremental dm.tools.tests.test_nsp_progress dm.tools.tests.test_nsp_mac dm.tools.tests.test_nsp_mac_app

GitHub checks for this commit

Earlier tests. Commit 52e45390ffe8cfe470d8c50007d5f17260a6a922 includes upstream main 1440a736860e45c7722f7bd803a0fc74ff62c69f. The packing reference now includes both the upstream Intel translator guidance and this PR’s launcher finding. The symptom index was regenerated from the combined documentation.

Local validation. On macOS with Xcode 27.2 (27B52), /opt/homebrew/bin/python3 -B -m unittest dm.tools.tests.test_docs dm.tools.tests.test_settings dm.tools.tests.test_launcher_settings dm.tools.tests.test_nsp_progress dm.tools.tests.test_nsp_incremental dm.tools.tests.test_nsp_mac dm.tools.tests.test_nsp_mac_app passed all 169 tests, including synthetic Mac app assembly.

GitHub checks for this commit

Earlier validation on 4c7d8ad681d3. python3 -m unittest dm.tools.tests.test_docs dm.tools.tests.test_settings dm.tools.tests.test_launcher_settings dm.tools.tests.test_nsp_progress dm.tools.tests.test_nsp_incremental — 101 tests passed.

Earlier local validation on 25b1a736ba8c. python3 -m unittest dm.tools.tests.test_docs dm.tools.tests.test_settings dm.tools.tests.test_launcher_settings dm.tools.tests.test_nsp_mac dm.tools.tests.test_nsp_incremental. All 99 tests passed. python3 -m unittest dm.tools.tests.test_nsp_mac_app passed all 47 cases. The packaged Mac app fixture also exercised its launcher, preference storage and environment propagation. The user-facing overlay still needs visual confirmation in a running game.

This affects every Mac app using the shared packer/launcher; Pokémon Legends: Z-A is the reported case. Synthetic app and settings fixtures exercise the preference/bundle/environment boundary directly, so no game was selected for a gameplay run. Visual confirmation of the overlay/menu in a running game remains open. No gameplay, extraction rebuild, game shader rebuild or device installation was performed.

Original commit context (historical, preserved through squash)

These messages preserve the original rationale, attribution, validation limits and interface notes. Any references to earlier source or test results remain historical; the current validation section and tree proof above identify the integrated revision.

Original published PR commits:

Commit db62b6943999eedaec46788cddb9a5a34fcacfcf
Author: seedds <seedds@gmail.com>

Restore the Metal HUD option in Mac app builds

Commit e7eedf3f1c4f36a0aca130f5ce2faaca6a39eac9
Author: seedds <seedds@gmail.com>

docs: keep HUD findings separate from validation evidence

Rebased/corrective commits before this squash:

Commit 86e69ac613d7ec9ac95794dbb7dc64dbcfaf2377
Author: seedds <seedds@gmail.com>

Restore the Metal HUD option in Mac app builds

Commit 89b99e59dca9fbb6f999fdb88c5125edb41bc2a8
Author: seedds <seedds@gmail.com>

docs: keep HUD findings separate from validation evidence

@v0lumehi

Copy link
Copy Markdown
Contributor

Heads-up: seedds asked in #388 to agree on one settings schema and one store for player choices before the launchers are extended. I posted a proposal there (#388 (comment)): one optional meta column (key=value;…) in settings.tsv, a versioned launcher.json, and one store with one precedence. Once that lands, the Metal HUD option is one row with platform=mac where it is Mac-only. Input welcome in #388.

@thehobbit85
thehobbit85 force-pushed the codex/mac-bundle-show-fps branch 4 times, most recently from 8403c87 to 0cd5804 Compare October 30, 2026 17:11
@thehobbit85
thehobbit85 force-pushed the codex/mac-bundle-show-fps branch 17 times, most recently from be51bc2 to 4c7d8ad Compare November 2, 2026 17:43
@github-actions github-actions Bot added packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers mac The Mac front end and app (dm/mac, front_mac.m) tools Tools and scripts (dm/tools, scripts) docs Documentation game: 0100F43008C44000 Pokémon Legends: Z-A labels Nov 3, 2026
@thehobbit85
thehobbit85 force-pushed the codex/mac-bundle-show-fps branch 3 times, most recently from df6954e to e7eedf3 Compare November 4, 2026 00:48
@thehobbit85
thehobbit85 force-pushed the codex/mac-bundle-show-fps branch 5 times, most recently from 2a03d52 to 25d50ee Compare November 10, 2026 02:43
Forward the build's FPS choice to the Mac app, store it with the bundle and apply it after saved/window choices. Keep explicit environment overrides, current Game Mode behavior and multi-program packing.

Front-ends: interface: --show-fps and --no-show-fps now also choose the Mac app HUD build default; explicit DM_METAL_HUD and saved choices retain precedence.
@thehobbit85
thehobbit85 force-pushed the codex/mac-bundle-show-fps branch from 25d50ee to 09357d9 Compare November 13, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 0100F43008C44000 Pokémon Legends: Z-A mac The Mac front end and app (dm/mac, front_mac.m) 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.

3 participants