Seeking a List of Variable Names for Hard Coding a controller configuration file
-
First, because I know this'll be the first solution people will suggest, I've already been to retropie.org.uk/docs/RetroArch-Configuration/. That doesn't have what I'm looking for.
The short of it is I want to find a complete list of acceptable variable names for those who want to hard code controller configurations into a particular system's retroarch.cfg. The reason why the above link doesn't work for my purpose is that, though it gives details for an snes controller, things like an xbox one's two sticks or the c-stick of an n64 controller aren't convered. Here's what I've already tried:
I've poured over the github docs as well as those on this site but have not found a clear answer. I've also tried exploring the source code for retro-arch, the thing thatgoverns how controllers interact with the installed emulators. I was able to find a list of variable names that seemed like they might work but, upon testing them out, did not. By testing them out here I mean opening up the n64's configuration via the following filepath and entering in the code that should have worked:
opt/retropie/configs/n64/retroarch.cfg
Now the following are all the variable names I was able to divine from the auto configuration file automatically generated by my retropie when I first set up my xbox one controller. I've also included the values I assigned them when trying out this solution to my problem. As nothing I've read stated the values needed to be in quotes or that the lines had to end in semi-colons I've not done so. Additionally I've formatted it for this post so any line that starts with \ is just meant as a descriptor for a block of code's intended purpose. In the actual .cfg file they aren't there:
\ For d-pad:
input_player1_up = -5
input_player1_down = +5
input_player1_left = -4
input_player1_right = +4\ For left stick:
input_player1_l_y_minus = -1
input_player1_l_y_plus = +1
input_player1_l_x_minus = -0
input_player1_l_x_plus = +0\ For right stick:
input_player1_r_y_minus = -3
input_player1_r_y_plus = +3
input_player1_r_x_minus = -2
input_player1_r_x_plus = +2\ For Face Buttons:
input_player1_select = 8
input_player1_start = 9
input_player1_y = 2
input_player1_x = 3
input_player1_b = 0
input_player1_a = 1\ For shoulder buttons
input_player1_r_btn = 5
input_player1_l_btn = 4
input_player1_l2 = 6
input_player1_r2 = 7\ For R3 and L3
input_player1_l3 = 11
input_player1_r2 = 12\ For the xbox button so it can toggle the emulator menu:
input_menu_toggle = 10The reason I want to go this route rather than through retro-pie's auto config is because if I can understand this from a coding level then I can create all kinds of crazy controller schemes and have even more fun with it. Now I've been at this for about a week, have come up empty, and am posting as a last resort. Am I on the right track, is there a list someone else has posted that'll give me what I'm after, or something else I've not yet considered? Thanks for reading and assisting if you're able.
-
@FFSamurai05 im confused with your config. Only l and r will work on a controller as they are the only ones assigned to a _btn or _axis. All the rest are assigned to keyboard keys. And a keyboard doesnt have + & - axis keys.
-
@FFSamurai05 also you can assign any button or axis to any button or axis. If you want the a button to be on an axis it would be something like this:
input_player1_a_axis = -1
Or for axis to be on a button:
input_player1_r_x_plus_btn = 1
Or a hat on an axis
input_player1_r_x_minus_btn = h0left
Also you can have an axis and a btn that do the same thing assigned at the same time. I use this to have both an axis and the dpad work at the same time:
input_player1_a_axis = -1 input_player1_a_btn = 0
-
Thanks for all of the help with this but after trying to add _btn to the end of each variable name it still doesn't quite work. I've also tried erasing _player1 from the variables name but still to no effect. Here's a copy of my retroarch.cfg file for the n64 controller in case it may help. Sorry that the first line is so large, for some reason the forums make it appear that way:
Settings made here will only override settings in the global retroarch.cfg if placed above the #include line
input_remapping_directory = "/opt/retropie/configs/n64/"
input_player1_up_axis = -5
input_player1_down_axis = +5
input_player1_left_axis = -4
input_player1_right_axis = +4
input_player1_l_y_minus_btn = -1
input_player1_l_y_plus_btn = +1
input_player1_l_x_minus_btn = -0
input_player1_l_x_plus_btn = +0
input_player1_a_btn = 6
input_player1_b_btn = 8
input_player1_x_btn = 7
input_player1_r_btn = 5
input_player1_l_btn = 4
input_player1_start_btn = 9
input_player1_r_y_minus_btn = 0
input_player1_r_y_plus_btn = 2
input_player1_x_minus_btn = 3
input_player1_r_x_plus_btn = 1#include "/opt/retropie/configs/all/retroarch.cfg"
-
So wanted to give a small update regarding this so that those who want to try what I'm doing don't end up wasting the same time and effort I have. Apparently the reason my controller configurations for my test emulator, the n64 one, didn't work is because I was using the wrong emulator for that one system. Which, yes, is also the default emulator and no, was not really obvious even after studying the docs and other resources for close to two weeks now. No, you first have to manually click a before the emulator boots up (also after selecting a game) and choose a different default emulator, the lr-mupen64plus. Then retroarch will work properly. Only two real problems though: the games look like arse when compared to every other option and the volume becomes so low you'll need to raise it up quite a deal just to hear it. This is true even if you have an external two-speaker and bass boost setup like I've got. And before anyone suggests otherwise yes, I have tried all seven possible emulator options. I did so after reinstalling a freshly downloaded copy of retro-pie on my sd card. The only one retroarch registers is the one with the worst possible graphical and audio fidelity. And for those wondering I have a raspberry pi 3 m so it is the top of the line model. Soon as I figure out how to get this thing to work like I want it to I'll post another update.
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.