Repository navigation
Conversation
…ds on a 64 KB boundary Symptom: adding a FRAME_STEP stub for Hades II 1.0.131248's main stopped the rewrite with "AssertionError: frame step state page". Cause: the state page is the page after the key page, and the appended patch area starts at the next 64 KB boundary after the key page. This main's key page is 0x590c000-0x5910000, so the patch area started at 0x5910000, exactly where the state page goes. Fix: when a main has frame step stubs (FRAME_STEP or MATCH_FRAME_STEP) and the key page ends there, the patch area starts 64 KB later. Modules without stubs, and those whose rounding already leaves the page free, keep their layout. Checked: dm/tools/tests/test_frame_step_page.py (new; a synthetic main whose key page ends on 64 KB fails without the change, and with it gets state page 0x10000 and patch area 0x20000; the two other layouts are unchanged); test_nso_match, test_patches, test_exclusive_windows, test_rewrite_parallel, test_spin_waits, test_jump_copies, test_acquire_lock and test_docs pass; lint_python.py: no new finding of its own (main's ue_cvar.py:65 shows on main too). Hades II 1.0.131248's main with the render-size stub: state page 0x5910000, patch area 0x5920000. Reference entry in docs/reference/rewriter.md, symptom index regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (DM_RENDER_SIZE) sets the size its app init takes Symptom: Hades II renders a fixed 1280x720 on the Mac too, and the Mac scales that up (issue seedds#772). Cause: the app's init (main+0x2a4d20 in 1.0.131248, the function that also runs the main loop) writes the size as one constant right after nn::vi::CreateLayer, mov x8,#0x500; movk x8,#0x2d0,lsl seedds#32 at main+0x2a4eb0, and stores it to the app settings and the window rectangle. The swapchain and every screen-sized target follow it. Fix: a frame-step stub at that site takes the size from the state page (+0x38, u32 width and height), written by the loader from DM_RENDER_SIZE=<w>x<h> (16:9, 1280x720 to 3840x2160; 0 keeps 1280x720). The stub declares the RENDER_SIZE capability, which offers the launcher's Resolution row. The profile registers 1.0.131248's build (v196608) for it; its shaders are not in the tables, so it is packed from a derived profile as before. Needs the previous commit (room for the state page). Checked: built from the base game and 1.0.131248 NSPs (main and sdk rewritten, state page 0x5910000, patch area 0x5920000, the stub at main+0x2a4eb0, Resolution in launcher.json). Headless on an M5 Max, the opening into Erebus, 110 s per size at DM_PRESENT_HZ=120: 1280x720, 1920x1080 and 3840x2160 without a fault, the swap chain at the size, every 300-frame window at 8.33 ms, GPU per frame 2.18 / 3.31 / 3.75 ms; a 4K still shows the scene and HUD at 3840x2160, the painted art as soft as its textures. Host unit tests, test_patches, test_settings, test_launcher_settings, test_player_env, test_game_profile and test_docs pass; lint_python.py: no new finding of its own. v0 has no stub. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The note said the art only looked made for 1080p or less. The manifests (Packages/NVN/*.pkg_manifest) give each sprite its original and stored size and a scale: 1.5 for 3,764 of 4,797 sprites read, 1.48 to 1.52 for most others. So 1.0.131248 stores its art at 2/3 of its original size, and a larger render size magnifies it 1.5x at 1080p and 3x at 4K while the HUD, text and edges get sharper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ER_SIZE), docked The game sizes its docked output and render targets from fixed 2560x1440 constants. Stubs at those sites (the ones PR seedds#1460 found for its ultrawide cuts: main+0x1202ee0, +0x31f39f4, the display mode table's 2560x1440 entry read at +0x112c604, and the float output size at +0xecbc80 / +0xecbcb4) take the state page's render size instead and keep the original for 0. Placed only when the frame-step function sits at v131072's place; they declare the RENDER_SIZE capability, so the launcher offers Resolution. The Resolution row's 0 now reads "Game's own (as on the Switch)", since the game's own size differs per game. Measured on an M5 Max (macOS 26.6.2), headless, n=1 each: 60 fps held at the game's own size, 2560x1440 and 3840x2160 (GPU p50 8.9 / 9.2 / 9.6 ms); in play at 2560x1440 and 3024x1702. Co-authored-by: vladbondarenko97 <12616782+vladbondarenko97@users.noreply.github.com>
Fasen24-AI
added a commit
to Fasen24-AI/swordboiMacNative
that referenced
this pull request
Nov 10, 2026
seedds#1901 seedds#1459 seedds#1928 seedds#1942 seedds#1940 seedds#1952 seedds#1611 seedds#2065 seedds#2083 seedds#2008 seedds#2079 seedds#2022 seedds#2075 seedds#2077 seedds#2020 seedds#2021 onto main 04811a6 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014eD437mxrMnW2UwLZhpwc7 Upstream pull requests applied in this commit (their authors' work, brought onto this tree with a three-way merge; the description is in each PR): - seedds#1459 by PromethOps (open): DM_UPSCALER=metalfx takes agl's agl_ndsr_vr.pck networks too, and a variant with no curve and no power is drawn as one colour space: Ocarina of Time's upscaler is MetalFX's - seedds#1611 by Esteban-V (open): An argument block whose only change is a uniform buffer is patched instead of encoded again - seedds#1774 by uncraftablexd (closed): Compute threads that exit before a barrier keep arriving at it, and every shader loop has a cap (GPU hang defences), chain change - seedds#1824 by cocoman93 (open): Clamp texel fetches past a sampled 2D texture's edge: no hard edge in Ocarina of Time's mist - seedds#1901 by FifteenPen (open): The game's compute dispatches with no game barrier between them run side by side (profile key dispatch_overlap, on for Ocarina of Time): Kokiri Forest GPU p50 15.63 → 14.76 ms - seedds#1928 by FeReuss (open): Ocarina of Time: enc_thread on, the replay encodes on a thread of its own - seedds#1929 by FeReuss (open): Unused border corrections are compiled out of pipelines that bind no sampler with a twin (function constant DMSH_BORDER_FC) - seedds#1930 by FeReuss (open): A float add to storage memory with no result read is one native atomic add instead of a compare-and-swap loop - seedds#1940 by uncraftablexd (open): A prewarm list's lines after its #@after_first_frame line are built after the first frame, in the background, instead of in the prepare step (issue seedds#1747) - seedds#1942 by uncraftablexd (open): Frame step: late frames with the GPU idle do not step up, and a longer hold the GPU does not explain is probed - seedds#1952 by AdyaGMD (open): Compute moves ahead of scene passes past occlusion queries and conditional rendering; clears wait across dispatches - seedds#2008 by bquilty25 (open): nvn: reactive memory watchdog, 16-way view cache, and texture upload batching - seedds#2020 by padsiwono (open): Ocarina of Time v131072: Output Native draws the full output size instead of the game's 80 % frame (`DM_OUTPUT`) - seedds#2021 by padsiwono (open): Ocarina of Time v131072 renders at the launcher's Resolution (`DM_RENDER_SIZE`), docked - seedds#2022 by sleepyeyedjoe (closed): Ocarina of Time: large models no longer go black for one frame twice, 4–5 frames apart, when the game streams new textures into them (a texture ID a shader has read keeps its read mark when it gets another texture) - seedds#2030 by humanperzeus (open): A NaN colour at alpha 0 is returned as 0, as NVIDIA's blender takes a zero factor: Ocarina of Time's white clouds over the ferns are gone - seedds#2035 by Know-It-All-Brother (open): The shader build runs as worker processes, and no shader waits for a batch (Ocarina of Time's cold Mac map: 3,002 s to 1,298 s) - seedds#2065 by Raymon82777 (closed): A vertex library with layer entry points of its own gets bases for its main0 pairs: Ocarina of Time's 230 ms camera-turn hitch in Hyrule Field goes to 39 ms - seedds#2075 by sleepyeyedjoe (closed): Ocarina of Time: a patch of scenery no longer draws dark for one frame when the game gives it a sharper texture (a pool texture the walk does not make holds a stand-in of its own colours until its first read) - seedds#2077 by roandegraaf (closed): Ocarina of Time: fix the "plaid" terrain / missing texture tiles (GPU-drawn textures now reach the storage the game copies) - seedds#2079 by uncraftablexd (open): Render pipelines that share a vertex function are taken from the archive or compiled one at a time: the AGX driver crashes in createVertexProgramVariant's completion block - seedds#2083 by FifteenPen (closed): Ocarina of Time's prewarm list gets 41 more task / mesh pipelines from later play
Fasen24-AI
added a commit
to Fasen24-AI/swordboiMacNative
that referenced
this pull request
Nov 10, 2026
…a 23 was built from Ours kept where main has not taken the change: the pool test of image_texture (virtual pools), need_make with seedds#2075's stand-in, the copy absorb beside main's gsb_mark, DM_SHARPEN's copy_t2t_draw_x, the render scale (seedds#1903) and fixed resolution stubs beside seedds#2020's native output and seedds#2021's render size. Main's own taken for the depth rule (fb_depth_rule), the family textures and the movie network: the opt-in shortcut of PR seedds#1331 (DM_NVN_NDVE_MOVIE_DIRECT) is removed, main runs the network as host kernels. Generated files (chain header, lock, translator binaries, symptoms, game-patches) are main's here and rebuilt in the next commit. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014eD437mxrMnW2UwLZhpwc7 Upstream pull requests applied in this commit (their authors' work, brought onto this tree with a three-way merge; the description is in each PR): - seedds#1331 by givethesourceplox (closed): Scale decoded NDVE movies on Metal and skip matched reconstruction - seedds#1903 by FifteenPen (open): Ocarina of Time takes the launcher's Render scale: the 3D views at that fraction of the game's own size, the dynamic resolution held at its top level (Kokiri Forest docked at 0.75: GPU p50 15.77 → 14.31 ms, 60 fps held) - seedds#2020 by padsiwono (open): Ocarina of Time v131072: Output Native draws the full output size instead of the game's 80 % frame (`DM_OUTPUT`) - seedds#2021 by padsiwono (open): Ocarina of Time v131072 renders at the launcher's Resolution (`DM_RENDER_SIZE`), docked - seedds#2075 by sleepyeyedjoe (closed): Ocarina of Time: a patch of scenery no longer draws dark for one frame when the game gives it a sharper texture (a pool texture the walk does not make holds a stand-in of its own colours until its first read)
Contributor
Author
|
Closing this. I reworked it onto main's render scale (the same five sites, 2560x1440 times the scale, up to 2.0) and ran it on v131072 from a Castle Town save, headless on an M5 Max, one run per scale. The output, the window crop and the HUD follow the scale (5120x2880 at 2.0, HUD and text placed right, no crash), but the 3D does not: 1536x864 at 1.0, 1603x902 at 1.5 and 1366x768 at 2.0. The game sizes its 3D from its own data ( |
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.
What and why
On the Mac, Ocarina of Time v131072 renders its docked picture at a fixed 2560x1440 and the window scales that to the screen. The game sizes its output and render targets from 2560x1440 constants at five sites in
main, the ones PR 1460 (vladbondarenko97) found for its build-time ultrawide cuts: the graphics setup's output (swapchain) sizemain+0x1202ee0, the docked render size+0x31f39f4, the display mode table's 2560x1440 entry where it is read (+0x112c604), and the float output width and height+0xecbc80/+0xecbcb4. Stubs there take the size from the state page instead (+0x38, as for Hades II in #1849) and keep the original instructions for 0. They declare theRENDER_SIZEcapability, so the launcher offers Resolution at run time: the game's own size, 1920 × 1080, 2560 × 1440 or 3840 × 2160. The stubs are placed by address, only when the matched frame-step function sits at v131072's place (main+0x6e6be0). Handheld is left alone.The game still draws 80 % of the output and its 3D at most at its top level (×0.75 of that), so at 3840x2160 the 3D is 2304x1296; #2020 (Output Native) removes the 80 %.
The first three commits are #1848 and #1849, which this needs (the state page room and the Resolution plumbing); the last is this change. #1849's Resolution row now reads "Game's own (as on the Switch)" for 0, since the game's own size differs per game.
Credit: the sites are from #1460 (
Co-authored-byin the commit). #1460 fixes one shape at build time (DM_ULTRAWIDE); this sets the size at launch. Shapes other than 16:9 are not in this PR.Game note: Render size. Also
docs/settings.md(Resolution),docs/env_switches.tsv,docs/agents/game-patches.md(regenerated), theBINDINGentry.Checked
patch_nso.pyon v131072'smainwith this branch: the five stubs placed (main.cuts.tsv),# RENDER_SIZE 1and# DYNAMIC_RESOLUTION 1inmain.fixups.tsv.test_patches,test_docs,test_settings,test_launcher_settings,test_env_switches,test_game_profile,test_frame_step_pagepass;make -C dm/host/tests GAME=0400486024DEC000 runpasses (50 suites, 0 failed).0400486024DEC000) v131072, docked, on our own build (main270b6fd5plus Ocarina of Time changes; the stubs are the same, they declared a fixup key of our own instead of the capability). Headless, a 1-minute route from a save, n=1 each: every size held 60 fps (frame p50 16.7 ms); GPU p50 8.9 ms at the game's own size, 9.2 ms at 2560x1440 through the stubs, 9.6 ms at 3840x2160; the log names the size (main: render size 3840x2160 (DM_RENDER_SIZE),WindowInitialize swap chain … 3840x2160,WindowCrop 0,0 3072x1728). In play: 2560x1440 (three sessions, 2 to 14 minutes) and 3024x1702 (five, up to 28 minutes), through Kakariko, Death Mountain Trail, Hyrule Field and Castle Town.Docs
python3 dm/tools/docs_symptoms.pywas run🤖 Generated with Claude Code