Emulationstation Controller Button Mapping Question...
-
Why does this current version of emulationstation for the Pi 5 treat controllers like XBOX 360 and PS2 Dual Shock differently? For example, when I configure the inputs, this is what I get:
XBOX 360:
START - Button 7
SELECT - Button 6
East - Button 1
South - Button 0
North - Button 3
West - Button 2
L - Button 4
R - Button 5
LT - Axis 2+
RT - Axis 5+
L Thumb - Button 9
R Thumb - Button 10PS3 Dual Shock:
START - Button 9
SELECT - Button 8
East - Button 1
South - Button 0
North - Button 2
West - Button 3
L - Button 4
R - Button 5
LT - Axis 2+
RT - Axis 5+
L Thumb - Button 11
R Thumb - Button 12WiiU Pro Controller:
START - Button 9
SELECT - Button 8
East - Button 1
South - Button 0
North - Button 2
West - Button 3
L - Button 4
R - Button 5
LT - Button 6
RT - Button 7
L Thumb - Button 11
R Thumb - Button 12So the START & SELECT buttons are assigned to different button numbers. Retroarch doesn't seem to mind but if I'm using a stand alone core like Hypseus I can no longer use START + SELECT for the same functionality on the PS2 controller as I can on the XBOX 360.
I never had this issue on any of my Pi 4 builds.
I'm currently using emulationstation V2.11.2RP on a Pi 5.
My retropie setup script is at 4.8.7
-
@TPR said in Emulationstation Controller Button Mapping Question...:
Why does this current version of emulationstation for the Pi 5 treat controllers like XBOX 360 and PS2 Dual Shock differently?
...Because they are different controllers and - as you have posted - their button numbers are different. Plus, don't assume that things like D-Pad/Hat are uniformily reported, some controllers report the D-Pad as axis, others are reporting them as hats, etc.
...Retroarch doesn't seem to mind but if I'm using a stand alone core like Hypseus I can no longer use START + SELECT for the same functionality on the PS2 controller as I can on the XBOX 360.
Hypseus is not automatically configured by EmulationStation, but you have to do this manually. See the docs page for Daphne for how to do that - though in your case you can map one controller and the others will not be able to use the same configuration and work the same since they have different input code reported for Start/Select.
-
@mitu So is this a change from previous versions of emulationstation?
In my past versions, all the controllers I mentioned above treat START/SELECT and BACK/START as the same number for the buttons. I guess I just don't understand why the change. It's not like the number of buttons on the face of the controller has changed. They are the same with all those examples.
So in the past build if I went from an xbox to a PS3 for example, I didn't need to go edit my Hypseus controller config because it "just worked" since all the button numbers were the same.
It just seems odd now that the 360 controller would have a different button number for Back/Start than the PS3 does for Start/Select.
If there's nothing that can be done, I can live it, just seems like an odd thing to have changed, that's all.
-
@TPR said in Emulationstation Controller Button Mapping Question...:
@mitu So is this a change from previous versions of emulationstation?
No, nothing has changed here. Take a look at your previous
es_input.cfg
and see how the button numbers are configured there.Also, we don't have - and never had - a Hypseus auto-mapping script, so I don't see how any new controller would 'just work' in it without being configured. Maybe Hypseus comes with a generic Xbox 360 configuration file pre-configured and that's how it worked before ?
-
@mitu So I just did a quick test on my previous Pi 4 build...
Connected my XBOX 360 controller, loading up Astron Belt on Hypseus, pressed BACK to select coins and START to start the game.
Disconnected that controller, then connected the PS3...
Same thing... Astron Belt... SELECT to add coins, START to start the game.
If I look at the configure input on ES, both controllers see the SELECT/START buttons as the same button number.
So no matter what controller I connect, Hypseus "just works."
If I go back to my Pi 5 build, it no longer works.
I'm not trying to argue so I apologize if I come across that way, I'm just trying to understand it. I don't get why these two controllers, which have the same number of buttons, are being treated differently in ES for my Pi 5 build than they are with the previous version of ES on my Pi 4 build.
And that change creates a knock on effect of having to edit the Hypseus controller config file for the different controller where I didn't have to do that before.
To me this seems like an issue. Is it not?
-
@TPR said in Emulationstation Controller Button Mapping Question...:
To me this seems like an issue. Is it not?
No, it's not.
The fact that it worked before (i.e. the input codes for Start/Select buttons were the same) is just a coincidence. Take a look at the various controller profiles that RetroArch has (here) and you'll see that there is no uniform mapping for the input codes and each gamepad/controller has it's own numbering and order. -
@mitu On my Pi 4 build, this is how my XBOX 360 controller looks in es_input.cfg:
<inputConfig type="joystick" deviceName="Microsoft X-Box 360 pad" deviceGUID="030000005e0400008e02000020010000">
<input name="rightanalogup" type="axis" id="3" value="-1"/>
<input name="pageup" type="button" id="4" value="1"/>
<input name="rightanalogdown" type="axis" id="3" value="1"/>
<input name="up" type="hat" id="0" value="1"/>
<input name="left" type="hat" id="0" value="8"/>
<input name="select" type="button" id="8" value="1"/>
<input name="rightanalogleft" type="axis" id="2" value="-1"/>
<input name="leftanalogdown" type="axis" id="1" value="1"/>
<input name="leftanalogright" type="axis" id="0" value="1"/>
<input name="right" type="hat" id="0" value="2"/>
<input name="leftanalogleft" type="axis" id="0" value="-1"/>
<input name="rightanalogright" type="axis" id="2" value="1"/>
<input name="pagedown" type="button" id="5" value="1"/>
<input name="leftanalogup" type="axis" id="1" value="-1"/>
<input name="y" type="button" id="2" value="1"/>
<input name="x" type="button" id="3" value="1"/>
<input name="down" type="hat" id="0" value="4"/>
<input name="start" type="button" id="9" value="1"/>
<input name="b" type="button" id="0" value="1"/>
<input name="a" type="button" id="1" value="1"/>
</inputConfig>The EXACT SAME controller connected to the Pi 5 looks like this:
<inputConfig type="joystick" deviceName="Xbox 360 Controller" deviceGUID="030003f05e0400008e02000020010000">
<input name="rightanalogdown" type="axis" id="4" value="1"/>
<input name="left" type="hat" id="0" value="8"/>
<input name="rightanalogleft" type="axis" id="3" value="-1"/>
<input name="right" type="hat" id="0" value="2"/>
<input name="pagedown" type="button" id="5" value="1"/>
<input name="down" type="hat" id="0" value="4"/>
<input name="rightanalogup" type="axis" id="4" value="-1"/>
<input name="pageup" type="button" id="4" value="1"/>
<input name="rightanalogright" type="axis" id="3" value="1"/>
<input name="y" type="button" id="2" value="1"/>
<input name="x" type="button" id="3" value="1"/>
<input name="b" type="button" id="0" value="1"/>
<input name="a" type="button" id="1" value="1"/>
<input name="up" type="hat" id="0" value="1"/>
<input name="select" type="button" id="6" value="1"/>
<input name="start" type="button" id="7" value="1"/>
<input name="leftanalogright" type="axis" id="0" value="1"/>
<input name="leftanalogup" type="axis" id="1" value="-1"/>
<input name="leftanalogdown" type="axis" id="1" value="1"/>
<input name="leftanalogleft" type="axis" id="0" value="-1"/>
</inputConfig>So why the change between one version of ES and the other? This breaks other things. Daphne, MAME, or any other stand alone core that has START & SELECT hard coded.
I just want to know why this isn't a concern or considered a bug?
-
So why the change between one version of ES and the other? This breaks other things. Daphne, MAME, or any other stand alone core that has START & SELECT hard coded.
How exactly does it break it ? If you're starting from scratch, the new configuration(s) generated from EmulationStation should be generated based on the new values. Do not expect to copy/paste your existing configs from the Pi4 to the new OS and to work just the same.
I just want to know why this isn't a concern or considered a bug?
I just explained in my previous post why.
EDIT: You may actually by impacted by the changes in the
xpad
Linux driver, which is used by your Xbox 360 gamepad. See here for the changes and why it changed here. -
@mitu said in Emulationstation Controller Button Mapping Question...:
So why the change between one version of ES and the other? This breaks other things. Daphne, MAME, or any other stand alone core that has START & SELECT hard coded.
How exactly does it break it ? If you're starting from scratch, the new configuration(s) generated from EmulationStation should be generated based on the new values. Do not expect to copy/paste your existing configs from the Pi4 to the new OS and to work just the same.
I'm not copy/pasting from one es_input to the other. It breaks it because the number assigned is different between the two versions of ES. I have three different controllers that I often use and on my Pi 4 build Start/Select are mapped the same in ES. Now all of a sudden on the Pi 5 they are different so now the same buttons don't work any longer.
I guess I was just expecting more consistency between versions, that's all?
-
@mitu said in Emulationstation Controller Button Mapping Question...:
EDIT: You may actually by impacted by the changes in the
xpad
Linux driver, which is used by your Xbox 360 gamepad. See here for the changes and why it changed here.Reading now...
-
@mitu said in Emulationstation Controller Button Mapping Question...:
EDIT: You may actually by impacted by the changes in the
xpad
Linux driver, which is used by your Xbox 360 gamepad. See here for the changes and why it changed here.Following these instructions fixed it!
echo "options xpad triggers_to_buttons=1" | sudo tee /etc/modprobe.d/xpad.confTHANK YOU!!!
-
@TPR said in Emulationstation Controller Button Mapping Question...:
I guess I was just expecting more consistency between versions, that's all?
I think there's enough consistency.
Things change and at some point we have to adapt to those changes - you've complained for the entire topic that you can't copy your old configs even after I explained that you should re-configure again your controllers. I understand you'd like to just copy/paste your old configs and things to work 'as before', but that's not always an option and you should be able to understand that.
-
@mitu said in Emulationstation Controller Button Mapping Question...:
You've complained for the entire topic that you can't copy your old configs even after I explained t>hat you should re-configure again your controllers.-
I wasn't complaining. I was asking questions to help me better understand why things changed.
-
I wasn't copy/pasting anything. Everything I did was set up on a completely new vanilla build on the Pi 5 from scratch.
@mitu said in Emulationstation Controller Button Mapping Question...:
I> understand you'd like to just copy/paste your old configs and things to work 'as before', but t>hat's not always an option and you should be able to understand that.100% do understand that. What I didn't understand is why functionality on a previous version of ES and RetroPie worked one way, but it did not on the current version. There was no copying of anything involved.
The answer, which you pointed me in the direction and I thank you for that, was here:
https://retropie.org.uk/docs/Xbox-360-Controller/#xpad-driver-options*Xpad driver options
The xpad kernel module has the option to interpret the shoulder triggers as button inputs instead of treating the trigger as Axis type inputs. This kind of configuration was default in RetroPie until April 2024 to fix an incompatibility with older EmulationStation version, but since this configuration causes conflicts with SDL's gamepad mappings for Xbox wired controllers, it has been removed.If you wish to retain the previous behavior or to fix the detection of buttons for gamepads that just mimic an Xbox 360 controller (in order to maintain compatibility with Windows), then running the following command will add back the 'trigger to buttons' option to the xpad configuration:
echo "options xpad triggers_to_buttons=1" | sudo tee /etc/modprobe.d/xpad.conf
After the command is executed, reboot the system or reload the xpad driver in order for the xpad configuration to be applied.*
End of the day, I don't think I was "wrong." There WAS IN FACT A CHANGE which made certain things not work like they did before. Again, that wasn't because I had copied something, that was just functionality that no longer worked the same.
Once you pointed me into the direction of the xpad change, that resolved everything.
Again... not complaining.
and thank you for the help.
it was exactly what I was looking for.
-
-
@TPR said in Emulationstation Controller Button Mapping Question...:
Following these instructions fixed it!
echo "options xpad triggers_to_buttons=1" | sudo tee /etc/modprobe.d/xpad.confTHANK YOU!!!
Does this no longer work? I have that in my xpad.conf but now my triggers are still coming up like this:
Is there a way to make the triggers act like button again? -
@TPR said in Emulationstation Controller Button Mapping Question...:
Is there a way to make the triggers act like button again?
Nothing has changed for
xpad
in RetroPie, the setting/option for the triggers interpreted as buttons should still work. -
@mitu said in Emulationstation Controller Button Mapping Question...:
@TPR said in Emulationstation Controller Button Mapping Question...:
Is there a way to make the triggers act like button again?
Nothing has changed for
xpad
in RetroPie, the setting/option for the triggers interpreted as buttons should still work.Weird so in my xpad.conf I have this:
options xpad triggers_to_buttons=1
This is where it is located:
And my right and left triggers come up as Axis 2+ and Axis 5+
Any idea why?
EDIT here is the contents of my Xbox 360 Controller.cfg file:
input_device = "Xbox 360 Controller"
input_driver = "udev"
input_vendor_id = "1118"
input_product_id = "654"
input_r_y_plus_axis = "+4"
input_r_y_plus_axis_label = "Right Analog Y+"
input_left_btn = "h0left"
input_left_btn_label = "D-Pad Left"
input_state_slot_decrease_btn = "h0left"
input_r_x_minus_axis = "-3"
input_right_btn = "h0right"
input_right_btn_label = "D-Pad Right"
input_state_slot_increase_btn = "h0right"
input_r_btn = "5"
input_r_btn_label = "RB"
input_save_state_btn = "5"
input_down_btn = "h0down"
input_down_btn_label = "D-Pad Down"
input_r_y_minus_axis = "-4"
input_r_y_minus_axis_label = "Right Analog Y-"
input_l_btn = "4"
input_l_btn_label = "LB"
input_load_state_btn = "4"
input_r_x_plus_axis = "+3"
input_y_btn = "2"
input_y_btn_label = "X"
input_x_btn = "3"
input_x_btn_label = "Y"
input_menu_toggle_btn = "3"
input_b_btn = "0"
input_b_btn_label = "A"
input_reset_btn = "0"
input_a_btn = "1"
input_a_btn_label = "B"
input_up_btn = "h0up"
input_up_btn_label = "D-Pad Up"
input_select_btn = "6"
input_select_btn_label = "Back"
input_l3_btn = "9"
input_l3_btn_label = "Left Thumb"
input_start_btn = "7"
input_start_btn_label = "Start"
input_exit_emulator_btn = "7"
input_l_x_plus_axis = "+0"
input_l_x_plus_axis_label = "Left Analog X+"
input_l_y_minus_axis = "-1"
input_l_y_minus_axis_label = "Left Analog Y-"
input_enable_hotkey_btn = "6"
input_l2_axis = "+2"
input_l2_axis_label = "LT"
input_r2_axis = "+5"
input_r2_axis_label = "RT"
input_l_y_plus_axis = "+1"
input_l_y_plus_axis_label = "Left Analog Y+"
input_r3_btn = "10"
input_r3_btn_label = "Right Thumb"
input_l_x_minus_axis = "-0"
input_l_x_minus_axis_label = "Left Analog X-" -
@TPR said in Emulationstation Controller Button Mapping Question...:
Any idea why?
Is the RetroPie
xpad
driver installed ? The defaultxpad
driver applies this option only for very few gamepad models. -
@mitu said in Emulationstation Controller Button Mapping Question...:
@TPR said in Emulationstation Controller Button Mapping Question...:
Any idea why?
Is the RetroPie
xpad
driver installed ? The defaultxpad
driver applies this option only for very few gamepad models.I believe so?
And I'm using an original OEM Microsoft controller:
-
Try re-installing it.
EDIT: did you userpi-update
to update the kernel/firmware ? -
@mitu said in Emulationstation Controller Button Mapping Question...:
EDIT: did you use
rpi-update
to update the kernel/firmware ?
I don't think so? Was I supposed to? That doesn't sound familiar to me.
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.