Skip to content

fix(pad): accept vibration mode 5 - #5523

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
milescoviello:fix/pad-vibration-mode-5
Oct 14, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
milescoviello:fix/pad-vibration-mode-5

Conversation

@milescoviello

@milescoviello milescoviello commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Crimson Desert (PPSA25286) calls scePadSetVibrationMode(handle, 5) on its open pad handle at start-up. main rejects any mode above 3, so the call returns SCE_PAD_ERROR_INVALID_ARG (0x80920001). The title carries on with the call failed.

The modes are not documented:

The call now also accepts 5, the value a shipped title passes on an open handle. It keeps rejecting the values no title has been seen to use (4, 6 and above), and the mode is stored as before with no other effect. The libScePad debt entry now lists 5 next to 3 as accepted modes of unknown meaning.

guest_pad checks that mode 5 is accepted and that 4 and 6 are still refused.

Rebased onto #5264, which now checks the mode before the handle as the console does: the change is if (mode > 3 && mode != 5) after its mode <= 0 check, and the debt entry keeps #5264's console measurements and adds mode 5.

#5038 rewrites the neighbouring scePadOpen entry of the libScePad debt file, so whichever of the two lands second needs a one-line rebase there.

Tested

Ubuntu 24.04, GCC 13.3 (CI's compiler), Release with CI's configure flags. After the rebase onto main fa539dd, guest_pad again fails with main's Export.cpp and passes with the change, and tools/check_conventions.py --base upstream/main passes. Before it, on main bf8dc61:

  • With main's Export.cpp and the new checks, guest_pad fails; with the change it passes 20/20.
  • All 344 guest_* tests pass in two runs.
  • Crimson Desert (PPSA25286), relinked with --to-intel and run on Linux under gdb, logging every libScePad, libSceSaveData, libSceUserService and other service call that returns an error code:
    • With main's libScePad, scePadSetVibrationMode (handle 1, mode 5) returns 0x80920001.
    • With this change it returns 0, and it no longer appears among the failing calls.
  • tools/check_conventions.py --base upstream/main passes.

Not checked on a console.

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: none
  • AI-assisted: yes

🤖 Generated with Claude Code

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is narrowly scoped: mode 5 is accepted while 4, 6+, and negative values remain rejected, and the regression checks cover those boundaries. The PR also records the remaining uncertainty about mode semantics and the expected one-line rebase with #5264. The current CI checks pass, while platform/build jobs are skipped; I’m relying on the Linux test evidence documented in the PR, not claiming an independent local run.

Crimson Desert (PPSA25286) calls scePadSetVibrationMode(handle, 5)
at start-up, and main rejects any mode above 3 with
SCE_PAD_ERROR_INVALID_ARG (0x80920001). The title then carries on
with the call failed.

The modes are not documented. SharpProspero names 1 (advanced) and 2
(compatible); mode 3 was accepted for PPSA21480. The call now also
accepts 5, which a shipped title passes, and keeps rejecting the values
no title has been seen to use (4, 6 and above). The mode is stored as
before and has no other effect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@milescoviello
milescoviello force-pushed the fix/pad-vibration-mode-5 branch from 7dd948e to d476518 Compare October 14, 2026 21:07
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 14, 2026
@adriadam10 adriadam10 self-assigned this Oct 14, 2026
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the diff, guest_pad and the scoped ctest (34/34) on current main; guest_pad fails without the Export.cpp change and passes with it. Debt entry updated accurately; merging.

@adriadam10
adriadam10 merged commit ba3ffba into boykopovar:main Oct 14, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants