WIP: feat(input): an Ocarina controls row, N64 / GameCube: A and the right stick play the notes #1303

Draft
kingo wants to merge 6 commits from kingo/Longshot:feat/ocarina-right-stick into main
First-time contributor

Type: feat · Risk: low · Tested on: Windows 11, RTX 5060 Ti 8 GB · Needs: Linux, any pad

Why

Players who grew up on the N64 or GameCube version play the ocarina with A and the C buttons (the C-stick on GameCube). On a PC pad that is A and the right stick, but in Longshot the notes are only on L, R, A, Y and X, and the five note rows (#1930) can take buttons, not the stick's directions. So songs that are muscle memory (Song of Time: right, A, down, right, A, down) don't work. Nothing on the tracker asks for it or does it (searched: ocarina, right stick, C buttons, C-stick).

What changed

A new row in Controls, Ocarina controls: Switch 2 (as now, the default) or N64 / GameCube. With N64 / GameCube, A plays the low D and the right stick plays the other four notes the way the C buttons did. While the ocarina waits for a note the stick plays notes and doesn't turn the camera; once the ocarina is put away it turns the camera again. Only that layout plays: L, R, Y and X play no note, song lessons included (learning Serenade of Water took a stray L, R, Y or X as a note). The staff's note icons show it: the low D the icon of the pad's A button, the other four arrows (down, right, left, up), as the N64 showed its C buttons.

Epona's Song on N64 / GameCube: the staff's notes as arrows

The remake's notes rise L, R, A, Y, X (low D, F, A, B, high D). Checked against the game's own song sheets: Saria's Song is R A Y, Song of Time is A L R, Zelda's Lullaby is Y X A. So the mapping is:

N64 Note Switch 2 button N64 / GameCube row
A low D L A
C down F R right stick down
C right A A right stick right
C left B Y right stick left
C up high D X right stick up
  • input: pads_read in host/nn_hid.c turns the right stick pushed past half way, by its main axis, into four inputs of their own (HOS_PAD_RS_*, bits past HOS_PAD_N like the touchpad's, so the Controls page binds none of them); the Invert camera rows are undone for them, so up is up. While the note wait is on and the row is N64 / GameCube, the stick is zeroed for the camera.
  • input: oc_notes adds the stick's ways to the note rows R, A, Y, X; oc_pad_word makes the A button the low D (the L note) and leaves the A note to the stick. The song lesson (kind 2) keeps the game's own buttons, as the note rows already do. Note rows the player bound keep working on top.
  • input: oc_pad_word with the row on N64 / GameCube gives the game only that layout's notes in every wait, the lesson's too: the Switch 2 note buttons (L, R, A, Y, X) are taken out of the word, the A button put in as the low D, the stick's and the bound note rows' notes added.
  • icons: nx2/prompt_assets.py draws the notes as that row plays them (TEX_N64_NOTE: OcarinaButtonL_00 as each pad input's icon for the A button, OcarinaButtonR/A/Y/X_00 as arrows on a disc, see-through white as the game's own) and marks each face's Switch 2 notes (TEX_SWITCH_NOTE) in textures.bin's u16 per entry (0 before); host/prompts.c texture_runs picks them by the row, and current_binds follows the row (BIND_OCARINA) so the notes change while the game runs. The "Play a note" hint line keeps its icons (the font's, not these textures).
  • menu: the row in gpu/vk/vk_menu.cpp (opts.ocarina_stick, after Invert camera Y), read by the host as HOS_OPT_OCARINA_STICK (72; 62 to 71, 80, 88 and 90 are taken). README's option table has its line.

Measurements

Verdict: nothing to measure: an input option, off by default; the stick is read every frame already.

Flags and settings

One new menu row.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
Ocarina controls (ocarina_controls= in longshot_options.ini) Controls row: which inputs play the ocarina (none: L R A Y X) Switch 2 (0) N64 / GameCube (1): A and the right stick play the notes Helps players used to the N64 / GameCube layout; Switch 2 unchanged Switch 2 by default, the player's choice

Testing

Tested: Windows 11 Pro 26200, RTX 5060 Ti 8 GB, a pad through SDL. In the game: with N64 / GameCube, Song of Time, Zelda's Lullaby and Saria's Song played from A and the right stick; the camera stayed still while playing and turned again after the ocarina was put away; Switch 2 plays as before. Then with the later commits: L, R, Y and X played nothing, a song lesson took the N64 layout; the staff showed A and the arrows (Epona's Song above), and switching the row back to Switch 2 brought the Switch icons back at once. python -I -B tests/run_all.py before the later commits: 578 passed, 52 failed, 90 skipped; the same 52 fail on main (54ef5ca3) on this PC (Windows tool paths and harness issues, e.g. test_pads_after_menu, test_crt_options), none new. After them, rebased on main @ 544229a2, the checks they touch pass (listed below); the full suite runs again before this leaves WIP. tests/test_ocarina_notes.py gets a case for the row (fails on main: no row; passes here), with the Switch 2 buttons playing nothing in a lesson too; tests/test_ocarina_note_icons.py (new) compiles texture_runs against a textures.bin written by write_textures (Switch 2 picks the Switch notes, N64 / GameCube the A button's low D and the arrows) and checks each arrow points its way; test_prompt_font_bind.py gets rx_option and BIND_OCARINA, which it cuts with current_binds; test_input_background.py and test_pads_after_menu.py get the new constants they cut with the code.

Not tested: Linux (test_pads_after_menu.py builds pads_read only there); the keyboard (the row is for pads; bound note keys are unchanged); a pad through XInput only.

Must be tested:

  • Linux, any pad: Controls → Ocarina controls → N64 / GameCube, take out the ocarina, play Song of Time as right, A, down, right, A, down, expecting the song to play and the camera not to move while playing (Test Farm: @Beanstalk linux, the ocarina with the right stick).

Risks

What could break: the right stick during the ocarina with the row on N64 / GameCube (the camera is held, by design). With Switch 2 nothing changes: the stick's new inputs are read but only the note layer looks at them, and only with the row on.

Turning it off: the row's Switch 2, or revert the commit.

Compatibility: one new line in longshot_options.ini; nothing else changes.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Docs updated.

🤖 Generated with Claude Code

**Type:** feat · **Risk:** low · **Tested on:** Windows 11, RTX 5060 Ti 8 GB · **Needs:** Linux, any pad ## Why Players who grew up on the N64 or GameCube version play the ocarina with A and the C buttons (the C-stick on GameCube). On a PC pad that is A and the right stick, but in Longshot the notes are only on L, R, A, Y and X, and the five note rows (#1930) can take buttons, not the stick's directions. So songs that are muscle memory (Song of Time: right, A, down, right, A, down) don't work. Nothing on the tracker asks for it or does it (searched: ocarina, right stick, C buttons, C-stick). ## What changed A new row in Controls, **Ocarina controls**: Switch 2 (as now, the default) or N64 / GameCube. With N64 / GameCube, A plays the low D and the right stick plays the other four notes the way the C buttons did. While the ocarina waits for a note the stick plays notes and doesn't turn the camera; once the ocarina is put away it turns the camera again. Only that layout plays: L, R, Y and X play no note, song lessons included (learning Serenade of Water took a stray L, R, Y or X as a note). The staff's note icons show it: the low D the icon of the pad's A button, the other four arrows (down, right, left, up), as the N64 showed its C buttons. ![Epona's Song on N64 / GameCube: the staff's notes as arrows](https://git.magicbean.dev/attachments/7c035a54-954f-4529-a13d-381972d81ee9) The remake's notes rise L, R, A, Y, X (low D, F, A, B, high D). Checked against the game's own song sheets: Saria's Song is R A Y, Song of Time is A L R, Zelda's Lullaby is Y X A. So the mapping is: | N64 | Note | Switch 2 button | N64 / GameCube row | |---|---|---|---| | A | low D | L | A | | C down | F | R | right stick down | | C right | A | A | right stick right | | C left | B | Y | right stick left | | C up | high D | X | right stick up | - input: `pads_read` in `host/nn_hid.c` turns the right stick pushed past half way, by its main axis, into four inputs of their own (`HOS_PAD_RS_*`, bits past `HOS_PAD_N` like the touchpad's, so the Controls page binds none of them); the Invert camera rows are undone for them, so up is up. While the note wait is on and the row is N64 / GameCube, the stick is zeroed for the camera. - input: `oc_notes` adds the stick's ways to the note rows R, A, Y, X; `oc_pad_word` makes the A button the low D (the L note) and leaves the A note to the stick. The song lesson (kind 2) keeps the game's own buttons, as the note rows already do. Note rows the player bound keep working on top. - input: `oc_pad_word` with the row on N64 / GameCube gives the game only that layout's notes in every wait, the lesson's too: the Switch 2 note buttons (L, R, A, Y, X) are taken out of the word, the A button put in as the low D, the stick's and the bound note rows' notes added. - icons: `nx2/prompt_assets.py` draws the notes as that row plays them (`TEX_N64_NOTE`: `OcarinaButtonL_00` as each pad input's icon for the A button, `OcarinaButtonR/A/Y/X_00` as arrows on a disc, see-through white as the game's own) and marks each face's Switch 2 notes (`TEX_SWITCH_NOTE`) in `textures.bin`'s u16 per entry (0 before); `host/prompts.c` `texture_runs` picks them by the row, and `current_binds` follows the row (`BIND_OCARINA`) so the notes change while the game runs. The "Play a note" hint line keeps its icons (the font's, not these textures). - menu: the row in `gpu/vk/vk_menu.cpp` (`opts.ocarina_stick`, after Invert camera Y), read by the host as `HOS_OPT_OCARINA_STICK` (72; 62 to 71, 80, 88 and 90 are taken). README's option table has its line. ## Measurements **Verdict:** nothing to measure: an input option, off by default; the stick is read every frame already. ### Flags and settings One new menu row. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | Ocarina controls (`ocarina_controls=` in longshot_options.ini) | Controls row: which inputs play the ocarina | (none: L R A Y X) | Switch 2 (0) | N64 / GameCube (1): A and the right stick play the notes | Helps players used to the N64 / GameCube layout; Switch 2 unchanged | Switch 2 by default, the player's choice | ## Testing **Tested:** Windows 11 Pro 26200, RTX 5060 Ti 8 GB, a pad through SDL. In the game: with N64 / GameCube, Song of Time, Zelda's Lullaby and Saria's Song played from A and the right stick; the camera stayed still while playing and turned again after the ocarina was put away; Switch 2 plays as before. Then with the later commits: L, R, Y and X played nothing, a song lesson took the N64 layout; the staff showed A and the arrows (Epona's Song above), and switching the row back to Switch 2 brought the Switch icons back at once. `python -I -B tests/run_all.py` before the later commits: 578 passed, 52 failed, 90 skipped; the same 52 fail on main (54ef5ca3) on this PC (Windows tool paths and harness issues, e.g. test_pads_after_menu, test_crt_options), none new. After them, rebased on main @ 544229a2, the checks they touch pass (listed below); the full suite runs again before this leaves WIP. `tests/test_ocarina_notes.py` gets a case for the row (fails on main: no row; passes here), with the Switch 2 buttons playing nothing in a lesson too; `tests/test_ocarina_note_icons.py` (new) compiles `texture_runs` against a `textures.bin` written by `write_textures` (Switch 2 picks the Switch notes, N64 / GameCube the A button's low D and the arrows) and checks each arrow points its way; `test_prompt_font_bind.py` gets `rx_option` and `BIND_OCARINA`, which it cuts with `current_binds`; `test_input_background.py` and `test_pads_after_menu.py` get the new constants they cut with the code. **Not tested:** Linux (`test_pads_after_menu.py` builds `pads_read` only there); the keyboard (the row is for pads; bound note keys are unchanged); a pad through XInput only. **Must be tested:** - Linux, any pad: Controls → Ocarina controls → N64 / GameCube, take out the ocarina, play Song of Time as right, A, down, right, A, down, expecting the song to play and the camera not to move while playing (Test Farm: @Beanstalk linux, the ocarina with the right stick). ## Risks **What could break:** the right stick during the ocarina with the row on N64 / GameCube (the camera is held, by design). With Switch 2 nothing changes: the stick's new inputs are read but only the note layer looks at them, and only with the row on. **Turning it off:** the row's Switch 2, or revert the commit. **Compatibility:** one new line in longshot_options.ini; nothing else changes. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [ ] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Docs updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(input): an Ocarina controls row, N64 / GameCube: A and the right stick play the notes
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
647d15cae3
Controls gets an Ocarina controls row: Switch 2 (the notes on L, R, A, Y and X, as now) or N64 / GameCube, where the
A button plays the low D and the right stick the other four notes as the C buttons did (down F, right A, left B, up
the high D). While the ocarina waits for a note the stick is the notes' and the camera gets none of it; once the
ocarina is put away it turns the camera again. The song lesson keeps the game's own buttons.

Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
kingo force-pushed feat/ocarina-right-stick from 647d15cae3
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to 2a1d5cb64c
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 8s
2026-11-17 08:10:35 +00:00
Compare
Owner

Brought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).

  • Tested on my own PC: ticked: Testing's Tested: an in-game run on Windows 11, RTX 5060 Ti 8 GB, with a pad through SDL.
  • Nothing gets worse that I know of: ticked: The verdict says nothing to measure for an off-by-default input option, and Risks names no unmeasured slowdown.
Brought up to the [ready-for-review standard](https://git.magicbean.dev/MagicBeanDev/Longshot/src/branch/main/CONTRIBUTING.md#ready-for-review-out-of-wip) (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know). - *Tested on my own PC*: ticked: Testing's Tested: an in-game run on Windows 11, RTX 5060 Ti 8 GB, with a pad through SDL. - *Nothing gets worse that I know of*: ticked: The verdict says nothing to measure for an off-by-default input option, and Risks names no unmeasured slowdown.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 8s
This pull request is marked as a work in progress.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/ocarina-right-stick:kingo-feat/ocarina-right-stick'
git switch 'kingo-feat/ocarina-right-stick'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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!1303
No description provided.