fix(prompts): show keyboard keys on the ocarina song sheet #2450

Merged
HumanBean merged 2 commits from huntet123/Longshot:fix/ocarina-keyboard-prompts into main 2026-12-04 21:23:04 +00:00
Contributor

Summary

Set Button prompts to Keyboard and play the ocarina with the Skull Kids in the Lost Woods. On main, the “Play a note” hint shows keyboard bindings while the notes on the song sheet still show controller icons.

Generate keyboard note textures from the same glyphs used by the text prompts. The Rust builder generates and caches them in builder/crates/build-assets/src/prompts/. The runtime selects a texture in host/prompts.c using the first keyboard binding of the corresponding Switch button.

Testing

Tested: Rebased source now at 1f26b82d on Windows, GeForce RTX 3080, NVIDIA driver 621.40. Played the ocarina with the Skull Kids in the Lost Woods using a keyboard and confirmed the correct keys on the song sheet. The Windows build with the new Rust builder and all 70 build-assets tests passed.

The two current commits are 21183e4d (regression test) and 1f26b82d (fix). The author and committer metadata was rewritten after testing. Both source trees and commit messages were verified identical, so the Windows play test and measurements apply to the current code.

The following broader checks and full Linux build were run before the latest rebase, against main 22d0d200.

The new Rust builder built the Windows base and pack. All 69 build-assets tests passed. The targeted Windows checks reported 10 passed, one failing test_dev_build.py also reproduced on main, and two Linux-only skips. Both skipped prompt tests passed in Ubuntu 24.04 Docker, where Clang also compiled the changed host file on both revisions.

The generated Switch, Xbox, PS4, PS5 and Steam Deck texture bundles matched the current main build byte for byte.

The full strict Windows suite reported 761 passed, 80 failed and 47 skipped on each revision. The same 80 checks failed on main and on the rebased branch.

Checks failing on both revisions
tests/test_auto_handheld.py
tests/test_box_light_reuse.py
tests/test_bug_report.py
tests/test_builder_channel.py
tests/test_camera_centering.py
tests/test_camera_speed.py
tests/test_control_picture.py
tests/test_coverage_run.py
tests/test_crash_record.py
tests/test_dev_ab.py
tests/test_dev_build.py
tests/test_dev_migrate.py
tests/test_drive_target.py
tests/test_dynres_sites.py
tests/test_fixed_scale_sites.py
tests/test_floor_carry_step.py
tests/test_frame_rate_cap_step.py
tests/test_frame_whole.py
tests/test_framegen_hdr.py
tests/test_framegen_resources.py
tests/test_free_view_anchor.py
tests/test_fsr4_tune.py
tests/test_game_menu_mouse_buttons.py
tests/test_high_fps_fixes.py
tests/test_horse_jump_step.py
tests/test_hud_layout.py
tests/test_input_movie.py
tests/test_job_queue.py
tests/test_jump_takeoff_step.py
tests/test_lifter.py
tests/test_log_redact.py
tests/test_loop_step.py
tests/test_menu_hooks.py
tests/test_mods_list.py
tests/test_mods_sizes.py
tests/test_mouse_native.py
tests/test_movement_speed.py
tests/test_movie_frame_count.py
tests/test_ocarina_wait.py
tests/test_ocb_hold.py
tests/test_oot_barrier.py
tests/test_oot_camera_clearance.py
tests/test_oot_cloth.py
tests/test_oot_cloth_60.py
tests/test_oot_cloth_time.py
tests/test_oot_damage.py
tests/test_oot_fov.py
tests/test_oot_heap_retry.py
tests/test_oot_jitter.py
tests/test_oot_menu_mouse.py
tests/test_oot_shadow.py
tests/test_oot_shadow_fit.py
tests/test_oot_transition_autosave.py
tests/test_oot_voice_option.py
tests/test_oot_wide_bubble.py
tests/test_oot_wide_save_picture.py
tests/test_pads_after_menu.py
tests/test_parity_gates.py
tests/test_perf_send.py
tests/test_player_update_sites.py
tests/test_present_source_crop.py
tests/test_reshade_fx.py
tests/test_run_all_mingw.py
tests/test_saved_turn_rate.py
tests/test_scarecrow_timing.py
tests/test_scene_format.py
tests/test_screensaver.py
tests/test_song_note_cue.py
tests/test_sprint.py
tests/test_switch_table.py
tests/test_temporal_present_bandwidth.py
tests/test_tex_compact.py
tests/test_text_speed.py
tests/test_title_card_sites.py
tests/test_utf8_paths.py
tests/test_water_substeps.py
tests/test_web_floor_steps.py
tests/test_wide_sites.py
tests/test_wide_ui.py
tests/test_xinput_thread.py

