Update for the RetroPie Setup Script: Support for RetroArch's Autoconfig Functionality and (wired) Xbox 360 controller support

retroupdate

With the recent update of the RetroPie Setup Script another feature has found its way into the RetroPie Project: The auto configuration functionality of RetroArch is now supported! This allows to hot-swap (USB-) controllers while the RPi is running and the all RetroArch-based emulators will automatically detect the newly connected controller.

You have to follow only a few steps to make RetroArch recognize all your different controllers:

    1. Register your controller with the help of the RetroPie Setup Script
      In the RetroPie Setup Script, choose "Setup". There, you can find a new menu entry "Register controller for RetroArch emulator". Connect only  the USB controller to the RPi that you would like to register and select "Register controller for RetroArch emulator". A command-line tool that comes with RetroArch is started. You need to press the buttons shown on the screen. If your controller does not have the shown button you can wait for 4 seconds and the command-line tool will skip to the next button. At the end the configuration file issaved in the directory

      /home/pi/RetroPie/emulators/RetroArch/configs/

      You can easily contribute to the RetroPie Project by sending me the configuration files that were generated for your controllers. Alternatively, you could use, e.g., pastebin.com and send me the link. The different configurations will be added to the official RetroPie Project and more and more controllers will be supported. Right after this update, configuration files for a wired Xbox 360 controller, SNESDev, and a Saitek controller are included in the RetroPie Setup Script.

    2. Update the input configuration of Emulation Station with the RetroPie Setup Script
      Emulation Station uses its own configuration file for the input settings. Having a set of controller files from the previous step, you can easily auto-generate an updated version of the input configuration files by selecting "Update input configuration of Emulation Station" from within the "Setup" menu of the RetroPie Setup Script.
    3. Update the global RetroArch configuration
      Go into the "Source-based installation" menu within the RetroPie Setup Script and select only "C) Configure video, rewind, and keyboard for RetroArch". This will update the global configuration file of RetroArch and make it aware of the autoconfig files.

From now on all systems that are emulated with a RetroArch-based core will automatically detect the connected controller.

Another feature that came with the recent update of the RetroPie Setup Script is that you can install the driver xboxdrv for wired Xbox 360 controllers now. You can do this by selecting "Install drivers for XBox 360 Wired Controllers" from within the "Setup" menu of the RetroPie Setup Script.

