Swapping joystick order issue
-
I'm using a Raspberrt Pi 3, RetroPie 4.3.9, my own install.
I've got two 8bitdo Bluetooth controllers setup for my RetroPie. They use different mapping values, for example select is "10" on one controller, "21" on the other. When I use the joystick selection script, the controllers are correctly reordered in the emulators, but the mapping itself does not carry along.
Is this expected? If it is, is there a clever way to change the mapping too?
@meleu Pinging your attention :)
-
@superrune paste here the output of this command:
ls /opt/retropie/configs/all/retroarch-joypads
-
Hi! Thanks for answering! Here's the content of the folder. Let me know if you need anything else...
pi@retropie:~ $ ls /opt/retropie/configs/all/retroarch-joypads 8Bitdo Joy.cfg 8Bitdo Joy.cfg.bak 8Bitdo SFC30 GamePad.cfg 8Bitdo SFC30 GamePad.cfg.bak
-
I have tried to do some more investigation, and I think the problem is related to the mapping itself. Not sure how to solve this, though, as there seems to be a conflict in how EmulationStation and Retroarch reads the controls.
In short, when I add a new stick using the EmulationStation menu, the mapping for the two 8bitdo controllers are basically the same. When I look into the files inside
\opt\retropie\configs\all\retroarch\autoconfig
, I see that the controllers have the same values for their inputs,input_1_btn
is6
on both. But that doesn't work in Retroarch, so I entered the Retroarch GUI and changed the binding, and Retroarch sets value11
to the same controller button.Now jstat gives me the same values as EmulationStation, where the ID is
6
for this button. So why does Retroarch give a different value? -
Taking the input values from the Retroarch GUI and manually entering them into the "8bitdo Joy.cfg" file solved the issue. I can now swap joystick and gamepad, and they both seem to work fine. So EmulationStation configures the the old 8bitdo arcade stick with the wrong values, I have to find out why.
-
OK, so I think I've solved this..
After spending some hours on the forum and github, I finally narrowed this down to a firmware issue with my 8bitdo FC30 Arcade Stick. There is very little mention of this stick and I did not realize I had to apply the 8bitdo hack for all firmware versions of this stick - but only when on Bluetooth.
(I had to downgrade this stick to 1.41 because of a bluetooth problem with 1.42. I initially thought 1.42 didn't need the 8bitdo hack, and 1.41 and below needed it. Turns out I was wrong.)
I also had to go into the source code to figure out exactly what the 8bitdo hack does! I could not find that written out anywhere. Many tutorials say "turn on the hack" or "turn off the hack", but never have I read why you do that and what it does. (For some reason, the source code use the variable name "atebitdo_hack", which made it tricky to find it as well!)
So if anyone else are interested. The 8bitdo hack takes all button input values and adds 11 to them, so button 10 becomes button 21. Button 11 becomes 22, and so on. Real simple. And this was exactly the problem I had with my input setup. So relieved to finally figure this out!
One thing I do not understand, is that the retroarch joypad autoconfig github seems to list these older values, but only in Bluetooth. If there is never a reason to turn off the hack for this controller in Bluetooth, could that not be hardcoded into RetroPie?
https://github.com/libretro/retroarch-joypad-autoconfig/blob/master/udev/8Bitdo_Arcade_F30_BT.cfg
Hope this is valuable to someone else :)
-
@superrune Nice find.
-
I did a little edit. Seems to be an issue with the 8bitdo FC30 Arcade Stick in bluetooth mode - but not in USB mode.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.