Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: xpad - update docs to reflect current state

The last time this documentation was accurate was
just over 8 years ago. In this time we've added
support for two new generations of Xbox console
controllers and dozens of third-party controllers.

This patch unifies terminology and makes it explicit
which model of controller a sentence refers to.

It also expands certain sections to address the latest
versions of Xbox controllers.

Thus this documentation should now be useful to
end users and not contain out-right untruths.

This is the patch's second revision. Prior versions
of this patch altered the driver's TODO list. That
change has been pulled out of this documentation
update patch.

Signed-off-by: Daniel Dressler <danieru.dressler@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Daniel Dressler and committed by
Jonathan Corbet
5469b196 d47fb4ec

+83 -40
+83 -40
Documentation/input/xpad.txt
··· 1 - xpad - Linux USB driver for X-Box gamepads 1 + xpad - Linux USB driver for Xbox compatible controllers 2 2 3 - This is the very first release of a driver for X-Box gamepads. 4 - Basically, this was hacked away in just a few hours, so don't expect 5 - miracles. 3 + This driver exposes all first-party and third-party Xbox compatible 4 + controllers. It has a long history and has enjoyed considerable usage 5 + as Window's xinput library caused most PC games to focus on Xbox 6 + controller compatibility. 6 7 7 - In particular, there is currently NO support for the rumble pack. 8 - You won't find many ff-aware linux applications anyway. 8 + Due to backwards compatibility all buttons are reported as digital. 9 + This only effects Original Xbox controllers. All later controller models 10 + have only digital face buttons. 11 + 12 + Rumble is supported on some models of Xbox 360 controllers but not of 13 + Original Xbox controllers nor on Xbox One controllers. As of writing 14 + the Xbox One's rumble protocol has not been reverse engineered but in 15 + the future could be supported. 9 16 10 17 11 18 0. Notes 12 19 -------- 13 - 14 - Driver updated for kernel 2.6.17.11. (Based on a patch for 2.6.11.4.) 15 - 16 20 The number of buttons/axes reported varies based on 3 things: 17 21 - if you are using a known controller 18 22 - if you are using a known dance pad ··· 24 20 module configuration for "Map D-PAD to buttons rather than axes for unknown 25 21 pads" (module option dpad_to_buttons) 26 22 27 - If you set dpad_to_buttons to 0 and you are using an unknown device (one 28 - not listed below), the driver will map the directional pad to axes (X/Y), 29 - if you said N it will map the d-pad to buttons, which is needed for dance 30 - style games to function correctly. The default is Y. 23 + If you set dpad_to_buttons to N and you are using an unknown device 24 + the driver will map the directional pad to axes (X/Y). 25 + If you said Y it will map the d-pad to buttons, which is needed for dance 26 + style games to function correctly. The default is Y. 31 27 32 - dpad_to_buttons has no effect for known pads. 28 + dpad_to_buttons has no effect for known pads. A erroneous commit message 29 + claimed dpad_to_buttons could be used to force behavior on known devices. 30 + This is not true. Both dpad_to_buttons and triggers_to_buttons only affect 31 + unknown controllers. 32 + 33 33 34 34 0.1 Normal Controllers 35 35 ---------------------- ··· 88 80 box in the future. 89 81 90 82 91 - 1. USB adapter 83 + 1. USB adapters 92 84 -------------- 85 + All generations of Xbox controllers speak USB over the wire. 86 + - Original Xbox controllers use a proprietary connector and require adapters. 87 + - Wireless Xbox 360 controllers require a 'Xbox 360 Wireless Gaming Receiver 88 + for Windows' 89 + - Wired Xbox 360 controllers use standard USB connectors. 90 + - Xbox One controllers can be wireless but speak Wi-Fi Direct and are not 91 + yet supported. 92 + - Xbox One controllers can be wired and use standard Micro-USB connectors. 93 93 94 - Before you can actually use the driver, you need to get yourself an 95 - adapter cable to connect the X-Box controller to your Linux-Box. You 96 - can buy these online fairly cheap, or build your own. 94 + 95 + 96 + 1.1 Original Xbox USB adapters 97 + -------------- 98 + Using this driver with an Original Xbox controller requires an 99 + adapter cable to break out the proprietary connector's pins to USB. 100 + You can buy these online fairly cheap, or build your own. 97 101 98 102 Such a cable is pretty easy to build. The Controller itself is a USB 99 103 compound device (a hub with three ports for two expansion slots and 100 104 the controller device) with the only difference in a nonstandard connector 101 - (5 pins vs. 4 on standard USB connector). 105 + (5 pins vs. 4 on standard USB 1.0 connectors). 102 106 103 107 You just need to solder a USB connector onto the cable and keep the 104 108 yellow wire unconnected. The other pins have the same order on both ··· 122 102 you can still use the controller with your X-Box, if you have one ;) 123 103 124 104 105 + 125 106 2. Driver Installation 126 107 ---------------------- 127 108 128 - Once you have the adapter cable and the controller is connected, you need 129 - to load your USB subsystem and should cat /proc/bus/usb/devices. 130 - There should be an entry like the one at the end [4]. 109 + Once you have the adapter cable, if needed, and the controller connected 110 + the xpad module should be auto loaded. To confirm you can cat 111 + /proc/bus/usb/devices. There should be an entry like the one at the end [4]. 131 112 132 - Currently (as of version 0.0.6), the following devices are included: 133 - original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202 134 - smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289 113 + 114 + 115 + 3. Supported Controllers 116 + ------------------------ 117 + For a full list of supported controllers and associated vendor and product 118 + IDs see the xpad_device[] array[6]. 119 + 120 + As of the historic version 0.0.6 (2006-10-10) the following devices 121 + were supported: 122 + original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202 123 + smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289 135 124 original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285 136 - InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a 137 - RedOctane Xbox Dance Pad (US), vendor=0x0c12, product=0x8809 125 + InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a 126 + RedOctane Xbox Dance Pad (US), vendor=0x0c12, product=0x8809 138 127 139 - The driver should work with xbox pads not listed above as well, however 140 - you will need to do something extra for dance pads to work. 128 + Unrecognized models of Xbox controllers should function as Generic 129 + Xbox controllers. Unrecognized Dance Pad controllers require setting 130 + the module option 'dpad_to_buttons'. 141 131 142 - If you have a controller not listed above, see 0.3 - Unknown Controllers 132 + If you have an unrecognized controller please see 0.3 - Unknown Controllers 143 133 144 - If you compiled and installed the driver, test the functionality: 134 + 135 + 4. Manual Testing 136 + ----------------- 137 + To test this driver's functionality you may use 'jstest'. 138 + 139 + For example: 145 140 > modprobe xpad 146 141 > modprobe joydev 147 142 > jstest /dev/js0 ··· 169 134 It works? Voila, you're done ;) 170 135 171 136 172 - 3. Thanks 137 + 138 + 5. Thanks 173 139 --------- 174 140 175 141 I have to thank ITO Takayuki for the detailed info on his site ··· 181 145 the basic functionality. 182 146 183 147 184 - 4. References 148 + 149 + 6. References 185 150 ------------- 186 151 187 - 1. http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki) 188 - 2. http://xpad.xbox-scene.com/ 189 - 3. http://www.markosweb.com/www/xboxhackz.com/ 190 - 191 - 4. /proc/bus/usb/devices - dump from InterAct PowerPad Pro (Germany): 152 + [1]: http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki) 153 + [2]: http://xpad.xbox-scene.com/ 154 + [3]: http://www.markosweb.com/www/xboxhackz.com/ 155 + [4]: /proc/bus/usb/devices - dump from InterAct PowerPad Pro (Germany): 192 156 193 157 T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0 194 158 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs= 1 ··· 198 162 E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms 199 163 E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms 200 164 201 - 5. /proc/bus/usb/devices - dump from Redoctane Xbox Dance Pad (US): 165 + [5]: /proc/bus/usb/devices - dump from Redoctane Xbox Dance Pad (US): 202 166 203 167 T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0 204 168 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 ··· 209 173 E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4ms 210 174 E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms 211 175 212 - -- 176 + [6]: http://lxr.free-electrons.com/ident?i=xpad_device 177 + 178 + 179 + 180 + 7. Historic Edits 181 + ----------------- 213 182 Marko Friedemann <mfr@bmx-chemnitz.de> 214 183 2002-07-16 215 184 - original doc ··· 222 181 Dominic Cerquetti <binary1230@yahoo.com> 223 182 2005-03-19 224 183 - added stuff for dance pads, new d-pad->axes mappings 184 + 185 + Later changes may be viewed with 'git log Documentation/input/xpad.txt'