Commit Graph
69 Commits
Author SHA1 Message Date
Dean 79c6c4222d Merge pull request #10880 from EagleBearerYS/feat/scepad-light-bar-and-handle-calls
feat(libScePad): implement scePadIsValidHandle, the light-bar resets and scePadSetVibrationForce
2026-10-27 21:14:55 +13:00
Adrià 1b2af92baf Merge pull request #11187 from p3n1cillin/claude/pad-ext-info-not-permitted
fix(libScePad): refuse scePadGetExtControllerInformation on a standard pad as the console does
2026-10-27 09:03:28 +01:00
Adrià f89559b472 Merge pull request #10119 from xXPBSXx/docs/debt-pad-deadbandstate-title
docs(debt): note how a title calls scePadSetAngularVelocityDeadbandState
2026-10-26 15:19:42 +01:00
Yunus Shaikh a5128c9be7 fix(libScePad): follow the module's light bar resets, handle checks and forced vibration
BunnyFl ran firmware 13.42's libScePad natively over a slot table he
wrote, and oneandonlydean asked for the four calls to follow it.

scePadIsValidHandle matches the handle's open port type against the
argument, and answers false before scePadInit.
scePadResetLightBarAllByPortType returns INVALID_ARG for any type but 0,
1 and 2 before the initialisation check, and otherwise resets each open
handle of that type as scePadResetLightBar resets it;
scePadResetLightBarAll is type 0. So a standard port with no open handle
keeps its light bar, and types 3, 4 and 16 no longer throw.

scePadSetVibrationForce returns NOT_INITIALIZED before scePadInit, then
INVALID_ARG for a null parameter, without looking the handle up. There
is no pad driver here: a special handle returns PAD_OK and a standard
handle sets its port's motors, open or not. A handle with no pad port
throws, as the driver's answer for it is not measured.

The tests drop the closed and unknown handle checks that no longer hold
and check the measured answers; the debt entries cite the run and say
which parts are this model's.
2026-10-26 05:46:40 -07:00
p3nicillinandClaude Opus 5.5 08e595fc15 docs(libScePad): keep the buffer side effect of the refusal unmeasured
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 21:43:09 +00:00
p3nicillinandClaude Opus 5.5 28544a4f7d docs(libScePad): use plain links in the extended information entry
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 21:41:19 +00:00
p3nicillinandClaude Opus 5.5 3436e8fe7e fix(libScePad): refuse scePadGetExtControllerInformation on a standard pad
On a standard-port handle the console answers NOT_PERMITTED (0x80920101):
Halo CE Universal's pad probe measured it on firmware 13.59 for two
connected DualSenses in three runs. The function returned 0 with
invented controller information instead. The special port keeps its
zeroed answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 21:04:17 +00:00
Dean 85a4d7f8c8 Merge pull request #10754 from slugzero/fix/pad-get-controller-type
fix(libScePad): accept special handles in scePadGetControllerType
2026-10-26 02:32:31 +13:00
Yunus Shaikh 63ef18b435 feat(libScePad): implement scePadSetVibrationForce as scePadSetVibration
scePadSetVibrationForce takes the same handle and vibration parameter as
scePadSetVibration and returns its result. No system vibration-off state
exists here for it to override: scePadSetVibrationMode only stores its
mode.
2026-10-25 02:53:52 +00:00
Yunus Shaikh 3921b0bd5f feat(libScePad): reset every light bar in scePadResetLightBarAll
scePadResetLightBarAll returns each standard port's light bar to its
default, as scePadResetLightBar does for one handle.
scePadResetLightBarAllByPortType does the same for the standard port
type and nothing for the special one. It throws for types 3, 4 and 16,
and rejects other types with INVALID_ARG, as scePadOpen does.
2026-10-25 02:53:18 +00:00
Yunus Shaikh 2e4ce13282 feat(libScePad): implement scePadIsValidHandle
A handle is valid for its own port type while the handle table that
scePadGetHandle reads holds it open: a standard port that is open, a
special slot that is in use, or the open remote port. Any other port
type answers false.
2026-10-25 02:52:39 +00:00
SlugZero bee2bee10b fix(libScePad): accept special handles in scePadGetControllerType
Accept valid special handles in scePadGetControllerType by using KnownHandle, reporting PAD_CONTROLLER_TYPE_UNKNOWN (0) for special handles with no physical controller behind them.
2026-10-24 23:53:12 +02:00
orezraeyandClaude Opus 5.5 199fd82e3d Merge main into fix/libscepad-open-checks-measured-ps5
Main limits the standard port to logged-in users, so scePadOpen now checks the port type alone first, then the user and index, and leaves the standard port's user lookup to PortForUser.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 15:30:45 -03:00
xXPBSXxandClaude Sonnet 5.5 a631659db4 docs(debt): note how a title calls scePadSetAngularVelocityDeadbandState
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-24 19:58:47 +02:00
SlugZero d950147cdc docs(debt): record unverified values in libSceUserService and libScePad 2026-10-24 19:21:15 +02:00
SlugZero 58a1bcc5a3 feat(pad): support up to 4 controllers with dynamic user discovery
- Track up to 4 pad slots in libScePad with per-slot inputs, outputs, sensor fusion, and deadbands
- Support dynamic user login/logout events and multi-user registration in libSceUserService
- Map SDL controllers 0-3 to Players 1-4 in libSceVideoOut while preserving Player 1 keyboard and mouse composition
- Add test coverage for multi-controller pads and multi-user services
2026-10-24 19:21:15 +02:00
orezraeyandClaude Opus 5.5 7844bbb5e1 Merge main into fix/libscepad-open-checks-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 12:58:01 -03:00
Adrià 3fcb5e4d76 Merge pull request #9178 from norton62/fix/pad-remote-control-port
fix(libScePad): open the system remote control port as a disconnected device
2026-10-24 17:40:15 +02:00
Adrià c51dcca0de Merge pull request #8350 from adriaespii/feat/pad-get-controller-type
feat(libScePad): implement scePadGetControllerType
2026-10-24 13:52:35 +02:00
norton62andClaude Opus 5.5 ce3e22a325 fix(libScePad): open the system remote control port as a disconnected device
scePadOpen for the system user's remote control port (type 16) returned the
DualSense handle, so scePadReadState on the "remote" reported the controller's
buttons as connected. SDL's PS5 video driver maps that port's buttons to keys,
so every Cross also arrived as Return and every D-pad press as an arrow key.
In Raptor (PPSA94002) the Return overwrote the key typed on the on-screen
keyboard before the name field read it, and Circle closed the dialog instead
of the keyboard.

The port now opens its own handle that reads no buttons with connected false,
and closes independently of the DualSense handle. Unlike the special port
handles, it stays out of KnownHandle, so calls that act on the DualSense reject
it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 21:31:49 +01:00
orezraeyandClaude Opus 5.5 ddcc81887f fix(libScePad): check the user before throwing for port types 3 and 4
A payload process on a PS5 (firmware 13.60) gets 0x809b0001 for user -1 on types 3 and 4 and on index 1, so scePadOpen answers those before it throws for the unknown types.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 16:52:58 -03:00
orezraeyandClaude Opus 5.5 2d33e51c45 fix(libScePad): answer scePadOpen's user, index and port checks as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 15:58:45 -03:00
Dean 8abd9bfb18 Merge pull request #9878 from ntamas94/fix/pad-special-port-handle
fix(libScePad): open the special port with a handle that reads as disconnected
2026-10-24 01:14:23 +13:00
Dean 11cf1c87f5 Merge pull request #9664 from krishalivaibhav/feat/pad-tracker-device-queries
feat(libScePad): answer the tracker DualShock 4, Blaster and Move queries
2026-10-23 13:01:07 +13:00
ntamas94andClaude Fable 5.1 fa5b090230 docs(debt): keep the special port entry under the length limit
Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-23 00:26:50 +02:00
ntamas94andClaude Fable 5.1 83debaa12f docs(debt): record the two-user special port measurement
With two users logged in on a PS4 Pro (firmware 10.71) each user's
special port handle, ALREADY_OPENED on its second open and close are
independent of the other user's, as the branch already models.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-23 00:26:06 +02:00
ntamas94andClaude Fable 5.1 7678df544f fix(libScePad): answer a 17th special-port user with the unknown-user code
The special port table had four slots and threw for a fifth user, which
the progress report counted as scePadOpen going back to a stub. A PS4
holds at most 16 accounts, so the table now has 16 slots and a 17th
distinct user id gets 0x809b0081, the code the console returned for an
unknown user id in the libScePad survey (PS4 Pro, firmware 10.71).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-22 22:45:14 +02:00
ntamas94andClaude Fable 5.1 7be1132713 fix(libScePad): make the special port handle behave as the PS4 measured
The ps4probe libScePad survey (PS4 Pro, firmware 10.71) measured the
special port with one user: a second scePadOpen returns ALREADY_OPENED
(0x80920004); scePadRead and scePadReadState give the rest record
(sticks 0x80, orientation w 1, acceleration y 1, connected 0);
scePadGetControllerInformation is zeroed;
scePadDeviceClassGetExtendedInformation reports device class -1; and
scePadSetVibration, scePadSetLightBar, scePadResetLightBar,
scePadSetMotionSensorState and scePadResetOrientation return 0.

