Find a file
2008-04-13 04:47:15 +02:00
.gitignore - added readme 2008-04-11 00:05:35 +02:00
COPYING - added copying 2008-04-11 00:06:07 +02:00
README - moved LED documentation into the application 2008-04-13 04:47:15 +02:00
SConstruct - uinput support working 2008-04-10 23:43:47 +02:00
TODO - moved LED documentation into the application 2008-04-13 04:47:15 +02:00
uinput.cpp - some more cleanup and axis reversal 2008-04-12 03:49:33 +02:00
uinput.hpp - some more cleanup and axis reversal 2008-04-12 03:49:33 +02:00
usb.txt - added readme 2008-04-11 00:05:35 +02:00
xbox360.cpp - moved LED documentation into the application 2008-04-13 04:47:15 +02:00
xbox360.hpp - fail on read error and shutdown (i.e. when device is busy) 2008-04-12 15:07:20 +02:00
xpad.c Initial commit 2008-04-10 18:38:50 +02:00
xpad.h Initial commit 2008-04-10 18:38:50 +02:00

[[ XBox360 USB Gamepad Driver for Userspace ]]
==============================================

This is a XBox360 gamepad driver for Linux that works in userspace. It
is a alternative to the xpad kernel driver.


[[ Compilation ]]
-----------------

Required libraries and tools:

 * libusb
 * boost
 * scons
 * uinput

You can compile by typing:

 % scons


[[ Running ]]
--------------

First make sure that the xpad kernel module does not get loaded,
either by deleting or renaming it. rmmod might not be enough since it
might be automatically loaded.

Once ensured that xpad is out of the way plug in your XBox360 gamepad
and start the userspace driver:

 % ./xbox360

This will create a /dev/input/js0 and allow you to access the gamepad
from any game. To exit the driver press Ctrl-c  twice

If you have multiple controllers you need to start multiple instances
of the xbox360 driver and append the -i argument like this:

 % ./xbox360 -i 1

This will then use the second detected controller, also see:

 % ./xbox360 --list-controller


[[ SDL Notes ]]
---------------

To let SDL know which axis act as a hat and which act as normal axis
you have to set an environment variable:

 % SDL_LINUX_JOYSTICK="'XBox360 Gamepad (userspace driver)' 6 1 0"
 % export SDL_LINUX_JOYSTICK

This will let the DPad act as Hat in case you need that for any
game. For most games the driver should work as-is.

See ftp://ptah.lnf.kth.se/pub/misc/sdl-env-vars for more information.

# EOF #