Full Linux build passed on the previous Rust-builder rebase in Ubuntu 24.04 Docker with the new Rust builder and the pinned Linux toolchain. The pack built against main 22d0d200, linked both longshot and longshot_vk.so, and produced a runtime with 660 keyboard texture entries. This was a build check.

Still to test:

  • Windows with an Xbox controller, by hand: select Auto or Xbox and play a note with the Skull Kids. Expect the Xbox icon for the assigned control.
  • Other affected Tier 1 configurations, by hand during review: play a note with Button prompts set to Keyboard, then repeat with a controller prompt mode. Check that the song sheet shows the selected symbols in both modes.

Measurements

Verdict: Fresh and cached prompt-stage timings overlap across the four runs on each revision. The fix adds a 6,119,528-byte (5.84 MiB) keyboard texture bundle and retains 3,677,472 bytes (3.51 MiB) more than main when the live loader selects Keyboard.

Setup: Windows, AMD Ryzen 9 5900X, Rust 1.99.1 release builds of build-assets --example assets, six prompt workers, same local ROMFS and drive. The job queue ran the measurement in timing-cpu mode. One warm-up per revision primed the system file cache. Four measured pairs alternated order. Each fresh run used a new output directory and an empty builder prompt cache. The warm run reused that directory immediately. Timings are wall-clock prompt-stage invocations including process startup and file I/O. Rust compilation and tool installation were outside the timer.

Check Before: main @ 28cb22b9 After: this PR @ 1f26b82d
Empty prompt cache, median 5.7100 s 5.7712 s
Empty prompt cache, range 5.5761–5.8557 s 5.7033–5.8632 s
Warm prompt cache, median 0.5186 s 0.5340 s
Warm prompt cache, range 0.4907–0.5657 s 0.5138–0.5780 s
Added keyboard bundle on disk 0 bytes 6,119,528 bytes
Buffer retained by live loading Keyboard 2,442,056 bytes (Switch fallback) 6,119,528 bytes
Buffer retained by live loading Xbox alone 4,438,832 bytes 4,438,832 bytes
Total after live loading Xbox, then Keyboard 6,880,888 bytes 10,558,360 bytes

All shared prompt output files matched byte for byte. The only new prompt output was keyboard/textures.bin. The fresh and warm log summaries confirmed which assets were generated and which were reused.

The Windows heap check compiled texture_face, texture_bin and read_all from each revision and called them on its generated bundles. It used the Windows CRT's _msize to measure the allocated buffers and confirmed that repeat lookups reuse the same buffer. These figures cover the loader's retained heap allocation. Total game RSS and GPU memory were outside the measurement.

The Rust regression test failed on the original Rust-builder base without the fix and passes on the current head.

The original screenshots show the same Lost Woods encounter before and after. The keyboard result was reproduced after the latest rebase.

Risks

