Commit Graph
60 Commits
Author SHA1 Message Date
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
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
boykopovar 35cf8d56cd refactor(sdk): add canonical headers for core libraries 2026-10-24 23:17:37 +03: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
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
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 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
Dean 3e7d1d297c Merge pull request #8138 from bl4nkTHEBUNKER/fix/pad-touchpad-resolution
fix(libScePad): report the DualSense touchpad resolution
2026-10-21 06:25:52 +13:00
Dean 1a3a1b2e0e Merge pull request #3998 from MrMha/feat/controller-timelines
feat(pad): queue timed controller button sequences
2026-10-21 04:08:30 +13:00
dantdmdarealguy e3125e43af feat(agc,videoout): save the displayed frame as a PNG with a screenshot key
F12 (the new Screenshot input action) requests a capture of the next
presented display buffer. The presenter records it with the existing
APS5_DUMP_FRAMES GPU readback at full resolution, and the frame dump
writer thread encodes it with decoder_png into anyps5-screenshots/
beside the executable, or ANYPS5_SCREENSHOTS.
2026-10-20 00:28:39 -05:00
bl4nkTHEBUNKER f57b79ef51 fix(libScePad): report the DualSense touchpad resolution
The controller information reported 1920 by 943, the DualShock 4 height with
the DualSense pixel density, while the host controller's fingers were scaled to
1920 by 942 and the keyboard touch contacts sat on the 942 centre line. A title
that maps touch coordinates through the reported resolution lost the lower part
of the touchpad. The width and height now live beside the pad state and all
three places use them.
2026-10-20 01:52:50 +02:00
Adrià 54e4adde5b Merge pull request #6860 from Amoenus/codex/fix-legacy-haptic-output-main82
fix(audio): route legacy vibration PCM with per-port timing
2026-10-19 14:10:57 +02:00
MrMha c72ccac3e6 feat(pad): queue timed controller button sequences 2026-10-19 07:58:16 +04:00
EdouardSenceandClaude Opus 5.5 d71853cf25 feat(pad): add a Shake input that swings the reported motion while held
Some titles stop on a prompt to shake the controller, which keyboard players
and controllers without motion sensors cannot answer. While the Shake input is
held (X by default), the composed pad state reports motion with the
acceleration and angular velocity flipping sign every 50 ms; a controller's own
sensor data is used otherwise.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 01:16:53 +02:00
Romans Pokrovskis 4b7f46d79c Merge remote-tracking branch 'origin/main' into codex/review6860-cadence-maineb1 2026-10-19 01:42:35 +03:00
AlxcBTW f0ec9bd2a0 Merge remote-tracking branch 'origin/main' into pr/input-analog-keys 2026-10-18 22:27:23 +02:00
Dean effb7d2d5a Merge pull request #7498 from AlxcBTW/pr/input-slow-mice
fix(libScePad): smooth a slow-reporting mouse over its measured report interval
2026-10-19 09:22:19 +13:00
Dean ce396a5d41 Merge pull request #7497 from AlxcBTW/pr/input-default-l2
feat(libScePad): bind L2 to R and the first mouse side button
2026-10-19 09:22:11 +13:00
Dean 65b0ad288b Merge pull request #7496 from AlxcBTW/pr/input-capture-hotkey
feat(libScePad): toggle mouse capture with F7 beside the middle button
2026-10-19 09:21:58 +13:00
AlxcBTW 5dbdd6b797 Merge main into pr/input-analog-keys 2026-10-18 18:51:35 +02:00
AlxcBTW 06ca6a066b fix(libScePad): smooth a slow-reporting mouse over its measured report interval 2026-10-18 11:00:03 +02:00
AlxcBTW 367d46e480 feat(libScePad): bind L2 to R and the first mouse side button 2026-10-18 11:00:02 +02:00
AlxcBTW 53af7be7ee feat(libScePad): toggle mouse capture with F7 beside the middle button 2026-10-18 11:00:02 +02:00
AlxcBTW 438e1baa3e feat(libScePad): ramp keyboard-driven triggers over TriggerRampMs 2026-10-18 11:00:01 +02:00
AlxcBTW 64a9979268 feat(libScePad): ramp keyboard sticks over KeyboardRampMs 2026-10-18 11:00:01 +02:00
AlxcBTW a0f14cdf14 feat(libScePad): tilt keyboard sticks partially while a modifier key is held 2026-10-18 11:00:01 +02:00
Romans Pokrovskis a2d6c16bcd fix(audio): route legacy vibration PCM with per-port timing 2026-10-18 10:07:29 +03:00
Yunus Shaikh 2a3946dbb0 Merge main into feat/videoout-performance-overlay
Main adds StorageTextureCacheBudget where this branch adds the public
LargestDeviceLocalHeap wrapper, in both the header and the source.
Keep both.
2026-10-17 15:57:45 -07:00
Dean 042ec94a60 Merge pull request #6569 from MarcZX100/codex/pr-6564-mouse-read-pad-guard
fix(videoout): separate title mouse input from pad bindings
2026-10-18 02:25:04 +13:00
XairRrR a9377e34ba feat(pad): touch the left or right touchpad half from the input command file
APS5_PAD_INPUT_FILE commands can set bit 0x200000 or 0x400000 to put a
finger on the left or right half of the touchpad, as the TouchLeft and
TouchRight keys do, so scripted runs can press touchpad combinations.
tools/pad_input.py queues them as touch-left and touch-right.

