Skip to content

Fixed resolution: let the dynamic path run first (black 3D at startup) - #102

Closed
vzeol wants to merge 1 commit into
NotRexed:mainfrom
vzeol:fix/fixed-resolution-black-3d
Closed

vzeol wants to merge 1 commit into
NotRexed:mainfrom
vzeol:fix/fixed-resolution-black-3d

Conversation

@vzeol

@vzeol vzeol commented Nov 7, 2026

Copy link
Copy Markdown

Problem

With Resolution 100% saved in hookshot_options.ini (and, here, Upscaling = Lanczos), loading a save shows the HUD and the minimap, but the 3D is completely black. The log shows the frame is drawn (~4700 draws, ~28 fps): it just comes out black. Switching to 100% from the Insert menu during play works fine. The bug only happens when the option is active from the first frame.

I checked that it is the resolution and not the upscaler: Resolution 100% + Upscaling off at startup gives the same black 3D.

Cause

oot_patches.py sends the engine to the fixed path (L_8082640c) as soon as hos_fixed_resolution is set. That path skips the whole dynamic block, and the dynamic block also writes fields the rest of the frame reads (the controller's +8, +16 and +168, written between the branch and L_80825c14). When the menu turns the option on mid-game, those fields have already been written by earlier frames. When the option is on from boot, they never are.

Fix

  • The lifted branch counts the dynamic path's runs (hos_dynres_runs++ right after the patched if).
  • realtime_step only sets hos_fixed_resolution after 30 of them, a fraction of a second, the same order as turning it on from the menu.

Two files: host/nn_vi.c and nx2/oot_patches.py. No change to the dynamic path itself or to the scale handling.

Tested

RX 7900 XTX, Ryzen 9 3950X, Windows 11, built with the same flags as the Builder (RX_RELEASE=1, hot chunk, PGO profile). With Resolution 100% + Lanczos at startup, the 3D now shows and the save even loads faster. Kokiri Forest runs at ~46-60 fps.

This probably isn't AMD specific: anyone who saves Resolution 100% should hit it on the next start.

🤖 Generated with Claude Code

With Resolution 100% saved in hookshot_options.ini, the 3D was black from
the first frame (HUD and minimap drawn, ~4700 draws a frame). Turning the
same option on in the Insert menu during play worked.

The fixed path jumps over the whole dynamic block, which also writes
fields the 3D reads later (+8, +16, +168 of the controller). Fixed from
the first frame, they were never written. The lifted branch now counts
the dynamic path's runs and the fixed path waits for 30 of them.

Tested on an RX 7900 XTX (Windows 11, Adrenalin): Resolution 100% +
Lanczos at startup now shows the 3D, and the save loads faster.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NotRexed

NotRexed commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Thank you! Applied in c02f290 and tested: with Resolution 100% saved before starting, the 3D now shows. It's in https://github.com/NotRexed/Hookshot/releases/tag/small-vram

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.

2 participants