WIP: feat(pc): add KBM actions, item wheels, DLSS 5 HDR and 30 FPS #173

Closed
TheDevil wants to merge 1 commit from TheDevil/Longshot:feat/pc-controls-neural-rendering into main
First-time contributor

Superseded by focused PRs requested in review:

  1. #609 — host-paced 30 FPS cap.
  2. #613 — separate PC keyboard actions and KBM/controller binding pages.
  3. #616 — mouse item wheels and locally extracted icons; depends on #613.
  4. #619 — regular NGX Neural Rendering port.
  5. #620 — Native HDR composition and NR scaling; depends on #619.

The patched-runtime bridge is withdrawn entirely from these submissions. No alternate runtime loader, RX_VK_DLSS_NR_DIRECT, nr_bridge or hardcoded application ID is included. The patch details and old AppID provenance are unknown; no claims about either are made. The NR path uses ordinary NGX initialization and a compatible unmodified runtime.

Credit for the original NR work: HypeZ85 (Discord valerio85), Hookshot PR #1590, commit a1f730de8c8e7b2adfbca4e0b8ac4cfbdf72834c.

All five replacement branches include main snapshot 6c9edffe using non-rewriting merges. The 30 FPS implementation uses host pacing, not a second renderer sleep. API 23 is isolated in the input PR and API 24 in its dependent wheel PR; NR keeps main API 22. Replacement descriptions provide commit-specific measurements, defaults, risks and pending validation.

Final HDR/NR stack Windows game-free run: 542 passed, 13 failures reproduced on the original unchanged baseline, 35 skipped. Windows renderers build with and without NGX. All replacements remain WIP for fresh gameplay, compatible unmodified-runtime and Linux validation. The user's installed game was not modified.

Closing this combined PR rather than rewriting its published history; its original source branch is retained.

Superseded by focused PRs requested in review: 1. #609 — host-paced 30 FPS cap. 2. #613 — separate PC keyboard actions and KBM/controller binding pages. 3. #616 — mouse item wheels and locally extracted icons; depends on #613. 4. #619 — regular NGX Neural Rendering port. 5. #620 — Native HDR composition and NR scaling; depends on #619. The patched-runtime bridge is withdrawn entirely from these submissions. No alternate runtime loader, RX_VK_DLSS_NR_DIRECT, nr_bridge or hardcoded application ID is included. The patch details and old AppID provenance are unknown; no claims about either are made. The NR path uses ordinary NGX initialization and a compatible unmodified runtime. Credit for the original NR work: **HypeZ85 (Discord valerio85)**, [Hookshot PR #1590](https://github.com/NotRexed/Hookshot/pull/1590), commit a1f730de8c8e7b2adfbca4e0b8ac4cfbdf72834c. All five replacement branches include main snapshot 6c9edffe using non-rewriting merges. The 30 FPS implementation uses host pacing, not a second renderer sleep. API 23 is isolated in the input PR and API 24 in its dependent wheel PR; NR keeps main API 22. Replacement descriptions provide commit-specific measurements, defaults, risks and pending validation. Final HDR/NR stack Windows game-free run: 542 passed, 13 failures reproduced on the original unchanged baseline, 35 skipped. Windows renderers build with and without NGX. All replacements remain WIP for fresh gameplay, compatible unmodified-runtime and Linux validation. The user's installed game was not modified. Closing this combined PR rather than rewriting its published history; its original source branch is retained.
feat(pc): add keyboard actions, item wheels, neural HDR and 30 FPS
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
PR description / Description follows the template (pull_request_target) Successful in 4s
878af78362
Integrate configurable keyboard-only sprint hold/toggle and roll, separate binding pages, mouse item wheels with locally extracted artwork, keyboard HUD labels, experimental DLSS 5 Native HDR composition and NR scaling, and a live 30 FPS choice.

Use instruction-checked source lift hooks and renderer API 22 instead of executable-specific offsets or injected binary sections. Keep PC controls and NR opt-in and preserve controller input and existing cap indices.

Original Neural Rendering integration, controls, comparison UI, translations and lifecycle tests by HypeZ85 (Discord: valerio85), based on Hookshot PR 1590 at a1f730de8c8e7b2adfbca4e0b8ac4cfbdf72834c. Runtime bridge, Native HDR adapter, NR scale and PC control additions are local extensions.

Based-on: https://github.com/NotRexed/Hookshot/pull/1590
Original-NR-Author: HypeZ85 (Discord: valerio85)
Assisted-by: OpenAI Codex
Author
First-time contributor

