Repository navigation
The Legend of Zelda: Ocarina of Time renders native ultrawide (21:9) with DM_ULTRAWIDE - #1460
vladbondarenko97 wants to merge 1 commit into
Conversation
|
Thanks for finding these sites. I built on them in #2021: the same five 2560x1440 constants, as stubs that take the size at launch from the launcher's Resolution (through #1849's state page plumbing), with you as co-author. It covers 16:9 sizes only, so your 21:9 cuts are not replaced by it; other shapes also need the camera's aspect and the HUD, which I haven't sent yet. #2020 removes the game's 80 % crop, the same one your log shows as |
…with DM_ULTRAWIDE On a 3440x1440 screen the game showed a 16:9 picture with black bars: it sizes its output from fixed 2560x1440 (docked) constants, so the host's fit kept the bars. An opt-in set of cuts for main e0f3ccfaf50065ae, applied when the NSP script runs with DM_ULTRAWIDE=<width>x<height>, gives the game widths from the screen's ratio at its own heights: the graphics setup's output size (main+0x1202ee0), the docked and handheld render sizes (main+0x31f39f4, +0x31f3a00), the float copy of the output width (main+0xecbc80) and the output resolution table (main+0x3f58540). The 3D view takes its aspect from the render size, so the field of view widens; nothing is stretched, and the HUD and subtitles stay centred. Without DM_ULTRAWIDE no cut is registered and nothing changes. Checked on a Mac mini M4 Pro, macOS 27.0.1, CB342CK at 3440x1440, update v131072: swap chain 3440x1440 (was 2560x1440), WindowCrop 2752x1152 (2.389:1, the game's 80 % dynamic resolution; was 2048x1152), title screen, the opening and Link's house fill the screen; about 36 fps in the opening at 3440x1440. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c5acc06 to
99dad19
Compare
…xed, Wide view, and four upstream fixes The first build of the X line (it would have been V24), on V23: - Render targets in a GPU-only pool are placed in heaps of their own, and a freed target's heap waits resident for the next target it fits (nxnative 7f50222, DM_NVN_RT_RECYCLE): dynamic-resolution and render-scale changes no longer get new Metal memory each time. Merged by hand into V's texture path: a recycled heap is tried before a fresh allocation, after the Potato recycle bin, and such a texture is not binned again. t_rt_recycle 18 checks pass. - The main submission may have up to 16 command allocators and visibility buffers in flight instead of 8 (DM_NVN_ALLOC_CAP, 3-32): at 8 the submit thread waited for a free one (log 64: 352 waits). - A memory pool's texture IDs are marked gone before its CPU-written classification goes (nxnative c229bd7): a draw reaching one in between got the NvPkg wrapper as its texture, and V23 stopped with "-[NvPkg buffer]: unrecognized selector" right after a save (logs 66 and 67). t_cpu_tex's finalize_during_walk fails 2 checks without it. - Wide view (DM_WIDE_VIEW, a launcher setting, off by default): the game renders the screen's shape instead of 16:9 with bars, Hor+, nothing stretched. The size constants are nxnative PR seedds#1460's; here they are stubs that read the state page, so it needs no rebuild. The present takes the picture's shape from nxnative 2202d61. Shown only for builds with the stubs (fixups WIDE_VIEW). - From nxnative main, merged with no conflict: a stopped Core Haptics engine no longer ends the app (7238bfd), each audio renderer plays from its own PCM blocks (a334797), a submission's queued writes grow as needed (6d5ed71), and cubes in cube-array and 2D-array slots read every face (c83c48f). Same shader chain (804433846e4b). Not yet played on a phone. Co-authored-by: seedds <seedds@gmail.com> Co-authored-by: Pedro Nascimento <91118+lunks@users.noreply.github.com> Co-authored-by: vladbondarenko97 <contactvlad1k@gmail.com> Co-authored-by: dsi-hub <260802842+dsi-hub@users.noreply.github.com> Co-authored-by: zatteogit <64840342+zatteogit@users.noreply.github.com> Co-authored-by: Oliver Ames <7366664+oliverames@users.noreply.github.com> Co-authored-by: David Padron-Harris <34929160+dpadr@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tried on a 2560x1080 screen (base M4 Mac mini, 10-core GPU, macOS 27.2) on main 0def324. Two findings: 1. The view is stretched, not widened. With 2. On current main the wide picture is squeezed back into 16:9 on screen. Since 2202d61 (issue #949), The same Kokiri Forest spot from one save, 16:9 with this PR, the PR #1460 cuts, and the 2560x1080 variant ( |
|
@Ayymeric on your point 1: in v131072 the main view's aspect doesn't come from
On our fork I stub those six loads: aspect becomes the render size's W / H, and fovy is widened only when the picture is taller than 16:9 (through the game's own Not tried: 2560x1080, and the stubs together with this PR's cuts. The HUD stays a stretched 16:9 canvas with these alone, which is a separate job (#2588). Happy to put the stubs up as a patch on top of this PR if that helps. |
|
Thanks, that matches what I found independently on v131072: the same three camera → projection copies (main+0x4c533c, +0x2e1bb6c, +0x2e1c7d0), plus three other projection setups (+0x653bd4, +0x6545f4, +0x3b50b50) and the camera parameter copy that defaults the aspect to 16:9 (+0x14fc7f0). I replace a 16:9 aspect with the output's ratio at those stores. At 2560x1080 (output and docked render size 2560x1080, so 1920x810 drawn, with the present-shape stopgap from my comment above) the view widens with nothing stretched: top 16:9, bottom 2560x1080, same spot and save ( That's from scripted runs only so far: I haven't played it yet, and the HUD, menus, cutscenes and other areas still need checking in play. Your patch covers taller screens too, so please do put it up on top of this PR; I'll test it at 2560x1080 on a base M4 and report back. |


What and why
On a 21:9 screen (3440x1440) Ocarina of Time showed a 16:9 picture with black bars: the game sizes its output from fixed 2560x1440 (docked) constants. This adds opt-in cuts for main
e0f3ccfaf50065ae(dm/games/0400486024DEC000/patches.py), registered only when the NSP script runs withDM_ULTRAWIDE=<width>x<height>. They give these widths from the screen's ratio at the game's own heights:The 3D view takes its aspect from the render size, so the view widens (Hor+) and nothing is stretched. The HUD and subtitles stay centred, and movies stay 16:9 in the middle. Without
DM_ULTRAWIDE, no cut is registered and nothing changes. The game note has a new "Ultrawide" section, anddocs/agents/game-patches.mdwas regenerated.Checked
python3 -m unittest dm.tools.tests.test_docs dm.tools.tests.test_env_switches(OK). Ranpatch_nso.pyon main v131072 withDM_ULTRAWIDE=3440x1440: all 5 cuts' original bytes matched, and the output was identical to the binary I played.WindowCrop2752x1152 (2.389:1, at the game's 80 % dynamic resolution; was 2048x1152).DM_CTL shot).Docs
🤖 Generated with Claude Code