fixed like everything on the readme also added some stuff like loader.bat #2017

Open
mimic-wasm wants to merge 10 commits from mimic-wasm/mimic-wasm-patch-1 into main
mimic-wasm commented 2026-11-10 23:46:42 +00:00 (Migrated from github.com)

Improve HUD Aspect Ratio, Graphics Settings and Performance

Summary

This PR introduces several graphics, HUD, and performance improvements to Hookshot.

Changes

HUD

  • Fix HUD stretching on narrower aspect ratios.
  • Preserve 16:9 HUD proportions on 4:3 and 16:10 displays.
  • Maintain proper HUD scaling on ultrawide displays.

Graphics

  • Add a Native 3D Resolution option.
  • Move Texture Streaming Cache into Graphics settings.
  • Add a PS3-style (720p) quality preset.

PS3-style preset

  • 1920×1080 output resolution.
  • Approximately 1280×720 3D rendering.
  • Lanczos upscaling.
  • Reduced sharpness and anisotropic filtering.
  • Native 3D resolution enabled.
  • Texture streaming cache enabled.

Performance

  • Expose texture streaming cache in the Graphics menu.
  • Allow players to use lower rendering resolutions.
  • Preserve frame-generation settings when changing quality presets.

Tests

  • Update widescreen shape tests.
  • Update frame-generation preset tests.
  • Add dedicated HUD aspect-ratio tests.

Expected Results

  • Correct HUD proportions across different display aspect ratios.
  • More control over 3D image sharpness.
  • An additional lower-resolution graphics preset.
  • Potentially fewer texture-streaming stalls when entering new areas.

Testing

The four targeted Python tests passed.

Full hardware validation is still needed.

loader.bat code:

@echo off
set RX_VK_GPU_UNSWIZZLE=1
set RX_VK_BATCH=1
hookshot.exe

Improve HUD Aspect Ratio, Graphics Settings and Performance Summary This PR introduces several graphics, HUD, and performance improvements to Hookshot. Changes HUD - Fix HUD stretching on narrower aspect ratios. - Preserve 16:9 HUD proportions on 4:3 and 16:10 displays. - Maintain proper HUD scaling on ultrawide displays. Graphics - Add a Native 3D Resolution option. - Move Texture Streaming Cache into Graphics settings. - Add a PS3-style (720p) quality preset. PS3-style preset - 1920×1080 output resolution. - Approximately 1280×720 3D rendering. - Lanczos upscaling. - Reduced sharpness and anisotropic filtering. - Native 3D resolution enabled. - Texture streaming cache enabled. Performance - Expose texture streaming cache in the Graphics menu. - Allow players to use lower rendering resolutions. - Preserve frame-generation settings when changing quality presets. Tests - Update widescreen shape tests. - Update frame-generation preset tests. - Add dedicated HUD aspect-ratio tests. Expected Results - Correct HUD proportions across different display aspect ratios. - More control over 3D image sharpness. - An additional lower-resolution graphics preset. - Potentially fewer texture-streaming stalls when entering new areas. Testing The four targeted Python tests passed. Full hardware validation is still needed. loader.bat code: @echo off set RX_VK_GPU_UNSWIZZLE=1 set RX_VK_BATCH=1 hookshot.exe
NotRexed (Migrated from github.com) requested changes 2026-11-10 23:49:22 +00:00
NotRexed (Migrated from github.com) left a comment

Thanks for this. The narrow-screen HUD fix is a good catch, and it's already been taken into #2015 (the oot_wide.py vertical squeeze, the hos_main.c lines, and your widescreen tests), with you credited as co-author. It's being checked in game in 4:3 and 16:10 windows before it merges.

The rest can't go in as it is:

  • loader.bat and hookshot_env.txt at the repo root: these look like your local setup. The hookshot_env.txt sets RX_VK_NOOPT=1, a debug switch that turns the game code's optimizer off. Neither belongs in the repository.
  • "Native 3D resolution" defaulting to on: hos_ini_option("native_3d_resolution", 1) changes every player's default from the game's 0.8 scene scale to 1.0, about 25% more pixels to draw, which costs fps for everyone. Defaulting to 0 would keep today's behaviour (HOS_SCENE_NATIVE already turns it on).
  • The "PS3-style (720p)" preset: its help text mentions "GTA V assets", which has nothing to do with this project. Presets are tuned per VRAM size, so a new one needs a reason and measurements.
  • Moving Sampler cache from Debug to Graphics: fine in principle, but it's a separate change. It's easier to review on its own.
  • The description mentions updated frame-generation and widescreen tests, but this branch doesn't include them.

If you'd like to continue: one PR per change, without the local files, each with how you tested it (GPU, resolution, what you saw). The HUD part needs nothing more from you, since #2015 carries it.

