Skip to content

games/0400486024DEC000: screen shape (DM_SCREEN_ASPECT) renders taller aspects without stretched HUD or transition gaps - #2651

Open
PiinoStudio wants to merge 1 commit into
seedds:mainfrom
PiinoStudio:oot-screen-aspect
Open

PiinoStudio wants to merge 1 commit into
seedds:mainfrom
PiinoStudio:oot-screen-aspect

Conversation

@PiinoStudio

Copy link
Copy Markdown

With screen_aspect on and DM_SCREEN_ASPECT set (e.g. 1.6 for 16:10 MacBook displays or 1.333 for 4:3 iPad displays; launcher setting Picture shape), places fifteen fingerprint-matched stubs under MATCH_FRAME_STEP (others, inactive when state +0x48 is 0):

  • Eleven height sites across graphics init, scene app init, base scene defaults, display mgr defaults, base res read, and display target a/b/c.
  • 3D perspective projection (sead::PerspectiveProjection::doUpdateMatrixImpl_ at 0x3485cc0), scaling fovyTan by k = (16/9) / ratio for Vert+ framing (preserving horizontal 16:9 framing with extra vertical scene view).
  • Layout2 ortho projection builders (layout ortho at main+0x1520c80 and layout view ortho at main+0x773b90), scaling canvas height so 2D HUD elements (hearts, buttons, minimap) keep a 1:1 pixel aspect ratio in the safe area.
  • Layout2 CalculateMtx (layout calc matrix at main+0x14e9980), scaling full-screen PicturePane elements (width >= 1000, height >= 700, |width*9 - height*16| < 200) so scene faders and door/warp transitions (such as P_Black_00 and P_White_00 in EventFade_00) cover the expanded canvas without un-faded bands at top and bottom.

Verification

Verified in active gameplay on macOS (v131072, Kokiri Forest and Goron City):

  • 16:9 (0, 2560x1440), 16:10 (1.6, 2560x1600), and 4:3 (1.333, 2560x1920) all keep heart1 at 68x33 (h/w = 0.485, shifted vertically by half the extra height) with unstretched HUD widgets and Vert+ 3D framing.
  • Door and scene transition wipes verified in gameplay with zero background bleed (top_non_black = 0, bot_non_black = 0).
  • Documentation check (python3 dm/tools/docs_patches.py --check) and test suite pass cleanly.

…r aspects without stretched HUD or transition gaps

With screen_aspect on and DM_SCREEN_ASPECT set (e.g. 1.6 for 16:10 MacBook
or 1.333 for 4:3 iPad), places fifteen fingerprint-matched stubs under
MATCH_FRAME_STEP:

- Eleven height sites across graphics init, scene app init, base scene
  defaults, display mgr defaults, base res read, and display targets.
- 3D perspective projection (sead::PerspectiveProjection::doUpdateMatrixImpl_)
  scaling fovyTan by k = (16/9) / ratio for Vert+ framing.
- Layout2 ortho projection builders (main+0x1520c80 and main+0x773b90)
  scaling canvas height so HUD widgets keep 1:1 pixel aspect ratio.
- Layout2 CalculateMtx (main+0x14e9980) scaling full-screen PicturePanes
  so scene transitions and faders cover the expanded canvas without gaps.

Verified in gameplay on macOS across 16:9, 16:10, and 4:3.
@github-actions github-actions Bot added rewriter The NSO rewriter and per-build patches tools Tools and scripts (dm/tools, scripts) docs Documentation game: 0400486024DEC000 A game labels Nov 14, 2026
@UserDerezzed

Copy link
Copy Markdown

This is an Ocarina of Time fix, writing this here so that agents can properly search for it as opposed to using the game ID

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

Labels

docs Documentation game: 0400486024DEC000 A game rewriter The NSO rewriter and per-build patches tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants