126 Commits
Author SHA1 Message Date
Dean 725e93001a Merge pull request #12756 from legendary-cookie/test/pad-trigger-state
test(libScePad): cover the scePadGetTriggerEffectState handle and argument checks
2026-11-06 00:05:26 +13:00
Dean 6fe3595431 Merge pull request #12115 from dantdmdarealguy/test/pad-latch-read-intervals
test(libScePad): wait for the read intervals the latch checks rely on
2026-11-06 00:04:39 +13:00
Dean d72fe12987 Merge pull request #14840 from akkadbakkad89/feat/pad-set-connection
feat(libScePad): implement scePadSetConnection from the 11.00 dump decode
2026-11-05 17:00:10 +13:00
Dean 6e58b59425 Merge pull request #14743 from slopgobblercobbler/test/pad-set-lightbar-flashing-bounds
test(libScePad): cover invalid handle in scePadSetLightBarBlinking
2026-11-05 17:00:06 +13:00
JJenkxandClaude Opus 5.5 36bffbab1e fix(libScePad): check only the selected triggers' modes in scePadSetTriggerEffect
The trigger mask selects which of the two commands apply, but every mode
was checked against the range, so an unselected command with any value
made the call fail. Quake (PPSA01880) and Quake II (PPSA09477) set only
the right trigger (mask 0x2) and leave the left command uninitialised
(mode 0xb65951b8 in one call), and got SCE_PAD_ERROR_INVALID_ARG; the
right trigger was never switched. Only selected commands are checked now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 08:19:26 -05:00
dantdmdarealguy 90e7ebec1f test(libScePad): keep the released-tap form of the latched press check
The newer-press case in CheckLatchedPressLifetime held the circle press
while it was read, so the check passed for any held button and no longer
showed that a released tap stays latched at the default 100 ms latch.

Release the circle tap before the read again. Each attempt makes two
reads within 50 ms, so the latch is 100 ms, taps cross, waits 150 ms,
taps circle and reads it. Repeat up to 50 times until the reads were
close and the read finished within 50 ms of the circle press, and abort
with a message if no attempt did.
2026-11-02 23:28:16 -06:00
slopgobblercobbler a3b39176e4 test(libScePad): cover invalid handle in scePadSetLightBarBlinking 2026-11-03 00:50:26 +01:00
Dean f4489e210f Merge pull request #14689 from slopgobblercobbler/test/pad-touchpad-data-null-bounds
test(libScePad): cover null pointer in scePadGetTouchData
2026-11-03 11:41:57 +13:00
Dean a7379cfdc6 Merge pull request #14657 from slopgobblercobbler/test/pad-get-handle-user-bounds
test(libScePad): cover invalid user ID in scePadGetHandle
2026-11-03 11:41:09 +13:00
Dean 90cf0ee6be Merge pull request #14640 from slopgobblercobbler/test/pad-motion-data-null-bounds
test(libScePad): cover invalid handle and null pointer in scePadGetMotionData
2026-11-03 11:40:53 +13:00
Dean 4534a41a68 Merge pull request #14593 from slopgobblercobbler/test/pad-set-vibration-bounds
test(libScePad): cover invalid handle in scePadSetVibration
2026-11-03 11:40:00 +13:00
Dean a38eae455a Merge pull request #14468 from slopgobblercobbler/test/pad-trigger-effects-coverage
test(libScePad): cover invalid handle and mode rejection in scePadSetTriggerEffect
2026-11-03 11:37:18 +13:00
Dean eecb6dee58 Merge pull request #10935 from mashingaan/fix/pad-open-unsupported-types
fix(libScePad): return an error for unsupported port probes
2026-11-03 08:45:10 +13:00
akkadbakkad89 cf1b8695b6 feat(libScePad): implement scePadSetConnection from the 11.00 dump decode 2026-11-02 01:26:23 +05:30
slopgobblercobbler ac3fb86b25 test(libScePad): cover null pointer in scePadGetTouchData 2026-11-01 18:03:32 +01:00
slopgobblercobbler 85b7c066c3 test(libScePad): cover invalid user ID in scePadGetHandle 2026-11-01 17:47:18 +01:00
slopgobblercobbler 84fcf9c7c0 test(libScePad): cover invalid handle and null pointer in scePadGetMotionData 2026-11-01 17:44:19 +01:00
slopgobblercobbler ba46471494 test(libScePad): cover invalid handle in scePadSetVibration 2026-11-01 17:13:23 +01:00
slopgobblercobbler 824ab2d36e test(libScePad): cover invalid handle and mode rejection in scePadSetTriggerEffect 2026-11-01 15:47:08 +01:00
Dean Galvin c4b304d1ba Merge commit 'd5ec8e6575be37f4340ded9c64c51b1d07076b51' into HEAD
# Conflicts:
#	core/libs/tests/GuestPad.cpp
2026-11-01 23:40:56 +13:00
mashingaan e11a4735a2 fix(pad): return error for unsupported port probes 2026-11-01 10:29:16 +03:00
MarcZX10 68a4689e62 Merge remote-tracking branch 'upstream/main' into fix/pad-port0-connected-state 2026-10-30 23:46:32 +00:00
Adrià ce03377e23 Merge pull request #13460 from BunnyFl/feat/libscepad-handle-queries
feat(libScePad): answer the motion, Bluetooth and Leonardo queries
2026-10-30 22:27:17 +01:00
BunnyFlandClaude Opus 5.5 708cf647d1 test(libScePad): check the five queries before scePadInit
Firmware 13.42 checks the initialized flag first in all five and
returns 0x80920005 without writing the outputs. The debt entry now
says where the behaviour comes from.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 17:57:01 +01:00
slopgobblercobbler 059b29ac24 test(libScePad): cover motion sensor, tilt correction, and orientation reset handle setters 2026-10-30 16:55:43 +01:00
BunnyFlandClaude Opus 5.5 2f9581050c feat(libScePad): answer the motion, Bluetooth and Leonardo queries
scePadGetMotionTimerUnit, scePadGetMotionSensorPosition,
scePadGetSphereRadius, scePadGetBluetoothAddress and
scePadParseUniqueDataLeonardo follow firmware 13.42's handle and
device checks for the one DualSense this library reports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 16:48:37 +01:00
MarcZX10 c2f6b9b641 test(libScePad): check controller information and pad info for a withdrawn port 0
Covers scePadGetControllerInformation on a withdrawn port 0 (not connected,
connectedCount 0) and scePadGetInfo, whose connected count must match the
ports Pad::IsConnected reports, with no entry when none is connected.
2026-10-30 13:53:55 +00:00
MarcZX10 f30b56225c test(libScePad): check that a withdrawn port 0 reads zeroed and disconnected
Covers scePadReadState and scePadRead on port 0 while it is withdrawn, input
published during the withdrawal staying out of the reads, and the restored
state after reconnection.
2026-10-30 13:52:58 +00:00
slopgobblercobbler fe5d340cdf test(libScePad): cover vibration and light bar setters on controller handles 2026-10-30 01:13:25 +01:00
legendary cookieandClaude Opus 5.5 6c4e602879 test(libScePad): cover the scePadGetTriggerEffectState handle and argument checks
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 16:05:04 +08:00
Dean 66248d1d5d Merge pull request #11349 from Wadefil/test/pad-special-handle-setters
test(libScePad): cover special handle state setters in GuestPad
2026-10-29 12:03:04 +13:00
MarcZX10 02c1c763cb test(libScePad): open special pads from eight threads at once
Each of 200 rounds releases eight threads together; they have to receive eight
distinct handles, which are then closed.
2026-10-28 22:29:41 +00:00
Dean b172776486 Merge pull request #12230 from milescoviello/test/pad-trigger-effect
test(libScePad): cover the trigger commands scePadSetTriggerEffect stores
2026-10-29 07:26:15 +13:00
Dean 651e248bef Merge pull request #11845 from Ralizaki/feat/libScePad-controller-settings
feat(libScePad): implement vibration and light bar brightness controls
2026-10-29 05:05:32 +13:00
milescovielloandClaude Opus 5.5 77600dcb87 test(libScePad): cover the trigger commands scePadSetTriggerEffect stores
Seven of the titles here import scePadSetTriggerEffect and no test reaches
it. Pin the requests it leaves in the port's output state: a weapon and a
feedback command as their DualSense effect bytes and fallback strengths,
the trigger mask leaving the other trigger as it was, an off command, and
a special handle leaving the output alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 04:28:40 +00:00
dantdmdarealguy 94df21e84d test(libScePad): wait for the read intervals the latch checks rely on
The latch lasts one and a half times the interval between the previous
two scePadReadState calls, kept between 100 ms and 500 ms. The latch
checks assumed two consecutive reads land within a few microseconds and
that a read follows a tap within the latch, so a stall of about 100 ms
on a loaded runner made them fail: guest_pad aborted in
CheckLatchedPressLifetime in two Windows CI runs on main.