The special handle is now accepted by every pad call: setters succeed
without touching the emulated pad, getters return the measured records.
Calls not covered by the survey follow the same rule and the debt entry
lists them.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-22 22:41:36 +02:00
ntamas94andClaude Fable 5.1 76b318a75c fix(libScePad): keep special port state per user
A single flag and one handle served every user's special port, so a
second user's scePadClose dropped the first user's handle from
scePadGetHandle. Each user now gets a handle of its own
(PAD_SPECIAL_HANDLE + slot, four slots), a repeated open returns it
again, and close frees only that slot. Whether the console shares or
separates the handles is not measured yet; the debt entry says so.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-22 22:30:59 +02:00
ntamas94andClaude Fable 5.1 f8233a2738 fix(libScePad): open the special port with a handle that reads as disconnected
scePadOpen returned DEVICE_NOT_CONNECTED (0x80920007) for a special port
(type 2) since #3838, which guessed the console behaviour. A PS4 Pro on
firmware 10.71 with no special controller connected opens the special
port of any valid user and returns a handle: scePadRead on it returns one
record with connected false, scePadGetControllerInformation succeeds, and
scePadRead(-1) is INVALID_HANDLE.

Unity's PS4 input module opens the standard and the special port of a
user and keeps the pad handle only if both opens succeed; otherwise it
calls scePadRead with handle -1 every frame and the title never sees a
button. Knowledge is Power (CUSA09558) and Knowledge is Power: Decades
(CUSA12435) had no controller input for that reason.

The special port now opens PAD_SPECIAL_HANDLE, tracked apart from the
standard handle by scePadClose and scePadGetHandle. scePadRead and
scePadReadState on it return a zeroed record, scePadGetControllerInformation
and scePadDeviceClassParseData zeroed structures, and the other pad calls
reject it with INVALID_HANDLE. The standard handle still reads its own
queue, so the double read of one queue that #3838 fixed does not return.
scePadOpenExt is unchanged. The unmeasured parts are recorded in
docs/dev/debt/libScePad.md.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-22 22:11:04 +02:00
Adria Espi 63a2666558 feat(libScePad): implement scePadGetControllerType 2026-10-22 12:05:17 +02:00
krishalivaibhavandClaude Opus 5.5 81ae747acd feat(libScePad): answer the tracker DualShock 4, Blaster and Move queries
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 12:38:04 +05:30
frankea 41d551eb60 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into ps5-measured-1340
# Conflicts:
#	core/libs/prx/libSceSystemService/Export.cpp
2026-10-21 17:37:31 -04:00
boykopovar 2f678e9046 docs: record retained activation and pad no-op behavior 2026-10-21 21:56:06 +03:00
boykopovar 2a8c0f82ab fix(pad): define vr controller sample layout 2026-10-21 21:54:00 +03:00
boykopovar 4a84bfe06b fix(pad): restore profile writes and virtual device parameters 2026-10-21 21:51:38 +03:00
boykopovar 43398d5572 fix(pad): restore internal data and device control signatures 2026-10-21 21:51:37 +03:00
boykopovar 2f8bf3c16e fix(pad): restore profile and device setting signatures 2026-10-21 21:50:48 +03:00
boykopovar 86b8fe3a25 fix(pad): restore report tracker and vr trigger signatures 2026-10-21 21:50:48 +03:00
boykopovar 787318c3d8 fix(pad): recover vr vibration and update query signatures 2026-10-21 21:47:30 +03:00
boykopovar d25257b90b fix(pad): recover capability and tracker color signatures 2026-10-21 21:47:27 +03:00
boykopovar 4e067caa65 fix(pad): recover infrared transfer signatures 2026-10-21 21:47:26 +03:00
boykopovar fa38f4e2af fix(pad): recover profile selection and infrared status signatures 2026-10-21 21:47:25 +03:00
boykopovar 7c741db5ef fix(pad): recover controller update status and data signatures 2026-10-21 21:47:24 +03:00
boykopovar ae33ab4bb1 fix(pad): recover feature report and compatibility signatures 2026-10-21 21:47:23 +03:00
boykopovar b878641d26 fix(pad): recover tracker and connection query signatures 2026-10-21 21:47:23 +03:00
boykopovar 482c0e92d4 fix(pad): recover profile and copilot control signatures 2026-10-21 21:47:21 +03:00
boykopovar 891d790b6a fix(pad): recover idle counters and device query signatures 2026-10-21 21:47:20 +03:00
boykopovar 5f1d9bafa2 fix(pad): recover controller settings signatures 2026-10-21 21:47:18 +03:00
boykopovar 9e87228eaf docs(debt): close verified hmd and pad parameterless signatures 2026-10-21 21:47:15 +03:00