Controller works fine in RetroPie UI but not in games (and retroarch config looks okay?)
-
I have a fresh install of RetroPie 4.4 running on a Pi Zero W. I've run through the input configuration without a problem, and I can navigate the UI just fine. However, if I start a game (using
mame4all
), I can't control the game. I can't even exit the game.I'm using a Logitech F310 controller. I've configured the "Logitech" button in the middle as the hotkey; that's button 8. The generated
es_input.cfg
looks like this:<?xml version="1.0"?> <inputList> <inputAction type="onfinish"> <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command> </inputAction> <inputConfig type="joystick" deviceName="Logitech Gamepad F310" deviceGUID="030000006d0400001dc2000014400000"> <input name="pageup" type="button" id="4" value="1"/> <input name="start" type="button" id="7" value="1"/> <input name="down" type="hat" id="0" value="4"/> <input name="pagedown" type="button" id="5" value="1"/> <input name="right" type="hat" id="0" value="2"/> <input name="select" type="button" id="6" value="1"/> <input name="left" type="hat" id="0" value="8"/> <input name="up" type="hat" id="0" value="1"/> <input name="a" type="button" id="0" value="1"/> <input name="b" type="button" id="1" value="1"/> <input name="x" type="button" id="2" value="1"/> <input name="y" type="button" id="3" value="1"/> </inputConfig> </inputList>
And the corresponding
~/.config/retroarch/autoconfig/Logitech Gamepad F310.cfg
looks like this:input_device = "Logitech Gamepad F310" input_driver = "udev" input_r_y_plus_axis = "+4" input_r_x_minus_axis = "-3" input_l_btn = "4" input_load_state_btn = "4" input_start_btn = "7" input_exit_emulator_btn = "7" input_r_y_minus_axis = "-4" input_down_btn = "h0down" input_l_x_plus_axis = "+0" input_r_btn = "5" input_save_state_btn = "5" input_right_btn = "h0right" input_state_slot_increase_btn = "h0right" input_select_btn = "6" input_left_btn = "h0left" input_state_slot_decrease_btn = "h0left" input_l3_btn = "9" input_l_y_minus_axis = "-1" input_up_btn = "h0up" input_a_btn = "0" input_b_btn = "1" input_reset_btn = "1" input_enable_hotkey_btn = "8" input_l_y_plus_axis = "+1" input_r3_btn = "10" input_x_btn = "2" input_menu_toggle_btn = "2" input_l_x_minus_axis = "-0" input_y_btn = "3" input_r_x_plus_axis = "+3"
The mappings here look fine, but according to the docs I should, using these mappings, be able to hold the "Logitech" button and "start" to exit the emulator. I can confirm using
jstest
that buttons 7 and 8 areon
when I do this, but it has no impact on the running game.What have I missed?
-
Hmm, reading through this doc it suggests that the only way to configure mame4all is with a keyboard...but it doesn't actually say that explicitly. If I do that, does the configuration persist for all mame4all games? Or just for the specific game that is running at the time?
Time to find a hub, I guess.
-
@larsks mame4all does not use the retroarch bindings, you need to bind your keys manually for it. Connect a keyboard, press tab and configure your input in the menu that will show up.
The only emulators that will have controls setup from ES are the libretro ones (they follow lr-* naming convention).
BTW, how does the Logitech F310 feel like, especially the dpad? I am tempted to grab one :)
Edit: Just read your second post. Yes, once setup, the configuration should persist in all mame4all games (there might be special saving option for per game and input in general in the menu, don't remember, haven't used non-libretro mame in years.)
-
@cybrasty said in Controller works fine in RetroPie UI but not in games (and retroarch config looks okay?):
Connect a keyboard, press tab and configure your input in the menu that will show up.
Do you know where this configuration gets stored? I'm currently running on a Pi Zero, so I can't plug in both a keyboard and a controller at the moment. I'm wondering if I can just manually create the configuration with a text editor. I guess the alternative is to just boot this sd card on another pi that has multiple usb ports and then put it back when configured...
BTW, how does the Logitech F310 feel like, especially the dpad? I am tempted to grab one :)
I'm not really a controller connoisseur...I would say it has a little more play in it than the ones on the Xbox One controllers I have in the other room, but seems to work just fine.
-
Well, that sort of worked. I've booted the sd card on my Pi 2, which allows me to connect both the gamepad and a keyboard and enter the mame4all configuration screens. I've been able to add mappings for the ui cancel, insert coin, and player 1 start options. Great! But I wanted to use the dpad to control these games, rather than the analog stick.
Unfortunately, mame4all doesn't appear to recognize the dpad? When I try to configure an input control, I can hold down the dpad for as long as I want and mame4all will never notice. The dpad is axes 6 (horizontal) and 7 (vertical). Is this something other folks have encountered?
I can (re-)map the analog stick, which shows up as e.g. "JoyAxis 1-" and "JoyAxis 1+". Does mame4all not support more than 4 axes or something?
-
@larsks I don't use mame4all, so I can't say for sure about the axis, hopefully someone else will be able to.
What might help is binding the arrow keys to input control in mame4all. Technically, if your up/down/left/right is bound to dpad in emulation station, it should also translate dpad input to arrow keys. This is how you are able to navigate the menus like retropie-setup with a controller. You might need to run joy2key by hand before launching mame4all. Not sure.
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.