🤖 Generated with Claude Code

Thanks for this. The narrow-screen HUD fix is a good catch, and it's already been taken into #2015 (the `oot_wide.py` vertical squeeze, the `hos_main.c` lines, and your widescreen tests), with you credited as co-author. It's being checked in game in 4:3 and 16:10 windows before it merges. The rest can't go in as it is: - **`loader.bat` and `hookshot_env.txt` at the repo root:** these look like your local setup. The `hookshot_env.txt` sets `RX_VK_NOOPT=1`, a debug switch that turns the game code's optimizer off. Neither belongs in the repository. - **"Native 3D resolution" defaulting to on:** `hos_ini_option("native_3d_resolution", 1)` changes every player's default from the game's 0.8 scene scale to 1.0, about 25% more pixels to draw, which costs fps for everyone. Defaulting to 0 would keep today's behaviour (`HOS_SCENE_NATIVE` already turns it on). - **The "PS3-style (720p)" preset:** its help text mentions "GTA V assets", which has nothing to do with this project. Presets are tuned per VRAM size, so a new one needs a reason and measurements. - **Moving Sampler cache from Debug to Graphics:** fine in principle, but it's a separate change. It's easier to review on its own. - The description mentions updated frame-generation and widescreen tests, but this branch doesn't include them. If you'd like to continue: one PR per change, without the local files, each with how you tested it (GPU, resolution, what you saw). The HUD part needs nothing more from you, since #2015 carries it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
hckrman101 (Migrated from github.com) reviewed 2026-11-11 02:21:37 +00:00
hckrman101 (Migrated from github.com) left a comment

I checked this one for anything risky first, since the title doesn't match the diff (nothing in the README changes). It's clean: nothing downloads or runs remote code, there are no binaries or obfuscated content, no workflow or release/update URL changes, and nothing touches credentials. loader.bat only sets two env vars and starts the local hookshot.exe.

NotRexed's review covers the rest, and I agree with all of it. The HUD part is already carried by #2015. loader.bat and hookshot_env.txt are local setup (RX_VK_NOOPT=1 turns the optimizer off). Native 3D resolution defaulting to on changes everyone's default. The PS3 preset's hint mentions GTA V and the preset has no measurements behind it. The Sampler cache move should be its own PR, and the tests the description mentions aren't in the branch.

Two more things:

  • The vertical squeeze writes 16 bytes starting at vreg[4] + 4. Each vreg is 16 bytes (uint64_t vreg[32][2]), so that write scales lanes 1-3 of Q4 and lane 0 of Q5. If the row is Q4 lanes 0-3 (the way the horizontal path scales all of Q1), the offset should be 0. If it really is lanes 1-3, the copy should be 12 bytes. #2015 has the same line, so it's worth checking there before it merges (inline note).
  • The branch was made by re-uploading whole files over an older base, so GitHub shows it as conflicting with main, and only the commit-title check ran. A fresh branch from current main per change would sort both out.

The test_env_file.py change (SDL_AUDIO_DRIVER) is fine: SDL_ names already pass the env-file filter.

I checked this one for anything risky first, since the title doesn't match the diff (nothing in the README changes). It's clean: nothing downloads or runs remote code, there are no binaries or obfuscated content, no workflow or release/update URL changes, and nothing touches credentials. `loader.bat` only sets two env vars and starts the local `hookshot.exe`. NotRexed's review covers the rest, and I agree with all of it. The HUD part is already carried by #2015. `loader.bat` and `hookshot_env.txt` are local setup (`RX_VK_NOOPT=1` turns the optimizer off). Native 3D resolution defaulting to on changes everyone's default. The PS3 preset's hint mentions GTA V and the preset has no measurements behind it. The Sampler cache move should be its own PR, and the tests the description mentions aren't in the branch. Two more things: - The vertical squeeze writes 16 bytes starting at `vreg[4] + 4`. Each `vreg` is 16 bytes (`uint64_t vreg[32][2]`), so that write scales lanes 1-3 of Q4 and lane 0 of **Q5**. If the row is Q4 lanes 0-3 (the way the horizontal path scales all of Q1), the offset should be 0. If it really is lanes 1-3, the copy should be 12 bytes. #2015 has the same line, so it's worth checking there before it merges (inline note). - The branch was made by re-uploading whole files over an older base, so GitHub shows it as conflicting with main, and only the commit-title check ran. A fresh branch from current main per change would sort both out. The `test_env_file.py` change (SDL_AUDIO_DRIVER) is fine: `SDL_` names already pass the env-file filter.
@ -0,0 +1,2 @@
RX_VK_NOOPT=1
hckrman101 (Migrated from github.com) commented 2026-11-11 02:21:37 +00:00