Uploaded the combined source contribution, rebased onto main 9a186f7. The post-rebase renderer builds and 23 focused checks pass. The description records runtime measurements, HypeZ85 / valerio85 credit, reproduced baseline test failures, and the remaining draft-readiness work without claiming unperformed validation.

Uploaded the combined source contribution, rebased onto main 9a186f7. The post-rebase renderer builds and 23 focused checks pass. The description records runtime measurements, HypeZ85 / valerio85 credit, reproduced baseline test failures, and the remaining draft-readiness work without claiming unperformed validation.
llun left a comment

Thanks for this, there's a lot of useful work here. The main ask: please split it into separate PRs. One commit with 67 files and about 5,800 added lines covers four features that don't depend on each other. CONTRIBUTING asks for one topic per PR, and at this size nobody can review it, test it or roll it back one piece at a time.

A split that would work:

  1. 30 FPS cap. Small, and the easiest to land first (notes below).

  2. PC keyboard actions + separate Keyboard & Mouse / Controller bindings pages (pc_controls, host/pc_controls.c, the lift hooks).

  3. Item wheels. On top of 2, with the local icon extraction (nx2/pc_item_icons.py).

  4. DLSS 5 Neural Rendering port (HypeZ85's Hookshot #1590 plus the menu, lifecycle and i18n). Native HDR composition and NR scale could follow it, either in the same PR or a second one.

  5. RX_VK_DLSS_NR_DIRECT / nr_bridge. I'd leave this out of Longshot until a maintainer has decided on it. It exists to load a user-supplied patched NGX runtime. NVIDIA's DLSS SDK license allows its runtime DLLs only unmodified and forbids modifying or reverse engineering them. The bridge also calls NVSDK_NGX_VULKAN_Init_Ext with a hard-coded application ID (0x0876232c), and NVIDIA issues those IDs per registered title. Even though the PR doesn't ship the DLL, the project would be shipping and documenting a way to run a modified NVIDIA runtime under an ID that may not be ours. Two questions:

    • What does the patch change?
    • Where does 0x0876232c come from?

    Until those are answered, could the bridge come out of this work entirely? The NR port can stand on the regular, unmodified NGX path.

Things that apply whichever way it's split:

  • It conflicts with main now, in README.md, docs/tested-configurations.md, gpu/vk/menu_i18n.h and gpu/vk/vk_api.h (from git merge-tree origin/main pr/173).
  • API version collision: main is already at MKWVK_API_VERSION 22, so this PR's own change to MkwVkHost/MkwVkRenderer needs 23 once it's rebased.
  • forge.py pr status 173 lists 13 description items to fix: the status line, Verdict / How to reproduce, Before/After commits in the measurement columns, Risks, and the checklist.

On the 30 FPS part:

  • The host doesn't know about 30. host/nn_vi.c is unchanged, and its fps_refresh turns frame_rate_cap=-1 into 60 (caps[i >= 0 && i < CAPS ? i : 0]). So the host's pacing, the game's limiter and the vsync event all still run at 60, and a separate sleep_until in the renderer's present() holds the frames to 30. That leaves two limiters fighting, and a sleep on the game's presenting thread that the host's real-time step doesn't account for.
  • nn_vi.c already has the console's way to do 30. present_interval (1 for 60 fps, 2 for 30) feeds the pacing period at the bottom of the file. Letting fps_of/fps_refresh accept 30 there, and pacing with interval 2 or a 30 period, keeps a single limiter in the place the other caps already live.
  • HOS_FPS_MAX=30 still gives 60. fps_of and fps_stats::cap_rate both clamp to at least 60, so the env override can't ask for the new cap.
  • std::getenv("HOS_FPS_MAX") runs on every present and on every option(0) query. Elsewhere it's read once into a static.
  • The 30 cap silently overrides the user's Game speed: Per frame setting (option(0) forced to 1). That's probably right, but the row's help text should say so.
  • The style doesn't match the rest of the file (if(, no spaces, missing (longshot) comments). Smaller, but it matters in files that tests read as text.

Happy to test the split 30 FPS PR on an RTX 5080 / Windows 11 once it's up.

Thanks for this, there's a lot of useful work here. The main ask: **please split it into separate PRs.** One commit with 67 files and about 5,800 added lines covers four features that don't depend on each other. CONTRIBUTING asks for one topic per PR, and at this size nobody can review it, test it or roll it back one piece at a time. A split that would work: 1. **30 FPS cap.** Small, and the easiest to land first (notes below). 2. **PC keyboard actions + separate Keyboard & Mouse / Controller bindings pages** (`pc_controls`, `host/pc_controls.c`, the lift hooks). 3. **Item wheels.** On top of 2, with the local icon extraction (`nx2/pc_item_icons.py`). 4. **DLSS 5 Neural Rendering port** (HypeZ85's Hookshot #1590 plus the menu, lifecycle and i18n). Native HDR composition and NR scale could follow it, either in the same PR or a second one. 5. **`RX_VK_DLSS_NR_DIRECT` / `nr_bridge`.** I'd leave this out of Longshot until a maintainer has decided on it. It exists to load a user-supplied *patched* NGX runtime. NVIDIA's DLSS SDK license allows its runtime DLLs only unmodified and forbids modifying or reverse engineering them. The bridge also calls `NVSDK_NGX_VULKAN_Init_Ext` with a hard-coded application ID (`0x0876232c`), and NVIDIA issues those IDs per registered title. Even though the PR doesn't ship the DLL, the project would be shipping and documenting a way to run a modified NVIDIA runtime under an ID that may not be ours. Two questions: - What does the patch change? - Where does `0x0876232c` come from? Until those are answered, could the bridge come out of this work entirely? The NR port can stand on the regular, unmodified NGX path. Things that apply whichever way it's split: - **It conflicts with main now**, in README.md, docs/tested-configurations.md, gpu/vk/menu_i18n.h and gpu/vk/vk_api.h (from `git merge-tree origin/main pr/173`). - **API version collision:** main is already at `MKWVK_API_VERSION 22`, so this PR's own change to `MkwVkHost`/`MkwVkRenderer` needs 23 once it's rebased. - `forge.py pr status 173` lists 13 description items to fix: the status line, Verdict / How to reproduce, Before/After commits in the measurement columns, Risks, and the checklist. **On the 30 FPS part:** - **The host doesn't know about 30.** `host/nn_vi.c` is unchanged, and its `fps_refresh` turns `frame_rate_cap=-1` into 60 (`caps[i >= 0 && i < CAPS ? i : 0]`). So the host's pacing, the game's limiter and the vsync event all still run at 60, and a separate `sleep_until` in the renderer's `present()` holds the frames to 30. That leaves two limiters fighting, and a sleep on the game's presenting thread that the host's real-time step doesn't account for. - **`nn_vi.c` already has the console's way to do 30.** `present_interval` (1 for 60 fps, 2 for 30) feeds the pacing period at the bottom of the file. Letting `fps_of`/`fps_refresh` accept 30 there, and pacing with interval 2 or a 30 period, keeps a single limiter in the place the other caps already live. - **`HOS_FPS_MAX=30` still gives 60.** `fps_of` and `fps_stats::cap_rate` both clamp to at least 60, so the env override can't ask for the new cap. - `std::getenv("HOS_FPS_MAX")` runs on every present and on every `option(0)` query. Elsewhere it's read once into a static. - **The 30 cap silently overrides the user's Game speed: Per frame setting** (`option(0)` forced to 1). That's probably right, but the row's help text should say so. - **The style doesn't match the rest of the file** (`if(`, no spaces, missing `(longshot)` comments). Smaller, but it matters in files that tests read as text. Happy to test the split 30 FPS PR on an RTX 5080 / Windows 11 once it's up.
Owner

Please break this out into individual PRs!

Please break this out into individual PRs!
Author
First-time contributor

@HumanBean wrote in #173 (comment):

Please break this out into individual PRs!

will do

@HumanBean wrote in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/173#issuecomment-21161: > Please break this out into individual PRs! will do
TheDevil closed this pull request 2026-11-15 00:46:57 +00:00
Author
First-time contributor

Split as requested into #609, #613, #616, #619 and #620. The bridge has been removed from all replacements; HypeZ85 / valerio85 is credited on the NR work. Closing this combined submission as superseded; original branch retained. See each WIP PR for its independent validation and remaining live/Linux checks.

Split as requested into #609, #613, #616, #619 and #620. The bridge has been removed from all replacements; HypeZ85 / valerio85 is credited on the NR work. Closing this combined submission as superseded; original branch retained. See each WIP PR for its independent validation and remaining live/Linux checks.
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
PR description / Description follows the template (pull_request_target) Successful in 4s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!173
No description provided.