What do you think of these features? Found any bugs or do you have any suggestions? Feel free to post a comment here or in the forum.

  • Josh Cote

    I am using RetroPie sd image 1.9.1 with a 4gb sd card. and trying to install GameCon GPIO drivers. i am getting the "ERROR: could not insert 'gamecon_gpio_rpi': Exec format error" i have upgraded + updated everything than updated the driver, and still getting the error.

  • Mace

    Nice, I have 2x SNES controllers in the front of my SNES system but good to know I can plug 2x 360 controllers in the back for multitap games. Will have to try this out.

  • Joshua

    Everything was working fine until I used the "Update input configuration..." option. Now my controller does not work any more. I did overwrite the dgenrc and retroarch.cfg files. Any thoughts?

  • Billipo

    This is a great idea! Thanks for adding it to your build. I will help out with any controllers that I get working.

  • blablator

    Hello!
    What does:
    "You need to follow this particular step only, if you are coming from an existing RetroPie installation"
    mean?
    It's confusing

    • http://www.petrockblock.com/ petRockBlog

      I agree, that sentence is confusing. Actually, the guide is easier to follow, when I remove this condition - just follow the third step.

      Thanks for the hint!

      • blablator

        Hello again!
        I've installed clean, newest retropie image and sudo apt-get updated & upgraded retropie and when I try to configure retropie to work with my chinese copy xbox 360 wired controller (it detects as xinput, don't worry) things just don't work anymore. I followed this guide to the letter but no luck.
        What I mean by don't work anymore:
        - Keyboard navigation doesn't work anymore in emulationstation, only f4 works for getting back to prompt.
        -xbox 360 wired controller blinks for a few secs on boot than goes black. It doesn't work for navigating emulationstation even if I try to re-connect it. Then, it only blinks.
        -I have also tried to configure it using "Register controller for RetroArch emulator". It detects everything, but again,no luck with emulationstation.
        -previously, when I tried to setup my controller using setup in emulationstation, it detected my controller and all the buttons when I pressed them, but when I tried to save I got a message: "Script error".

        Basically I've tried every tutorial and still nothing! What am I missing?
        Is the problem in the fact that the controller is directly connected and not via powered hub? Seems unlikely, it's detected properly on setup.

        How do I get it to work? I'm getting itchy to play those super mario bruhs :)

      • http://www.petrockblock.com/ petRockBlog

        As far as I can tell the RPi is very picky about the power supply. Emulation Station seems to increase the power demand such that an active USB hub might still be a solution to your problem. During the setup, Emulation Station is not running so that the power problem does not occur in that situation.

  • Mike

    My son and I (user123p10) are struggling to get a pair of Adafruit arcade joysticks and arcade buttons to work with RetroPie. His post in the forum is here: http://blog.petrockblock.com/forums/topic/retropie-gpio-2p-player-freeze/

    Are we on the wrong track trying to use a GPIO based set up with 2 joysticks and 7 buttons (using all 15 available GPIO pins on a version 2 board) with RetroPie/RetroArch?
    Player 1 joystick (up/down/left/right) and all 7 buttons work like a charm. Player 2 joystick left/right works great, "up" command creates a RESET message, "down" command creates a freeze condition. No amount of rewiring of GPIO pins fixes the issue, so we are convinced its a software/config issue.

    Should we reload RetroPie?

    • http://www.petrockblock.com/ petRockBlog

      It could be that there is some "dirty" wiring/soldering which could cause high currents and voltage drops. The RPi is quite sensitive when it comes to the power supply. But this is just a guess ...

  • Jonny Needles

    I've installed the image to the sd card, and run the RetroPie-Setup, then installed the Xbox 360 wired controller drivers there. I'm using a Logitech f310 wired controller in x-input mode. Is there anything else I have to setup after I install the drivers from RetroPie-Setup, or should I be able to reboot and use the controller in emulationstation? So far I've had no luck with the Xbox 360 controller drivers.
    Thanks for any help you can give me!!

    • http://www.petrockblock.com/ petRockBlog

      Besides installing xboxdrv you also need to update some configuration files with the help of the RetroPie Setup Script. This is described with steps 2. and 3. in the post above. Did you also follow these steps?

      • Jonny Needles

        Thanks for the response! I noticed last night that my xboxdrv is version 0.8.4, and the f310 requires 0.8.5. I couldn't get 0.8.5 installed after many failed attempts (still a linux noob, but trying). I ordered a wireless adapter so I could try using my microsoft 360 controllers. Is there a tutorial on installing drivers without a self installing package? Or will there be an image with the updated drivers coming?
        -Learning linux through video games.

      • http://www.petrockblock.com/ petRockBlog

        As far as I have read at http://www.raspberrypi.org/phpBB3/viewtopic.php?f=78&t=57627 the new version 0.8.5 is not included in the Raspbian repositories yet. Mazbe zoo can make some progress with xpad. You could install it with sudo apt-get install xpad. However, I must say that I do not any further experience with xpad.

      • Jonny Needles

        I finally got everything working a few days ago. I installed a fresh copy of RetroPie on my SD card, modified local.rc, and added the proper lines to the retroarch.cfg file. For some reason the logitech f310 now works. I preferred a wireless controller, so I ended up using an xbox 360 controller once I received my wireless receiver. Thanks so much for your help! I love the RetroPie, and everyone who's seen it now wants one too!

      • http://www.petrockblock.com/ petRockBlog

        Glad to hear!

  • KilroyRock

    Hi, I've been working on this for a straight week, and the only thing i've successfully done is alienate my wife.. But I think i see where i'm stuck:

    Step 1: Works great, takes my controls I enter and rolls with it. (I am using an xbox 360 afterglow controller)

    Step 2: I see that it copies to the emulation station emulator directories, as far as it says on screen.

    On step 3, i get a "the file or folder does not exist" when it looks at the shader directory. Then it pushes back to the menu, saying it's all set up. I know something happened because the emulation station controls are not the same as i had JUST loaded before (that mapped just fine natively, btw, thank you), but none of the other emulators i have tried (nes,snes) see any buttons, least of all the start button to get things going. My keyboard then works only, i can press enter on the keyboard and it starts the game.

    When looking at the supernintendopi.wordpress.com instructions, they have a manual option, going through LXDE, which this is supposed to replace. When i look at the config file in the all folder, none of the button presses I just set up are in that directory now. This makes me think that Step 3 is failing, due to the invalid file or folder error.

    Suggestions on how to handle the error, can you replicate this on a scratch image installation?

    Background: 1.9.1 image flash, all binaries updated, all retropie scripts updated, latest version of raspi firmware as well as raspbian.

    Help me, PetRockBlog, you're my only hope!

    • http://www.petrockblock.com/ petRockBlog

      There is a logs subfolder in the RetroPie-Setup folder. There you can find the console output of every run of the RetroPie-Setup Script. To open the logs you can use the command zless NAME_OF_LOGFILE.

      It would help a lot if you could post the part of that log where the error occurs.

      Also, you might get additional help in the forum at http://blog.petrockblock.com/forums/forum/retropie-project-forum/emulators/.

    • Rob

      I have exactly the same problem (except fiance, not wife)! But my RetroPie installation is behaving the same, doing the above steps kills all my controls... even the keyboard...

  • CPOKashue

    Should the global config update take a really long time? It's takin about 2 1/2 hours so far for me. I'm on the older model Pi, though.

    It's really great to have this controller support and now the ready-made image. You (and the community) have brought emulation a long way on the Pi.

  • DomNewell

    Hi,
    This is great, but whenever I try this and it works, my gameboy advance emulator stops working entirely. It was working before, and I don't know what is happening.
    Please help
    Thanks

  • Dog Rox

    hello, nobody said that step 3 is going to take over 15 hours? I am on my third rebuilt in 5 days trying to get this thing to run. If it ain't one thing its another. The game pads don't work then the keyboard doesn't work, Duke doesn't work then doom doesn't work then that Castle game that.all these games just keep rebooting itself when you start them it just keeps stopping and going back to the menu screen. I've rebuilt this thing 3 times and each time it takes over 15 hours to do step 3 just to get the key boards and stuff to work find out that it makes it only worse. what your instructions do not state is how long it's going to take.

    this program has very bad support because all I see is everybody's saying to do different things and everything is making it worse and worse which is why I have to keep rebuilding it all the time. nothing works and all these hours put into this it's not worth it. the worst part the emulators themselves like the genesis and the NES play like a little tiny window in the middle of screen. I see people with YouTube videos showing them they just plug it in and everything works fine full screen everything with the controllers but they don't tell you that they do a lot of editing on the videos and they don't tell you how they got it working just like the main support place of this program doesn't tell you how to get it working right either.

    I'm sorry with the lack of detailed instructions and the time that it takes to build this thing, almost makes me want to say why bother just to play a bunch of game emulators.