Closed barbudreadmon closed 3 months ago
input_l2_axis and input_r2_axis expect axises, hence should be using the analog indexes +2 & +5 instead of the digital indexes 6 & 7 Fix regression from 8150723
Fix regression from https://github.com/libretro/retroarch-joypad-autoconfig/commit/815072328d5d5ca469e30bb0a7d52896733b15e7
I changed it from _btn:
input_l2_btn = "6"
input_r2_btn = "7"
to _axis:
input_l2_axis = "6"
input_r2_axis = "7"
you don't solve a regression by adding the new values like you did:
input_l2_axis = "+2"
input_r2_axis = "+5"
However, there's a reason why I uploaded my autoconfig. Your autoconfig will cause a regression for my controller.
Here's a summary from the current autoconfig that I uploaded:
# Required Linux kernel version for both USB and Bluetooth: 5.15
# Source: https://linuxiac.com/linux-kernel-5-12-released-with-many-essential-additions/
#
# Successful evaluation of DualSense firmware versions + Tested GNU/Linux distribution (and kernel):
# * DualSense (Model number: CFI-ZCT1W A. DualSense firmware: 0402) + Trisquel GNU/Linux 11 in live mode ($ uname -a: Linux trisquel 5.15.0-67-generic #74+11.0trisquel18 SMP Sun Mar 5 03:14:11 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux)
Please copy/paste/modify/reply your data:
input_l2_axis = "+2"
input_r2_axis = "+5"
Afaik, that syntax you used is not correct : input_xx_axis
in libretro autoconfigs is for axises and axises start with either a + or -. Retroarch allowing a mix of input_xx_axis
and digital indexes seems too lax and a bug to me.
With your changes, L2 and R2 won't act like analog axises, this is 100% a regression.
This is the model i'm using, i think that's the same model you are using :
I'm on Gentoo Linux with a kernel 6.6.21, using a recent nightly of retroarch.
I don't know how you check dualsense firmware version, fwiw my kernel is saying this :
playstation 0003:054C:0CE6.0009: Registered DualSense controller hw_version=0x00000413 fw_version=0x010c000a
And this is the output of jstest, which is the most reliable tool for creating udev autoconfigs :
jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Sony Interactive Entertainment DualSense Wireless Controller) has 8 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y)
and 13 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnTL2, BtnTR2, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR).
Testing ... (interrupt to exit)
Axes: 0: 258 1: 258 2:-32767 3: 1032 4: -517 5:-32767 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off
On a sidenote, the reason why you must use jstest
is because using the in-app feature of retroarch is unreliable for triggers on sony controllers (and maybe other brands).
This is due to the digital indexes (6 & 7) and the analog indexes (+2 and +5) being both reported and retroarch apparently not knowing which ones it should prioritize for its config.
At 8150723#diff-c1c9ed65f7bce6977c157ddff0576e61fc138bed4f67af333413810100235a93L19-L20, it used to be
input_l2_axis = "+2" input_r2_axis = "+5"
You are right, sorry.
Afaik, that syntax you used is not correct :
input_xx_axis
in libretro autoconfigs is for axises and axises start with either a + or -. Retroarch allowing a mix ofinput_xx_axis
and digital indexes seems too lax and a bug to me.
Thank you, can you please document this in https://github.com/libretro/docs/blob/master/docs/guides/controller-autoconfiguration.md ?
With your changes, L2 and R2 won't act like analog axises, this is 100% a regression.
This is the model i'm using, i think that's the same model you are using :
I'm on Gentoo Linux with a kernel 6.6.21, using a recent nightly of retroarch.
I don't know how you check dualsense firmware version, fwiw my kernel is saying this :
playstation 0003:054C:0CE6.0009: Registered DualSense controller hw_version=0x00000413 fw_version=0x010c000a
And this is the output of jstest, which is the most reliable tool for creating udev autoconfigs :
jstest /dev/input/js0 Driver version is 2.1.0. Joystick (Sony Interactive Entertainment DualSense Wireless Controller) has 8 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y) and 13 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnTL2, BtnTR2, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR). Testing ... (interrupt to exit) Axes: 0: 258 1: 258 2:-32767 3: 1032 4: -517 5:-32767 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off
I have overlooked this issue so many tims.
I generated the autoconfig file by following https://www.retroarch.com/index.php?page=controller-autoconfig.
I'm confident that I tried to reproduce a correct autoconfig file by reviewing it multiple time. However, I tried to reproduce again but now it changed the values from _axis to _btn:
input_l2_btn = "6"
input_r2_btn = "7"
Delete the retroarch directory for the appimage to start all over with the default settings
Create retroarch/autoconfig/udev/ directory (otherwise the autoconfig will be placed in retroarch/autoconfig/ in the next steps)
Open appimage 1.18.0
Run Settings->Input->User 1 Binds->User 1 Bind All
Run Settings -> Input -> RetroPad Binds -> Port 1 Controls -> Save Controller Profile
retroarch/autoconfig/udev/Sony Interactive Entertainment DualSense Wireless Controller.cfg generated:
input_driver = "udev"
input_device = "Sony Interactive Entertainment DualSense Wireless Controller"
input_vendor_id = "1356"
input_product_id = "3302"
input_b_btn = "0"
input_y_btn = "3"
input_select_btn = "8"
input_start_btn = "9"
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_a_btn = "1"
input_x_btn = "2"
input_l_btn = "4"
input_r_btn = "5"
input_l2_btn = "6"
input_r2_btn = "7"
input_l3_btn = "11"
input_r3_btn = "12"
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_r_x_plus_axis = "+3"
input_r_x_minus_axis = "-3"
input_r_y_plus_axis = "+4"
input_r_y_minus_axis = "-4"
I assigned hotkeys to L2 and R2 with fast-forward and rewind respectively, and tested them in a SNES game. They are working!
I closed RA. and edited udev/Sony Interactive Entertainment DualSense Wireless Controller.cfg by adding
input_l2_axis = "+2"
input_r2_axis = "+5"
I opened RA and tested L2 and R2 again in a SNES game. They are working!
With this the https://github.com/libretro/retroarch-joypad-autoconfig/commit/815072328d5d5ca469e30bb0a7d52896733b15e7 regression should be fixed by replacing _axis with _btn (because that is what RA generates). Can you modify it?:
input_l2_btn = "6"
input_r2_btn = "7"
There is nothing to modify.
We need
input_l2_axis = "+2"
input_r2_axis = "+5"
for proper trigger analog behavior.
Note that pressing an analog trigger in retroarch will automatically press its digital counterpart at the same time, so there is no reason to ever have
input_l2_btn = "6"
input_r2_btn = "7"
Thank you very much for taking your time, I appreciate it!
Afaik, that syntax you used is not correct :
input_xx_axis
in libretro autoconfigs is for axises and axises start with either a + or -. Retroarch allowing a mix ofinput_xx_axis
and digital indexes seems too lax and a bug to me.
Thank you, can you please document this in https://github.com/libretro/docs/blob/master/docs/guides/controller-autoconfiguration.md ?
On a sidenote, the reason why you must use jstest is because using the in-app feature of retroarch is unreliable for triggers on sony controllers (and maybe other brands). This is due to the digital indexes (6 & 7) and the analog indexes (+2 and +5) being both reported and retroarch apparently not knowing which ones it should prioritize for its config.
You need to comment why you modified these variables in the autoconfig file, for us to understand why the uploaded file looks differently than the autoconfig generated by RA. Otherwise, people will re-upload a new autoconfig file again in the future because they think it's "outdated".
Also, include the GitHub issue link (see Issue 2) in the comment.
I added some comments about this in the fixed autoconfig file. If it's not enough then i don't intend to pursue this issue further, i have already written enough libretro documentations/issues/code for a lifetime, but i don't have that kind of free time anymore.
Thank you very much for taking your time, I appreciate it!
Issue 1
Afaik, that syntax you used is not correct :
input_xx_axis
in libretro autoconfigs is for axises and axises start with either a + or -. Retroarch allowing a mix ofinput_xx_axis
and digital indexes seems too lax and a bug to me.Thank you, can you please document this in https://github.com/libretro/docs/blob/master/docs/guides/controller-autoconfiguration.md ?
I'll take care of it.
Issue 2
I found an active bug report on this issue
On a sidenote, the reason why you must use jstest is because using the in-app feature of retroarch is unreliable for triggers on sony controllers (and maybe other brands). This is due to the digital indexes (6 & 7) and the analog indexes (+2 and +5) being both reported and retroarch apparently not knowing which ones it should prioritize for its config.
* Can you please file a bug report and link it here? It's important.
Issue 3
You need to comment why you modified these variables in the autoconfig file, for us to understand why the uploaded file looks differently than the autoconfig generated by RA. Otherwise, people will re-upload a new autoconfig file again in the future because they think it's "outdated".
Also, include the GitHub issue link (see Issue 2) in the comment.
Thank you for solving this. Can you please add this link as references in your comments in the autoconfig file:
Done
Thank you very much for taking your time, I appreciate it!
Issue 1
Afaik, that syntax you used is not correct :
input_xx_axis
in libretro autoconfigs is for axises and axises start with either a + or -. Retroarch allowing a mix ofinput_xx_axis
and digital indexes seems too lax and a bug to me.Thank you, can you please document this in https://github.com/libretro/docs/blob/master/docs/guides/controller-autoconfiguration.md ?
I'll take care of it.
Done:
Thank you very much for taking your time, I appreciate it!
Issue 1
Afaik, that syntax you used is not correct :
input_xx_axis
in libretro autoconfigs is for axises and axises start with either a + or -. Retroarch allowing a mix ofinput_xx_axis
and digital indexes seems too lax and a bug to me.Thank you, can you please document this in https://github.com/libretro/docs/blob/master/docs/guides/controller-autoconfiguration.md ?
I'll take care of it.
Done:
* [Update controller-autoconfiguration.md -- Mapping sub-sections docs#951](https://github.com/libretro/docs/pull/951)
Here's the new guide how to use jstest:
input_l2_axis and input_r2_axis expect axises, hence should be using the analog indexes +2 & +5 instead of the digital indexes 6 & 7 Fix regression from https://github.com/libretro/retroarch-joypad-autoconfig/commit/815072328d5d5ca469e30bb0a7d52896733b15e7