The keyboard textures are generated during the build. Older builds without the keyboard texture bundle fall back to the original note icons. The song sheet follows the regular button bindings. Dedicated Ocarina Note overrides are outside the scope of this change. Reverting the patch restores the previous texture selection.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Screenshots of the same spot on main and here, for a change that shows on screen.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.
<!-- Suggested title: fix(prompts): show keyboard keys on the ocarina song sheet --> <!-- Add this trailer at the end of the commit message: Assisted-by: OpenAI Codex --> ## Summary Set **Button prompts** to **Keyboard** and play the ocarina with the Skull Kids in the Lost Woods. On main, the “Play a note” hint shows keyboard bindings while the notes on the song sheet still show controller icons. Generate keyboard note textures from the same glyphs used by the text prompts. The Rust builder generates and caches them in `builder/crates/build-assets/src/prompts/`. The runtime selects a texture in `host/prompts.c` using the first keyboard binding of the corresponding Switch button. ## Testing **Tested:** Rebased source now at `1f26b82d` on Windows, GeForce RTX 3080, NVIDIA driver 621.40. Played the ocarina with the Skull Kids in the Lost Woods using a keyboard and confirmed the correct keys on the song sheet. The Windows build with the new Rust builder and all 70 `build-assets` tests passed. The two current commits are `21183e4d` (regression test) and `1f26b82d` (fix). The author and committer metadata was rewritten after testing. Both source trees and commit messages were verified identical, so the Windows play test and measurements apply to the current code. The following broader checks and full Linux build were run before the latest rebase, against main `22d0d200`. The new Rust builder built the Windows base and pack. All 69 `build-assets` tests passed. The targeted Windows checks reported 10 passed, one failing `test_dev_build.py` also reproduced on main, and two Linux-only skips. Both skipped prompt tests passed in Ubuntu 24.04 Docker, where Clang also compiled the changed host file on both revisions. The generated Switch, Xbox, PS4, PS5 and Steam Deck texture bundles matched the current main build byte for byte. The full strict Windows suite reported 761 passed, 80 failed and 47 skipped on each revision. The same 80 checks failed on main and on the rebased branch. <details> <summary>Checks failing on both revisions</summary> ~~~text tests/test_auto_handheld.py tests/test_box_light_reuse.py tests/test_bug_report.py tests/test_builder_channel.py tests/test_camera_centering.py tests/test_camera_speed.py tests/test_control_picture.py tests/test_coverage_run.py tests/test_crash_record.py tests/test_dev_ab.py tests/test_dev_build.py tests/test_dev_migrate.py tests/test_drive_target.py tests/test_dynres_sites.py tests/test_fixed_scale_sites.py tests/test_floor_carry_step.py tests/test_frame_rate_cap_step.py tests/test_frame_whole.py tests/test_framegen_hdr.py tests/test_framegen_resources.py tests/test_free_view_anchor.py tests/test_fsr4_tune.py tests/test_game_menu_mouse_buttons.py tests/test_high_fps_fixes.py tests/test_horse_jump_step.py tests/test_hud_layout.py tests/test_input_movie.py tests/test_job_queue.py tests/test_jump_takeoff_step.py tests/test_lifter.py tests/test_log_redact.py tests/test_loop_step.py tests/test_menu_hooks.py tests/test_mods_list.py tests/test_mods_sizes.py tests/test_mouse_native.py tests/test_movement_speed.py tests/test_movie_frame_count.py tests/test_ocarina_wait.py tests/test_ocb_hold.py tests/test_oot_barrier.py tests/test_oot_camera_clearance.py tests/test_oot_cloth.py tests/test_oot_cloth_60.py tests/test_oot_cloth_time.py tests/test_oot_damage.py tests/test_oot_fov.py tests/test_oot_heap_retry.py tests/test_oot_jitter.py tests/test_oot_menu_mouse.py tests/test_oot_shadow.py tests/test_oot_shadow_fit.py tests/test_oot_transition_autosave.py tests/test_oot_voice_option.py tests/test_oot_wide_bubble.py tests/test_oot_wide_save_picture.py tests/test_pads_after_menu.py tests/test_parity_gates.py tests/test_perf_send.py tests/test_player_update_sites.py tests/test_present_source_crop.py tests/test_reshade_fx.py tests/test_run_all_mingw.py tests/test_saved_turn_rate.py tests/test_scarecrow_timing.py tests/test_scene_format.py tests/test_screensaver.py tests/test_song_note_cue.py tests/test_sprint.py tests/test_switch_table.py tests/test_temporal_present_bandwidth.py tests/test_tex_compact.py tests/test_text_speed.py tests/test_title_card_sites.py tests/test_utf8_paths.py tests/test_water_substeps.py tests/test_web_floor_steps.py tests/test_wide_sites.py tests/test_wide_ui.py tests/test_xinput_thread.py ~~~ </details> Full Linux build passed on the previous Rust-builder rebase in Ubuntu 24.04 Docker with the new Rust builder and the pinned Linux toolchain. The pack built against main `22d0d200`, linked both `longshot` and `longshot_vk.so`, and produced a runtime with 660 keyboard texture entries. This was a build check. **Still to test:** - Windows with an Xbox controller, by hand: select **Auto** or **Xbox** and play a note with the Skull Kids. Expect the Xbox icon for the assigned control. - Other affected Tier 1 configurations, by hand during review: play a note with **Button prompts** set to **Keyboard**, then repeat with a controller prompt mode. Check that the song sheet shows the selected symbols in both modes. ## Measurements **Verdict:** Fresh and cached prompt-stage timings overlap across the four runs on each revision. The fix adds a 6,119,528-byte (5.84 MiB) keyboard texture bundle and retains 3,677,472 bytes (3.51 MiB) more than main when the live loader selects Keyboard. **Setup:** Windows, AMD Ryzen 9 5900X, Rust 1.99.1 release builds of `build-assets --example assets`, six prompt workers, same local ROMFS and drive. The job queue ran the measurement in `timing-cpu` mode. One warm-up per revision primed the system file cache. Four measured pairs alternated order. Each fresh run used a new output directory and an empty *builder* prompt cache. The warm run reused that directory immediately. Timings are wall-clock prompt-stage invocations including process startup and file I/O. Rust compilation and tool installation were outside the timer. | Check | Before: main @ `28cb22b9` | After: this PR @ `1f26b82d` | | --- | ---: | ---: | | Empty prompt cache, median | 5.7100 s | 5.7712 s | | Empty prompt cache, range | 5.5761–5.8557 s | 5.7033–5.8632 s | | Warm prompt cache, median | 0.5186 s | 0.5340 s | | Warm prompt cache, range | 0.4907–0.5657 s | 0.5138–0.5780 s | | Added keyboard bundle on disk | 0 bytes | 6,119,528 bytes | | Buffer retained by live loading Keyboard | 2,442,056 bytes (Switch fallback) | 6,119,528 bytes | | Buffer retained by live loading Xbox alone | 4,438,832 bytes | 4,438,832 bytes | | Total after live loading Xbox, then Keyboard | 6,880,888 bytes | 10,558,360 bytes | All shared prompt output files matched byte for byte. The only new prompt output was `keyboard/textures.bin`. The fresh and warm log summaries confirmed which assets were generated and which were reused. The Windows heap check compiled `texture_face`, `texture_bin` and `read_all` from each revision and called them on its generated bundles. It used the Windows CRT's `_msize` to measure the allocated buffers and confirmed that repeat lookups reuse the same buffer. These figures cover the loader's retained heap allocation. Total game RSS and GPU memory were outside the measurement. The Rust regression test failed on the original Rust-builder base without the fix and passes on the current head. The [original screenshots](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2450#issuecomment-78788) show the same Lost Woods encounter before and after. The keyboard result was reproduced after the latest rebase. ## Risks The keyboard textures are generated during the build. Older builds without the keyboard texture bundle fall back to the original note icons. The song sheet follows the regular button bindings. Dedicated Ocarina Note overrides are outside the scope of this change. Reverting the patch restores the previous texture selection. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] Screenshots of the same spot on `main` and here, for a change that shows on screen. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold.
Assisted-by: OpenAI Codex
fix(prompts): show keyboard keys on the ocarina song sheet
Some checks failed
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 12s
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
CI / Website build and checks (pull_request) Has been cancelled
43591cd411
Assisted-by: OpenAI Codex
Author
Contributor

