Controller Driver For Retro Pi

RetroPie & PS3 Controller over Bluetooth. Ask Question 7. I've got a Raspberry Pie 3. Try 'Remove PS3 controller' driver like in step 6 and then try installing one of the other PS3 controller drivers. Keep trying until one of them works. Help with Xbox controller on PI running RetroPie. RetroPie missing 'emulator' folder. So, you have finally made your Retro Gaming Console on Raspberry Pi 3. But, what you will do with it without a top SNES controller? Yes, there are quite different.

Wireless Receiver

To use wireless Xbox 360 controllers, you will also need a USB wireless receiver plugged into your Raspberry Pi. The Official Microsoft Xbox 360 receiver or a generic brand like zettaguard, VicTsing will work. You can pair multiple controllers to a single wireless receiver. Play and charging cables will not work.

To pair your controller(s) with the wireless receiver:

  • turn on your wireless Xbox 360 controller (hold down the Guide button)
  • press the connect button on the receiver (green light will start flash)
  • then press the tiny connect button on the top of the controller
  • you will need to repeat these steps to pair each additional controller

Automatic Configuration (Easiest)

Xpad Driver

Starting with the RetroPie 4.1 SD image, the Xpad driver is enabled by default and the following steps are unnecessary.

With the recent kernel issues of xboxdrv rendering images unusable, there is an updated xpad driver which will work just as well for Xbox controllers, it's possible it may also support Xbox One controllers.

You access the driver through Manage Packages >> Manage Driver Packages >> Xpad Driver and you'll install it from source. Reboot for good measure, reconfigure your controllers and the lights should work properly.

A complete working config (that was generated from the EmulationStation configuration) is listed below at /opt/retropie/configs/all/retroarch-joypads/Xbox360WirelessReceiver(XBOX).cfg

Xboxdrv Driver

Controller

Note! There are known incompatibilities with this driver when used in it's default configuration with the latest kernel. As such, the xpad drive is currently the best option to simply make an Xbox 360 controller operational in RetroPie.

However, these incompatibilities are not an issue when using xboxdrv as a calibration and key-mapping tool for almost any gamepad, including the Xbox 360 controller. When used this way, it's even possible for both xpad and xboxdrv to coexist together.

Access the RetroPie Setup Script and navigate to Manage Packages >> Manage Driver Packages >> xboxdrv

  1. Enable xboxdrv: This will install the driver and add a start-up configuration in /etc/rc.local
  2. Disable xboxdrv: This will disable the driver and remove the start-up configuration in /etc/rc.local
  3. Set Number of Controllers To Enable: Default number of controllers is 2 (If you have more than two controllers, set this first before you enable xboxdrv)
  4. Set Analog Stick Deadzone: Smaller number = more responsive, Larger number = less responsive.
  5. Set dwc_otg.speed=1 in /boot/config.txt: May help if controller is being glitchy.
  6. Remove dwc_otg.speed=1 from /boot/config.txt: Removes the config.

After you have enabled the driver and rebooted you'll need to reconfigure your controller(s) in EmulationStation as described on the first installation page

Alternatively if you prefer you can manually install it..

Manual Configuration

RetroPie 3.3 contains a newer xboxdrv at /opt/retropie/supplementary/xboxdrv/bin/xboxdrv - which is preferable over the older Debian package. On older RetroPie images you can install the Debian package.

install it by running

Then you must choose one of the 3 methods below

1 - Multiples instances of xboxdrv

You have to launch multiple instances of xboxdrv (one for each controller)

For example we can edit the file /etc/rc.local to start instances of xboxdrv during boot

Here is an example of what to insert in /etc/rc.local for 4 wireless pads (put this just before exit 0):

(replace the --wid by --id if you use wired controllers)You must swich-on your pads before booting the raspberry.

Notice the sleep 1 between each instance: this prevents the RPi from setting random controllers with random led status; adjust timing if necessary.

Usb retro controllers

2 - Single command line

Another way is to specify this single command :

3 - init script

Controller Driver For Retro Pi 2

The third possibility, you can use an init.d script with the daemon -D Option. Save the following content to /etc/init.d/xboxdrv:

sudo chmod +x /etc/init.d/xboxdrv
sudo update-rc.d xboxdrv start 90 2 3 4 5 stop 90 0 1 6
You will also need a default configuration file. Save the following content to /etc/default/xboxdrv:

Controller

To specifiy the amount of controller, edit the variable CONTROLLER_NUM. If you have a wired controller, replace all '-w' occurences with '-i'.

It is generally advisable to use the daemon mode, 'cause it uses less CPU and RAM instead of several xboxdrv processes for each controller.

Additional Configuration Information

Xbox 360 controller glitchy?

According to this post it might help to add the line dwc_otg.speed=1to the file /boot/cmdline.txt.

Outdated optional manual configs

Xbox 360 Controller button configuration for retroarch and final burn alpha

/home/pi/RetroPie/configs/all/retroarch.cfg

input exit emulator to exit the emulator and return to emulationstation. input menu toggle to show the retroarch menu (e.g. to set the aspect ratio, save/load the game, etc.)

/home/pi/RetroPie/emulators/pifba/fba2x.cfg (or /opt/retropie/emulators/pifba/fba2x.cfg in some versions)

Up until now, I didn't figure out how to change the configuration from the analog sticks to the digipad. To exit the emulator, press START and SELECT together.

Alternate Controller Configurations

This is what makes the Xbox 360 controller the best for this project.

  1. Copy necessary files: First, copy the files above to your pi. (Remove the .txt extension first of course.) I placed them in /usr/local/ but they could go anywhere.

  2. Edit rc.local: Next, you need to edit rc.local so that xboxdrv uses the config files. There a few different possibilities depending on how you are instantiating xboxdrv, so be careful.

    2a. If you have this line:

    change it to this:

    2b. If you have this line (generated by the xboxdrv install from retropie_setup.sh):

    change it to this:

    2c. Or, if you are using separate lines like this:

    Edit them so that they look like this:

  3. File Permissions: The very last step is to make the .cfg files executable. So run these commands, changing them to reflect the location you placed the .cfg files.

Now, whenever you press the Xbox (guide) button on either controller 1 or 2, it will change the control scheme. For player 1, the controller starts up in normal mode. Hitting the Xbox button will change to player1.cfg. Hitting it again will enable mouse emulation. One more time will bring back normal operation. Controller 2 cycles between normal operation and player2.cfg. Controllers 3 and 4 are unaffected.

Controller Driver For Retro Pi 3

Here's a little explanation of xboxdrv_player1.cfg (player2 is similar):