fix(prompts): the d-pad icons show what the d-pad is bound to, on every face #1921

Open
gab9281 wants to merge 3 commits from gab9281/Longshot:fix/prompts-dpad-bound into main
Member

Summary

The d-pad icons in texts showed the face's own d-pad whatever the controls. The HUD's icon between the ocarina and Navi is the one players see all the time, and the up-down and left-right icons were affected too. On the Keyboard prompts, that meant a pad's d-pad where the keys are 1 2 3 4: a player's report, "There are still sections that don't have the PC buttons!!!". And on any pad face, a d-pad bound elsewhere on the Controls page still showed the d-pad.

To see it on main: set Button prompts to Keyboard and restart the game. Load a save in play: the HUD's d-pad (between the ocarina and Navi) is a pad's d-pad, not keys. Or keep a pad face, bind d-pad Left to Y on the Controls page, and restart: the icon is still the d-pad.

Now: each way of the icon shows what it is bound to, at the d-pad's four places:

  • the Keyboard face shows its keys: 1 2 3 4 by default, or the arrows, or whatever is bound;
  • a pad face keeps its own d-pad icon while the d-pad is on the d-pad, and shows that face's icon of the input bound otherwise (Y, LB, triangle, ...);
  • the up-down and left-right icons show the ways they don't mean as a hollow ring, or a hollow key on the Keyboard face.

How:

  • nx2/prompt_assets.py dpad_glyphs adds, for each d-pad icon, glyphs made of four pieces placed in the game's d-pad's round buttons.
  • Each piece is a CFF global subr: each face's icon of each pad input, each key's icon, and the hollow pieces.
  • prompts/dpad.bin (dpad_table) records which subr each piece is and where each glyph's calls sit in the font.
  • host/prompts.c writes those calls for the controls now:
    • at the start, when it serves the font (dpad_bind);
    • for a text rewritten after a change while the game runs, a glyph of its own per set of pieces (dpad_slot), kept when the font is served again (slots_point).
  • The glyphs sit at U+FA2E..U+FAFF, 70 per icon: the start's and 69 for texts after changes. That range is in none of the game's fonts; the private use area's free codes were too few.
  • dpad_pieces decides what each way shows.

Read first: host/prompts.c dpad_pieces, dpad_bind, dpad_slot; nx2/prompt_assets.py dpad_glyphs, dpad_piece.

Testing

Tested:

  • Setup: CachyOS (Linux 7.3.4), NVIDIA RTX 3060 Laptop, driver 620.70.06. Pack and runtime on the 9027e737 base through dev.py queue. A save in play (Kokiri Forest); the DualSense hidden from the game; the controls from an options file.
  • Each face at a game start, default controls: Switch, Xbox, PS4, PS5 and Steam Deck keep their own d-pad icon on the HUD. Keyboard shows 2 on top, 1 left, 3 right, 4 down.
  • Each face at a game start, d-pad rebound: Left on the top face button, Up on the left shoulder, keys on the arrows. Every pad face shows its own icon of each binding: Switch L and X, Xbox LB and Y, PS4/PS5 L1 and triangle, Steam Deck L1 and Y. Right and down show that face's d-pad-right and d-pad-down icons. Keyboard shows the four arrows.
  • On main, the Keyboard face shows the Switch's d-pad for both control sets. The shots are in the comment below.
  • After the review's changes (70 glyphs per icon at U+FA2E): rebuilt and run again on Keyboard and Xbox with the d-pad rebound: the arrows, and LB / Y with Xbox's d-pad right and down, as before.
  • Live changes: keyboard → Xbox → keyboard. The prompts log follows each change ("now the xbox icons in texts, 16 buttons on these controls", and back), with no "no prompts/dpad.bin" line. The HUD's d-pad keeps its start icon through such a change, on main as here: the game doesn't draw that text again until the next start.
  • Checks:
    • tests/test_prompt_font_bind.py covers the start's glyph on each face, with the d-pad left alone and rebound: its calls, and that no other icon moves. It also covers a text's codes through d-pad changes in one run: the face's own icon, or one glyph per set of pieces, reused for the same set.
    • It also runs host/prompts.c's own dpad_slot and slots_point on a made-up font where the game keeps it. A glyph is given out per set of pieces, with its calls written; none past the 69th, and nothing written then. Once the font is served again, every glyph given out still has its calls. Breaking slots_point makes this check fail.
    • The other tests/test_prompt*.py pass.
    • The changed tests (run_all.py --changed upstream/main) pass except test_host_guest_writes, test_mods_size_table and test_lift_cache, which fail the same way on main a106df16.

Still to test:

  • Windows (any GPU): Button prompts Keyboard, restart, a save in play: the HUD's d-pad shows the keys 1 2 3 4 (by hand, or @Beanstalk on Windows).
  • Linux or Windows, a pad face with the d-pad bound on another button on the Controls page while the game runs: a text drawn after the change that shows a d-pad icon shows the new binding (by hand). The HUD's icon doesn't take a live change (above), and I found no other text the game draws anew with it, so the live path ran in the checks only.

Measurements

Verdict: no frame-time path changes. The prompts build takes ~0.5 s more (+2.7 %), and its output grows by ~53 KB: the font goes from 55 to 104 KB.

Setup: CachyOS, AMD Ryzen 7 6800H, dev.py queue --mode timing. A clean nx2/prompt_assets.py run (every face, textures included) into an empty folder: main, then this PR, three times interleaved, wall time. The only build step this changes; the game's own compile doesn't change.

Before: main @ 9027e737 (its prompts files as a106df16's) After: this PR @ 37966a8b
Prompts build, median of 3 19.9 s (19.5, 19.9, 20.2) 20.4 s (20.4, 21.7, 20.3)
External.bfotf 55,088 B 104,284 B
All prompts output 275,662,296 B 275,715,589 B (+ dpad.bin, 4 KB)

At run time: when the font is served, writing the start's calls is twelve 2-byte writes. A text rewritten after a change gives out a glyph by four 2-byte writes into the game's copy.

Risks

  • What could break: the d-pad icons in texts, on every face. A wrong offset in dpad.bin would draw wrong or broken pieces in those three icons only. The host checks each place it writes still holds a 2-byte number (otf[a] == 28) and refuses a dpad.bin of the wrong size. Without dpad.bin, the icons stay the face's own, as on main.
  • After updating: the button prompts are drawn again once (their stamp hashes nx2/prompt_assets.py). Nothing changes in saves or longshot_options.ini.
  • Glyph limit: 69 glyphs per icon are given out to texts in a run, one per distinct set of pieces (a face and its d-pad bindings). Past that, a d-pad bound anew shows the face's own icon in texts until the next start (logged once).
  • The code points: the glyphs given out after a change are U+FA2E..U+FAFF, CJK compatibility ideographs in no game font. Where a text breaks lines like CJK, a line may break next to such an icon where it wouldn't next to a private-use one. The icon at the start keeps the game's own code (U+E049...), so only texts rewritten after a change can.
  • Turning it off: a revert is enough.
  • Not in this PR: other Keyboard-face gaps in textures keep the Switch's letters: the ocarina's notes, the A/B/X/Y letters on black, and the Talk ring.

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). On this PC, run_all.py --strict: 736 pass, 136 fail. 82 of the failures are the Vulkan and SPIR-V headers this PC lacks ("not found: vulkan_headers / spirv_headers (--strict)"; CI has them). The other 54 fail the same on main a106df16 (54 of 54 run there), among them test_host_guest_writes, test_mods_size_table, test_lift_cache, test_walk_key and test_dev_packs. None is a prompts test; every test_prompt* passes.
  • 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.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. Linux: the pack built here. Windows: host/prompts.c compiled with llvm-mingw clang (-std=c11 -Wall -Wextra), no warnings; CI doesn't build Windows for pull requests. No paths changed.
  • 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.

🤖 Generated with Claude Code

https://claude.ai/code/session_015KgSKntdRabGivCmhJ63NW