Tested in game: Windows, GeForce RTX 3080, NVIDIA driver 621.24. Played the ocarina with the Skull Kids in the Lost Woods using a keyboard. The song sheet showed the correct keyboard symbols for the notes.

Tested in game: Windows, GeForce RTX 3080, NVIDIA driver 621.24. Played the ocarina with the Skull Kids in the Lost Woods using a keyboard. The song sheet showed the correct keyboard symbols for the notes.
Member

Possibly related, for context:

  • issue #749 Idea: Add keyboard button prompts when playing Ocarina — Direct issue requesting keyboard glyphs on ocarina song sheets; this PR addresses it.
  • issue #297 Idea: Ocarina Glyphs should match the separate ocarina controls. — Adjacent request for ocarina sheet glyphs to follow custom note bindings; this PR only selects keyboard bindings, not dedicated ocarina-note overrides.
Possibly related, for context: - issue #749 Idea: Add keyboard button prompts when playing Ocarina — Direct issue requesting keyboard glyphs on ocarina song sheets; this PR addresses it. - issue #297 Idea: Ocarina Glyphs should match the separate ocarina controls. — Adjacent request for ocarina sheet glyphs to follow custom note bindings; this PR only selects keyboard bindings, not dedicated ocarina-note overrides.
Author
Contributor

