feat(pad): add a Shake input that swings the reported motion while held #6353

Merged
EdouardSence merged 1 commit from upstream-pr/6353 into main 2026-10-18 23:36:04 +00:00
EdouardSence commented 2026-10-15 12:53:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-15T12:53:51Z.


What

Astro Bot (PPSA21567) stops progressing at the Crash Site on current main unless the player has a controller with motion sensors. After the crash cutscene the title asks the player to shake the controller, with the DualSense half buried in the sand and a shake prompt in the corner. Keyboard players, and controllers without motion sensors, cannot answer that prompt: the keyboard path never reports motion. In a 20-minute keyboard run on main d92a8dad3, the prompt was still up from 10 minutes in until the end.

This adds a Shake input action, bound to X by default and rebindable in anyps5-input.ini like the others. While it is held, KeyboardMouse::Compose reports motion:

  • acceleration x is ±2 g, with gravity on y;
  • angular velocity z is ±6 rad/s;
  • both flip sign every 50 ms, from ShakeHalfPeriod and the last advance time.

Advance reports a change while the key is held, so the state keeps being published without a controller connected. When the key is up, a controller's own sensor data is used as before. docs/user/INPUT_MAPPING.md lists the action and describes it.

Tested

Linux (CachyOS, GCC), branch based on main 6ea62f9b4.

  • New pad_keyboard_mouse case shake: a held X reports motion, the acceleration and angular velocity flip after one half period, and the motion stops after release. Advance returns true while the key is held. All pad tests pass (9/9).
  • PPSA21567 v01.019.000, 20 minutes each with the same scripted keyboard input: Space presses for 7 minutes, then walking. In the run with this branch, the walking loop also held X for 3 s.
    • On main d92a8dad3, it reaches the Crash Site and stays on the shake prompt from about 10 minutes to the end of the run.
    • On this branch, the controller is dug out at about 8.5 minutes. From about 10 minutes Astro runs freely across the Crash Site dunes, with the objective marker shown, until the end of the run.
    • Neither run had a fatal error before the timeout.
  • RX 9070 XT, RADV Mesa 26.2.4, headless gamescope.

Not tested: titles that read only orientation or a specific shake axis, and a real controller held still while X is pressed.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA21567 #357
  • GPUs tested: n/a (input only); game run on AMD Radeon RX 9070 XT, RADV Mesa 26.2.4, Linux
  • AI-assisted: yes

Written by Claude (AI assistant) on a contributor's machine; Gemini ran the game. AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4873573905 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6353). Originally posted by [EdouardSence](https://github.com/EdouardSence) on 2026-10-15T12:53:51Z. --- ### What Astro Bot (PPSA21567) stops progressing at the Crash Site on current `main` unless the player has a controller with motion sensors. After the crash cutscene the title asks the player to shake the controller, with the DualSense half buried in the sand and a shake prompt in the corner. Keyboard players, and controllers without motion sensors, cannot answer that prompt: the keyboard path never reports motion. In a 20-minute keyboard run on `main` `d92a8dad3`, the prompt was still up from 10 minutes in until the end. This adds a `Shake` input action, bound to X by default and rebindable in `anyps5-input.ini` like the others. While it is held, `KeyboardMouse::Compose` reports motion: - acceleration x is ±2 g, with gravity on y; - angular velocity z is ±6 rad/s; - both flip sign every 50 ms, from `ShakeHalfPeriod` and the last advance time. `Advance` reports a change while the key is held, so the state keeps being published without a controller connected. When the key is up, a controller's own sensor data is used as before. `docs/user/INPUT_MAPPING.md` lists the action and describes it. ### Tested Linux (CachyOS, GCC), branch based on `main` `6ea62f9b4`. - New `pad_keyboard_mouse` case `shake`: a held X reports motion, the acceleration and angular velocity flip after one half period, and the motion stops after release. `Advance` returns true while the key is held. All `pad` tests pass (9/9). - PPSA21567 v01.019.000, 20 minutes each with the same scripted keyboard input: Space presses for 7 minutes, then walking. In the run with this branch, the walking loop also held X for 3 s. - On `main` `d92a8dad3`, it reaches the Crash Site and stays on the shake prompt from about 10 minutes to the end of the run. - On this branch, the controller is dug out at about 8.5 minutes. From about 10 minutes Astro runs freely across the Crash Site dunes, with the objective marker shown, until the end of the run. - Neither run had a fatal error before the timeout. - RX 9070 XT, RADV Mesa 26.2.4, headless gamescope. Not tested: titles that read only orientation or a specific shake axis, and a real controller held still while X is pressed. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: PPSA21567 #357 - [x] GPUs tested: n/a (input only); game run on AMD Radeon RX 9070 XT, RADV Mesa 26.2.4, Linux - [x] AI-assisted: yes *Written by Claude (AI assistant) on a contributor's machine; Gemini ran the game. AI-assisted: yes.*
github-actions[bot] commented 2026-10-15 13:01:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T13:01:27Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 674 core/libs/prx/libSceVideoOut/src/InputMapping.cpp
docs/user/INPUT_MAPPING.md
PR 4891 core/libs/prx/libScePad/include/InputMapping.hpp
core/libs/prx/libScePad/include/PadInputTypes.hpp
core/libs/prx/libSceVideoOut/src/InputMapping.cpp
docs/user/INPUT_MAPPING.md
PR 7201 core/libs/prx/libSceVideoOut/src/InputMapping.cpp
PR 7499 core/libs/prx/libScePad/include/InputMapping.hpp
core/libs/prx/libSceVideoOut/src/InputMapping.cpp
docs/user/INPUT_MAPPING.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6192674857 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6353#issuecomment-6192674857). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T13:01:27Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 674](https://www.github.com/boykopovar/AnyPS5/pull/674) | `core/libs/prx/libSceVideoOut/src/InputMapping.cpp`<br>`docs/user/INPUT_MAPPING.md` | | [PR 4891](https://www.github.com/boykopovar/AnyPS5/pull/4891) | `core/libs/prx/libScePad/include/InputMapping.hpp`<br>`core/libs/prx/libScePad/include/PadInputTypes.hpp`<br>`core/libs/prx/libSceVideoOut/src/InputMapping.cpp`<br>`docs/user/INPUT_MAPPING.md` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceVideoOut/src/InputMapping.cpp` | | [PR 7499](https://www.github.com/boykopovar/AnyPS5/pull/7499) | `core/libs/prx/libScePad/include/InputMapping.hpp`<br>`core/libs/prx/libSceVideoOut/src/InputMapping.cpp`<br>`docs/user/INPUT_MAPPING.md` |
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!6353
No description provided.