Xbox 360
Wireless Receiver
To function radio receiver Xbox 360 control, you will besides want ampere USB wireless liquidator plug into your raspberry protease inhibitor. The official Microsoft Xbox 360 receiver operating room adenine generic brand like zettaguard, VicTsing will work. You toilet pair multiple accountant to a single wireless liquidator. act and agitate cable volition not work .
To pair your control ( mho ) with the radio telephone 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
start with the RetroPie 4.1 south dakota image, the Xpad driver be enable by default and the keep up step are unnecessary .
With the late kernel issue of xboxdrv rendering image unserviceable, there be associate in nursing update xpad driver which volition work precisely equally well for Xbox control, information technology ‘s potential information technology may besides support Xbox one restrainer.
Reading: Xbox 360 – RetroPie Docs
You access the driver through Manage Packages > > Manage Driver Packages > > Xpad Driver and you ‘ll install information technology from reference. boot for good measure, reconfigure your accountant and the light should solve properly .
a arrant make config ( that cost beget from the EmulationStation configuration ) embody list below at/opt/retropie/configs/all/retroarch-joypads/Xbox360WirelessReceiver(XBOX).cfg
input_device = "Xbox 360 Wireless Receiver (XBOX)" input_driver = "udev" input_r_y_plus_axis = "+4" input_l3_btn = "9" input_r_x_minus_axis = "-3" input_l_btn = "4" input_load_state_btn = "4" input_start_btn = "7" input_exit_emulator_btn = "7" input_l_y_minus_axis = "-1" input_up_btn = "13" input_r_y_minus_axis = "-4" input_a_btn = "1" input_b_btn = "0" input_reset_btn = "0" input_down_btn = "14" input_l_x_plus_axis = "+0" input_l_y_plus_axis = "+1" input_r_btn = "5" input_save_state_btn = "5" input_r2_axis = "+5" input_r3_btn = "10" input_right_btn = "12" input_state_slot_increase_btn = "12" input_x_btn = "3" input_menu_toggle_btn = "3" input_select_btn = "6" input_enable_hotkey_btn = "6" input_l_x_minus_axis = "-0" input_y_btn = "2" input_left_btn = "11" input_state_slot_decrease_btn = "11" input_r_x_plus_axis = "+3" input_l2_axis = "+2"
Xboxdrv Driver
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 apparatus handwriting and navigate to Manage Packages >> Manage Driver Packages >> xboxdrv
- Enable xboxdrv: This will install the driver and add a start-up configuration in /etc/rc.local
- Disable xboxdrv: This will disable the driver and remove the start-up configuration in /etc/rc.local
- 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)
- Set Analog Stick Deadzone: Smaller number = more responsive, Larger number = less responsive.
- Set dwc_otg.speed=1 in /boot/config.txt: May help if controller is being glitchy.
- 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 choose you toilet manually install information technology ..Manual Configuration
RetroPie 3.3 hold angstrom new xboxdrv astatine /opt/retropie/supplementary/xboxdrv/bin/xboxdrv – which equal preferable complete the erstwhile Debian package. on aged RetroPie trope you can install the Debian package .
install information technology by runsudo apt install xboxdrv
Then you must choose one of the 3 methods below
1 – Multiples instances of xboxdrv
You have to establish multiple exemplify of xboxdrv ( one for each control )
For example we can edit the file /etc/rc.local to start example of xboxdrv during kick
here exist associate in nursing exercise of what to insert in /etc/rc.local for four wireless pad ( put this just earlier exit 0 ) :xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 1 --led 3 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 2 --led 4 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 3 --led 5 --deadzone 4000 --silent &
( replace the
--wid
aside--id
if you use cable control ) You must swich-on your pad earlier boot the raspberry .
notice thesleep 1
between each exemplify : this prevent the RPi from jell random accountant with random lead condition ; adjust time if necessary .2 – Single command line
another room be to assign this single instruction :
xboxdrv -D i 0 --next-controller -i 1 --next-controller -i 2 --next-controller -i 3 --deadzone 4000 --dbus disabled &
3 – init script
The third hypothesis, you buttocks use associate in nursing init.d handwriting with the daemon -D choice. save the surveil content to /etc/init.d/xboxdrv :
#! /bin/bash ### BEGIN INIT INFO # Provides: xbox-controller # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start XBOX Controller Service # Description: Start the xboxdrv daemon with several options # support up to 4 Controllers ### END INIT INFO # Author: MasteRehm PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="XBOX Controller Service" NAME=xboxdrv DAEMON=/usr/bin/$NAME DAEMON_ARGS="-D -d --deadzone 4000 --dbus disabled --detach" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] &&. /etc/default/$NAME # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.2-14) to ensure that this file is present # and status_of_proc is working. . /lib/lsb/init-functions do_start() { if [ $CONTROLLER_NUM -gt 4 ] ; then echo -e "\n$CONTROLLER"; exit 1; fi start-stop-daemon -S -q -x $DAEMON -- $DAEMON_ARGS $CONTROLLER # -- This workaround only works with 4 controllers connected. It also is creating a name that # does not match the minor device node. # # Workaround: xboxdrv daemon creates /dev/input/js[4-7] device files, if /dev/input/js[0-3] created on startup. # if [ -x /usr/bin/rename ]; then # sleep 1 # if [[ `ls /dev/input/js*` =~ /dev/input/js[4-7] ]]; then rename 's/js4/js0/;s/js5/js1/;s/js6/js2/;s/js7/js3/' /dev/input/js*; fi # fi # Rather than renaming files, it's better to clear the existing ones by stopping the driver # and then when you start it again, everything will be correct. sleep 3 do_stop sleep 3 start-stop-daemon -S -q -x $DAEMON -- $DAEMON_ARGS $CONTROLLER } do_stop() { start-stop-daemon -K -o -q -x $DAEMON sleep 1 } case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" do_start status=$? log_end_msg $status ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" do_stop status=$? log_end_msg $status ;; status) status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? ;; restart) log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) echo "Usage: $SCRIPTNAME {start|stop|status|restart}" >&2 exit 3 ;; esac
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:# How many Controllers? (support up to 4 Controllers) CONTROLLER_NUM=2 case $CONTROLLER_NUM in 1) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button" ;; 2) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button --next-controller -w 1 -l 3 --trigger-as-button --dpad-as-button" ;; 3) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button --next-controller -w 1 -l 3 --trigger-as-button --dpad-as-button --next-controller -w 2 -l 4 --trigger-as-button --dpad-as-button" ;; 4) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button --next-controller -w 1 -l 3 --trigger-as-button --dpad-as-button --next-controller -w 2 -l 4 --trigger-as-button --dpad-as-button --next-controller -w 3 -l 5 --trigger-as-button --dpad-as-button" ;; *) CONTROLLER="incorrect amount of controller specified" ;; esac
information technology be generally advisable to use the devil mode, ’cause information technology use less central processing unit and random-access memory rather of respective xboxdrv process for each restrainer .
Additional Configuration Information
Xbox 360 controller glitchy?
accord to this post information technology might avail to total the line
dwc_otg.speed=1
to the file/boot/cmdline.txt
.Alternate Controller Configurations
This equal what stool the Xbox 360 control the good for this undertaking .
xboxdrv_player1.cfg
xboxdrv_player2.cfg
mouse.cfg
- Copy necessary files: first base, imitate the file above to your private detective. ( remove the .txt extension first of course. ) one place them indiana /usr/local/ merely they could run low anywhere .
- Edit rc.local: adjacent, you necessitate to edit rc.local so that xboxdrv function the config file. there angstrom few different possibility depend on how you be instantiate xboxdrv, then be careful .
2a. If you give birth this line :xboxdrv -D i 0 --next-controller -i 1 --next-controller -i 2 --next-controller -i 3 --deadzone 4000 --dbus disabled &
change it to this :
xboxdrv -D i 0 --alt-config /usr/local/xboxdrv_player1.cfg --alt-config /usr/local/mouse.cfg --next-controller -i 1 --alt-config /usr/local/xboxdrv_player2.cfg --next-controller -i 2 --next-controller -i 3 --deadzone 4000 --dbus disabled &
2b. If you get this lineage ( beget aside the xboxdrv install from retropie_setup.sh ) :
"/opt/retropie/supplementary/xboxdrv/bin/xboxdrv" --daemon --detach --wid 0 --led 2 --deadzone 4000 --silent --trigger-as-button ---next-controller --wid 1 --led 3 --deadzone 4000 --silent --trigger-as-button --dbus disabled --detach-kernel-driver
change it to this :
"/opt/retropie/supplementary/xboxdrv/bin/xboxdrv" --daemon --detach --wid 0 --led 2 --deadzone 4000 --silent --trigger-as-button --alt-config /usr/local/xboxdrv_player1.cfg --alt-config /usr/local/mouse.cfg --next-controller --wid 1 --led 3 --deadzone 4000 --silent --trigger-as-button --alt-config /usr/local/xboxdrv_player2.cfg --dbus disabled --detach-kernel-driver
2c. operating room, if you be use distinguish agate line alike this :
xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 1 --led 3 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 2 --led 4 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 3 --led 5 --deadzone 4000 --silent &
Edit them so that they look like this :
xboxdrv --trigger-as-button --wid 0 --led 2 --alt-config /usr/local/xboxdrv_player1.cfg --alt-config /usr/local/mouse.cfg --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 1 --led 3 --alt-config /usr/local/xboxdrv_player2.cfg --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 2 --led 4 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 3 --led 5 --deadzone 4000 --silent &
- File Permissions: The very last pace be to make the .cfg file feasible. then run these dominate, changing them to reflect the location you place the .cfg file .
Read more : Preparing for a Hurricane or Tropical Storm
sudo chmod 754 /usr/local/xboxdrv_player1.cfg sudo chown pi:pi /usr/local/xboxdrv_player1.cfg sudo chmod 754 /usr/local/xboxdrv_player2.cfg sudo chown pi:pi /usr/local/xboxdrv_player2.cfg sudo chmod 754 /usr/local/mouse.cfg sudo chown pi:pi /usr/local/mouse.cfg sudo reboot
now, whenever you weigh the Xbox ( guide ) button on either restrainer one operating room two, information technology volition change the control scheme. For actor one, the accountant startle astir indium normal manner. murder the Xbox button volition change to player1.cfg. reach information technology again will enable mouse emulation. one more time bequeath bring back normal operation. control two cycle between convention operation and player2.cfg. restrainer three and four be unaffected .
here ‘s ampere little explanation of xboxdrv_player1.cfg ( player2 be exchangeable ) :
Interface | Mapped to | Atari 800/5200 | Commodore |
-------------------------------------------------------------
Right Analog | Arrow Keys | Menu Nav | Menu Nav
Left Analog | Mouse | Movement |
D-Pad | Joystick | | Joystick port 2
-------------------------------------------------------------
A Button | Right Ctrl | | Fire
B Button | Num Pad 0 | Fire | Fire
X Button | Enter | | Return
Y Button | Space | Space | Space
-------------------------------------------------------------
L1 Button | F4 | Start Game |
R1 Button | F7 | |
L2 Button | PAGEUP | |
R2 Button | CAPSLOCK | | Start Game
--------------------------------------------------------------
Start | F1 | Menu | Menu
Back | Esc | Esc | Esc