The option was set to Keyboard in both runs of the Skull Kids' ocarina minigame in the Lost Woods.

Before (main 8aa5ab87) — controller icons on the song sheet.

Controller icons on the ocarina song sheet

After (fix 43591cd4) — keyboard icons on the song sheet.

Keyboard icons on the ocarina song sheet

The option was set to **Keyboard** in both runs of the Skull Kids' ocarina minigame in the Lost Woods. **Before (main `8aa5ab87`)** — controller icons on the song sheet. ![Controller icons on the ocarina song sheet](https://git.magicbean.dev/attachments/b8a47400-1d29-48c2-8e08-aa0bc70bca56) **After (fix `43591cd4`)** — keyboard icons on the song sheet. ![Keyboard icons on the ocarina song sheet](https://git.magicbean.dev/attachments/4fd85489-2133-481e-bf8b-bf02369729e3)
huntet123 changed title from WIP: fix(prompts): show keyboard keys on the ocarina song sheet to fix(prompts): show keyboard keys on the ocarina song sheet 2026-11-24 11:44:20 +00:00
Owner

Needs rebase onto new builder!

Needs rebase onto new builder!
huntet123 force-pushed fix/ocarina-keyboard-prompts from 43591cd411
Some checks failed
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 12s
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
CI / Website build and checks (pull_request) Has been cancelled
to 814230ca5e
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-11-28 08:18:29 +00:00
Compare
Author
Contributor

Rebased onto main 22d0d200 and ported keyboard note texture generation and the regression test to the Rust builder. The updated head is 814230ca.

Retested in game on Windows with a GeForce RTX 3080 and NVIDIA driver 621.40. Playing the ocarina with the Skull Kids in the Lost Woods displayed the correct keyboard symbols on the song sheet. The Windows pack built, and the Rust regression and targeted Linux prompt checks passed. All five generated controller texture bundles matched main byte for byte. The Xbox controller still needs an in-game pass on the rebased build.

Rebased onto main `22d0d200` and ported keyboard note texture generation and the regression test to the Rust builder. The updated head is `814230ca`. Retested in game on Windows with a GeForce RTX 3080 and NVIDIA driver 621.40. Playing the ocarina with the Skull Kids in the Lost Woods displayed the correct keyboard symbols on the song sheet. The Windows pack built, and the Rust regression and targeted Linux prompt checks passed. All five generated controller texture bundles matched main byte for byte. The Xbox controller still needs an in-game pass on the rebased build.
Author
Contributor

Full Linux build passed for 814230ca in Ubuntu 24.04 Docker with the new Rust builder and the pinned Linux toolchain. The pack built against main 22d0d200, linked both longshot and longshot_vk.so, and produced a runtime with 660 keyboard texture entries. This was a build check.

Full Linux build passed for `814230ca` in Ubuntu 24.04 Docker with the new Rust builder and the pinned Linux toolchain. The pack built against main `22d0d200`, linked both `longshot` and `longshot_vk.so`, and produced a runtime with 660 keyboard texture entries. This was a build check.
futondestroyer left a comment

Recommendation: Request changes. The exact-head Windows run shows that the song sheet now displays the regular keyboard bindings. Measure the build and memory cost of the new texture bundle before merging.

Blocking — builder/crates/build-assets/src/prompts/textures.rs:168. These layers encode each whole 93×93 ASTC note texture for each supported key. The 660 entries reported in Testing imply about 5.8 MiB of block data before headers (660 × 24 × 24 × 16) at the reported dimensions. The default assets build generates the bundle even if the player uses a controller. The live texture loader also retains the entire bundle after it is opened. Please report actual output bytes and matched fresh/cached prompt build timings, and record the live retained size. The estimate above comes from the source and is separate from a measurement.

Checked. Generation uses the same built font cmap as the text prompts, and caches the keyboard variant against that font key. The startup and live readers select the same first regular keyboard binding. Existing installations without the keyboard bundle still select the original Switch textures; the author reports all five controller texture bundles remain byte-identical. The dedicated Ocarina Note controls are the separate #297 behavior; neither the change nor the keyboard evidence covers them.

Testing. The author reproduced the Lost Woods keyboard result on exact head 814230ca on Windows RTX 3080, reported 69 asset tests passed, and linked a Linux pack containing 660 keyboard texture entries. The Linux evidence is a build check. Before merge, run the documented Windows Xbox/Auto regression and applicable Tier 1 runtime checks for Keyboard and controller mode. The description check passed. Ten exact-head workflow jobs remain blocked by required conditions. CI