Repeat the two short reads until both finished within 50 ms, hold the
newer press while it is read, and repeat the slow-read and per-port
cases until the tap was read within 250 ms of the second slow read.
2026-10-27 16:28:21 -05:00
Daniel Castrillon 0701378a56 feat(pad): inject touch coordinates through command files 2026-10-27 12:53:57 +01:00
Adrià d410ce253f Merge pull request #11207 from EagleBearerYS/feat/imedialog-pad-keyboard
feat(libSceImeDialog): type with the controller on an on-screen keyboard
2026-10-27 12:00:58 +01:00
AnyPS5 Contributor 7fd424e51b feat(libScePad): implement vibration and light bar brightness controls 2026-10-27 11:04:10 +01:00
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
Yunus Shaikh 30d2ca3492 fix(libScePad): keep presses from before a capture out of the intercepted reads
A press published before the keyboard captured the pad stayed in the
read latch and in the sample queue. The first ReadState after the
handoff returned it beside the Intercepted bit, and Read drained the
queued samples from before the capture unmasked. Clear both when a
sample starts the capture, so every read while it lasts holds only the
Intercepted bit.

Found by MarcZX10's review.
2026-10-27 05:20:10 +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
Wadefil d3c0ed743e test(libScePad): cover special handle state setters in GuestPad 2026-10-26 13:24:10 +01:00
Adrià a4f0c002da Merge pull request #9919 from zaidhawk/fix/pad-latch-read-interval
fix(pad): keep a latched press for one and a half read intervals
2026-10-26 12:48:09 +01:00
Yunus Shaikh 87d01722ce test(libScePad): stop requiring the unmodelled port types to throw
Port types 3, 4 and 16 are valid ones the console answers.
scePadResetLightBarAllByPortType still refuses them, but a test that
requires the refusal would fail once they are supported. The positive
and invalid-argument checks stay.

Asked for in oneandonlydean's review.
2026-10-25 23:17:56 -07: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