## Summary The d-pad icons in texts showed the face's own d-pad whatever the controls. The HUD's icon between the ocarina and Navi is the one players see all the time, and the up-down and left-right icons were affected too. On the Keyboard prompts, that meant a pad's d-pad where the keys are 1 2 3 4: a player's report, "There are still sections that don't have the PC buttons!!!". And on any pad face, a d-pad bound elsewhere on the Controls page still showed the d-pad. **To see it on main:** set Button prompts to Keyboard and restart the game. Load a save in play: the HUD's d-pad (between the ocarina and Navi) is a pad's d-pad, not keys. Or keep a pad face, bind d-pad Left to Y on the Controls page, and restart: the icon is still the d-pad. **Now:** each way of the icon shows what it is bound to, at the d-pad's four places: - the Keyboard face shows its keys: 1 2 3 4 by default, or the arrows, or whatever is bound; - a pad face keeps its own d-pad icon while the d-pad is on the d-pad, and shows that face's icon of the input bound otherwise (Y, LB, triangle, ...); - the up-down and left-right icons show the ways they don't mean as a hollow ring, or a hollow key on the Keyboard face. **How:** - `nx2/prompt_assets.py` `dpad_glyphs` adds, for each d-pad icon, glyphs made of four pieces placed in the game's d-pad's round buttons. - Each piece is a CFF global subr: each face's icon of each pad input, each key's icon, and the hollow pieces. - `prompts/dpad.bin` (`dpad_table`) records which subr each piece is and where each glyph's calls sit in the font. - `host/prompts.c` writes those calls for the controls now: - at the start, when it serves the font (`dpad_bind`); - for a text rewritten after a change while the game runs, a glyph of its own per set of pieces (`dpad_slot`), kept when the font is served again (`slots_point`). - The glyphs sit at U+FA2E..U+FAFF, 70 per icon: the start's and 69 for texts after changes. That range is in none of the game's fonts; the private use area's free codes were too few. - `dpad_pieces` decides what each way shows. Read first: `host/prompts.c` `dpad_pieces`, `dpad_bind`, `dpad_slot`; `nx2/prompt_assets.py` `dpad_glyphs`, `dpad_piece`. ## Testing **Tested:** - **Setup:** CachyOS (Linux 7.3.4), NVIDIA RTX 3060 Laptop, driver 620.70.06. Pack and runtime on the 9027e737 base through `dev.py queue`. A save in play (Kokiri Forest); the DualSense hidden from the game; the controls from an options file. - **Each face at a game start, default controls:** Switch, Xbox, PS4, PS5 and Steam Deck keep their own d-pad icon on the HUD. Keyboard shows 2 on top, 1 left, 3 right, 4 down. - **Each face at a game start, d-pad rebound:** Left on the top face button, Up on the left shoulder, keys on the arrows. Every pad face shows its own icon of each binding: Switch L and X, Xbox LB and Y, PS4/PS5 L1 and triangle, Steam Deck L1 and Y. Right and down show that face's d-pad-right and d-pad-down icons. Keyboard shows the four arrows. - **On main**, the Keyboard face shows the Switch's d-pad for both control sets. The shots are in the comment below. - **After the review's changes (70 glyphs per icon at U+FA2E):** rebuilt and run again on Keyboard and Xbox with the d-pad rebound: the arrows, and LB / Y with Xbox's d-pad right and down, as before. - **Live changes:** keyboard → Xbox → keyboard. The prompts log follows each change ("now the xbox icons in texts, 16 buttons on these controls", and back), with no "no prompts/dpad.bin" line. The HUD's d-pad keeps its start icon through such a change, on main as here: the game doesn't draw that text again until the next start. - **Checks:** - `tests/test_prompt_font_bind.py` covers the start's glyph on each face, with the d-pad left alone and rebound: its calls, and that no other icon moves. It also covers a text's codes through d-pad changes in one run: the face's own icon, or one glyph per set of pieces, reused for the same set. - It also runs `host/prompts.c`'s own `dpad_slot` and `slots_point` on a made-up font where the game keeps it. A glyph is given out per set of pieces, with its calls written; none past the 69th, and nothing written then. Once the font is served again, every glyph given out still has its calls. Breaking `slots_point` makes this check fail. - The other `tests/test_prompt*.py` pass. - The changed tests (`run_all.py --changed upstream/main`) pass except `test_host_guest_writes`, `test_mods_size_table` and `test_lift_cache`, which fail the same way on main a106df16. **Still to test:** - Windows (any GPU): Button prompts Keyboard, restart, a save in play: the HUD's d-pad shows the keys 1 2 3 4 (by hand, or `@Beanstalk` on Windows). - Linux or Windows, a pad face with the d-pad bound on another button on the Controls page while the game runs: a text drawn after the change that shows a d-pad icon shows the new binding (by hand). The HUD's icon doesn't take a live change (above), and I found no other text the game draws anew with it, so the live path ran in the checks only. ## Measurements **Verdict:** no frame-time path changes. The prompts build takes ~0.5 s more (+2.7 %), and its output grows by ~53 KB: the font goes from 55 to 104 KB. Setup: CachyOS, AMD Ryzen 7 6800H, `dev.py queue --mode timing`. A clean `nx2/prompt_assets.py` run (every face, textures included) into an empty folder: main, then this PR, three times interleaved, wall time. The only build step this changes; the game's own compile doesn't change. | | Before: main @ 9027e737 (its prompts files as a106df16's) | After: this PR @ 37966a8b | |---|---|---| | Prompts build, median of 3 | 19.9 s (19.5, 19.9, 20.2) | 20.4 s (20.4, 21.7, 20.3) | | `External.bfotf` | 55,088 B | 104,284 B | | All prompts output | 275,662,296 B | 275,715,589 B (+ `dpad.bin`, 4 KB) | At run time: when the font is served, writing the start's calls is twelve 2-byte writes. A text rewritten after a change gives out a glyph by four 2-byte writes into the game's copy. ## Risks - **What could break:** the d-pad icons in texts, on every face. A wrong offset in `dpad.bin` would draw wrong or broken pieces in those three icons only. The host checks each place it writes still holds a 2-byte number (`otf[a] == 28`) and refuses a `dpad.bin` of the wrong size. Without `dpad.bin`, the icons stay the face's own, as on main. - **After updating:** the button prompts are drawn again once (their stamp hashes `nx2/prompt_assets.py`). Nothing changes in saves or `longshot_options.ini`. - **Glyph limit:** 69 glyphs per icon are given out to texts in a run, one per distinct set of pieces (a face and its d-pad bindings). Past that, a d-pad bound anew shows the face's own icon in texts until the next start (logged once). - **The code points:** the glyphs given out after a change are U+FA2E..U+FAFF, CJK compatibility ideographs in no game font. Where a text breaks lines like CJK, a line may break next to such an icon where it wouldn't next to a private-use one. The icon at the start keeps the game's own code (U+E049...), so only texts rewritten after a change can. - **Turning it off:** a revert is enough. - **Not in this PR:** other Keyboard-face gaps in textures keep the Switch's letters: the ocarina's notes, the A/B/X/Y letters on black, and the Talk ring. ## 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). On this PC, `run_all.py --strict`: 736 pass, 136 fail. 82 of the failures are the Vulkan and SPIR-V headers this PC lacks ("not found: vulkan_headers / spirv_headers (--strict)"; CI has them). The other 54 fail the same on main a106df16 (54 of 54 run there), among them `test_host_guest_writes`, `test_mods_size_table`, `test_lift_cache`, `test_walk_key` and `test_dev_packs`. None is a prompts test; every `test_prompt*` passes. - [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] A check under `tests/` that reads changed source is updated, not weakened. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. Linux: the pack built here. Windows: `host/prompts.c` compiled with llvm-mingw clang (`-std=c11 -Wall -Wextra`), no warnings; CI doesn't build Windows for pull requests. No paths changed. - [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. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015KgSKntdRabGivCmhJ63NW
fix(prompts): the d-pad icons show what the d-pad is bound to, on every face
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 21s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 28s
CI / Workflow lint (actionlint) (pull_request) Successful in 32s
Third-party parts / As their notes say (pull_request) Successful in 36s
PR description / Description follows the template (pull_request_target) Successful in 4s
CI / Website build and checks (pull_request) Has been cancelled
71ab01f49f
The d-pad icons in texts (the HUD's, between the ocarina and Navi, and the up-down and left-right ones) were the face's
own d-pad whatever the controls: the Keyboard prompts showed a pad's d-pad where the keys are 1 2 3 4, and a pad with
the d-pad bound elsewhere still showed the d-pad.

The build adds, for each d-pad icon, glyphs of four pieces placed in the game's d-pad's round buttons
(nx2/prompt_assets.py dpad_glyphs): each piece is a global subr (each face's icon of each pad input, each key's, a
hollow ring or key for the ways the icon does not show), and prompts/dpad.bin says which subr number each piece is and
where each glyph's calls are. host/prompts.c writes the calls for the controls: the start's glyph when it serves the
font (dpad_bind), and a glyph of its own per set of pieces for texts rewritten after a change while the game runs
(dpad_slot, kept when the font is served again). A d-pad left on the face's own d-pad keeps the face's icon; the
keyboard face always shows its keys. Without dpad.bin the icons stay the face's, as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015KgSKntdRabGivCmhJ63NW
Author
Member

Tested in game: CachyOS (Linux 7.3.4), NVIDIA RTX 3060 Laptop, driver 620.70.06: the HUD in play (Kokiri Forest save) at a game start on each of the six faces, with the default controls and with the d-pad rebound (Left on the top face button, Up on the left shoulder, keys on the arrows). Pad faces keep their own d-pad with the defaults and show their icons of the new bindings when rebound; Keyboard shows 1 2 3 4, then the arrows. main shows the Switch's d-pad on Keyboard either way. Live face changes keyboard/xbox/keyboard ran clean in the log.

Tested in game: CachyOS (Linux 7.3.4), NVIDIA RTX 3060 Laptop, driver 620.70.06: the HUD in play (Kokiri Forest save) at a game start on each of the six faces, with the default controls and with the d-pad rebound (Left on the top face button, Up on the left shoulder, keys on the arrows). Pad faces keep their own d-pad with the defaults and show their icons of the new bindings when rebound; Keyboard shows 1 2 3 4, then the arrows. main shows the Switch's d-pad on Keyboard either way. Live face changes keyboard/xbox/keyboard ran clean in the log.
Author
Member

Screenshots, the HUD's d-pad icon zoomed (4x) from in-game shots, NVIDIA RTX 3060 Laptop on CachyOS.

main (base 9027e737): the Keyboard face shows the Switch's d-pad, whatever the keys:

main, Keyboard face

This PR, each face at a game start: the default controls (top), and the d-pad rebound (bottom: Left on the top face button, Up on LB/L1/L, keys on the arrows):

this PR, every face

Screenshots, the HUD's d-pad icon zoomed (4x) from in-game shots, NVIDIA RTX 3060 Laptop on CachyOS. **main** (base 9027e737): the Keyboard face shows the Switch's d-pad, whatever the keys: ![main, Keyboard face](https://git.magicbean.dev/attachments/a142e3b7-6e93-4c7b-bf91-0a30b7f4f12b) **This PR**, each face at a game start: the default controls (top), and the d-pad rebound (bottom: Left on the top face button, Up on LB/L1/L, keys on the arrows): ![this PR, every face](https://git.magicbean.dev/attachments/0b52c901-973e-4783-9640-d7c79747834d)
Member

Possibly related, for context:

  • PR #1184 fix(prompts): texts already on screen follow a new face at once (the HUD's item button) — Overlapping live prompt changes in host/prompts.c; this PR expressly leaves the HUD icon unchanged until restart.
  • PR #1700 feat(prompts): the System page's guide follows every controller and binding (#1211) — Related prompts work in same control-binding domain, but System guide layout is separate.
  • PR #529 fix(prompts): the Keyboard prompts show the movement keys as they are bound — Merged keyboard prompt binding fix; this extends bound-key artwork to the d-pad.
  • issue #297 Idea: Ocarina Glyphs should match the separate ocarina controls. — Open issue about d-pad-bound ocarina controls not matching glyphs; adjacent symptom, not necessarily addressed by this fix.
Possibly related, for context: - PR #1184 fix(prompts): texts already on screen follow a new face at once (the HUD's item button) — Overlapping live prompt changes in host/prompts.c; this PR expressly leaves the HUD icon unchanged until restart. - PR #1700 feat(prompts): the System page's guide follows every controller and binding (#1211) — Related prompts work in same control-binding domain, but System guide layout is separate. - PR #529 fix(prompts): the Keyboard prompts show the movement keys as they are bound — Merged keyboard prompt binding fix; this extends bound-key artwork to the d-pad. - issue #297 Idea: Ocarina Glyphs should match the separate ocarina controls. — Open issue about d-pad-bound ocarina controls not matching glyphs; adjacent symptom, not necessarily addressed by this fix.
BeanBot left a comment

Recommendation: Request changes. The startup fix is supported by the reported Linux run, but live changes can exhaust the available glyphs and fall back to incorrect prompts. The live implementation is also not exercised by the new test, and the build-time cost required by the project standards is unmeasured.

The change makes d-pad text icons reflect keyboard and controller bindings by adding composite glyphs to the prompt font. The reported cost is about 37 KB of font data; build time and the live-rebinding path still need validation.

Does it help: Yes for the reported startup cases on Linux: the author observed default and rebound icons on all six faces, compared with main. Live rebinding is unproven in game; the reported font grows from about 55 KB to 92 KB.
Other systems: Windows, AMD, Steam Deck and live rebinding remain untested in the supplied evidence. The font is shared by dialogue, menus and HUD text; the author tested the HUD at startup but did not demonstrate a newly drawn dialogue or menu after rebinding. The generator also runs during builds, whose time was not measured.
Switches: None.

Reviewed: 71ab01f49f against a106df16b2: Read the repository rules, PR template, change diff and changed portions of all three files, plus surrounding font serving, live update, glyph generation and build integration. Skimmed unrelated portions of the large changed files and the screenshot maintenance guide. The review checklist and adjacent Tooling checkout were absent; the supplied comments and reviews were empty. No external runs or overlapping PRs were available offline.; nothing run (a code review).
Checked and fine:

  • The reported startup run covers default and rebound controls across all prompt faces.
  • The new glyph writes check the font buffer bounds and expected number marker.
  • The change adds no player-facing switches, generated files or third-party modifications.

Blocking (to change before merge)

  1. host/prompts.c:1145: Only nine live glyphs are available per d-pad icon. After ten distinct composite bindings or face-and-binding combinations in one session, newly drawn text falls back to the face's d-pad, which can misidentify the active controls. Avoid exhausting the available representations or provide a correct fallback.
  2. tests/test_prompt_font_bind.py:401: The live test substitutes its own dpad_slot and never exercises the production font write or restoration in slots_point. A broken write or lost glyph after a font reload would pass; test the production functions with a synthetic font and verify the resulting calls across a reload.
  3. nx2/prompt_assets.py:474: The new glyph generation runs during a player build, but the PR supplies no before-and-after build timing. The standards require build time and size measurements for build changes; measure clean builds on the same setup and report the cost.

Testing: No code or tests were run in this review. The author reports Linux in-game startup checks and passing prompt tests; Windows build and runtime, live rebinding in game, the full test run and required Tier 1 coverage remain outstanding.
Overlaps and merge order: Unknown; the network was closed.


Automated code review by BeanBot (gpt-6.1-terra), on the pull request's opening. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The startup fix is supported by the reported Linux run, but live changes can exhaust the available glyphs and fall back to incorrect prompts. The live implementation is also not exercised by the new test, and the build-time cost required by the project standards is unmeasured. The change makes d-pad text icons reflect keyboard and controller bindings by adding composite glyphs to the prompt font. The reported cost is about 37 KB of font data; build time and the live-rebinding path still need validation. **Does it help:** Yes for the reported startup cases on Linux: the author observed default and rebound icons on all six faces, compared with main. Live rebinding is unproven in game; the reported font grows from about 55 KB to 92 KB. **Other systems:** Windows, AMD, Steam Deck and live rebinding remain untested in the supplied evidence. The font is shared by dialogue, menus and HUD text; the author tested the HUD at startup but did not demonstrate a newly drawn dialogue or menu after rebinding. The generator also runs during builds, whose time was not measured. **Switches:** None. **Reviewed:** 71ab01f49f2e against a106df16b273: Read the repository rules, PR template, change diff and changed portions of all three files, plus surrounding font serving, live update, glyph generation and build integration. Skimmed unrelated portions of the large changed files and the screenshot maintenance guide. The review checklist and adjacent Tooling checkout were absent; the supplied comments and reviews were empty. No external runs or overlapping PRs were available offline.; nothing run (a code review). **Checked and fine:** - The reported startup run covers default and rebound controls across all prompt faces. - The new glyph writes check the font buffer bounds and expected number marker. - The change adds no player-facing switches, generated files or third-party modifications. **Blocking** (to change before merge) 1. host/prompts.c:1145: Only nine live glyphs are available per d-pad icon. After ten distinct composite bindings or face-and-binding combinations in one session, newly drawn text falls back to the face's d-pad, which can misidentify the active controls. Avoid exhausting the available representations or provide a correct fallback. 2. tests/test_prompt_font_bind.py:401: The live test substitutes its own dpad_slot and never exercises the production font write or restoration in slots_point. A broken write or lost glyph after a font reload would pass; test the production functions with a synthetic font and verify the resulting calls across a reload. 3. nx2/prompt_assets.py:474: The new glyph generation runs during a player build, but the PR supplies no before-and-after build timing. The standards require build time and size measurements for build changes; measure clean builds on the same setup and report the cost. **Testing:** No code or tests were run in this review. The author reports Linux in-game startup checks and passing prompt tests; Windows build and runtime, live rebinding in game, the full test run and required Tier 1 coverage remain outstanding. **Overlaps and merge order:** Unknown; the network was closed. --- <sub>Automated code review by BeanBot (gpt-6.1-terra), on the pull request's opening. Nothing was run; a maintainer decides.</sub>
host/prompts.c Outdated
@ -1042,0 +1142,4 @@
int g = 1;
while (g < dpad_ngiven[k] && memcmp(dpad_given[k][g], piece, sizeof dpad_given[k][g])) g++;
if (g == dpad_ngiven[k]) {
uint8_t *q = g < DPAD_GLYPHS && font.at ? (uint8_t *)hos_guest_range(font.at, font.n - 8) : NULL;
Member

After nine distinct composite glyphs for an icon, the next binding falls back to the face's d-pad even if that is not the active binding. Please support further changes without displaying an incorrect control.

After nine distinct composite glyphs for an icon, the next binding falls back to the face's d-pad even if that is not the active binding. Please support further changes without displaying an incorrect control.
@ -268,6 +471,7 @@ def faces_font(otf, faces, label_otf=None):
for i in range(len(PADS)):
placed[BIND_BASE + (n * len(SWITCH) + b) * len(PADS) + i] = placed[base + i]
dpad = dpad_glyphs(game, faces, cmap, chars, hmtx, placed, add)
Member

This adds work to prompt generation during builds. Please measure clean build time and size against the base on the same setup, as required for build changes.

This adds work to prompt generation during builds. Please measure clean build time and size against the base on the same setup, as required for build changes.
@ -308,0 +398,4 @@
# (dpad_slot as host/prompts.c's, without the font: each icon's glyphs given out per set of pieces, from 1)
"static int16_t given[3][DPAD_GLYPHS][4];",
"static int ngiven[3] = {1, 1, 1};",
"static int dpad_slot(int k, const int16_t piece[4]) {",
Member

This stand-in bypasses the production slot write and restoration, so the live test can pass even if the actual glyph is never written or is lost on a font reload. Please exercise those functions with a synthetic font and check the resulting calls.

This stand-in bypasses the production slot write and restoration, so the live test can pass even if the actual glyph is never written or is lost on a font reload. Please exercise those functions with a synthetic font and check the resulting calls.
fix(prompts): 70 glyphs per d-pad icon, and the live ones tested as the game writes them
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 38s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 39s
CI / Workflow lint (actionlint) (pull_request) Successful in 56s
Third-party parts / As their notes say (pull_request) Successful in 54s
PR description / Description follows the template (pull_request_target) Successful in 14s
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval approved by gab9281 (reviewed)
beanstalk/windows 1/1 fail
CI / Website build and checks (pull_request) Has been cancelled
37966a8b04
The d-pad icons' glyphs move to U+FA2E..U+FAFF (in none of the game's fonts; the private use area's free codes were too
few): 69 per icon for texts after changes in one run, not 9, before one falls back to the face's own icon.
tests/test_prompt_font_bind.py runs host/prompts.c's dpad_slot and slots_point themselves on a made-up font: a glyph per
set of pieces, none past the last, and each one as given out once the font is served again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015KgSKntdRabGivCmhJ63NW
Author
Member

Review answered in 37966a8b (a new commit on top; the description is updated):

  1. Nine live glyphs per icon (host/prompts.c dpad_slot): now 69 per icon, besides the start's. The glyphs moved to U+FA2E..U+FAFF, which no game font uses; the private use area had too few free codes left. A glyph is given out per distinct set of pieces (a face with its d-pad bindings) and reused for the same set, so 69 is that many different faces and bindings in one run. Past it, the fallback stays the face's own icon, logged once, as with the keyboard's key codes (key_slot, 320). There is no picture that stays right without a new code: the game keeps a code's glyph drawn, so reusing a code would show its old pieces. The new code points' one side effect (CJK line breaking, texts rewritten after a change only) is under Risks.

  2. The live test bypassed the real code (tests/test_prompt_font_bind.py): check_dpad_live compiles host/prompts.c's own dpad_write, dpad_slot, slots_point and font_point against a made-up font where the game keeps it. It checks:

    • a glyph is given out per set of pieces, with its calls written;
    • the same set gets its glyph again;
    • nothing is given or written past the 69th;
    • nothing is written to glyphs not given out;
    • once the font is served again (slots_point), every glyph given out has the same calls.

    Making slots_point skip the d-pad makes it fail ("the font served again (slots_point) does not have the glyphs given out as they were").

  3. Build cost: a clean prompts build (the only build step this changes), main then this PR, three times interleaved, in the queue's timing mode on a Ryzen 7 6800H. Medians are 19.9 s on main and 20.4 s here (+0.5 s). The font goes from 55 to 104 KB, and the whole output grows by ~53 KB. The table is under Measurements.

Rebuilt and run again in game after these changes (Keyboard and Xbox, the d-pad rebound): the same icons as before.

Review answered in 37966a8b (a new commit on top; the description is updated): 1. **Nine live glyphs per icon** (`host/prompts.c` `dpad_slot`): now 69 per icon, besides the start's. The glyphs moved to U+FA2E..U+FAFF, which no game font uses; the private use area had too few free codes left. A glyph is given out per distinct set of pieces (a face with its d-pad bindings) and reused for the same set, so 69 is that many different faces and bindings in one run. Past it, the fallback stays the face's own icon, logged once, as with the keyboard's key codes (`key_slot`, 320). There is no picture that stays right without a new code: the game keeps a code's glyph drawn, so reusing a code would show its old pieces. The new code points' one side effect (CJK line breaking, texts rewritten after a change only) is under Risks. 2. **The live test bypassed the real code** (`tests/test_prompt_font_bind.py`): `check_dpad_live` compiles `host/prompts.c`'s own `dpad_write`, `dpad_slot`, `slots_point` and `font_point` against a made-up font where the game keeps it. It checks: - a glyph is given out per set of pieces, with its calls written; - the same set gets its glyph again; - nothing is given or written past the 69th; - nothing is written to glyphs not given out; - once the font is served again (`slots_point`), every glyph given out has the same calls. Making `slots_point` skip the d-pad makes it fail ("the font served again (slots_point) does not have the glyphs given out as they were"). 3. **Build cost:** a clean prompts build (the only build step this changes), main then this PR, three times interleaved, in the queue's timing mode on a Ryzen 7 6800H. Medians are 19.9 s on main and 20.4 s here (+0.5 s). The font goes from 55 to 104 KB, and the whole output grows by ~53 KB. The table is under Measurements. Rebuilt and run again in game after these changes (Keyboard and Xbox, the d-pad rebound): the same icons as before.
gab9281 changed title from WIP: fix(prompts): the d-pad icons show what the d-pad is bound to, on every face to fix(prompts): the d-pad icons show what the d-pad is bound to, on every face 2026-11-20 23:00:39 +00:00
Author
Member

@Beanstalk on Windows (any GPU): set Button prompts to Keyboard and restart the game, then load a save in play and take a screenshot of the HUD. The d-pad icon between the ocarina and Navi should show the keys 1 2 3 4 (2 on top, 1 left, 3 right, 4 down), not a pad's d-pad. Then set Button prompts to Xbox, restart, and take the same screenshot: Xbox's own d-pad icon. Compare with main, which shows a pad's d-pad on Keyboard.

@Beanstalk on Windows (any GPU): set Button prompts to Keyboard and restart the game, then load a save in play and take a screenshot of the HUD. The d-pad icon between the ocarina and Navi should show the keys 1 2 3 4 (2 on top, 1 left, 3 right, 4 down), not a pad's d-pad. Then set Button prompts to Xbox, restart, and take the same screenshot: Xbox's own d-pad icon. Compare with main, which shows a pad's d-pad on Keyboard.
Member
Beanstalk test farm · an earlier run: commit 37966a8 (the newer results are in a comment below)

Commit 37966a8 · approved by gab9281 (reviewed) · dashboard

⚠️ Note: The Keyboard screenshot cannot automatically verify the expected 2 above, 1 left, 3 right and 4 below; comparison with main would flag the intended change.
⚠️ Note: Rebinding and live-updated text are outside this startup HUD plan.

Summary, written by AI (gpt-6.1-terra) from the numbers below:

The change failed on Windows: the Xbox HUD screenshot differed on the AMD Radeon RX 9060 XT, though the NVIDIA RTX 5090 report passed. The AMD screenshot difference was 0.8839, above the 0.01 limit; the NVIDIA difference was 0.0. Both Keyboard and Xbox runs exited successfully on both PCs, but the Keyboard captures had no automatic image verdict.

Done (started 23:06 UTC, last report 23:59 UTC). Comment @Beanstalk to run it again.

Target Result Reports Frame time p99 (ms), main → PR VRAM peak (MB) Crashes
windows ❌ fail 2 1 2 — — none

Why it failed

  • windows: xbox-hud screenshot.max_diff: limit 0.0
What was tested

What will be tested · AI plan (gpt-6.1-terra)

On Windows, the plan loads the Kokiri save with Keyboard and Xbox prompts in separate game starts and captures the HUD for comparison with main. It takes about 20 minutes per tester. Crashes or an Xbox screenshot difference fail the plan; the Keyboard capture is recorded without an automatic image verdict because its expected fix differs from main.

  • Where: windows (1-2 reports).
  • keyboard-hud: from the repository's save kokiri-start (settings button_prompts=6), then take the picture keyboard-hud; 1 run on each side.
  • xbox-hud: from the repository's save kokiri-start (settings button_prompts=2), then take the picture xbox-hud to compare with main; 1 run on each side.
  • Measured: crashes.
  • The PR fails if: it crashes; or a picture differs from main by more than 1%.
  • Time: about 21 min of game runs per tester (4 game starts), plus the two builds.
Measurements on `windows`, for the PR description

Verdict: fail on windows (2 reports): xbox-hud screenshot.max_diff failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5090, 621.24.0 AMD Ryzen 9 9950X3D2 16-Core Processor, 96 GB RAM; 2: windows+amd+amd-proprietary+dgpu AMD Radeon RX 9060 XT, 2.0.416 AMD Ryzen 5 5600 6-Core Processor, 32 GB RAM
Scene: keyboard-hud, from the repository's save kokiri-start (button_prompts=6); xbox-hud, from the repository's save kokiri-start (button_prompts=2); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); keyboard-hud: 1 game start a side; xbox-hud: 1 game start a side; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Nothing was measured: no metric came back.

Flags and settings

None: the plan varied no setting, switch or build option.

As Markdown for the PR description:

## Measurements

**Verdict:** fail on windows (2 reports): `xbox-hud screenshot.max_diff` failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5090, 621.24.0` `AMD Ryzen 9 9950X3D2 16-Core Processor, 96 GB RAM`; 2: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9060 XT, 2.0.416` `AMD Ryzen 5 5600 6-Core Processor, 32 GB RAM`  
Scene: keyboard-hud, from the repository's save kokiri-start (button_prompts=6); xbox-hud, from the repository's save kokiri-start (button_prompts=2); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); keyboard-hud: 1 game start a side; xbox-hud: 1 game start a side; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

Nothing was measured: no metric came back.

**Flags and settings**

None: the plan varied no setting, switch or build option.
The testers' hardware
Target Report Ran on
windows 1 windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5090, 621.24.0 AMD Ryzen 9 9950X3D2 16-Core Processor, 96 GB RAM
windows 2 windows+amd+amd-proprietary+dgpu AMD Radeon RX 9060 XT, 2.0.416 AMD Ryzen 5 5600 6-Core Processor, 32 GB RAM
<!-- beanstalk:previous --> <details><summary>Beanstalk test farm · an earlier run: commit <code>37966a8</code> (the newer results are in a comment below)</summary> Commit `37966a8` · approved by gab9281 (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/1921) ⚠️ **Note:** The Keyboard screenshot cannot automatically verify the expected 2 above, 1 left, 3 right and 4 below; comparison with main would flag the intended change. ⚠️ **Note:** Rebinding and live-updated text are outside this startup HUD plan. > **Summary**, written by AI (`gpt-6.1-terra`) from the numbers below: > > The change failed on Windows: the Xbox HUD screenshot differed on the AMD Radeon RX 9060 XT, though the NVIDIA RTX 5090 report passed. The AMD screenshot difference was 0.8839, above the 0.01 limit; the NVIDIA difference was 0.0. Both Keyboard and Xbox runs exited successfully on both PCs, but the Keyboard captures had no automatic image verdict. Done (started 23:06 UTC, last report 23:59 UTC). Comment `@Beanstalk` to run it again. | Target | Result | Reports | Frame time p99 (ms), main → PR | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | --- | | `windows` | ❌ fail | 2 [1](https://beanstalk.magicbean.dev/reports/rp_dfaab0d6a0540563) [2](https://beanstalk.magicbean.dev/reports/rp_45aaf27e5b5db59b) | — | — | none | **Why it failed** - `windows`: `xbox-hud` `screenshot.max_diff`: `limit 0.0` <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) On Windows, the plan loads the Kokiri save with Keyboard and Xbox prompts in separate game starts and captures the HUD for comparison with main. It takes about 20 minutes per tester. Crashes or an Xbox screenshot difference fail the plan; the Keyboard capture is recorded without an automatic image verdict because its expected fix differs from main. - **Where:** windows (1-2 reports). - **keyboard-hud:** from the repository's save `kokiri-start` (settings button_prompts=6), then take the picture keyboard-hud; 1 run on each side. - **xbox-hud:** from the repository's save `kokiri-start` (settings button_prompts=2), then take the picture xbox-hud to compare with main; 1 run on each side. - **Measured:** crashes. - **The PR fails if:** it crashes; or a picture differs from main by more than 1%. - **Time:** about 21 min of game runs per tester (4 game starts), plus the two builds. </details> <details><summary>Measurements on `windows`, for the PR description</summary> **Verdict:** fail on windows (2 reports): `xbox-hud screenshot.max_diff` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5090, 621.24.0` `AMD Ryzen 9 9950X3D2 16-Core Processor, 96 GB RAM`; 2: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9060 XT, 2.0.416` `AMD Ryzen 5 5600 6-Core Processor, 32 GB RAM` Scene: keyboard-hud, from the repository's save kokiri-start (button_prompts=6); xbox-hud, from the repository's save kokiri-start (button_prompts=2); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); keyboard-hud: 1 game start a side; xbox-hud: 1 game start a side; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) Nothing was measured: no metric came back. **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** fail on windows (2 reports): `xbox-hud screenshot.max_diff` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5090, 621.24.0` `AMD Ryzen 9 9950X3D2 16-Core Processor, 96 GB RAM`; 2: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9060 XT, 2.0.416` `AMD Ryzen 5 5600 6-Core Processor, 32 GB RAM` Scene: keyboard-hud, from the repository's save kokiri-start (button_prompts=6); xbox-hud, from the repository's save kokiri-start (button_prompts=2); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); keyboard-hud: 1 game start a side; xbox-hud: 1 game start a side; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) Nothing was measured: no metric came back. **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>The testers' hardware</summary> | Target | Report | Ran on | | --- | --- | --- | | `windows` | [1](https://beanstalk.magicbean.dev/reports/rp_dfaab0d6a0540563) | windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5090, 621.24.0` `AMD Ryzen 9 9950X3D2 16-Core Processor, 96 GB RAM` | | `windows` | [2](https://beanstalk.magicbean.dev/reports/rp_45aaf27e5b5db59b) | windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9060 XT, 2.0.416` `AMD Ryzen 5 5600 6-Core Processor, 32 GB RAM` | </details> </details>
Owner
@fix
Member

I changed this pull request by bringing it up to date: the new head is f51f9b2415. I rebased it onto main (9bda94ba81).

Conflicts resolved

  • host/prompts.c: Kept the base branch’s controller detection and the pull request’s d-pad binding changes.

Left for the author

  • Live d-pad glyph exhaustion, production test, and build measurements: The production write and reload test already exists at tests/test_prompt_font_bind.py:524. Glyph exhaustion remains unresolved: host/prompts.c:1145 has 69 live slots per icon, and reusing a code can display its cached image. The available glyph hook does not expose cache invalidation. The author must also measure clean build time and output size against the base on the same setup; no builds were run here.

Nothing was built or run: check the change. It will be reviewed again.


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

I changed this pull request by bringing it up to date: the new head is f51f9b241560. I rebased it onto `main` (9bda94ba81f2). **Conflicts resolved** - host/prompts.c: Kept the base branch’s controller detection and the pull request’s d-pad binding changes. **Left for the author** - **Live d-pad glyph exhaustion, production test, and build measurements**: The production write and reload test already exists at tests/test_prompt_font_bind.py:524. Glyph exhaustion remains unresolved: host/prompts.c:1145 has 69 live slots per icon, and reusing a code can display its cached image. The available glyph hook does not expose cache invalidation. The author must also measure clean build time and output size against the base on the same setup; no builds were run here. Nothing was built or run: check the change. It will be reviewed again. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
BeanBot force-pushed fix/prompts-dpad-bound from 37966a8b04
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 38s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 39s
CI / Workflow lint (actionlint) (pull_request) Successful in 56s
Third-party parts / As their notes say (pull_request) Successful in 54s
PR description / Description follows the template (pull_request_target) Successful in 14s
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval approved by gab9281 (reviewed)
beanstalk/windows 1/1 fail
CI / Website build and checks (pull_request) Has been cancelled
to f51f9b2415
Some checks failed
beanstalk/approval not approved yet
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 19s
CI / Conventional Commit title (pull_request) Successful in 18s
CI / Workflow lint (actionlint) (pull_request) Successful in 26s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 33s
Third-party parts / As their notes say (pull_request) Successful in 36s
CI / Website build and checks (pull_request) Has been cancelled
2026-11-21 00:06:22 +00:00
Compare
Member

Beanstalk test farm

Commit dfa6277 · approved by nobody yet · dashboard

A member of BigBeans can review this commit and comment @Beanstalk to test it.

<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `dfa6277` · approved by nobody yet · [dashboard](https://beanstalk.magicbean.dev/prs/1921) A member of `BigBeans` can review this commit and comment `@Beanstalk` to test it.
BeanBot left a comment

Recommendation: Request changes. The reported Linux runs show that startup prompts can display the correct bindings. The live rewrite can replace ordinary CJK text with d-pad icons, some supported controller bindings still show the wrong input, and the Windows AMD screenshot failure remains unexplained.

The change builds a composite glyph for each of the three d-pad prompts and patches its four pieces to match the controls. That fixes the reported Keyboard HUD prompt at startup and helps players with rebound controls. It adds a sidecar that must match the font, a bounded live glyph cache, and about 53 KB of generated output.

Does it help: Yes for the reported Linux startup cases. On the RTX 3060 Laptop, the author reported correct default and rebound HUD icons across all six faces, compared with the Switch d-pad on main's Keyboard face. Keyboard and Xbox rebound startup were repeated at 37966a8b. Live rendering and the full rebased head remain unproven. Three interleaved clean prompts builds on the Ryzen 7 6800H measured 19.9 s versus 20.4 s median at 9027e737 and 37966a8b. The runs overlap, so the 0.5 s difference is within the observed spread. The font grew from 55,088 to 104,284 bytes and total output grew by 53,293 bytes.
Other systems: The shared font and rewrite hooks affect HUD, menu and dialogue text on Windows, Linux and Steam Deck, including localized and modded text. The size table uses the generated font size and the existing mod-table merge, while a mod's replacement font keeps precedence. Beanstalk reported no crashes on Windows NVIDIA or AMD at 37966a8b, with no frame-time or memory metrics. The Steam Deck prompt face ran on desktop Linux. Steam Deck hardware and Linux AMD coverage are outstanding. The diff leaves renderer interfaces, shaders, saves, audio and input handling untouched.
Switches: None.

Reviewed: f51f9b2415 against 9bda94ba81: Read the HEAD diff for all three changed files and the commit log. Read all changed sections and their supporting paths in host/prompts.c, nx2/prompt_assets.py and tests/test_prompt_font_bind.py, including binding readers, font serving and live hooks, resource sizing, build staging and the test harnesses. Skimmed unrelated portions of the large files and the guide screenshot maintenance plan. Read AGENTS.md, CONTRIBUTING.md, the Forgejo template, standards and the supplied comments and stale review. The review checklist and adjacent Tooling checkout were absent. Screenshot attachments, farm logs and CI results were unavailable offline.; nothing run (a code review).
Checked and fine:

  • The Conventional Commit title and diff cover one topic. There are no tracked game files, generated assets, vendor SDKs, third-party edits, new dependencies or unrelated downloads or deletes. Both commits record AI assistance.
  • The build stages the font and sidecar together, and the incremental output inventory covers the new sidecar. The resource size table calculation already takes the larger font into account.
  • The production live-slot harness exercises writes, reuse and restoration after a reload. Host slot allocation and restoration share slot_lock.
  • The prompt font is outside the recorded user-guide fixture inputs. The menu settings, switch-table, renderer API and shader checklist items are inapplicable.

Blocking (to change before merge)

  1. host/prompts.c:1206: After a live prompt change, any text box containing U+FA30 has that genuine CJK character rewritten as a d-pad prompt, even if the slot was never issued or dpad.bin is missing. A localized text mod can legitimately use that character. Keep live tokens in a private-use namespace or carry their provenance outside the text, and test that real CJK text survives a prompt change.
  2. host/prompts.c:275: The composite uses only gamepad Input 1 and substitutes the default direction for unsupported artwork. Put Left on Y in Input 2 and clear Input 1, or put Left on a rear paddle in Input 1, and the prompt still indicates d-pad Left. Use the second binding when the first is clear, include the displayed binding in live change detection, and use an honest label or neutral piece for inputs without artwork.
  3. host/prompts.c:288: A rejected offset silently skips one piece, but startup still selects the composite and live allocation still records it as valid. For example, a sidecar paired with a font from a different build can produce a hollow or partly patched prompt. An offset that lands on an unrelated operand marked 28 can also alter another glyph. Tie the sidecar to its font, validate before patching, and select the existing face glyph when validation fails.
  4. host/prompts.c:1176: The 70th distinct live binding combination for an icon falls back to the face's stock d-pad. On Keyboard that means a controller d-pad again, even when the player just assigned a new key. Use a representation that can be reused safely or a neutral fallback that won't name the wrong input. A startup-only fix would also avoid this live limit if the live feature is deferred explicitly.
  5. tests/test_prompt_font_bind.py:528: The harness supplies its own offsets and fills every destination with 28. It passes if the builder serializes the wrong offsets or if the host rejects the real sidecar. Add a game-free round trip with a small synthetic CFF font through the generator and host loader, then check the resulting glyphs and the mismatched-sidecar fallback.

Waiting on the author (a run, a measurement or a decision; no edit does it)

  • The Windows AMD Xbox HUD comparison failed at 0.8839 against a stated 0.01 threshold, while Windows NVIDIA reported 0.0. Inspect the paired captures and repeat on the merge candidate with the same save, controls and capture point. Establish whether the default Xbox prompt or surrounding HUD regressed. Manually verify the Keyboard capture, which had no automated verdict.
  • The reported live run changed faces in the log but never demonstrated a redrawn d-pad prompt. Before merge, show a newly laid-out prompt after rebinding, including the two partial d-pad icons, and cover the outstanding Tier 1 Linux AMD and Steam Deck runs. Record CI and the required checks on the merge candidate, and update the clean-build, startup and memory evidence against its base or explain which existing measurements still apply.

Testing: Read-only review. The author reports passing prompt checks and a warning-free llvm-mingw compile before the rebase. The strict run reported 736 passes and 136 failures, including 82 missing-header failures and 54 reproduced on main. No head CI or lint result was supplied. The reported Beanstalk run predates the rebase and its supplied threshold descriptions disagree, though the stated AMD result exceeds either threshold.
Overlaps and merge order: BeanBot identified #1184 as the relevant overlap in host/prompts.c because it also changes live prompts. Verify status and merge order on Forgejo, then review the combined text rewrite path if both are pending. #1700 concerns a separate guide layout, #529 is merged, and issue #297 concerns separate ocarina controls.


Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The reported Linux runs show that startup prompts can display the correct bindings. The live rewrite can replace ordinary CJK text with d-pad icons, some supported controller bindings still show the wrong input, and the Windows AMD screenshot failure remains unexplained. The change builds a composite glyph for each of the three d-pad prompts and patches its four pieces to match the controls. That fixes the reported Keyboard HUD prompt at startup and helps players with rebound controls. It adds a sidecar that must match the font, a bounded live glyph cache, and about 53 KB of generated output. **Does it help:** Yes for the reported Linux startup cases. On the RTX 3060 Laptop, the author reported correct default and rebound HUD icons across all six faces, compared with the Switch d-pad on main's Keyboard face. Keyboard and Xbox rebound startup were repeated at 37966a8b. Live rendering and the full rebased head remain unproven. Three interleaved clean prompts builds on the Ryzen 7 6800H measured 19.9 s versus 20.4 s median at 9027e737 and 37966a8b. The runs overlap, so the 0.5 s difference is within the observed spread. The font grew from 55,088 to 104,284 bytes and total output grew by 53,293 bytes. **Other systems:** The shared font and rewrite hooks affect HUD, menu and dialogue text on Windows, Linux and Steam Deck, including localized and modded text. The size table uses the generated font size and the existing mod-table merge, while a mod's replacement font keeps precedence. Beanstalk reported no crashes on Windows NVIDIA or AMD at 37966a8b, with no frame-time or memory metrics. The Steam Deck prompt face ran on desktop Linux. Steam Deck hardware and Linux AMD coverage are outstanding. The diff leaves renderer interfaces, shaders, saves, audio and input handling untouched. **Switches:** None. **Reviewed:** f51f9b241560 against 9bda94ba81f2: Read the HEAD diff for all three changed files and the commit log. Read all changed sections and their supporting paths in host/prompts.c, nx2/prompt_assets.py and tests/test_prompt_font_bind.py, including binding readers, font serving and live hooks, resource sizing, build staging and the test harnesses. Skimmed unrelated portions of the large files and the guide screenshot maintenance plan. Read AGENTS.md, CONTRIBUTING.md, the Forgejo template, standards and the supplied comments and stale review. The review checklist and adjacent Tooling checkout were absent. Screenshot attachments, farm logs and CI results were unavailable offline.; nothing run (a code review). **Checked and fine:** - The Conventional Commit title and diff cover one topic. There are no tracked game files, generated assets, vendor SDKs, third-party edits, new dependencies or unrelated downloads or deletes. Both commits record AI assistance. - The build stages the font and sidecar together, and the incremental output inventory covers the new sidecar. The resource size table calculation already takes the larger font into account. - The production live-slot harness exercises writes, reuse and restoration after a reload. Host slot allocation and restoration share slot_lock. - The prompt font is outside the recorded user-guide fixture inputs. The menu settings, switch-table, renderer API and shader checklist items are inapplicable. **Blocking** (to change before merge) 1. host/prompts.c:1206: After a live prompt change, any text box containing U+FA30 has that genuine CJK character rewritten as a d-pad prompt, even if the slot was never issued or dpad.bin is missing. A localized text mod can legitimately use that character. Keep live tokens in a private-use namespace or carry their provenance outside the text, and test that real CJK text survives a prompt change. 2. host/prompts.c:275: The composite uses only gamepad Input 1 and substitutes the default direction for unsupported artwork. Put Left on Y in Input 2 and clear Input 1, or put Left on a rear paddle in Input 1, and the prompt still indicates d-pad Left. Use the second binding when the first is clear, include the displayed binding in live change detection, and use an honest label or neutral piece for inputs without artwork. 3. host/prompts.c:288: A rejected offset silently skips one piece, but startup still selects the composite and live allocation still records it as valid. For example, a sidecar paired with a font from a different build can produce a hollow or partly patched prompt. An offset that lands on an unrelated operand marked 28 can also alter another glyph. Tie the sidecar to its font, validate before patching, and select the existing face glyph when validation fails. 4. host/prompts.c:1176: The 70th distinct live binding combination for an icon falls back to the face's stock d-pad. On Keyboard that means a controller d-pad again, even when the player just assigned a new key. Use a representation that can be reused safely or a neutral fallback that won't name the wrong input. A startup-only fix would also avoid this live limit if the live feature is deferred explicitly. 5. tests/test_prompt_font_bind.py:528: The harness supplies its own offsets and fills every destination with 28. It passes if the builder serializes the wrong offsets or if the host rejects the real sidecar. Add a game-free round trip with a small synthetic CFF font through the generator and host loader, then check the resulting glyphs and the mismatched-sidecar fallback. **Waiting on the author** (a run, a measurement or a decision; no edit does it) - The Windows AMD Xbox HUD comparison failed at 0.8839 against a stated 0.01 threshold, while Windows NVIDIA reported 0.0. Inspect the paired captures and repeat on the merge candidate with the same save, controls and capture point. Establish whether the default Xbox prompt or surrounding HUD regressed. Manually verify the Keyboard capture, which had no automated verdict. - The reported live run changed faces in the log but never demonstrated a redrawn d-pad prompt. Before merge, show a newly laid-out prompt after rebinding, including the two partial d-pad icons, and cover the outstanding Tier 1 Linux AMD and Steam Deck runs. Record CI and the required checks on the merge candidate, and update the clean-build, startup and memory evidence against its base or explain which existing measurements still apply. **Testing:** Read-only review. The author reports passing prompt checks and a warning-free llvm-mingw compile before the rebase. The strict run reported 736 passes and 136 failures, including 82 missing-header failures and 54 reproduced on main. No head CI or lint result was supplied. The reported Beanstalk run predates the rebase and its supplied threshold descriptions disagree, though the stated AMD result exceeds either threshold. **Overlaps and merge order:** BeanBot identified #1184 as the relevant overlap in host/prompts.c because it also changes live prompts. Verify status and merge order on Forgejo, then review the combined text rewrite path if both are pending. #1700 concerns a separate guide layout, #529 is merged, and issue #297 concerns separate ocarina controls. --- <sub>Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
host/prompts.c Outdated
@ -220,0 +272,4 @@
} else if (face == HOS_PROMPT_KEYBOARD) {
piece[w] = dpad.key[bind[HOS_SW_N + b] & 0xFF];
} else {
const int pad = bind[b] >= 0 && bind[b] < HOS_PAD_ART_N ? bind[b] : switch_pad[b]; /* (a paddle: the default's) */
Member

With Input 1 cleared and Y in Input 2, Left still shows d-pad Left. A paddle assignment also shows the default. Resolve the active slot and use a neutral piece when artwork is unavailable.

With Input 1 cleared and Y in Input 2, Left still shows d-pad Left. A paddle assignment also shows the default. Resolve the active slot and use a neutral piece when artwork is unavailable.
@ -220,0 +285,4 @@
for (int w = 0; w < 4; w++) {
const uint32_t a = dpad.at[k][g][w];
if (a < n && n - a >= 3 && otf[a] == 28) wr16(otf + a + 1, (uint16_t)piece[w]); /* (28: a 2-byte number follows) */
}
Member

Skipping a rejected write still publishes the composite. Validate that the sidecar matches the font before writing any pieces and fall back if validation fails.

Skipping a rejected write still publishes the composite. Validate that the sidecar matches the font before writing any pieces and fall back if validation fails.
host/prompts.c Outdated
@ -1066,0 +1173,4 @@
} else {
static int full_said;
if (g == DPAD_GLYPHS && !full_said++)
hos_log("prompts: the d-pad's icons for these controls are all given out: d-pads bound anew show the face's own "
Member

The 70th distinct live combination can put a controller d-pad back into Keyboard text. Use a truthful fallback or defer live composites.

The 70th distinct live combination can put a controller d-pad back into Keyboard text. Use a truthful fallback or defer live composites.
@ -1085,3 +1204,3 @@
(c - PAD_BASE) % FACE_CODES < STATIC_AT + 3)
k = (int)((c - PAD_BASE) % FACE_CODES - STATIC_AT);
if (k >= 0) return PAD_BASE + FACE_CODES * face + STATIC_AT + k;
if (c >= DPAD_BASE && c < DPAD_BASE + 3 * DPAD_GLYPHS) k = (int)((c - DPAD_BASE) / DPAD_GLYPHS);
Member

This classifies real CJK text as prompts, even for unissued slots or a missing sidecar. Keep live tokens in private-use space or track their provenance outside the text.

This classifies real CJK text as prompts, even for unissued slots or a missing sidecar. Keep live tokens in private-use space or track their provenance outside the text.
@ -397,0 +525,4 @@
"""host/prompts.c dpad_slot and slots_point themselves, on a made-up font where the game keeps it: a glyph given out per
set of pieces (the same set its glyph again), its calls written there; none past the last, the font untouched then; and
the font served again (live_font: from the file, slots_point) has each glyph given out with its calls as before"""
n = 3 * 3 * prompt_assets.DPAD_GLYPHS * 4 # (each glyph's four calls: 28, then the number)
Member

The synthetic bytes verify host writes but bypass the generated sidecar and its loader. Round-trip a synthetic CFF font to catch bad offsets and a rejected or mismatched sidecar.

The synthetic bytes verify host writes but bypass the generated sidecar and its loader. Round-trip a synthetic CFF font to catch bad offsets and a rejected or mismatched sidecar.
Owner
@fix
Member

I changed this pull request as the review asked: the new head is dfa62777b9.

Changed

  • Live prompt tokens: Moved d-pad tokens to private-use codes and added U+FA30 coverage in host/prompts.c:230 and tests/test_prompt_font_bind.py:453.
  • Displayed d-pad bindings: Use the second pad binding when the first is clear, track it for live changes, and show hollow pieces for inputs without artwork in host/prompts.c:162 and host/prompts.c:284.
  • Sidecar validation: Fingerprint the font, validate every call offset before patching, and fall back to the face glyph on failure in nx2/prompt_assets.py:370 and host/prompts.c:241.
  • Live slot exhaustion: Reserved a hollow composite as the neutral fallback when live slots are exhausted in host/prompts.c:1183 and nx2/prompt_assets.py:195.
  • Generator and loader round trip: Added a synthetic CFF round trip that inspects the patched glyph and checks mismatched and invalid sidecars in tests/test_prompt_font_bind.py:615. Tests were not run, as requested.
  • Sidecar offset integrity in host/prompts.c:241: The sidecar checksum now covers its contents and the font. The round-trip harness checks that a redirected valid offset is rejected. Tests were not run.
  • Concurrent table reload in host/prompts.c:1324: Load into a temporary table and publish it with the font under slot_lock; text rewriting holds the same lock while selecting and allocating a glyph.
  • Partial fallback glyphs in nx2/prompt_assets.py:355: Neutral fallback glyphs now show rings only for active directions. The round-trip harness checks all three layouts.

Still for the author (from the review)

  • The Windows AMD Xbox HUD comparison failed at 0.8839 against a stated 0.01 threshold, while Windows NVIDIA reported 0.0. Inspect the paired captures and repeat on the merge candidate with the same save, controls and capture point. Establish whether the default Xbox prompt or surrounding HUD regressed. Manually verify the Keyboard capture, which had no automated verdict.
  • The reported live run changed faces in the log but never demonstrated a redrawn d-pad prompt. Before merge, show a newly laid-out prompt after rebinding, including the two partial d-pad icons, and cover the outstanding Tier 1 Linux AMD and Steam Deck runs. Record CI and the required checks on the merge candidate, and update the clean-build, startup and memory evidence against its base or explain which existing measurements still apply.

Nothing was built or run: check the change. It will be reviewed again.


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

I changed this pull request as the review asked: the new head is dfa62777b9a5. **Changed** - **Live prompt tokens**: Moved d-pad tokens to private-use codes and added U+FA30 coverage in host/prompts.c:230 and tests/test_prompt_font_bind.py:453. - **Displayed d-pad bindings**: Use the second pad binding when the first is clear, track it for live changes, and show hollow pieces for inputs without artwork in host/prompts.c:162 and host/prompts.c:284. - **Sidecar validation**: Fingerprint the font, validate every call offset before patching, and fall back to the face glyph on failure in nx2/prompt_assets.py:370 and host/prompts.c:241. - **Live slot exhaustion**: Reserved a hollow composite as the neutral fallback when live slots are exhausted in host/prompts.c:1183 and nx2/prompt_assets.py:195. - **Generator and loader round trip**: Added a synthetic CFF round trip that inspects the patched glyph and checks mismatched and invalid sidecars in tests/test_prompt_font_bind.py:615. Tests were not run, as requested. - **Sidecar offset integrity in host/prompts.c:241**: The sidecar checksum now covers its contents and the font. The round-trip harness checks that a redirected valid offset is rejected. Tests were not run. - **Concurrent table reload in host/prompts.c:1324**: Load into a temporary table and publish it with the font under slot_lock; text rewriting holds the same lock while selecting and allocating a glyph. - **Partial fallback glyphs in nx2/prompt_assets.py:355**: Neutral fallback glyphs now show rings only for active directions. The round-trip harness checks all three layouts. **Still for the author** (from the review) - The Windows AMD Xbox HUD comparison failed at 0.8839 against a stated 0.01 threshold, while Windows NVIDIA reported 0.0. Inspect the paired captures and repeat on the merge candidate with the same save, controls and capture point. Establish whether the default Xbox prompt or surrounding HUD regressed. Manually verify the Keyboard capture, which had no automated verdict. - The reported live run changed faces in the log but never demonstrated a redrawn d-pad prompt. Before merge, show a newly laid-out prompt after rebinding, including the two partial d-pad icons, and cover the outstanding Tier 1 Linux AMD and Steam Deck runs. Record CI and the required checks on the merge candidate, and update the clean-build, startup and memory evidence against its base or explain which existing measurements still apply. Nothing was built or run: check the change. It will be reviewed again. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
fix(prompts): validate and safely display bound d-pad icons
Some checks failed
beanstalk/approval not approved yet
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 31s
PR description / Description follows the template (pull_request_target) Successful in 39s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 44s
CI / Workflow lint (actionlint) (pull_request) Successful in 48s
Third-party parts / As their notes say (pull_request) Successful in 50s
CI / Website build and checks (pull_request) Failing after 13s
dfa62777b9
As the review on #1921 asked.
BeanBot left a comment

Recommendation: Request changes. HEAD cannot compile on Windows or Linux because the font builder declares table twice. The new round-trip test also requires a package missing from both CI test setups, and the Windows AMD HUD difference remains unexplained.

The PR makes d-pad text icons reflect their bindings. The latest fix moves live glyphs into private-use code points, uses Input 2 when Input 1 is empty, validates the font and sidecar together, and shows neutral rings after eight distinct live composites per icon. The gain is clearer prompts for keyboard players and players who rebind a controller. The cost is a larger generated font, a sidecar, and extra work when the font is served or refreshed.

Since the last review (on f51f9b2415)
Resolved:

  • host/prompts.c:1206: After a live prompt change, any text box containing U+FA30 has that genuine CJK character rewritten as a d-pad prompt, even if the slot was never issued or dpad.bin is missing. A localized text mod can legitimately use that character. Keep live tokens in a private-use namespace (host/prompts.c:230 reserves U+F8E0–U+F8FD, and tests/test_prompt_font_bind.py:529 checks that U+FA30 survives with the d-pad table enabled.)
  • host/prompts.c:275: The composite uses only gamepad Input 1 and substitutes the default direction for unsupported artwork. Put Left on Y in Input 2 and clear Input 1, or put Left on a rear paddle in Input 1, and the prompt still indicates d-pad Left. Use the second binding when the first is clear, i (host/prompts.c:162 uses Input 2 when Input 1 is clear, so the live snapshot sees the displayed binding. dpad_pieces uses a hollow piece for unsupported pad inputs.)
  • host/prompts.c:288: A rejected offset silently skips one piece, but startup still selects the composite and live allocation still records it as valid. For example, a sidecar paired with a font from a different build can produce a hollow or partly patched prompt. An offset that lands on an unrelated (host/prompts.c:241 verifies the checksum over the decrypted font and sidecar and checks every patch location. dpad_write validates all four calls before writing, and dpad_bind selects the face glyph if a write fails. Live reload introduces a separate issue for previously issued glyphs.)
  • host/prompts.c:1176: The 70th distinct live binding combination for an icon falls back to the face's stock d-pad. On Keyboard that means a controller d-pad again, even when the player just assigned a new key. Use a representation that can be reused safely or a neutral fallback that won't name the wr (host/prompts.c:1198 selects a reserved neutral glyph after eight live slots per icon. nx2/prompt_assets.py:361 draws rings only for active directions in that glyph.)
  • tests/test_prompt_font_bind.py:528: The harness supplies its own offsets and fills every destination with 28. It passes if the builder serializes the wrong offsets or if the host rejects the real sidecar. Add a game-free round trip with a small synthetic CFF font through the generator and host loade (tests/test_prompt_font_bind.py:620 adds a synthetic CFF round trip through the generator and host loader, reads back the patched calls, and checks rejected sidecars. The missing CI dependency is a separate blocker.)
    Still open:
  • The Windows AMD Xbox HUD comparison failed at 0.8839 against a stated 0.01 threshold, while Windows NVIDIA reported 0.0. Inspect the paired captures and repeat on the merge candidate with the same save, controls and capture point. Establish whether the default Xbox prompt or surrounding HUD regresse (No paired-capture diagnosis or merge-candidate rerun was supplied. The Windows Keyboard capture still needs a manual verdict.)
  • The reported live run changed faces in the log but never demonstrated a redrawn d-pad prompt. Before merge, show a newly laid-out prompt after rebinding, including the two partial d-pad icons, and cover the outstanding Tier 1 Linux AMD and Steam Deck runs. Record CI and the required checks on the me (In-game proof for freshly drawn full and partial d-pad prompts, outstanding Tier 1 runs, current CI and measurements for the merge candidate remain pending.)
    New:
  • host/prompts.c:1586: build() already declares char table[MAX_PATH] for the resource size table. The new struct dpad_table table conflicts in the same scope, stopping compilation on either platform. Give the d-pad table a distinct name.
  • tests/test_prompt_font_bind.py:624: The round trip imports fontTools unconditionally. Clean Forgejo and CircleCI game-free jobs provision zstandard, Pillow and NumPy, so this test fails at the import. Keep the fixture dependency-free or agree on a test dependency, declare RUN_ALL_MODULES, and provision the pinned package in both jobs.
  • host/prompts.c:165: Input 2 fallback changes the shared snapshot for all buttons, but startup cmap4_bind still reads only Input 1 for ordinary button glyphs. With A on a supported non-default input in Input 2 alone, startup text shows the default, while textures and rewritten text can show Input 2. Keep the new fallback scoped to d-pad composites or make the ordinary prompt paths agree and test the wider behavior.
  • host/prompts.c:1330: Live reload replaces a valid table and font even when the newly read sidecar is rejected. If a pack update temporarily removes or mismatches the sidecar after live glyphs were issued, slots_point skips them and the copy overwrites their calls with placeholder rings. Preserve the active font and table when a reload cannot restore issued glyphs, and cover this case in the reload test.

Does it help: Yes for startup on the earlier Linux builds. The author reported correct default and rebound HUD icons across all six faces on an RTX 3060 Laptop, compared with main showing a Switch d-pad on Keyboard. Live rendering and the current head are unproven. Three interleaved clean prompts builds on a Ryzen 7 6800H measured 19.9 s versus 20.4 s median at 9027e737 and 37966a8b, within the observed spread. The font grew from 55,088 to 104,284 bytes and total output grew by 53,293 bytes on that revision. HEAD generates fewer glyphs and uses a different sidecar format, so those sizes do not describe HEAD.
Other systems: The shared font affects HUD, dialogue, menus and localized or modded text on Windows, Linux and Steam Deck. The private-use range avoids the reported CJK collision. The wider Input 2 change also reaches ordinary button text, texture selection and layout placement, while startup still reads only Input 1 for ordinary button glyphs. The size-table path accounts for the generated font and preserves a mod's replacement font. The diff leaves renderer interfaces, shaders, saves, audio and input handling untouched.
Switches: None. DPAD and DPAD_SECOND are inputs to the synthetic test harness.

Reviewed: dfa62777b9 against 9bda94ba81: Read the repository rules, Forgejo template and developer standards, the commit log, and the base and re-review diffs for all three files. Read the changed sections and relevant surrounding code in host/prompts.c, nx2/prompt_assets.py and tests/test_prompt_font_bind.py, plus the controller binding reader, font wrapping, test runner and CI dependency setup. Unrelated sections of the large files were skimmed. Read the supplied comments and reviews. The review checklist, adjacent Tooling checkout, screenshot attachments and current CI results were unavailable.; nothing run (a code review).
Checked and fine:

  • The title follows Conventional Commits and the diff stays within prompt generation, rendering and tests. No generated output, game assets, vendor SDKs or third-party changes appear in the diff.
  • The font and sidecar use the same padding convention for the checksum. The offset check rejects short buffers and incomplete call operands before any piece is written.
  • Live slot selection and table publication use the same lock. The synthetic slot test covers allocation, reuse, exhaustion and restoration.
  • The change needs no switch table, menu settings table, renderer API or shader updates. Both earlier commits record AI assistance.

Blocking (to change before merge)

  1. host/prompts.c:1586: build() already declares char table[MAX_PATH] for the resource size table. The new struct dpad_table table conflicts in the same scope, stopping compilation on either platform. Give the d-pad table a distinct name.
  2. tests/test_prompt_font_bind.py:624: The round trip imports fontTools unconditionally. Clean Forgejo and CircleCI game-free jobs provision zstandard, Pillow and NumPy, so this test fails at the import. Keep the fixture dependency-free or agree on a test dependency, declare RUN_ALL_MODULES, and provision the pinned package in both jobs.
  3. host/prompts.c:165: Input 2 fallback changes the shared snapshot for all buttons, but startup cmap4_bind still reads only Input 1 for ordinary button glyphs. With A on a supported non-default input in Input 2 alone, startup text shows the default, while textures and rewritten text can show Input 2. Keep the new fallback scoped to d-pad composites or make the ordinary prompt paths agree and test the wider behavior.
  4. host/prompts.c:1330: Live reload replaces a valid table and font even when the newly read sidecar is rejected. If a pack update temporarily removes or mismatches the sidecar after live glyphs were issued, slots_point skips them and the copy overwrites their calls with placeholder rings. Preserve the active font and table when a reload cannot restore issued glyphs, and cover this case in the reload test.

Waiting on the author (a run, a measurement or a decision; no edit does it)

  • At 37966a8b the Windows AMD Xbox HUD comparison reported 0.8839 against a stated 0.01 limit, while NVIDIA reported 0.0. Inspect the paired captures and repeat on the merge candidate with the same save, controls and capture point to establish whether the Xbox prompt or surrounding HUD regressed. Manually verify the Keyboard capture as well.
  • Show newly laid-out full and partial d-pad prompts after rebinding in game, and cover the outstanding Tier 1 Linux AMD and Steam Deck runs. Record CI and the required checks on the merge candidate, and refresh the clean-build, startup and memory evidence against its base or explain what still applies.

Suggestions (the author may take or leave)

  • Bring Summary, Testing, Measurements and Risks up to date with the private-use range, eight live slots per icon and neutral fallback. Record the latest automated commit's assistance with the trailer called for by the checklist.

Testing: No builds or tests were run during this review. The author reported passing prompt tests, a Windows host compile and Linux startup rendering on earlier revisions. Beanstalk reported no crashes on Windows AMD or NVIDIA at 37966a8b and returned no frame-time or VRAM measurements. There are no supplied runs on dfa62777b9.
Overlaps and merge order: The supplied comments identify #1184 as touching live prompt updates in host/prompts.c. #1700 concerns the System guide, and #529 is already merged. No merge order is established from the available evidence.


Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** HEAD cannot compile on Windows or Linux because the font builder declares `table` twice. The new round-trip test also requires a package missing from both CI test setups, and the Windows AMD HUD difference remains unexplained. The PR makes d-pad text icons reflect their bindings. The latest fix moves live glyphs into private-use code points, uses Input 2 when Input 1 is empty, validates the font and sidecar together, and shows neutral rings after eight distinct live composites per icon. The gain is clearer prompts for keyboard players and players who rebind a controller. The cost is a larger generated font, a sidecar, and extra work when the font is served or refreshed. **Since the last review** (on f51f9b241560) Resolved: - host/prompts.c:1206: After a live prompt change, any text box containing U+FA30 has that genuine CJK character rewritten as a d-pad prompt, even if the slot was never issued or dpad.bin is missing. A localized text mod can legitimately use that character. Keep live tokens in a private-use namespace (host/prompts.c:230 reserves U+F8E0–U+F8FD, and tests/test_prompt_font_bind.py:529 checks that U+FA30 survives with the d-pad table enabled.) - host/prompts.c:275: The composite uses only gamepad Input 1 and substitutes the default direction for unsupported artwork. Put Left on Y in Input 2 and clear Input 1, or put Left on a rear paddle in Input 1, and the prompt still indicates d-pad Left. Use the second binding when the first is clear, i (host/prompts.c:162 uses Input 2 when Input 1 is clear, so the live snapshot sees the displayed binding. dpad_pieces uses a hollow piece for unsupported pad inputs.) - host/prompts.c:288: A rejected offset silently skips one piece, but startup still selects the composite and live allocation still records it as valid. For example, a sidecar paired with a font from a different build can produce a hollow or partly patched prompt. An offset that lands on an unrelated (host/prompts.c:241 verifies the checksum over the decrypted font and sidecar and checks every patch location. dpad_write validates all four calls before writing, and dpad_bind selects the face glyph if a write fails. Live reload introduces a separate issue for previously issued glyphs.) - host/prompts.c:1176: The 70th distinct live binding combination for an icon falls back to the face's stock d-pad. On Keyboard that means a controller d-pad again, even when the player just assigned a new key. Use a representation that can be reused safely or a neutral fallback that won't name the wr (host/prompts.c:1198 selects a reserved neutral glyph after eight live slots per icon. nx2/prompt_assets.py:361 draws rings only for active directions in that glyph.) - tests/test_prompt_font_bind.py:528: The harness supplies its own offsets and fills every destination with 28. It passes if the builder serializes the wrong offsets or if the host rejects the real sidecar. Add a game-free round trip with a small synthetic CFF font through the generator and host loade (tests/test_prompt_font_bind.py:620 adds a synthetic CFF round trip through the generator and host loader, reads back the patched calls, and checks rejected sidecars. The missing CI dependency is a separate blocker.) Still open: - The Windows AMD Xbox HUD comparison failed at 0.8839 against a stated 0.01 threshold, while Windows NVIDIA reported 0.0. Inspect the paired captures and repeat on the merge candidate with the same save, controls and capture point. Establish whether the default Xbox prompt or surrounding HUD regresse (No paired-capture diagnosis or merge-candidate rerun was supplied. The Windows Keyboard capture still needs a manual verdict.) - The reported live run changed faces in the log but never demonstrated a redrawn d-pad prompt. Before merge, show a newly laid-out prompt after rebinding, including the two partial d-pad icons, and cover the outstanding Tier 1 Linux AMD and Steam Deck runs. Record CI and the required checks on the me (In-game proof for freshly drawn full and partial d-pad prompts, outstanding Tier 1 runs, current CI and measurements for the merge candidate remain pending.) New: - host/prompts.c:1586: `build()` already declares `char table[MAX_PATH]` for the resource size table. The new `struct dpad_table table` conflicts in the same scope, stopping compilation on either platform. Give the d-pad table a distinct name. - tests/test_prompt_font_bind.py:624: The round trip imports fontTools unconditionally. Clean Forgejo and CircleCI game-free jobs provision zstandard, Pillow and NumPy, so this test fails at the import. Keep the fixture dependency-free or agree on a test dependency, declare `RUN_ALL_MODULES`, and provision the pinned package in both jobs. - host/prompts.c:165: Input 2 fallback changes the shared snapshot for all buttons, but startup `cmap4_bind` still reads only Input 1 for ordinary button glyphs. With A on a supported non-default input in Input 2 alone, startup text shows the default, while textures and rewritten text can show Input 2. Keep the new fallback scoped to d-pad composites or make the ordinary prompt paths agree and test the wider behavior. - host/prompts.c:1330: Live reload replaces a valid table and font even when the newly read sidecar is rejected. If a pack update temporarily removes or mismatches the sidecar after live glyphs were issued, `slots_point` skips them and the copy overwrites their calls with placeholder rings. Preserve the active font and table when a reload cannot restore issued glyphs, and cover this case in the reload test. **Does it help:** Yes for startup on the earlier Linux builds. The author reported correct default and rebound HUD icons across all six faces on an RTX 3060 Laptop, compared with main showing a Switch d-pad on Keyboard. Live rendering and the current head are unproven. Three interleaved clean prompts builds on a Ryzen 7 6800H measured 19.9 s versus 20.4 s median at 9027e737 and 37966a8b, within the observed spread. The font grew from 55,088 to 104,284 bytes and total output grew by 53,293 bytes on that revision. HEAD generates fewer glyphs and uses a different sidecar format, so those sizes do not describe HEAD. **Other systems:** The shared font affects HUD, dialogue, menus and localized or modded text on Windows, Linux and Steam Deck. The private-use range avoids the reported CJK collision. The wider Input 2 change also reaches ordinary button text, texture selection and layout placement, while startup still reads only Input 1 for ordinary button glyphs. The size-table path accounts for the generated font and preserves a mod's replacement font. The diff leaves renderer interfaces, shaders, saves, audio and input handling untouched. **Switches:** None. DPAD and DPAD_SECOND are inputs to the synthetic test harness. **Reviewed:** dfa62777b9a5 against 9bda94ba81f2: Read the repository rules, Forgejo template and developer standards, the commit log, and the base and re-review diffs for all three files. Read the changed sections and relevant surrounding code in host/prompts.c, nx2/prompt_assets.py and tests/test_prompt_font_bind.py, plus the controller binding reader, font wrapping, test runner and CI dependency setup. Unrelated sections of the large files were skimmed. Read the supplied comments and reviews. The review checklist, adjacent Tooling checkout, screenshot attachments and current CI results were unavailable.; nothing run (a code review). **Checked and fine:** - The title follows Conventional Commits and the diff stays within prompt generation, rendering and tests. No generated output, game assets, vendor SDKs or third-party changes appear in the diff. - The font and sidecar use the same padding convention for the checksum. The offset check rejects short buffers and incomplete call operands before any piece is written. - Live slot selection and table publication use the same lock. The synthetic slot test covers allocation, reuse, exhaustion and restoration. - The change needs no switch table, menu settings table, renderer API or shader updates. Both earlier commits record AI assistance. **Blocking** (to change before merge) 1. host/prompts.c:1586: `build()` already declares `char table[MAX_PATH]` for the resource size table. The new `struct dpad_table table` conflicts in the same scope, stopping compilation on either platform. Give the d-pad table a distinct name. 2. tests/test_prompt_font_bind.py:624: The round trip imports fontTools unconditionally. Clean Forgejo and CircleCI game-free jobs provision zstandard, Pillow and NumPy, so this test fails at the import. Keep the fixture dependency-free or agree on a test dependency, declare `RUN_ALL_MODULES`, and provision the pinned package in both jobs. 3. host/prompts.c:165: Input 2 fallback changes the shared snapshot for all buttons, but startup `cmap4_bind` still reads only Input 1 for ordinary button glyphs. With A on a supported non-default input in Input 2 alone, startup text shows the default, while textures and rewritten text can show Input 2. Keep the new fallback scoped to d-pad composites or make the ordinary prompt paths agree and test the wider behavior. 4. host/prompts.c:1330: Live reload replaces a valid table and font even when the newly read sidecar is rejected. If a pack update temporarily removes or mismatches the sidecar after live glyphs were issued, `slots_point` skips them and the copy overwrites their calls with placeholder rings. Preserve the active font and table when a reload cannot restore issued glyphs, and cover this case in the reload test. **Waiting on the author** (a run, a measurement or a decision; no edit does it) - At 37966a8b the Windows AMD Xbox HUD comparison reported 0.8839 against a stated 0.01 limit, while NVIDIA reported 0.0. Inspect the paired captures and repeat on the merge candidate with the same save, controls and capture point to establish whether the Xbox prompt or surrounding HUD regressed. Manually verify the Keyboard capture as well. - Show newly laid-out full and partial d-pad prompts after rebinding in game, and cover the outstanding Tier 1 Linux AMD and Steam Deck runs. Record CI and the required checks on the merge candidate, and refresh the clean-build, startup and memory evidence against its base or explain what still applies. **Suggestions** (the author may take or leave) - Bring Summary, Testing, Measurements and Risks up to date with the private-use range, eight live slots per icon and neutral fallback. Record the latest automated commit's assistance with the trailer called for by the checklist. **Testing:** No builds or tests were run during this review. The author reported passing prompt tests, a Windows host compile and Linux startup rendering on earlier revisions. Beanstalk reported no crashes on Windows AMD or NVIDIA at 37966a8b and returned no frame-time or VRAM measurements. There are no supplied runs on dfa62777b9a5. **Overlaps and merge order:** The supplied comments identify #1184 as touching live prompt updates in host/prompts.c. #1700 concerns the System guide, and #529 is already merged. No merge order is established from the available evidence. --- <sub>Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
@ -161,1 +163,3 @@
for (int b = 0; b < HOS_SW_N; b++) bind[b] = hos_binding(HOS_BIND_PAD, b, 0), bind[HOS_SW_N + b] = first_key(b);
for (int b = 0; b < HOS_SW_N; b++) {
bind[b] = hos_binding(HOS_BIND_PAD, b, 0);
if (bind[b] < 0) bind[b] = hos_binding(HOS_BIND_PAD, b, 1);
Member

This changes all buttons in the shared snapshot. With A bound only in Input 2, textures and live text can show that binding while startup text still shows the default. Scope the change to d-pad composites or make both paths agree.

This changes all buttons in the shared snapshot. With A bound only in Input 2, textures and live text can show that binding while startup text still shows the default. Scope the change to d-pad composites or make both paths agree.
@ -1181,3 +1327,4 @@
const int ok = q && !memcmp(q, b + 8, 64); /* (still the font: its tables' directory, which a binding leaves as is) */
if (ok) {
AcquireSRWLockExclusive(&slot_lock); /* (the keys' codes given out stay on their keys) */
dpad = table;
Member

A rejected sidecar here replaces the active table and skips restoring live slots, so the font copy can turn already-issued icons into placeholder rings. Keep the active pair if the reload cannot restore those slots.

A rejected sidecar here replaces the active table and skips restoring live slots, so the font copy can turn already-issued icons into placeholder rings. Keep the active pair if the reload cannot restore those slots.
@ -1437,3 +1584,3 @@
uint32_t key;
int bound;
uint8_t *b = font_bound(dir, face, &n, &key, &bound);
struct dpad_table table;
Member

build() already has char table[MAX_PATH] in this scope. Rename the new d-pad table so the host compiles.

`build()` already has `char table[MAX_PATH]` in this scope. Rename the new d-pad table so the host compiles.
@ -397,0 +621,4 @@
"""Generate a small CFF, serialize its actual offsets, and load and patch it with the host code."""
import io
import struct
from fontTools.fontBuilder import FontBuilder
Member

Neither clean CI test setup installs fontTools. Keep this test dependency-free or declare and provision the pinned dependency in both jobs.

Neither clean CI test setup installs fontTools. Keep this test dependency-free or declare and provision the pinned dependency in both jobs.
Some checks failed
beanstalk/approval not approved yet
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 31s
PR description / Description follows the template (pull_request_target) Successful in 39s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 44s
CI / Workflow lint (actionlint) (pull_request) Successful in 48s
Third-party parts / As their notes say (pull_request) Successful in 50s
CI / Website build and checks (pull_request) Failing after 13s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/prompts-dpad-bound:gab9281-fix/prompts-dpad-bound'
git switch 'gab9281-fix/prompts-dpad-bound'
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!1921
No description provided.