Reviewed. All four changed files and the generation, startup and live call paths at head 814230ca5ea20d5bf2e41d25a6a088e7b101dc83 against actual base 22d0d20098d6acaf16761ec18cc7b80059b19e46, with live target main at 01d6878b; the four files did not change on main in between. No switches changed. Code review only.

**Recommendation: Request changes.** The exact-head Windows run shows that the song sheet now displays the regular keyboard bindings. Measure the build and memory cost of the new texture bundle before merging. **Blocking** — `builder/crates/build-assets/src/prompts/textures.rs:168`. These layers encode each whole 93×93 ASTC note texture for each supported key. The 660 entries reported in Testing imply about 5.8 MiB of block data before headers (660 × 24 × 24 × 16) at the reported dimensions. The default assets build generates the bundle even if the player uses a controller. The live texture loader also retains the entire bundle after it is opened. Please report actual output bytes and matched fresh/cached prompt build timings, and record the live retained size. The estimate above comes from the source and is separate from a measurement. **Checked.** Generation uses the same built font cmap as the text prompts, and caches the keyboard variant against that font key. The startup and live readers select the same first regular keyboard binding. Existing installations without the keyboard bundle still select the original Switch textures; the author reports all five controller texture bundles remain byte-identical. The dedicated Ocarina Note controls are the separate #297 behavior; neither the change nor the keyboard evidence covers them. **Testing.** The author reproduced the Lost Woods keyboard result on exact head `814230ca` on Windows RTX 3080, reported 69 asset tests passed, and linked a Linux pack containing 660 keyboard texture entries. The Linux evidence is a build check. Before merge, run the documented Windows Xbox/Auto regression and applicable Tier 1 runtime checks for Keyboard and controller mode. The description check passed. Ten exact-head workflow jobs remain blocked by required conditions. [CI](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57003) **Reviewed.** All four changed files and the generation, startup and live call paths at head `814230ca5ea20d5bf2e41d25a6a088e7b101dc83` against actual base `22d0d20098d6acaf16761ec18cc7b80059b19e46`, with live target main at `01d6878b`; the four files did not change on main in between. No switches changed. Code review only.
@ -164,2 +166,3 @@
im.paste_colour(&[0, 0, 0, 255], &m.holes, ox, oy);
layers.push(layer(format!("{name}.{pad_name}.png"), name, sw(s) as u8, p as u8, im));
let file = if keyboard { format!("{name}.{p}.png") } else { format!("{name}.{}.png", PADS[p]) };
layers.push(layer(file, name, sw(s) as u8, p as u8, im));
Member

[P2] Measure the incremental keyboard bundle bytes, clean and cached build time, and retained runtime size. The 660 full-canvas ASTC entries imply about 5.8 MiB of encoded blocks before headers. The reported entry count does not measure the build or live cost.

[P2] Measure the incremental keyboard bundle bytes, clean and cached build time, and retained runtime size. The 660 full-canvas ASTC entries imply about 5.8 MiB of encoded blocks before headers. The reported entry count does not measure the build or live cost.
Author
Contributor

Thanks for flagging this. I rebased onto 28cb22b9 and retested the keyboard prompts with the Skull Kids on head 6801249c. The song sheet showed the correct keys.

With six workers and four interleaved runs per revision on Windows, the empty-cache prompt stage had median wall times of 5.7100 s on main and 5.7712 s with the fix. The warm-cache medians were 0.5186 s and 0.5340 s. The ranges overlapped in both comparisons.

The only added prompt output was the 6,119,528-byte keyboard bundle. I compiled the live loader functions from both revisions and measured the retained Windows CRT heap buffers with _msize. Selecting Keyboard retains 6,119,528 bytes with the fix versus 2,442,056 bytes for the Switch fallback on main, an increase of 3,677,472 bytes (3.51 MiB). Xbox alone retained 4,438,832 bytes on both builds. This measures the loader allocation. The full run ranges and cache setup are in Measurements.

Thanks for flagging this. I rebased onto `28cb22b9` and retested the keyboard prompts with the Skull Kids on head `6801249c`. The song sheet showed the correct keys. With six workers and four interleaved runs per revision on Windows, the empty-cache prompt stage had median wall times of **5.7100 s on main and 5.7712 s with the fix**. The warm-cache medians were **0.5186 s and 0.5340 s**. The ranges overlapped in both comparisons. The only added prompt output was the **6,119,528-byte** keyboard bundle. I compiled the live loader functions from both revisions and measured the retained Windows CRT heap buffers with `_msize`. Selecting Keyboard retains **6,119,528 bytes** with the fix versus **2,442,056 bytes** for the Switch fallback on main, an increase of **3,677,472 bytes (3.51 MiB)**. Xbox alone retained **4,438,832 bytes** on both builds. This measures the loader allocation. The full run ranges and cache setup are in Measurements.
huntet123 force-pushed fix/ocarina-keyboard-prompts from 814230ca5e
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 6801249cd9
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-11-30 08:30:57 +00:00
Compare
huntet123 force-pushed fix/ocarina-keyboard-prompts from 6801249cd9
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 1f26b82d59
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-11-30 08:55:59 +00:00
Compare
Owner
@rebase
Member

I rebased this pull request onto main (46ae5b43d3): the new head is 63f441413a.

Conflicts resolved

  • host/prompts.c: Kept keyboard texture detection and key bindings alongside the base branch’s settings, renamed Switch bindings, and extracted patch writer.

Nothing was built or run: read the resolution before merging.


Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

I rebased this pull request onto `main` (46ae5b43d33e): the new head is 63f441413ad0. **Conflicts resolved** - host/prompts.c: Kept keyboard texture detection and key bindings alongside the base branch’s settings, renamed Switch bindings, and extracted patch writer. Nothing was built or run: read the resolution before merging. --- <sub>Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
BeanBot force-pushed fix/ocarina-keyboard-prompts from 1f26b82d59
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 63f441413a
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Successful in 8s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 17s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m18s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 12m59s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 11m14s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 13m45s
CI / Website build and checks (pull_request) Failing after 38s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 48m1s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 1h0m5s
2026-12-04 21:13:38 +00:00
Compare
BeanBot left a comment

Recommendation: Request changes. The Windows play test shows the keyboard song-sheet fix works, but the regression test does not cover the runtime selection that makes it work. Undoing that selection would restore the original bug while the new test still passes.

The builder generates note textures from keyboard glyphs, and the runtime selects them using the first regular keyboard binding. The added bundle costs 5.84 MiB on disk and 3.51 MiB of retained loader heap when Keyboard is selected; measured prompt-stage timings overlap.

Blocking (1): must change before merging.

  1. L1 host/prompts.c:366: The regression test exercises keyboard layer generation but does not exercise the runtime's choice of keyboard bindings and texture bundle. (more on the line) Do: Add a game-free runtime test that selects a keyboard binding from a keyboard texture bundle and verifies the chosen note run, including the older-build fallback.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L2: The remaining controller-mode and Linux in-game prompt checks have not been reported. When: The change also participates in selecting and replacing textures when prompt mode changes; the reported Linux result is a build check and the controller bundles were compared without an in-game pass. Do: On Linux, play the Lost Woods note sequence with Keyboard prompts, then switch to a controller prompt mode and confirm the corresponding symbols appear.

@fix can do L1.

Checks: they run again on this head; a failure shows on the pull request.

More: does it help, other systems, switches, what was read

Does it help: Yes. The author reports that the Lost Woods song sheet showed the correct keys on Windows with an RTX 3080, and supplied before-and-after screenshots. Fresh prompt-stage medians were 5.7100 s before and 5.7712 s after; warm medians were 0.5186 s and 0.5340 s, with overlapping ranges.

Other systems: The change also affects startup and live prompt switching, controller faces, Linux, and the prompt asset build and cache. The author reports byte-identical controller bundles and a Linux build, but controller-mode and Linux in-game checks remain outstanding.

Switches: None.

Reviewed: 63f441413a against 46ae5b43d3: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, the diff and both commit messages, all four changed files, and the relevant binding, startup, live-selection and asset-generation paths. Skimmed related prompt tests and the reported runs and reviews. docs/review-checklist.md and ../Tooling/AGENTS.md were absent. No generated files or translations changed.; nothing run (a code review).

Checked and fine:

  • Both commits carry the AI-assistance trailer.
  • No game-derived files, generated outputs, third-party files, API versions or switches changed.
  • The keyboard cache key includes the generated font key; startup and live selection use the same first-key bindings.
  • The reported controller texture bundles match the base byte for byte.

Testing: Read-only review; no code, scripts, builds or tests were run. CI has not run on this head.

Overlaps and merge order: Not checked; network access was unavailable.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The Windows play test shows the keyboard song-sheet fix works, but the regression test does not cover the runtime selection that makes it work. Undoing that selection would restore the original bug while the new test still passes. The builder generates note textures from keyboard glyphs, and the runtime selects them using the first regular keyboard binding. The added bundle costs 5.84 MiB on disk and 3.51 MiB of retained loader heap when Keyboard is selected; measured prompt-stage timings overlap. **Blocking (1)**: must change before merging. 1. **L1** `host/prompts.c:366`: The regression test exercises keyboard layer generation but does not exercise the runtime's choice of keyboard bindings and texture bundle. (more on the line) **Do:** Add a game-free runtime test that selects a keyboard binding from a keyboard texture bundle and verifies the chosen note run, including the older-build fallback. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L2**: The remaining controller-mode and Linux in-game prompt checks have not been reported. *When:* The change also participates in selecting and replacing textures when prompt mode changes; the reported Linux result is a build check and the controller bundles were compared without an in-game pass. **Do:** On Linux, play the Lost Woods note sequence with Keyboard prompts, then switch to a controller prompt mode and confirm the corresponding symbols appear. `@fix` can do L1. **Checks:** they run again on this head; a failure shows on the pull request. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes. The author reports that the Lost Woods song sheet showed the correct keys on Windows with an RTX 3080, and supplied before-and-after screenshots. Fresh prompt-stage medians were 5.7100 s before and 5.7712 s after; warm medians were 0.5186 s and 0.5340 s, with overlapping ranges. **Other systems:** The change also affects startup and live prompt switching, controller faces, Linux, and the prompt asset build and cache. The author reports byte-identical controller bundles and a Linux build, but controller-mode and Linux in-game checks remain outstanding. **Switches:** None. **Reviewed:** 63f441413ad0 against 46ae5b43d33e: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, the diff and both commit messages, all four changed files, and the relevant binding, startup, live-selection and asset-generation paths. Skimmed related prompt tests and the reported runs and reviews. docs/review-checklist.md and ../Tooling/AGENTS.md were absent. No generated files or translations changed.; nothing run (a code review). **Checked and fine:** - Both commits carry the AI-assistance trailer. - No game-derived files, generated outputs, third-party files, API versions or switches changed. - The keyboard cache key includes the generated font key; startup and live selection use the same first-key bindings. - The reported controller texture bundles match the base byte for byte. **Testing:** Read-only review; no code, scripts, builds or tests were run. CI has not run on this head. **Overlaps and merge order:** Not checked; network access was unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.</sub>
@ -362,2 +363,4 @@
static int texture_face(int face) { return face == HOS_PROMPT_KEYBOARD && !keyboard_textures ? HOS_PROMPT_SWITCH : face; }
static const int *texture_bind(int face, const int *bind, int *own) {
if (face != HOS_PROMPT_KEYBOARD) return bind;
if (keyboard_textures) return bind + HOS_SW_N;
Member

L1 (blocking): The regression test exercises keyboard layer generation but does not exercise the runtime's choice of keyboard bindings and texture bundle.

When: If this line and the keyboard texture selection are reverted, the runtime again shows Switch note icons while the new Rust test still passes, because it only calls face_layers.

Do: Add a game-free runtime test that selects a keyboard binding from a keyboard texture bundle and verifies the chosen note run, including the older-build fallback.

**L1** (blocking): The regression test exercises keyboard layer generation but does not exercise the runtime's choice of keyboard bindings and texture bundle. *When:* If this line and the keyboard texture selection are reverted, the runtime again shows Switch note icons while the new Rust test still passes, because it only calls face_layers. **Do:** Add a game-free runtime test that selects a keyboard binding from a keyboard texture bundle and verifies the chosen note run, including the older-build fallback.
HumanBean deleted branch fix/ocarina-keyboard-prompts 2026-12-04 21:23:04 +00:00
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Successful in 8s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 17s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m18s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 12m59s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 11m14s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 13m45s
CI / Website build and checks (pull_request) Failing after 38s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 48m1s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 1h0m5s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 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!2450
No description provided.