Skip to content

Make BOTW iOS handheld scene size configurable without runtime code writes - #2029

Draft
mrliuzhiyu wants to merge 2 commits into
ly05010419:mainfrom
mrliuzhiyu:codex/botw-ios-handheld-scene
Draft

mrliuzhiyu wants to merge 2 commits into
ly05010419:mainfrom
mrliuzhiyu:codex/botw-ios-handheld-scene

Conversation

@mrliuzhiyu

@mrliuzhiyu mrliuzhiyu commented Nov 10, 2026 •

Copy link
Copy Markdown

BOTW's iOS handheld scene is fixed at 960×540 even when a device cannot meet the 16.7 ms GPU budget for 60 FPS. Add explicit 800×450 and 640×360 choices while keeping 960×540 as the default, the game's 1280×720 canvas and UI layout. Lower sizes soften the world image; docked settings, macOS, visionOS and other games retain their policy.

Replace the handheld immediate pair with an export-time ADRP + LDR to a dedicated writable-data slot at +0x28, following the existing docked-scene approach. Runtime selection only writes the float pair; iOS never writes executable pages. Unsupported values fall back to 960×540; mismatched old exported instructions fail verification. Existing iOS exports must be rebuilt. Add the BOTW-only Settings row and French localization.

Validation:

  • The compiled production patch runs under UBSan against synthetic BOTW 1.6/1.9 modules in export and device-verification modes. Tests decode instructions and effective addresses, check offered/invalid values and adjacent state, and reject wrong instructions/layouts.
  • Full local source core rerun: 1,644 tests passed, 7 skipped; localization passed. The initial archive-timeout test error also passed on isolated rerun.
  • A prepared BOTW 1.9 diagnostic backport compiles and signs. All three modules' embedded sections and hashes were verified. On iPad mini 6 (A15, 4 GB, iPadOS 27.2.1), the runtime confirms 800×450 and gameplay entry; the user reports mostly smooth outdoor movement with occasional hitches.
  • Later warmed 30-second windows measured 59.7, 60.0, 59.7, 59.6 and 60.0 FPS, with GPU times around 13–15 ms in that sampled view. Earlier windows including loading/heavier frames fell to 41–55 FPS; a longer follow-up also had windows around 39.5–42.8 FPS when multi-second stalls occurred. There were large first-use texture-upload pauses and separate unexplained 2/4/6-second in-game stalls. The user confirms the app stayed in the foreground, and these continued during an interval without USB log polling. This is not a locked-60 result. The diagnostic also includes memory-layout, file-backed-heap and upstream writeback behavior; it does not isolate resolution as the cause of the improvement.
  • Full fork CI passed on the failed-jobs rerun, including the Mac settings group: https://github.com/mrliuzhiyu/MacNativeGames/actions/runs/42799311783 . The initial run had unchanged AppKit probe timeouts/assertion failures; no Mac UI code was modified.

Kept as a draft while sustained frame pacing, heavy views and image quality are tested. See docs/ios-botw-handheld-scene.md. Independent of address-space #2025, initial presets #2026 and memory-mode #2027.

Latest documentation update: the latest commit records the device measurements and remaining multi-second hitches. This follow-up changes documentation only; functional test results above refer to the preceding code commit. Checks for the updated head are pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant