Question regarding Hotkeys [Pi3, RPv4.2]
-
Hello! I am finishing up my first build currently. Here are the details:
Raspberry Pi 3, model B - RetroPie V4.2 built from the pre-made microSD card image from here.
The PS is a 2.5A supply from Canakit.
Controls are arcade buttons and Sanyo joysticks run by a Xin-Mo USB controller; shows in ES as XIN-MO DUAL ARCADE CONTROLLER.
Only USB inputs are the XIN-MO and a keyboard (which will be removed once everything is up and running).
All game testing has been done on SNES ROMS, using lr-snes9x2010 emulator (I made no effort to pick an emulator. This is what the machine defaulted to.)My problem is that I can't get the hotkeys to work. (The only one I really need is the one to exit the emulator, so I don't need to either flip the power switch or reboot from Putty to get a different game up.)
More fundamentally, I don't really understand how the config files work together to make everything work.Once I had everything physically together, I had to poke around to get the P2 controls to work. It involved adding the "usbhid.quirks" string to the cmdline.txt file, followed by deleting the /opt/retropie/configs/all/emulationstation/es_input.cfg file. P2 only started working once I deleted that file and let the machine recreate it. Now, it appears to work perfectly... except for hotkeys.
I've been poking through the config files and I'm kind of confused. I have found five files that appear to have a bearing on the testing I'm doing. They are:
- /opt/retropie/configs/all/retroarch.cfg
the "main" cfg file - /opt/retropie/configs/all/retroarch-joypads/Xin-Mo Xin-Mo Dual Arcade.cfg
the file specific to the controller and the only controller-specific file in that retroarch-joypads directory - /opt/retropie/configs/all/emulationstation/es_input.cfg
the file specific to controls inside EmuStation - /opt/retropie/configs/all/emulationstation/es_temporaryinput.cfg
the... wait... what? - /opt/retropie/configs/snes/retroarch.cfg
file containing emulator specific commands
So, some observations on my part:
/opt/retropie/configs/snes/retroarch.cfg
- I shouldn't have to worry about this overriding anything, since it seems to make no changes, other than assigning which set of controls go to which player.
/opt/retropie/configs/all/emulationstation/es_input.cfg
/opt/retropie/configs/all/emulationstation/es_temporaryinput.cfg- how do these interact with retroarch? I was under the impression that these only control the controls in the EmuStation menus, but I had to delete es_input.cfg to get the machine to recognize the second player in the XIN-MO controller after adding the usbhid.quirks string to the cmdlime.txt file.
- Do I need to add hotkey definitions in es_input as well?
- Why does es_temporaryinput.cfg exist and what does it control? I notice that the es_input file only shows the button numbers for one player, and es_temporaryinput shows the button values for the other player. Are they supposed to be split into two files like this?
/opt/retropie/configs/all/retroarch-joypads/Xin-Mo Xin-Mo Dual Arcade.cfg
- This only shows button values for one player, but has input_hotkey_<etc...> entries.
/opt/retropie/configs/all/retroarch.cfg
-
This has entries for input_player1_<fill in the blank>_btn = and input_player2_<fill in the blank>_btn =, but the button values are identical for P1 and P2, (values 0-7)...
Why is it like that and how is it that I can play 2P games if it's mapping the buttons like this? -
This also has entries for input_player1_<fill in the blank> = (no "_btn").
This must specify keyboard input? I say that because all the values in these entries are keyboard entries. Is that why there is a "input_hotkey_enable" and a "input_hotkey_enable_btn"?
I think the input_..._btn entries must point at the "RetroPad", but which controller gets assigned as the default, (since there's only one set of "input_player1..._btn" entries? Is that a string in retroarch.cfg somewhere?
Complete copy of all code from the above listed files can be found here if you want to wade through it. If you think another file is important, let me know and I will produce that code as well.
General Questions
If there was a conflict in the code where something was overwriting the hotkey inputs, where would you check first, and is there a hierarchy of what overpowers everything else?Is there a setting that kills hotkeys altogether in some other cfg file in the image? (Am I not even looking in the right place?)
I tried to R all the F-ing Ms I could find, so if anyone can point me at docs that answer this, I'll both be grateful and apologize for lack of due diligence.
You have a good community here. I appreciate any direction you can give me.
Thanks,
Mike - /opt/retropie/configs/all/retroarch.cfg
-
@chuuken have you read the docs? See this link: RetroArch HotKeys
The default hot keys set up for the retroarch emulators is select and start pushed together. In my experience this only works on the first player controllers with the default settings. If you set up your first player controller with the input configuration the hot keys should have worked on the first player controller without any edits required. From the sounds of your post, the first player controller worked, but the second player gave you issues.
-
Aye. I have never had the hotkeys function. This includes when only P1 was working. I also have never been able to get the hotkeys to work on the Keyboard. It makes me think I'm missing something outside of the .cfg files I mentioned. I've been working on this specific problem for about a week, but I have 3 kids and the oldest is 5... I'm not allowed many consecutive minutes to focus on any given thing unless it's them or directly related to them.
I have read all of the docs on retropie, I don't think the answer is in there, unless I'm just not reading them right because my problem has me looking at them wrong.
Reading that group again, I see that the question of hierarchy is addressed there, so it's possible I just need to look at things more broadly.I will work on it more tonight and post any progress made.
-
Well, the main problem has been solved.
User error was the problem, (as expected). The thing that broke the dam was figuring out that the input_..._btn entries were for the controls vs. input_...(no _btn) entries. When I looked closer, I figured out I didn't have a complete set of hotkey inputs for the keyboard or the controller in the .../all/retroarch.cfg file.
So that is sorted. I still would like to know the answers to the other questions, but I can live with this.
Thanks!
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.