RetroPie USB SNES Controller issues


10 posts
by smoothtalker » Fri Mar 08, 2013 12:31 am
Hey all, i just picked up some USB SNES controllers and they look great. so far. I however, am having some issues. I plugged the controller into the usb port, booted emulationstation and walked away, it would appear to have ran through the autoconfig that i have been reading should display. I need a way to either reset the "first time plugged in" sensor. Or, if someone could provide me with the code needed to make these changes, I would greatly appreciate it.

I have attempted to follow these instructions (and many others):
Whenever you hook up the SNES controllers the controllers will work within the operating system. Tho since the RetroArch is configurered seperately the controls need to be set also for each emulator. in the folders ~/Retropie/configs/* all "retroarch.cfg" files can be modified seperately for each emulator. Whenever you want to make global changes edit the retroarch.cfg in the ~/Retropie/configs/all.
Setting up a controller is fairly easy. navigate to ~/Retropie/emulators/Retroarch/tools/ Type in : retroarch-joyconfig -o ~/Retropie/configs/all/retroarch.cfg \ the -o argument will output the config directly into a cfg file for all emulators. In case you don't want this remove everything after the -o and only use the retroarch-joyconfig command \
During the setting up of the config lots of questions may arise for which you have no button ( L3 buttons do not exist on a SNES controller for instance ) just press one of the random buttons.

After the configuring has been done, type: nano ~/Retropie/configs/all/retroarch.cfg Read all the lines stated there. Delete all the lines that are describing axes, L3 buttons etc. then save the file ( ctrl-X )
-- For setting up a Player 2 Copy copy the content of the retroarch.cfg and paste it in the same file. change the index of the first "set of controls" to index"1" Now if you did this properly you have a entry for all the controls of a joystick with index "1" and a joystick index "0".


However, when i get to the underlined portion of the instructions, all it does is pull up a blank "new" text file. I am assuming i need to export the contents of the retroarch-joyconfig command, but i do not know how to put that in to a coded format.

Again, thank you for the help!
Posts: 6
Joined: Wed Feb 06, 2013 4:15 pm
by Aloshi » Fri Mar 08, 2013 3:49 pm
Run "rm ~/.emulationstation/es_input.cfg" to delete the input config file, which will cause the controller config to run again on startup.
User avatar
Posts: 355
Joined: Sat Jun 23, 2012 6:42 pm
by smoothtalker » Fri Mar 08, 2013 4:47 pm
Aloshi wrote:Run "rm ~/.emulationstation/es_input.cfg" to delete the input config file, which will cause the controller config to run again on startup.


Thanks for the tip! Running this command did exactly what i needed to, in getting back to the initial set up. however, i still cannot use the controller inside the snes roms. it will allow me to navigate through emulationstation, and choose which rom/emulator i want, but once the rom launches, it seems to lose all connectivity. is there something i am missing, in order to place this config into the rom's?
Posts: 6
Joined: Wed Feb 06, 2013 4:15 pm
by kalehrl » Fri Mar 08, 2013 7:16 pm
You also need to configure your joystick for use with emulators.
Use retroarch-joyconfig for that.
Posts: 343
Joined: Tue Jul 24, 2012 10:49 am
by smoothtalker » Mon Mar 11, 2013 7:38 pm
Thank you all for the help, I was able to take the output of the retroarch-joyconfig command, take the variables that the keypresses on the joypad returned, and manually input this info into the .cfg file for the emulators. This all works fine and dandy, but only on controller 1. The system is not appearing to pick up any input from the player2 controller. I copied the text lines for player1 inputs, and changed them all to player2, but it still will not work.

Any ideas??

Thanks!
Posts: 6
Joined: Wed Feb 06, 2013 4:15 pm
by smoothtalker » Tue Mar 12, 2013 10:28 pm
So, I pulled together some info that may be useful for trying to resolve this issue.
I ran LSUSB, and here are the contents

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 013: ID 12bd:d012
Bus 001 Device 005: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 006: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 012: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Bus 001 Device 008: ID 12bd:d012
Bus 001 Device 010: ID 046d:c044 Logitech, Inc. LX3 Optical Mouse
Bus 001 Device 011: ID 03f0:0324 Hewlett-Packard SK-2885 keyboard

I am assuming that the 2 usb controllers are the "standard microsystems" entries.

I also got the config file for the controller, or at least the portions containing Joypad info:
# If desired, it is possible to override which joypads are being used for player 1 through 5. First joypad available is 0.
input_player1_joypad_index = 0
input_player2_joypad_index = 1
input_player3_joypad_index = 2
input_player4_joypad_index = 3

input_player1_a_btn = 1
input_player1_b_btn = 0
input_player1_y_btn = 2
input_player1_x_btn = 3
input_player1_start_btn = 7
input_player1_select_btn = 6
input_player1_l_btn = 4
input_player1_r_btn = 5

input_player2_a_btn = 1
input_player2_b_btn = 0
input_player2_y_btn = 2
input_player2_x_btn = 3
input_player2_start_btn = 7
input_player2_select_btn = 6
input_player2_l_btn = 4
input_player2_r_btn = 5

# Axis for RetroArch D-Pad.
# Needs to be either '+' or '-' in the first character signaling either positive or negative direction of the axis, then the axis number.
# Do note that every other input option has the corresponding _btn and _axis binds as well; they are omitted here for clarity.
input_player1_left_axis = "-0"
input_player1_right_axis = "+0"
input_player1_up_axis = "-1"
input_player1_down_axis = "+1"

input_player2_left_axis = "-0"
input_player2_right_axis = "+0"
input_player2_up_axis = "-1"
input_player2_down_axis = "+1"

can anyone spot anything wrong that I am missing?
Posts: 6
Joined: Wed Feb 06, 2013 4:15 pm
by HackerWhale » Mon Apr 15, 2013 3:25 am
I have a question about your tutorial, is it in startx?
Posts: 3
Joined: Sat Apr 13, 2013 5:17 pm
by smoothtalker » Mon Apr 15, 2013 5:05 pm
negative, i am running this from the initial CLI after booting the SD card.
Posts: 6
Joined: Wed Feb 06, 2013 4:15 pm
by Aloshi » Mon Apr 15, 2013 9:58 pm
You could give ES-config a try: https://github.com/Aloshi/ES-config

You should be able to build and run with:
Code: Select all
git clone https://github.com/Aloshi/ES-config.git
cd ES-config
chmod +x get_dependencies.sh
./get_dependencies.sh
make
./es-config

ES-config is my current project: a graphical, scriptable configuration tool designed to be extendable to any emulator. It's still largely untested on anything other than my own hardware, but it might generate a working config for you. The RetroArch script will output a "retroarch.cfg" in the directory you run from after you choose "SAVE". You can use it as a reference or copy it directly (though it'll only have input stuff, none of the audio configuration etc. from RetroPie's).
User avatar
Posts: 355
Joined: Sat Jun 23, 2012 6:42 pm
by drewmcvey » Sun Jun 23, 2013 11:46 pm
Did you ever get it to work? The issue I am having is that the second controller is only responsive when I push (and hold) a button on my first controller. I don't understand why this is.
Posts: 1
Joined: Sun Jun 23, 2013 11:44 pm