AI-assisted: yes
2026-10-17 13:27:54 +02:00
Adrià 7b63ccbc93 Merge pull request #5970 from Ondra97/codex/fix-pad-command-unicode-path
fix(pad): read controller commands from Unicode paths
2026-10-17 00:15:35 +02:00
TamaleroandClaude Opus 5.5 07dd28f448 fix(libSceVideoOut): keep mouse clicks and motion off the pad while the title reads the mouse
The default bindings map the left and right mouse buttons to Square and
R2, and mouse mode maps motion to the right stick. A title that opens the
mouse with sceMouseOpen therefore gets every click twice: as a mouse
button and as a pad press. PPSA15388 treats the pad press as a switch to
gamepad input, re-centres its cursor and drops the click, so menu items
cannot be clicked.

While libSceMouse has a handle open, KeyboardMouse ignores mouse motion
and mouse-button presses. Releases still pass, so a button held before
the title opened the mouse is let go. Keys and the wheel are unchanged,
as with the IME guard next to it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 13:40:53 -07:00
Yunus Shaikh 67acc14910 Merge branch 'main' into feat/videoout-performance-overlay
main's StorageTextureBudget calls largestDeviceLocalHeap, the helper this branch made public as LargestDeviceLocalHeap for the overlay's VRAM line. The merge renames that call, so the merged tree builds.
2026-10-14 19:49:56 -07:00
Adrià ffbc26c7d0 Merge pull request #5264 from hugodearaujo/fix/pad-vibration-mode-errors
fix(libScePad): check scePadSetVibrationMode's arguments in the console's order
2026-10-14 22:56:29 +02:00
Ondra97 6bddb1aa2c fix(pad): read controller commands from Unicode paths 2026-10-14 19:28:33 +02:00
Yunus Shaikh a41be04ed9 feat(videoout): toggle the performance overlay with F10
TogglePerformanceOverlay is bound to F10 by default and, like
ToggleFullscreen, accepts only a keyboard key in anyps5-input.ini.
2026-10-14 16:36:48 +00:00
Joel Fernandes dcfabcc579 feat(pad): bridge controller audio haptics to motor rumble 2026-10-14 13:45:00 +02:00
hugodearaujoandClaude Opus 5.5 b80fefd467 fix(libScePad): check scePadSetVibrationMode's arguments in the console's order
Measured on a PS5 (firmware 13.60): before scePadInit the call returns
NOT_INITIALIZED (0x80920005); after it, a mode of 0 or below returns
INVALID_ARG before the handle is checked, and a bad handle with a
higher mode returns INVALID_HANDLE.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 12:49:00 -03:00
AlxcBTWandClaude Opus 5.5 38bc0fd348 feat(input): turn mouse speed into a smooth right-stick tilt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 17:00:20 +02:00
p3nicillinandClaude Opus 5.5 1d115b8962 feat(libScePad): apply the angular velocity deadband
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 22:29:57 +01:00
Dean 9fca13b538 Merge pull request #4009 from dantdmdarealguy/feat/input-deadzone-sensitivity
feat(input): configure stick deadzones and mouse sensitivity
2026-10-12 23:51:54 +13:00
fma-rc e0eef6c57f feat(pad): hold the sticks from the controller command file 2026-10-12 04:47:59 +02:00
dantdmdarealguy 3c581619d3 feat(input): configure stick deadzones and mouse sensitivity
anyps5-input.ini accepts LeftStickDeadzone and RightStickDeadzone (whole
percent, 0 to 90), a radial deadzone on the controller sticks whose
remaining travel is rescaled to the full range, and MouseSensitivity
(above 0, at most 10), which replaces the fixed factor of 1 for mouse
look. The defaults keep the current mapping exactly.
2026-10-11 15:57:12 -05:00
TibixDev 3a35841aad feat(pad): accept timed controller pulses from a local command file
Add an optional input helper for test runs without desktop input injection. Preserve physical input and release injected buttons automatically.

Validation: guest_pad tests and Python helper CLI smoke checks passed. Written with AI assistance.
2026-10-11 10:54:18 +02:00
TideOPLandClaude Opus 5.5 71e0f6428f style(libScePad): remove code comments
Per CONVENTIONS, code comments only mark technical debt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 11:06:09 +01:00
TideOPLandClaude Opus 5.5 efa6cd56f0 fix(libScePad): queue input states for scePadRead
scePadRead reported only the current state, so input that changed and
changed back between two reads was lost. Published states are now kept in
a queue of up to 64 and drained oldest first; with none queued the current
state is returned as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 11:03:30 +01:00