Local debug settings (optimizer off, checkpoints on). Please drop this from the PR, as NotRexed said.

Local debug settings (optimizer off, checkpoints on). Please drop this from the PR, as NotRexed said.
@ -0,0 +1,4 @@
@echo off
hckrman101 (Migrated from github.com) commented 2026-11-11 02:21:37 +00:00

Harmless (it sets two env vars and starts the local exe), but it's a personal launcher. Please drop it too. hookshot_env.txt beside the exe already does the same job.

Harmless (it sets two env vars and starts the local exe), but it's a personal launcher. Please drop it too. `hookshot_env.txt` beside the exe already does the same job.
@ -49,1 +52,4 @@
"else if (_qy > 0.0f && _qy < 1.0f) { memcpy(_row, (const uint8_t *)c->vreg[4] + 4, 16); "
"for (int _k = 0; _k < 4; _k++) _row[_k] *= _qy; memcpy((uint8_t *)c->vreg[4] + 4, _row, 16); } "
"} } } } /* (nx2/oot_wide.py: HUD keeps 16:9 on wide and narrow screens) */"
% (UI_M00, UI_M11, " : ".join("_vt == 0x%xULL ? %du" % (v, 1 << k) for k, v in enumerate(KEEP_VTABLES)) + " : 0u"))
hckrman101 (Migrated from github.com) commented 2026-11-11 02:21:37 +00:00

c->vreg[4] is one 16-byte Q register, so a 16-byte copy from + 4 reads and writes the first float of Q5 too. Should this be c->vreg[4] with 16 bytes (the whole row, like the Q1 path), or 12 bytes from + 4? The same line is in #2015.

`c->vreg[4]` is one 16-byte Q register, so a 16-byte copy from `+ 4` reads and writes the first float of Q5 too. Should this be `c->vreg[4]` with 16 bytes (the whole row, like the Q1 path), or 12 bytes from `+ 4`? The same line is in #2015.
hckrman101 commented 2026-11-11 15:50:57 +00:00 (Migrated from github.com)

Heads-up: this conflicts with main now. Could you rebase onto main and resolve the conflicts? Thanks!

Heads-up: this conflicts with main now. Could you rebase onto main and resolve the conflicts? Thanks!
Joey-Magnus (Migrated from github.com) reviewed 2026-11-11 21:46:40 +00:00
Joey-Magnus (Migrated from github.com) left a comment

I'd close this one. The useful part, the vertical HUD squeeze in nx2/oot_wide.py and host/hos_main.c, is carried by #2015 with you as co-author. #2015 is still open on main, and the 16-byte write at vreg[4] + 4 hckrman101 flagged should be checked there.

Nothing else here can go in as it is, and there's been no update since NotRexed's review yesterday:

  • loader.bat and hookshot_env.txt at the repo root are local setup. The env file turns on RX_VK_NOOPT=1, a debug switch.
  • hos_ini_option("native_3d_resolution", 1) changes every player's scene scale from 0.8 to 1.0, about 25% more pixels to draw.
  • The PS3 preset has no measurements behind it, and its hint mentions GTA V.
  • Moving Sampler cache to Graphics is a separate change.
  • hos_main.c still reads HOS_SCENE_NATIVE with atoi, where main now uses env_on (#2042).

The branch also conflicts with main in vk_menu.cpp and hos_main.c, and the title doesn't describe the change. If you want to pursue any of these, a fresh branch from main per change, with how you tested it, is the way forward.

I'd close this one. The useful part, the vertical HUD squeeze in `nx2/oot_wide.py` and `host/hos_main.c`, is carried by #2015 with you as co-author. #2015 is still open on main, and the 16-byte write at `vreg[4] + 4` hckrman101 flagged should be checked there. Nothing else here can go in as it is, and there's been no update since NotRexed's review yesterday: - `loader.bat` and `hookshot_env.txt` at the repo root are local setup. The env file turns on `RX_VK_NOOPT=1`, a debug switch. - `hos_ini_option("native_3d_resolution", 1)` changes every player's scene scale from 0.8 to 1.0, about 25% more pixels to draw. - The PS3 preset has no measurements behind it, and its hint mentions GTA V. - Moving Sampler cache to Graphics is a separate change. - `hos_main.c` still reads `HOS_SCENE_NATIVE` with `atoi`, where main now uses `env_on` (#2042). The branch also conflicts with main in `vk_menu.cpp` and `hos_main.c`, and the title doesn't describe the change. If you want to pursue any of these, a fresh branch from main per change, with how you tested it, is the way forward.
Commenting is not possible because the repository is archived.
No description provided.