fix(pad): accept vibration mode 3 #3727

Merged
mariusyo07 merged 2 commits from upstream-pr/3727 into main 2026-10-11 22:14:30 +00:00
mariusyo07 commented 2026-10-11 16:03:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mariusyo07 on 2026-10-11T16:03:31Z.


What

Allows vibration mode 3 in scePadSetVibrationMode in libScePad.

Broken Sword - Shadow of the Templars: Reforged (PPSA21480, Windows) calls scePadSetVibrationMode(handle, 3) after scePadOpen and aborts on failure (#3704):

ps5_controls.cpp:19 "Sony call failed with code 80920001"

which is PAD_ERROR_INVALID_ARG. scePadSetVibrationMode previously accepted only modes 0 to 2.

Modes 0 to 3 are now accepted, while 4 and above (and negative values) remain invalid.

guest_pad is updated: asserts that mode 3 returns 0 and mode 4 returns PAD_ERROR_INVALID_ARG.

Tested

  • Linux (GCC 16.1.1): Export.cpp syntax check passes; GuestPad.cpp test asserts mode 3 is accepted (0) and mode 4 returns PAD_ERROR_INVALID_ARG (fails on main where mode 3 expects PAD_ERROR_INVALID_ARG).
  • python3 tools/check_conventions.py --base upstream/main: all checks passed.
  • git diff --check: passes with no whitespace or style warnings.
  • python3 tools/pr_overlap.py --branch fix/pad-vibration-mode-3: no overlap with open pull requests.

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 in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4820389215 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3727). Originally posted by [mariusyo07](https://github.com/mariusyo07) on 2026-10-11T16:03:31Z. --- ### What Allows vibration mode 3 in `scePadSetVibrationMode` in libScePad. Broken Sword - Shadow of the Templars: Reforged (PPSA21480, Windows) calls `scePadSetVibrationMode(handle, 3)` after `scePadOpen` and aborts on failure (#3704): ``` ps5_controls.cpp:19 "Sony call failed with code 80920001" ``` which is `PAD_ERROR_INVALID_ARG`. `scePadSetVibrationMode` previously accepted only modes 0 to 2. Modes 0 to 3 are now accepted, while 4 and above (and negative values) remain invalid. `guest_pad` is updated: asserts that mode 3 returns 0 and mode 4 returns `PAD_ERROR_INVALID_ARG`. ### Tested - Linux (GCC 16.1.1): `Export.cpp` syntax check passes; `GuestPad.cpp` test asserts mode 3 is accepted (0) and mode 4 returns `PAD_ERROR_INVALID_ARG` (fails on `main` where mode 3 expects `PAD_ERROR_INVALID_ARG`). - `python3 tools/check_conventions.py --base upstream/main`: all checks passed. - `git diff --check`: passes with no whitespace or style warnings. - `python3 tools/pr_overlap.py --branch fix/pad-vibration-mode-3`: no overlap with open pull requests. ### 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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
adriadam10 commented 2026-10-11 21:56:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:56:21Z.


Checked on Linux: build and guest_pad pass, and the updated test fails without the change. The mode is only stored in PadState, so accepting 3 has no other effect.

Added one commit: a TechnicalDebt line ("Unknown function info") for the unverified meaning of mode 3, since the only evidence is that PPSA21480 calls it and aborts on failure.

Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114239425 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3727#issuecomment-6114239425). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T21:56:21Z. --- Checked on Linux: build and `guest_pad` pass, and the updated test fails without the change. The mode is only stored in `PadState`, so accepting 3 has no other effect. Added one commit: a TechnicalDebt line ("Unknown function info") for the unverified meaning of mode 3, since the only evidence is that PPSA21480 calls it and aborts on failure. Merging once CI is green.
github-actions[bot] commented 2026-10-11 22:11:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T22:11:08Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#3728 docs/dev/TechnicalDebt.md L93-94
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114417135 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3727#issuecomment-6114417135). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T22:11:08Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #3728 | `docs/dev/TechnicalDebt.md` [L93-94](https://github.com/boykopovar/AnyPS5/blob/31bf997b5342b88ebd4fa8f5629b0ee7400fe176/docs/dev/TechnicalDebt.md#L93-L94) | | |
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!3727
No description provided.