Help with fixing controls changing
-
@Hyperxil said in Help with fixing controls changing:
The problem gets fixed when i re configure them in the emulation station
Do I understand you correctly, that the controls of both players are right at first in ES, then get messed up in a game, then are still messed up in ES until you re-configure them?
The photos only show one of the encoders. Your answer didn't say exactly if you checked that the wiring is exactly the same on both encoders. Did you do that?
The reason for identical wiring is that Retropie stores control settings under the name of the device in the directory
/opt/retropie/configs/all/retroarch/autoconfig/
. Thus, if you have two devices of the same name, they both use the same config file. If they are wired differently, the joystick and/or button configuration of one of them will be messed up when you configure the other one.That said, if both joysticks and all of the buttons for both players work identically in Emulation Station at the same time, the wiring should be okay. Is that the case?
Here's the link to that thread but i don't really understand what to do -> https://www.raspberrypi.org/forums/viewtopic.php?t=164176
That thread is from 2016. It may be that the bug mentioned there was fixed since then. I didn't hear about it since I joined the Retropie community in November 2017, but I may have just missed it.
-
@Clyde Your correct about that. (How do you quote a sentence from someone's response?)
Do you mean the wires from the buttons hooked up both in the same slots in each usb encoder? I don't think they are in the same order. Also i just remembered, player 1 or the left side of controls has a hotkey button linked to it and the other side doesn't. (I'll upload some more photos to the same link). You said about the same names for them, your right because when i went to change the order of the controllers they were the same name and took me a while to figure out which was player 1 and 2.
I've opened the file you said and there's 4 files (photo).
So, do i have to wire the buttons in the same position/slot in each usb encoder and what about the hotkey button, i only have 1 linked to player 1?
And how do i fix the controls so that they don't change? -
@rbaker Okay so i was looking at the wrong file that's why i was getting confused, so i think i understand what it says but would i have to insert the configurations for each emulator or is there a global file i can change?
-
@Hyperxil said in Help with fixing controls changing:
is there a global file i can change
Did you read the links I quoted? They explain it all. Here it is again. All the instructions are in the docs.
-
@Hyperxil said in Help with fixing controls changing:
@Clyde Your correct about that. (How do you quote a sentence from someone's response?)
You just put or leave a
>
at the start of the line.Do you mean the wires from the buttons hooked up both in the same slots in each usb encoder? I don't think they are in the same order.
Then we may have found a possible problem. As I said, if you wire identically named encoders differently, you can't get both of their controls right (at least not with ES' auto configuration), because they share the same configuration file with only one set of button assignments, which is based on the slots on the encoder.
(edit: If you look at the "DragonRise …" file, you'll see numbers assigned to the functions. These are the numbers of the slots on your encoder. Thus, the same button must be wired to the same slot on both of them to activate the same function.)
So, do i have to wire the buttons in the same position/slot in each usb encoder and what about the hotkey button, i only have 1 linked to player 1?
Yes, you should do that. If you have only one hotkey button, you should wire it to a slot on the encoder that isn't used on the other encoder. (Logically, it only can go there if you wire all other buttons to the same slots on both encoders.)
And how do i fix the controls so that they don't change?
One step at a time. Wire both encoders identically (i.e. the same button to the same slot) and then check what problems remain, if any.
A quick comment about your last photo: You may be able to grab the "|" before „Date modified“ and move it to the right to widen the view of the file names and show them completely, so you don't have to comment on the file extensions. The truncated names don't matter much at the moment, but they could in other situations. So, it's better to learn doing it properly now than later. :)
By the way, the files with the
.bak
extensions are just automatically created backups files (bak stands for backup). So, you can ignore them as long as you don't want to correct a faulty new file. Just in case you didn't know that. -
A quick comment about your last photo: You may be able to grab the "|" before „Date modified“ and move it to the right to widen the...
Yeah thanks about that i forgot how to do it but i got it know :)
By the way, the files with the
.bak
extensions are just automatically created backups files (bak stands for backup). So, you can ignore them as long as you don't want to correct a faulty new file. Just in case you didn't know that.Are the files meant to have different codes? I checked both files and one of them has extra lines:
This is for the one with .bak
input_device = "DragonRise Inc. Generic USB Joystick "
input_driver = "udev"
input_start_btn = "1"
input_exit_emulator_btn = "1"
input_down_axis = "-1"
input_right_axis = "-0"
input_state_slot_increase_axis = "-0"
input_select_btn = "0"
input_left_axis = "+0"
input_state_slot_decrease_axis = "+0"
input_up_axis = "+1"
input_a_btn = "4"
input_b_btn = "5"
input_reset_btn = "5"
input_enable_hotkey_btn = "6"
input_x_btn = "2"
input_menu_toggle_btn = "2"
input_y_btn = "3"This is the one without the bak, i.e .cfg
input_device = "DragonRise Inc. Generic USB Joystick "
input_driver = "udev"
input_start_btn = "1"
input_down_axis = "-1"
input_right_axis = "-0"
input_select_btn = "0"
input_left_axis = "+0"
input_up_axis = "+1"
input_a_btn = "4"
input_b_btn = "5"
input_x_btn = "2"
input_y_btn = "3"Wire both encoders identically (i.e. the same button to the same slot) and then check what problems remain, if any.
Good news! Both controls work after i did this thanks! I tested out player 1 and 2 and they seem to work fine. But the hotkey button doesn't seem to work with any kind of button combination with neither player 1 nor 2. It works on my keyboard when i press the hotkey and start but not with the controls.
The wires are wired both the same except player 1 has the hotkey button wired after all the other ones.
Did you read the links I quoted? They explain it all. Here it is again. All the instructions are in the docs.
I did but i don't get it :/ When i go into those files i can't seem to find what they are describing in that article. Anyways doesn't matter if what i have done so far works then i won't need to worry about that. Thanks anyways
-
@Hyperxil said in Help with fixing controls changing:
Are the files meant to have different codes?
Only if you did configure this controller a second time differently from the first time. The .bak file should just be the .cfg file from before the current .cfg file. In other words, each time you configure a controller, its .cfg file should be renamed to .cfg.bak and the new configuration will be saved in a new .cfg file. (I hope I could make myself sufficiently clear, since English isn't my native language.)
I checked both files and one of them has extra lines:
That is strange, because the current configuration (.cfg) has more button mappings than the older one (.cfg.bak), including a hotkey button which the current .cfg file is lacking.
I suspect that you configured the second joystick the last time. That one doesn't have a hotkey button, so you may have skipped it and saved that configuration as the current one. Since both encoders share the same configuration file, you would end up with a configuration without a hotkey button. Do I assume correctly?
You should re-configure one of the controllers including the hotkey, carefully avoiding to skip any button you don't want to skip. And then you could show us the contents of
the .cfg file (without .bak at the end)edit: both files again.The wires are wired both the same except player 1 has the hotkey button wired after all the other ones.
Does the button work at all? You could check that by switching it with one of the other ones, just to see if the problem is caused by a faulty button or wire.
-
@Hyperxil said in Help with fixing controls changing:
But the hotkey button doesn't seem to work with any kind of button combination with neither player 1 nor 2
The hotkey is enabled only for player1. As @Clyde said, you re-configured the same type of gamepad by mapping the 2nd controller, eliminating the hotkey. Since both controllers use the same config file (that's why you had to wire them identically), it's enough to configure only the P1 controller - including mapping the hotkey - and the 2nd one will automatically be also configured.
-
Thanks so much for all the help! It finally works!
I suspect that you configured the second joystick the last time. That one doesn't have a hotkey button, so you may have skipped it and saved that configuration as the current one. Since both encoders share the same configuration file, you would end up with a configuration without a hotkey button. Do I assume correctly?
You should re-configure one of the controllers including the hotkey, carefully avoiding to skip any button you don't want to skip. And then you could show us the contents of the .cfg file >>(without .bak at the end) edit: both files again.
Yeah i did that and it worked! :)
One last thing, some of the audio doesn't sound that good in some games. Like in super mario kart 64 the audio sounds really bad but in other games such as galaga the audio is fine.
-
@Hyperxil N64 emulation is finicky and a bit taxing on the PI, don't expect it to be perfect. What emulator are you using for N64 ?
-
@Hyperxil said in Help with fixing controls changing:
Thanks so much for all the help! It finally works!
I'm pleased to hear that. Have fun.
One last thing, some of the audio doesn't sound that good in some games.
If this isn't dealt with in a few posts, it may be better if you open a new thread about it, because it has nothing to do with the title of this one, and other potential helpers may see it in the unread posts of the forum this way.
edit:
@mitu By the way, I didn't know that the hotkey is only enabled for the first controller. Instead, I assumed that @Hyperxil skipped it voluntarily, because his second controller doesn't have that button. I never noticed it in my own Retropie, because I only ever configured the first controller, not the identical second one. Thanks to you, I've learned that now. :) -
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.