Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PSTV/Vita] Analog L2/R2 does not work using a Dualshock 3 #17162

Open
techsrus opened this issue Nov 4, 2024 · 3 comments
Open

[PSTV/Vita] Analog L2/R2 does not work using a Dualshock 3 #17162

techsrus opened this issue Nov 4, 2024 · 3 comments

Comments

@techsrus
Copy link

techsrus commented Nov 4, 2024

Description

Trying to manually remap for analog L2/R2, but there are no working axis numbers that maps the Dualshock 3's analog triggers to RetroArch on PlayStation TV.

Expected behavior

Should be able to map the Dualshock's L2 and R2's axis numbers to "input_l2_axis" and "input_r2_axis" and get the pressure sensitive triggers, as it says in the libretro document.

Actual behavior

I've tried axis numbers up from -0 to -40 (+axis numbers got the buttons stuck on PC, I tried + on vita as well) and none seem to be the ones attached to L2 and R2 on the Dualshock 3 for the Playstation TV (it is supported).

Steps to reproduce the bug

  1. PlayStation TV with genuine Dualshock 3
  2. Configure the RetroPad Binds with the Dualshock 3
  3. Save the controller profile
  4. Must manually edit the config file to get around the Analog L2/R2 remapping bug
  5. You can observe that L2 and R2 analogs are working using reVita. When enabled press Start+Square to open up the menu, go down to Developer and then Show buttons.

Bisect Results

This issue exists on PC with a workaround, but I guess hasn't come up yet for the Vita version. By mapping any other analog axis like the Right Analog stick to L2 or R2, I found that I was able to get the the intended analog function to come from RetroArch. So it's just RetroArch not being able to bind to the L2 or R2 analog axis.

On PC I was easily able to fix it with the manual remap for dinput, and I think since RetroArch has to define what Vita inputs are seen through its 'vita' input driver, maybe it still needs the axes for L2 and R2 to be defined before I am able to manually remap it.

File I believe is relevant (vita input driver)

Version/Commit

  • RetroArch: Version 1.19.1

Environment information

  • OS: Playstation TV
  • Compiler: GCC (10.3.0) 32-bit

Thank you.

@zoltanvb
Copy link
Contributor

The guess sounds about right, L2/R2 analog values are not mapped, they are just read from the on/off button structure:

pad_state[i] |= (STATE_BUTTON(state_tmp) & PSP_CTRL_R2) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R2) : 0;

Now, it may be possible to get the analog value, using the dedicated lt/rt part of the structSceCtrlData. I do not have PSTV, but if you are willing to install a few test builds, maybe it can be achieved.

@techsrus
Copy link
Author

I'll be glad to test!

@zoltanvb
Copy link
Contributor

retroarch_vita.zip
Here's a test build with pcsx_rearmed. L2 is mapped to axis 4, R2 is mapped to axis 5.

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

No branches or pull requests

2 participants