Repository navigation
Add adaptive 60 fps support for Pokémon Legends: Z-A 2.0.2 - #918
Open
thehobbit85 wants to merge 1 commit into
Open
thehobbit85 wants to merge 1 commit into
thehobbit85 wants to merge 1 commit into
Conversation
thehobbit85
force-pushed
the
codex/za-dynamic-60fps
branch
from
November 2, 2026 06:00
176ca3e to
a7be739
Compare
thehobbit85
marked this pull request as ready for review
November 2, 2026 08:31
thehobbit85
force-pushed
the
codex/za-dynamic-60fps
branch
6 times, most recently
from
November 3, 2026 02:57
f0895cc to
d56cb76
Compare
thehobbit85
force-pushed
the
codex/za-dynamic-60fps
branch
6 times, most recently
from
November 5, 2026 18:03
e8adef0 to
725722f
Compare
thehobbit85
force-pushed
the
codex/za-dynamic-60fps
branch
7 times, most recently
from
November 13, 2026 06:16
4fdcf17 to
448e17f
Compare
thehobbit85
force-pushed
the
codex/za-dynamic-60fps
branch
from
November 20, 2026 06:26
448e17f to
eb0030f
Compare
thehobbit85
force-pushed
the
codex/za-dynamic-60fps
branch
6 times, most recently
from
November 25, 2026 08:12
8df1d20 to
d43b2f6
Compare
SaranSundar
pushed a commit
to SaranSundar/nxnative
that referenced
this pull request
Nov 26, 2026
…ked at; patch index regenerated Co-Authored-By: Claude Fable 5.1 <[email protected]>
thehobbit85
force-pushed
the
codex/za-dynamic-60fps
branch
from
November 27, 2026 01:26
d43b2f6 to
8901aa5
Compare
thehobbit85
force-pushed
the
codex/za-dynamic-60fps
branch
from
November 27, 2026 19:29
8901aa5 to
08f1ede
Compare
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.
Pokémon Legends: Z-A 2.0.2 uses its verified native-clock hook to follow the host's adaptive whole-vsync frame step. The fixed-address hook remains restricted to the verified main build; setting
fps_target 60alone does not provide this behavior.Head
eb0030f1a6e8924cb4d86e1fc7a27cd34126d482resolves the shared profile-documentation conflict on maind43d4355865c130759f26727c5aeaf37c7be79d5. Main's engine/frame-step documentation and newer host/renderer changes are preserved. The Z-A executable hook, game profile, smoke/benchmark routes and hook-specific test source are byte-identical to the previous published head. The rewriter's only feature delta remains its supported-title comment.Fresh local validation on native arm64 macOS, Xcode 27.2 / supported Metal 32023.922.4 and Python 3.14:
make -C dm/host GAME=0100F43008C44000 -j3: full host build passed.make -C dm/gfx/tests GAME=0100F43008C44000 -j2 check_t_fstep: 119 checks passed, zero failures.python -m unittest -v dm.tools.tests.test_za_fps dm.tools.tests.test_patches dm.tools.tests.test_game_profile dm.tools.tests.test_docs: 48 ran, 47 passed, one inherited failure, zero skips. All five ARM64 execution cases passed using isolated Unicorn 2.1.4, including native 30/60 timing, variable steps, startup and disabled/register preservation. The initial environment lacked Unicorn; the completed run used the optional dependency with native JIT access.Registry.test_entry_forms: Strikers' unchanged profile exports_FULL_RATE,_RATE,_STEPand_FLOAT_RATE, which main's registry rejects. The same failure was independently reproduced on exact main; no assertion or profile workaround was added here.scripts/build_ipa_from_nsp.py:1765, independently reproduced. These shared failures remain for CI remediation; current-head remote CI is unverified.Impacted game: Z-A 2.0.2 only, because the hook is build-gated. The native fixture validates host frame-step behavior, not gameplay. No game was launched, extracted or packaged; no fresh shader comparison, controlled performance, full graphics suite or device result is claimed. The historical p99 regression 37.6 → 52.3 ms (+39.1%) remains unresolved. Sustained 60 fps, audio synchronization, battles, longer routes and iPhone behavior remain unverified. Earlier results and original commit rationale below remain historical.
Historical published description, original commit context and validation
Current integration — November 13, 2026
Published commit
448e17f8a95fb53601b129d3cbe11f674523eaeerebases4fdcf174bfc51f1e114ec2a4034b2c6a3d74abdbonto main90b7cefd1d572ab05859c73930b436c4040cd25c. The verified Z-A 2.0.2 adaptive native-clock hook remains distinct from main:fps_target 60alone cannot make Trinity's clock follow the host's whole-vsync step. Other main builds receive no fixed-address hook. Main's newer frame-pacing fallback and all host/renderer changes are preserved; only the shared profile documentation conflicted. The hook, profile, routes and hook-specific regression tests are unchanged from the published feature.Validation (native Python 3.14.6, Xcode 27.2, Apple Metal 32023.922.4): the 90-case hook/profile suite and native builds below ran on
8ba38081bf6649ec244380a220b918eee564ada3/ main48dca7a4ad146afc05a01cbd200387d8854ebea7. All host, NVN, texture, MSL, native fixture, profile and hook/rewrite inputs are byte-identical on this final revision; fresh documentation/chain and lint checks cover the later shader-extraction and PRAGMATA changes.python3 -m unittest -v dm.tools.tests.test_za_fps dm.tools.tests.test_patches dm.tools.tests.test_fps_target dm.tools.tests.test_game_profile dm.tools.tests.test_docs dm.tools.tests.test_settings dm.tools.tests.test_ue_fixed_rate dm.tools.tests.test_nso_match: 90 cases, no failures/errors; five optional Unicorn ARM64 execution cases skipped because that dependency is unavailable. The build-gate/patch registry and frame-state layout tests ran.python3 -m unittest -v dm.tools.tests.test_docs dm.tools.tests.test_nsp_chain: 23 cases passed. Patch index and symptom generators report current output; chain/source/lock are exactly main.make -C dm/host GAME=0100F43008C44000 -j3: passed, including final main's tessellation renderer integration.make -C dm/gfx/tests GAME=0100F43008C44000 -j1 check_t_timestamp check_t_counter_clock check_t_fstep: 25 timestamp + 21 counter-clock + 86 adaptive-step checks passed.make -C dm/host/tests GAME=0100F43008C44000 build/t_fpslockand its executable passed. The shared frame-step and engine-cap inputs are unchanged; the timestamp replay fixture was rebuilt with the newer renderer.dm/tools/lint_python.py: 321 findings against 321 baseline entries, zero new or stale; baseline unchanged.Impacted game: Pokémon Legends: Z-A 2.0.2 only, because the new native-clock hook is keyed to its verified main build. No game was launched, extracted or packaged for this refresh, and no current gameplay, shader-library comparison, controlled performance or full native graphics result is claimed. The shared frame-step and engine-cap native fixtures check host behavior, not Z-A gameplay. The historical p99 increase 37.6 → 52.3 ms (+39.1%) remains unresolved; sustained 60 fps, audio synchronization, battles, longer routes and iPhone behavior remain unverified. Current-head remote CI is pending verification.
Original commit context (historical)
Previous description and validation history (historical; preserved verbatim)
Current refresh — November 9, 2026
Rebased
4fdcf174bfc51f1e114ec2a4034b2c6a3d74abdbonto mainbbea4c90f136f478e25228bc3d4ab33c77420f2e. Main's text-only README and removal of the old gallery are preserved; the full games table and Z-A frame-rate note retain the option. The generated game-patch index was rebuilt from combined sources. The adaptive hook, profile, benchmark/smoke inputs and ARM64 fixture are byte-identical to the previous published head.Removed the redundant patch-area reservation from this PR: main now supplies the required adjustment for registered and matched frame steps. The retained layout regression exercises that upstream implementation; the rewriter's only remaining PR delta is its supported-title comment. The Z-A hook remains build-bound to 2.0.2, and no unverified function matching was added.
Fresh validation on this head: 70 focused tests ran, 65 passed and five optional Unicorn execution tests were skipped. The Mac host build passed with 56 compiler warnings, and native frame-step and frame-rate cap fixtures passed. The pinned Python ratchet reproduces exact main's three
dmsh_build.py:166–167findings (339 total, 336 baseline, zero stale); it is not clean. No baseline or assertion was weakened. Main ancestry, feature preservation and final diff were reviewed. Replacement-head remote CI is pending the CI handoff.No fresh gameplay, game extraction, shader rebuild, performance comparison or device validation was performed. In particular, the historical target-30 p99 regression 37.6 → 52.3 ms (+39.1%) remains unresolved; this pass does not establish sustained 60 fps or current runtime qualification. Other historical limits and original commit context below remain in force.
Historical revision records
All remaining revision-specific runs below predate this refresh.
The Z-A 2.0.2 adaptive frame-step hook and profile choices remain absent from main. The earlier frame-time regression still requires independent verification before merge.
Conflict refresh — 2026-11-09 UTC
Rebased
a18b7ab5bbd0a93f840ba4a0a782b60a71c76818onto main7479adf86cd7997c806d45c4c99a875ed4a6038easfcfb076bcce43a33c532ab1d47640f91651c9e40. Main advanced by two shader-tool commits and then a Unity decoder lint correction before publication; the live PR still conflicted, and its feature patch remained equivalent after incorporating them. The gallery uses main's exact table with only the existing Z-A 2.0.2 caption added; regeneration preserves main's newer Brilliant Diamond caption and every game exactly once. The patch catalogue retains current main's function-matched hooks. The Z-A binding note now states its actual remaining limitation: this clock adapter has not been validated for function matching across builds. Its executable hook and build gate are unchanged.The shared state-page reservation still covers both registered and function-matched frame steps before branch emission. Range-diff confirms unchanged feature patches except the binding explanation and generated-document context. All 174 upstream-only paths match main; six of seven feature-only paths match the old head exactly, and the seventh differs only in that binding explanation. Main is an ancestor, and the generated files and remaining diff were reviewed.
Fresh validation and limitations
On Apple Silicon, macOS 26.6, Xcode 27.2 and native Python 3.14.6:
/opt/homebrew/bin/python3 -m unittest dm.tools.tests.test_za_fps dm.tools.tests.test_patches dm.tools.tests.test_fps_target dm.tools.tests.test_game_profile dm.tools.tests.test_docs dm.tools.tests.test_settings dm.tools.tests.test_ue_fixed_rate dm.tools.tests.test_nso_match dm.tools.tests.test_shader_package_keys dm.tools.tests.test_unity_bucket: 99 tests on the exact final head, 94 passed and five optional Unicorn ARM64 execution cases skipped. Historical executed-hook results below remain attributed to their original revisions.arch -arm64 make -C dm/host GAME=0100F43008C44000 -j4linked successfully onbcc357a30a7efc0792959841208d732198beef64, with host/graphics sources and dependencies byte-identical to the final head, with 58 existing compiler warnings. An initial invocation inherited an x86-translated launcher and failed on ARM64 instructions; selecting native ARM64 corrected the invocation without a source change. Nativet_fpslockand all 78t_fstepchecks passed on the intermediate42b44e47767f5b409c81a8ee52082d744c46fba8; their source and dependencies are unchanged by the final two upstream commits.The workflow-pinned Ruff 0.17.2 / Pyright 1.1.414 ratchet passes on the final head: 336 findings against 336 baseline entries, zero new or stale findings. Earlier candidates reproduced three optional-subscript findings in main’s Unity decoder. Upstream
7479adf8fixes their cause by reusing checked instruction decodes; it is now included. No local workaround or baseline change was added.Gallery, patch-catalogue and symptom generation, documentation checks and
git diff --checkpassed. No agent artifacts are included. Remote CI on this replacement head remains pending Agent 3's verification.Z-A 2.0.2 is the direct target; the shared state-page guard also reaches matched frame steps such as Ocarina of Time and Mario Kart World. Hades, Breath of the Wild, Pokémon Scarlet and Tears of the Kingdom are additional shared-rewriter impact targets. No game, station benchmark, extraction, shader translation, full graphics campaign or device test ran in this refresh. The earlier busy-run p99 increase from 37.6 to 52.3 ms (+39.1%), two qualified main trials and zero qualified candidate trials remain unresolved. Sustained 60 fps, controlled stalls, audio, iOS and full-game coverage remain open. Other Z-A builds do not acquire this fixed-address hook automatically.
Historical proposal, validation and original commit context
The previous description follows intact. Its results and earlier current-state wording apply to the revisions they record; current main now supports function-matched frame steps, but this particular clock adapter remains build-gated.
The Z-A 2.0.2 adaptive frame-step hook and profile choices remain absent from main.
Conflict refresh — 2026-11-08 UTC
Rebased
7f71a20f6d0a75456c87798847533ea43d9ae877onto555122a9069235441d5a88955105397ec6d53686asa18b7ab5bbd0a93f840ba4a0a782b60a71c76818. Regenerating the patch catalogue retains the existing Z-A hook and main's new function-matched Ocarina of Time and Mario Kart World stubs. Main selects a function match before layout and uses the same state page for a match or a registered build. The layout guard now reserves that page for either path. An added boundary test reproduced the overlap before the guard covered matches and passed after the fix. Misses, SDK modules and front patch layouts retain their offsets.On this exact head, 124 of 129 focused Python tests passed and five optional ARM64 Unicorn cases skipped. Coverage includes the Z-A hook, function matcher, profile and rewriter boundaries, fixed-rate behavior and generated documentation. The native frame-lock fixture for Z-A and all 78 frame-step checks passed. Pinned Ruff 0.17.2 and Pyright 1.1.414 reported 376 findings against 371 recorded. The five excess counts are three
reportIndexIssueand tworeportArgumentTypefindings on unchanged main registry test lines. Removing only the added layout fixture reconstructs the main test file byte-for-byte, with no finding in the added lines. This is an inherited lint failure. Range-diff, ancestry, generated documentation andgit diff --checkwere verified. Remote CI remains pending.Z-A 2.0.2 is the direct target. The matched layout change can also affect Ocarina of Time and Mario Kart World. The broader shared-rewriter impact rule identifies Hades, Breath of the Wild, Pokémon Scarlet and Tears of the Kingdom, with 149 profiles of unknown coverage. This refresh adds no game run, benchmark, device test, shader translation or extraction. The earlier busy-run p99 increase from 37.6 to 52.3 ms (+39.1%) remains unresolved. Two qualified main runs and zero qualified candidate runs leave sustained 60 fps, stall, audio, iOS and full-game coverage open.
Historical proposal, validation and original commit context
The complete prior description follows. Its earlier results belong to the revisions they record.
The Z-A 2.0.2 adaptive frame-step hook and profile choices remain absent from main.
Current conflict refresh — 2026-11-07 19:04 UTC pass
Rebased
96d395490d8f312d2f79ea09bffbade83edcd35donto mainbd979ced3ae6bad60bf86429a71d172297d93471, producing7f71a20f6d0a75456c87798847533ea43d9ae877on the same PR branch. The conflict was thefps_targetdocumentation row: it now retains main's UnrealbUseFixedFrameRate/Pikmin 4 behavior and the Z-A entry. Generated gallery, patch catalogue and symptom index are current. Range-diff and the remaining main diff were reviewed. All nine feature-only paths and fourteen upstream-only paths are byte-identical to their respective inputs; the combined rewriter is exactly current main plus the existing feature's two additions. Main is an ancestor of the tested head.Fresh validation on this exact head, using an Apple M2 Max, macOS 26.6, Xcode 27.2 and native Python 3.14.6:
/opt/homebrew/bin/python3 -m unittest dm.tools.tests.test_za_fps dm.tools.tests.test_patches dm.tools.tests.test_fps_target dm.tools.tests.test_game_profile dm.tools.tests.test_docs dm.tools.tests.test_settings dm.tools.tests.test_ue_fixed_rate: 57 tests, 52 passed and five optional ARM64 execution cases skipped because Unicorn is unavailable.make -C dm/host GAME=0100F43008C44000 -j6: native host build passed. It emitted 57 compiler warnings in unchanged upstream sources; this is not a zero-warning claim.t_fpslock, rebuilt forGAME=0100F43008C44000, passed the frame-limit cases including main's new Unreal flag handling. The freshly builtt_fsteppassed all 78 checks./Users/thehobbit85/Games/venv/bin/python3 dm/tools/lint_python.py, using the workflow-pinned Ruff 0.17.2 / Pyright 1.1.414: 371 findings against 371 baseline entries, zero new or stale findings. An initial system-Python invocation lacked Ruff; the existing pinned environment supplied the successful run. No source or baseline was changed for lint.git diff --check, feature preservation and PR documentation/artifact placement checks passed. Remote CI on this replacement commit is pending Agent 3's verification; older results do not validate it.Z-A 2.0.2 is the direct target.
scripts/regress.py impact bd979ced3ae6bad60bf86429a71d172297d93471..HEADalso identifies Hades, Breath of the Wild, Pokémon Scarlet and Tears of the Kingdom through the broad shared-rewriter rule; 147 profiles lack usage manifests. These games have no fresh end-to-end result from this documentation conflict refresh. No gameplay, benchmark, shader translation, extract rebuild or device run was performed. Prior unavailable-build/cold-cache limits below remain historical evidence, not a fresh regression pass. The earlier busy-run p99 increase from 37.6 to 52.3 ms (+39.1%) remains unresolved. Two qualified main runs and zero qualified candidate runs leave sustained 60 fps, stalls, audio, iOS and full-game coverage open.Earlier proposal, validation and original commit context
The previous description follows in full; its earlier current/refresh sections apply only to the revisions they record.
The Z-A 2.0.2 adaptive frame-step hook and profile choices remain absent from main.
Conflict refresh — 2026-11-07
Rebased
9de1409fe7122ca6864ceb1673eaab58ba8b4c0fonto main01abf27977aa4a7366c4a14bc58d9eae75f1d8e6as96d395490d8f312d2f79ea09bffbade83edcd35d. The profile key table retains main's newer frame-limit descriptions and the Z-A entry. The game-patch catalogue, gallery and symptom index were regenerated from the combined sources. Range-diff shows that the feature changes outside the affected documentation retain their prior patch content.On this head, 87 of 92 focused Python checks passed and five optional Unicorn cases skipped. The native frame-lock fixture and all 78 frame-step checks passed. The pinned Python ratchet matched 371 baseline findings with zero new or stale findings. The generated documentation and remaining diff passed checks.
The affected game is Z-A 2.0.2. Its hook is gated to the verified build, and the frame-state boundary fixture also checks the shared rewriter path. This refresh had no matching runnable game build and adds no gameplay, device, shader translation or benchmark result. The earlier busy-run p99 increase from 37.6 to 52.3 ms (+39.1%) remains unresolved. Two qualified main runs and zero qualified candidate runs leave sustained 60 fps, stalls, audio, iOS and full-game coverage open.
Historical proposal, validation and original commit context
The previous description follows in full. Its earlier results apply to the revisions it records.
The build-gated Z-A 2.0.2 adaptive frame-step hook, profile choices and frame-state layout correction remain absent from main.
Current conflict refresh — 2026-11-06
Rebased
725722f5bd80ccda455cf085684586627438f6bdonto pinned mainb2d46b86d03f4b03afe11ea61c67cdf00d7a5345, producing9de1409fe7122ca6864ceb1673eaab58ba8b4c0fon the same branch. The only conflict was README’s generated gallery; regenerating it from combineddocs/images/gallery.tsvpreserves current main’s games and the existing Z-A caption. Range-diff changes are gallery context only. Hook, rewriter and focused hook test sources match the previous head; current main’s shared frame controller was freshly exercised.On this exact head, 92 focused Python hook/layout/profile/docs/settings tests completed: 87 passed and five optional Unicorn cases skipped. The native frame-lock fixture and all 78 frame-step checks passed. The workflow-pinned Python ratchet passes: 371 findings against 371 recorded, zero new or stale findings. Generated gallery, remaining diff and
git diff --checkwere reviewed. Remote CI on this replacement head is pending verification.No fresh gameplay, benchmark, shader translation, game regression or device run was performed. Z-A is the affected game: the hook is guarded to its verified 2.0.2 main build; layout coverage also protects other frame-step mains. Full game builds/runtime inputs were not established for this scoped refresh. Historical evidence below applies only to its recorded revisions. The unresolved p99 regression remains 37.6 → 52.3 ms (+39.1%) under busy load; two qualified main runs and zero qualified candidate runs do not establish a performance pass. Sustained 60 fps, stall/audio/iOS/full-game coverage remain open.
Historical proposal, validation and original commit context
The complete previous description follows. Its earlier “current” sections, tool versions, revision identities and pass/failure claims are historical, not newly repeated validation.
The verified Z-A 2.0.2 adaptive frame-step hook and profile choices remain absent from main.
Current refresh — 2026-11-05
Rebased
e8adef09b0f4a8d43bd3beda0b84934ed0e6f8edonto pinned main865cc35fad7034d17c2190f8ce349f61f5bcaba1, producing725722f5bd80ccda455cf085684586627438f6bdon the same canonical branch and existing PR. The sole conflict was the generated game-patch catalogue; regenerating it from combined current sources retains main’s newer findings and the Z-A hook. Range-diff changes are catalogue context; runtime feature behavior is preserved.Fresh validation on this head: 92 focused hook/layout/profile/documentation/settings tests completed (87 passed; five optional Unicorn cases skipped). Native frame-lock tests and all 78 frame-step checks passed.
git diff --checkpasses. The pinned Python ratchet reports 390 findings versus 387 recorded, with three excessreportIndexIssuefindings indm/tools/tests/test_nso_match.py. The same result was reproduced on untouched pinned main with the same interpreter; its blob is identical (042bc4320b0d2a1c22bf296c9877ece03108fb51). This is an inherited lint failure, not a pass; no source or baseline repair is mixed into this feature. Remote CI on this replacement head is pending verification.No fresh gameplay, benchmark, device, shader build or full game regression campaign was performed. The unresolved historical p99 regression remains 37.6 → 52.3 ms (+39.1%) under busy load; two qualified main runs and zero qualified PR runs do not establish a candidate performance pass. Sustained 60 fps, stall/audio/iOS/full-game coverage remain open. Original commit context and all earlier evidence/limits are retained below as historical.
Historical proposal, validation and commit context
The Z-A 2.0.2 build-gated adaptive frame-step hook and its profile choices remain absent from main.
Current rebase — 2026-11-05
Rebased
4fcb04e2d05c62144df3444a5811f2e91aed6e56onto fixed current mainf8a5618d5f505a4c0a0bcac7c413872d3a53c009, producinge8adef09b0f4a8d43bd3beda0b84934ed0e6f8edon the same existing canonical and PR branches. Main is an ancestor. This replays the existing feature commit; no new squash or unrelated prerequisite is included.The sole conflict was README’s generated gallery. It was regenerated from the combined gallery source, retaining all new main games and the Z-A 60 fps option caption. The remaining range-diff is context only; no runtime logic was changed.
Fresh validation and limits
92 Python tests completed: 87 passed and five optional Unicorn execution cases skipped. Native frame-lock checks and all 78 portable frame-step checks passed. Gallery generation is current. Hook, rewriter, frame-lock and frame-step sources match their previously tested revisions; the old native Unicorn execution result remains historical evidence.
The workflow-pinned Python ratchet (Ruff 0.17.2 / Pyright 1.1.414) passes: 389 findings against 389 recorded, zero new or stale findings. The former shared-main B023 issue is fixed on this base; references to it below are historical. No baseline was loosened. Generated documentation and
git diff --checkwere reviewed. New remote CI is pending publication and is not claimed green.No fresh benchmark, gameplay, device, full shader build or end-to-end game check was performed. The p99 regression remains open (37.6 → 52.3 ms, +39.1%, both busy runs); two qualified main runs and zero qualified PR runs do not establish a candidate performance pass. Sustained 60 fps, controlled stalls, audio, iOS and full-game coverage remain unverified.
Historical proposal, validation and original commit context
The description below predates this rebase. Its commit identities, timing tables, tool environments and validation limits remain historical; they are not a current all-pass or fresh gameplay claim.
Main has the shared adaptive frame-step controller, but does not register this verified Z-A 2.0.2 hook or its profile choices. The build-gated hook, shared frame-state layout coverage and durable unresolved performance findings remain necessary. Current main’s 120 fps profile semantics are retained.
Current refresh — 2026-11-04
Candidate
4fcb04e2d05c62144df3444a5811f2e91aed6e56is exactly one commit directly atop fresh main975bb4c14456d145eb3d969814534eecdd996ce9. The canonical branch and existing PR destination are unchanged. The published head wasa42256783cb3a3d0595ae68fc77d2324d5d69aef; preserved local pre-pass candidate was1747221712bd7faafb6fd56286c6267261f4bb54. Rebase range-diff is patch-equivalent, and the pre-squash tree33b1100ce07d19dee62a42499e20ca8fd9bb55a4equals final tree33b1100ce07d19dee62a42499e20ca8fd9bb55a4. No unrelated prerequisite or feature was dropped. Original author credit is preserved.Validation and limits
44 focused hook/profile/documentation/settings tests completed: 39 passed and five Unicorn execution cases skipped because that optional dependency is unavailable in the present environment. The gallery, patch inventory and symptom generators are current. Hook/profile, rewriter, test, frame-lock and frame-step blobs are identical to tested
17472217, whose 92-test suite (including five native Unicorn cases), frame-lock fixture and 78 frame-step checks passed before this rebase. That older result is reused only for those identical sources, not reported as a new runtime result.No gameplay, shader translation, performance rerun or device run was performed. The historical p99 regression remains unresolved: 37.6 → 52.3 ms (+39.1%), both runs under unrelated shader load. There are two qualified main runs and zero qualified PR runs in the later comparison; sustained 60 fps and controlled stall/audio/iOS/full-game coverage remain unverified. All detailed historical limits and measurements below remain applicable.
Shared Python lint is blocked by unchanged main
dm/games/settings.py:115Ruff B023 (390 findings versus 389 baseline), confirmed on the pinned base. No unrelated repair or baseline alteration is included. Generated documentation, final main diff andgit diff --checkwere reviewed for PR #895 placement/artifact rules; no planning journals or run-specific evidence were added to repository documentation. Remote CI for this new unpublished SHA has not run; previous CI results are historical.Historical context and evidence
The description below predates this refresh. Its revision names, validation runs, measurements and limitations are retained as historical evidence rather than current all-pass claims.
What and why
Z-A 2.0.2's native interval selector caps rendering at 30 fps. This adds a build-gated 60 fps option that feeds the existing host frame-step controller into the game's graphics interval and native clock dispatch, so ordinary frame drops advance game time by the corresponding whole-vsync duration. The launcher defaults to 60 fps and retains 30 fps;
DM_FPS_TARGET=0restores the original selector.Independent verification requested before merging. At the 30 fps cap, an earlier headless station comparison measured p99 frame time rising from 37.6 to 52.3 ms (+39.1%). Both runs had competing shader compilation. The cause remains unresolved. The prior benchmark series produced two qualified main runs and zero qualified PR runs before further benchmarking was waived for review.
The hook is restricted to main build
b1f12fd919eae86ab8a978317677e64b, asserts the original instructions, and preserves the game's paused-clock behavior. It uses the original graphics setter, duration table, and all three clock adapters. The shared rewriter also reserves the state page before emitting appended patch-area branches: this build's key page ends at a 64 KB alignment boundary, where the previous layout overlapped state with code. Layouts that already have room, front patch areas, and modules without a frame step stay unchanged.Adds ARM64 hook execution tests, state-layout tests, station benchmark/smoke routes, and the 60 fps launcher/gallery documentation. No host or shader-chain implementation changes.
Details: game note, state allocation finding.
Current rebase and focused validation
Revision
a42256783cb3a3d0595ae68fc77d2324d5d69aefrebases published1d4e86d8782da5c59cf5edf727ea6cc102c185cconto fixed mainbd98317eecfe832b40d401219c15207a398e78dd. All four Z-A feature/documentation commits are retained. The README gallery conflicted with newer upstream entries; regenerating it from the combinedgallery.tsvkeeps all upstream games and exactly one Z-A cell with the existing 2.0.2 caption. The old gallery-only correction becomes redundant after this regeneration and drops. Final main-to-candidate README diff is one caption line; the full range-diff records upstream context in the generated tables and symptoms, with the remaining three documentation patches identical.The Z-A build-gated hook, profile, ARM64 test source and frame-state layout tests are byte-identical to the published head. The generic frame-limit host source is also identical. This does not make the older whole-system shader/performance evidence current: main's shader chain and unrelated host/graphics sources changed.
Fresh validation on Apple M2 Max, arm64 macOS 26.6, Xcode 27.2 and native Python 3.14.6:
test_za_fps,test_patches,test_tail_call,test_docsandtest_nsp_incrementalpassed all 123 tests with zero skips using native Unicorn 2.1.4. This includes the five ARM64 hook execution cases, registered-build/original-byte checks, disabled/startup paths, varying clock steps, register preservation, patch-state alignment and upstream rewrite/incremental-reuse behavior. The first dependency-free run skipped the five optional hook cases; the complete pinned-dependency run above executed them successfully.t_fpslock, freshly built withGAME=0100F43008C44000, passed its found-field, build-gated, integer/float/vsync and override cases. It uses synthetic data, not a running game.git diff --checkpassed. Durable frame-rate findings, timing tables and open limitations remain in the game note, with the shared state-allocation reference under “Found on this game.” No agent planning/progress artifacts are included.regress.py impactidentifies four broad shared-rewriter matches and 130 profiles without usage manifests. The direct target is Z-A 2.0.2; Hades, Breath of the Wild, Pokémon Scarlet and Tears of the Kingdom are additional shared-layout targets and remain untested. A Z-A-only staticcheck --no-smokeusing a cached-only guard stopped with exit 2 before translation: the current chain cachenvn-316fb82e2f22-bbc470421a6e-8f71dc0e15411377is cold. Its report is ERROR; no current shader/interface result is claimed and no compiler lock was relaxed.No game, benchmark, screenshot, device or simulator run occurred in this rebase pass. The p99 increase from 37.6 to 52.3 ms (+39.1%), zero qualified candidate trials in the later station series, sustained-60-fps caveat and need for independent verification remain unresolved. Current shared-main lint/remote CI and a fresh full graphics suite are not claimed here.
Earlier integration and focused validation — historical
Tested
95c377be7addc35c4e181ba9dbba43714badf336against maine70fd69d5c828c906905991872c2eeead435dd4e. Main now finds a target-rate field for Fire Emblem Fortune’s Weave from code that reads and sets it. Running the upstreamdm/tools/fps_target.pyon the extracted, unmodified Z-A 2.0.2 main produced build IDb1f12fd919eae86ab8a978317677e64band “no target frame rate”. Z-A therefore retains its build-gated interval and clock hook. Both mechanisms appear in the profile-key documentation and generated patch inventory.test_docs,test_game_profile,test_patches,test_za_fps,test_fps_targetandtest_txq_typepassed 50 tests with zero skips. The five ARM64 hook cases ran under native Unicorn 2.1.4, including disabled/startup behavior, original-instruction and build gates, register preservation, and variable clock steps. The seven TXQ cases used the bundled translator. Host fixturedm/host/tests/build/t_fpslock, built withGAME=0100F43008C44000, passed the generic found-field and build-gated paths. The gallery and diff checks passed.379e885e. The prior and upstream variants decode identical input and both fail with the missing opcode name. This PR uses main’s test verbatim and keeps its four Z-A commits.regress.py impactreports four broad matches and 129 profiles without usage manifests. This maintenance pass used synthetic fixtures and read-only code inspection. No gameplay, device test, or station performance measurement ran on this revision.Historical station comparison and pre-merge handoff
The 2.0.2 Mac assets were rebuilt from the NSPs on the M2 Max. All 28,603 Mac shader libraries built, and the
applegpu_g14sarchive contains 26,029 bases. Both revisions were set up to use the same archive with the matching chain, depth mode and shader pairs. This Mac used Metal 32023.921. The repository pins 32023.922.The local
saves/stationfixture was copied from the original player save and checked byte-for-byte. Each trial got a fresh copy. A screenshot confirmed the starting scene and camera on the Lumiose Station platform. The headless route ran for 100 seconds atDM_FPS_TARGET=30in docked mode with audio disabled. Measurements use seconds 40–90.99330eb8, run 199330eb8, run 2An earlier setup run of main measured 29.9 fps and 34.18 ms p99. The new PR attempts on
a7be7395were excluded for contention. None supplied a qualified candidate measurement. Both the original performance finding and the sustained-60-fps caveat remain open.For an independent tester: run the full station route twice per revision on an idle Apple-silicon Mac with the same verified save, graphics settings and prewarmed archive. Check for competing work throughout each run and post the individual p99 values, FPS and screenshot comparisons here. If the increase repeats, investigate the per-frame CPU, GPU and present timings before merging.
Historical author validation
372a8d8a0404; unrelated controller work is excluded. The hook and state-layout logic are unchanged from the initial gameplay tests.python3 -m unittest discover -s dm/tools/tests: 861 tests, 21 optional skips, passed on the rebased tree. The native Mac packaging tests required running outside the filesystem sandbox.python -m unittest dm.tools.tests.test_za_fps dm.tools.tests.test_patches: 23 passed, including the five new hook tests under Unicorn/x86 Python. Covers both caps, varying steps, startup, disabled mode, registers/flags, original-byte/build gates, and state allocation.make -C dm/gfx/tests GAME=0100F43008C44000 -j6 run: complete Metal graphics suite passed, including the shared frame-step controller tests.dm/tools/lint_python.py: 391 baseline findings, zero new findings. Generated docs and diff whitespace checks passed.0100F43008C44000, 2.0.2, on Apple M2 Max / macOS 26.6 / Xcode 27.0. Earlier windowed gameplay covered the station, camera movement, and timed two-second walks. Native clock counters measured 59.70 game seconds / 59.73 real seconds (1.000) and 45.57 / 45.52 (1.001) through natural frame drops; a probe saw all 11 clocks receive 33,333,334 ns once per presented frame at hold 2.372a8d8a0404versus feature commit68d75dfab2f9, 100 seconds each, target 30. Both reached gameplay with matching screenshot dHashes, unchanged 28,603 shaders, and no new red-line kinds. The overall result isREGRESSIONdue to p99 frame time, not a clean performance pass; exact report below.--recordcorrectly did not write a greenvalidated.tsv.Caveats and remaining validation
regress.py impactbroadly flags the rewriter for every game (the available manifests list Hades, Breath of the Wild, Pokémon Scarlet, and Tears of the Kingdom; 122 profiles have no manifest); this PR limits the shared change to registered frame-step mains and tests every key-page alignment, SDK/unregistered modules, and front layouts. Other games remain unchecked.DM_WINDOW/DM_WINDOW_TOP/DM_METAL_HUDand recordsDM_TEST_HEADLESS=1. Headless runs establish execution/rendering, not display-link or fullscreen pacing.--wait-idle 0); both runs are marked busy. The run uses the preserved pipeline archive stamped for chainb7cd656abd7c, rather than the shared build directory whose stamp changed during PR preparation. Its timings are non-isolated. The p99 increase could reflect load, patch behavior, or both; an idle-machine rerun is required before merge.game_speedresult; the measured normal-speed evidence comes from the separate windowed clock run.SetRenderEnableConditional(the host draws anyway) and retry-success memory-pool red lines occurred in the earlier tests. No new red-line kinds were introduced in the recorded comparison. This PR does not resolve those existing limitations.<NSP folder>/saves/stationfixture. The rebuilt Mac assets and restored fixture are local test inputs. The package, game files, save and screenshots are excluded from the PR.Earlier headless benchmark samples
station-walk, 40–140 seconds, one run per variant; these pre-rebase measurements are retained with the load caveat above. The hook and frame-state layout logic did not change during the rebase.Regression report: full check — REGRESSION
Baseline
origin/main372a8d8, candidateHEAD68d75dfab2f9; Apple M2 Max, macOS 26.6, Xcode 27.0; 237.4 s0100F43008C44000LegendsZA
0100F43008C44000: REGRESSIONHistorical README gallery verification
At
eb3bdb13, the merge from main left two rendered Pokémon Legends: Z-A cells in the README. The gallery source contains one entry with the 2.0.2 frame-rate caption. The same gallery test passed on the merge basec7ba23dfand failed on the PR head. Runningpython3 dm/tools/docs_gallery.pyat1d4e86d8restored one cell with the caption.python3 dm/tools/docs_gallery.py --check, all 11 tests inpython3 -m unittest dm.tools.tests.test_docs, andgit diff --checkpassed locally. The generated gallery contains 129 distinct games. This README-only correction required no game or performance rerun.Historical original commit context and preserved corrective messages
These are the original published and preserved local messages before this squash. They explain historical intent and limitations; any validation named in them belongs to the original commit, not the new candidate. Repeated equivalent messages are shown once with their original identities.
seedds [email protected] —
0fb4524c9b3d913c1300d0ec3ef4bbd69251cb89(published),c4bf5518c89f2f365a7383cab90e26c9fa0d9463(preserved unpublished/local)seedds [email protected] —
4cb60a7782a192dd8682c4faa501c7451630c87a(published),6e449de07eeee664b0d91eda473b28059dfbd2eb(preserved unpublished/local)seedds [email protected] —
f7c51ba4622ab32c2f1caeccbbd1e70cdf3c9529(published),75a4c41b568669e803abc63d18889eb691d72b08(preserved unpublished/local)seedds [email protected] —
a42256783cb3a3d0595ae68fc77d2324d5d69aef(published),1747221712bd7faafb6fd56286c6267261f4bb54(preserved unpublished/local)Published commit context before this rebase
Historical message from
4fcb04e2d05c62144df3444a5811f2e91aed6e56; any validation statements belong to that revision.