Skip to content

Fix PS3 trigger and face-button analog axes - #265

Open
Revise0592 wants to merge 1 commit into
wiredopposite:masterfrom
Revise0592:fix/ps3-dinput-analog-trigger-facebutton-axes
Open

Fix PS3 trigger and face-button analog axes#265
Revise0592 wants to merge 1 commit into
wiredopposite:masterfrom
Revise0592:fix/ps3-dinput-analog-trigger-facebutton-axes

Conversation

@Revise0592

@Revise0592 Revise0592 commented Jul 21, 2026

Copy link
Copy Markdown

What's broken

Both bugs only show up on PS3 output mode, and specifically hit games that read the analog pressure value for a button/trigger rather than just its digital bit which is why some games worked fine and others didn't.

I noticed the XMB seemed to work OK but going into a game, buttons went skewif and triggers didn't work.

1. Triggers (L2/R2) had no analog pressure
PS3Device::process() set the L2/R2 digital button bits from gp_in.trigger_l/trigger_r, but never wrote report_in_.l2_axis / r2_axis. Those bytes stayed at 0 every frame, so any game reading trigger pressure (throttle/brake, aim, etc.) saw no input at all, even though the digital button bit was set correctly.

2. Face-button (Circle/Cross/Square) were wired to the wrong buttons
In PS3.cpp's digital-only fallback (used whenever the host controller doesn't report analog buttons, e.g. a standard XInput pad) and in DInput.cpp's analog-enabled path, the circle/cross/square axis assignments were rotated one position off relative to the correct mapping (confirmed against the digital button bits and PS3's own analog-enabled branch, both of which are correct). In practice: pressing Xbox B correctly set the PS3 Circle digital bit, but wrote its pressure value into cross_axis instead of circle_axis so any game reading pressure would see Cross being pressed instead of Circle.

Testing

Built and flashed to real hardware (Pi Pico, PS3 output mode):

  • MotorStorm and Driver: San Francisco were both previously broken (no throttle/brake response, wrong face-button actions). These now seem to work correctly.
  • Minecraft: PS3 Edition was already working fine before this fix but confirmed still works, unaffected by the change.

Related issues

This looks like it explains several existing open reports:

I will also disclose that I did use AI to help me figure this out, but I did learn something out of this - if I have inadvertently broken something else, let me know. I have mainly been testing on PS3. I can also test on XBOX 360.

PS3Device::process() set the L2/R2 digital button bits from
gp_in.trigger_l/trigger_r but never wrote report_in_.l2_axis/r2_axis,
so the analog pressure value for both triggers was always 0. Games
that read trigger pressure instead of (or in addition to) the digital
bit never saw a real throttle/brake input.

Separately, the digital-only face-button fallback in PS3.cpp (used
whenever the host controller doesn't report analog buttons, e.g. a
standard XInput pad) and the analog-enabled path in DInput.cpp both
had circle/cross/square axes rotated onto the wrong physical buttons,
while the digital bits and PS3's own analog-enabled path were correct.
Practically: pressing B (Xbox) correctly set the Circle digital bit,
but wrote its pressure value into cross_axis instead of circle_axis.

Tested on hardware (Pi Pico, PS3 output mode): MotorStorm and
Driver: San Francisco, both previously broken (no throttle/brake,
wrong face-button actions), now behave correctly. Minecraft: PS3
Edition, which already worked before this fix, is unaffected.

Fixes wiredopposite#164, Fixes wiredopposite#142
Relates to wiredopposite#68, wiredopposite#127
@Revise0592 Revise0592 mentioned this pull request Jul 24, 2026
@Invictaz

Copy link
Copy Markdown

Maybe @MegaCadeDev can use this in his fork?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Triggers not working properly on PS3 Button inconsistency on PS3

2 participants