1 ============================================== 1 ======================================================= 2 xpad - Linux USB driver for Xbox compatible co 2 xpad - Linux USB driver for Xbox compatible controllers 3 ============================================== 3 ======================================================= 4 4 5 This driver exposes all first-party and third- 5 This driver exposes all first-party and third-party Xbox compatible 6 controllers. It has a long history and has enj 6 controllers. It has a long history and has enjoyed considerable usage 7 as Windows' xinput library caused most PC game 7 as Windows' xinput library caused most PC games to focus on Xbox 8 controller compatibility. 8 controller compatibility. 9 9 10 Due to backwards compatibility all buttons are 10 Due to backwards compatibility all buttons are reported as digital. 11 This only affects Original Xbox controllers. A 11 This only affects Original Xbox controllers. All later controller models 12 have only digital face buttons. 12 have only digital face buttons. 13 13 14 Rumble is supported on some models of Xbox 360 14 Rumble is supported on some models of Xbox 360 controllers but not of 15 Original Xbox controllers nor on Xbox One cont 15 Original Xbox controllers nor on Xbox One controllers. As of writing 16 the Xbox One's rumble protocol has not been re 16 the Xbox One's rumble protocol has not been reverse-engineered but in 17 the future could be supported. 17 the future could be supported. 18 18 19 19 20 Notes 20 Notes 21 ===== 21 ===== 22 22 23 The number of buttons/axes reported varies bas 23 The number of buttons/axes reported varies based on 3 things: 24 24 25 - if you are using a known controller 25 - if you are using a known controller 26 - if you are using a known dance pad 26 - if you are using a known dance pad 27 - if using an unknown device (one not listed b 27 - if using an unknown device (one not listed below), what you set in the 28 module configuration for "Map D-PAD to butto 28 module configuration for "Map D-PAD to buttons rather than axes for unknown 29 pads" (module option dpad_to_buttons) 29 pads" (module option dpad_to_buttons) 30 30 31 If you set dpad_to_buttons to N and you are us 31 If you set dpad_to_buttons to N and you are using an unknown device 32 the driver will map the directional pad to axe 32 the driver will map the directional pad to axes (X/Y). 33 If you said Y it will map the d-pad to buttons 33 If you said Y it will map the d-pad to buttons, which is needed for dance 34 style games to function correctly. The default 34 style games to function correctly. The default is Y. 35 35 36 dpad_to_buttons has no effect for known pads. 36 dpad_to_buttons has no effect for known pads. A erroneous commit message 37 claimed dpad_to_buttons could be used to force 37 claimed dpad_to_buttons could be used to force behavior on known devices. 38 This is not true. Both dpad_to_buttons and tri 38 This is not true. Both dpad_to_buttons and triggers_to_buttons only affect 39 unknown controllers. 39 unknown controllers. 40 40 41 41 42 Normal Controllers 42 Normal Controllers 43 ------------------ 43 ------------------ 44 44 45 With a normal controller, the directional pad 45 With a normal controller, the directional pad is mapped to its own X/Y axes. 46 The jstest-program from joystick-1.2.15 (jstes 46 The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) will report 8 47 axes and 10 buttons. 47 axes and 10 buttons. 48 48 49 All 8 axes work, though they all have the same 49 All 8 axes work, though they all have the same range (-32768..32767) 50 and the zero-setting is not correct for the tr 50 and the zero-setting is not correct for the triggers (I don't know if that 51 is some limitation of jstest, since the input 51 is some limitation of jstest, since the input device setup should be fine. I 52 didn't have a look at jstest itself yet). 52 didn't have a look at jstest itself yet). 53 53 54 All of the 10 buttons work (in digital mode). 54 All of the 10 buttons work (in digital mode). The six buttons on the 55 right side (A, B, X, Y, black, white) are said 55 right side (A, B, X, Y, black, white) are said to be "analog" and 56 report their values as 8 bit unsigned, not sur 56 report their values as 8 bit unsigned, not sure what this is good for. 57 57 58 I tested the controller with quake3, and confi 58 I tested the controller with quake3, and configuration and 59 in game functionality were OK. However, I find 59 in game functionality were OK. However, I find it rather difficult to 60 play first person shooters with a pad. Your mi 60 play first person shooters with a pad. Your mileage may vary. 61 61 62 62 63 Xbox Dance Pads 63 Xbox Dance Pads 64 --------------- 64 --------------- 65 65 66 When using a known dance pad, jstest will repo 66 When using a known dance pad, jstest will report 6 axes and 14 buttons. 67 67 68 For dance style pads (like the redoctane pad) 68 For dance style pads (like the redoctane pad) several changes 69 have been made. The old driver would map the 69 have been made. The old driver would map the d-pad to axes, resulting 70 in the driver being unable to report when the 70 in the driver being unable to report when the user was pressing both 71 left+right or up+down, making DDR style games 71 left+right or up+down, making DDR style games unplayable. 72 72 73 Known dance pads automatically map the d-pad t 73 Known dance pads automatically map the d-pad to buttons and will work 74 correctly out of the box. 74 correctly out of the box. 75 75 76 If your dance pad is recognized by the driver 76 If your dance pad is recognized by the driver but is using axes instead 77 of buttons, see section 0.3 - Unknown Controll 77 of buttons, see section 0.3 - Unknown Controllers 78 78 79 I've tested this with Stepmania, and it works 79 I've tested this with Stepmania, and it works quite well. 80 80 81 81 82 Unknown Controllers 82 Unknown Controllers 83 ------------------- 83 ------------------- 84 84 85 If you have an unknown Xbox controller, it sho 85 If you have an unknown Xbox controller, it should work just fine with 86 the default settings. 86 the default settings. 87 87 88 HOWEVER if you have an unknown dance pad not l 88 HOWEVER if you have an unknown dance pad not listed below, it will not 89 work UNLESS you set "dpad_to_buttons" to 1 in 89 work UNLESS you set "dpad_to_buttons" to 1 in the module configuration. 90 90 91 91 92 USB adapters 92 USB adapters 93 ============ 93 ============ 94 94 95 All generations of Xbox controllers speak USB 95 All generations of Xbox controllers speak USB over the wire. 96 96 97 - Original Xbox controllers use a proprietary 97 - Original Xbox controllers use a proprietary connector and require adapters. 98 - Wireless Xbox 360 controllers require a 'Xbo 98 - Wireless Xbox 360 controllers require a 'Xbox 360 Wireless Gaming Receiver 99 for Windows' 99 for Windows' 100 - Wired Xbox 360 controllers use standard USB 100 - Wired Xbox 360 controllers use standard USB connectors. 101 - Xbox One controllers can be wireless but spe 101 - Xbox One controllers can be wireless but speak Wi-Fi Direct and are not 102 yet supported. 102 yet supported. 103 - Xbox One controllers can be wired and use st 103 - Xbox One controllers can be wired and use standard Micro-USB connectors. 104 104 105 105 106 106 107 Original Xbox USB adapters 107 Original Xbox USB adapters 108 -------------------------- 108 -------------------------- 109 109 110 Using this driver with an Original Xbox contro 110 Using this driver with an Original Xbox controller requires an 111 adapter cable to break out the proprietary con 111 adapter cable to break out the proprietary connector's pins to USB. 112 You can buy these online fairly cheap, or buil 112 You can buy these online fairly cheap, or build your own. 113 113 114 Such a cable is pretty easy to build. The Cont 114 Such a cable is pretty easy to build. The Controller itself is a USB 115 compound device (a hub with three ports for tw 115 compound device (a hub with three ports for two expansion slots and 116 the controller device) with the only differenc 116 the controller device) with the only difference in a nonstandard connector 117 (5 pins vs. 4 on standard USB 1.0 connectors). 117 (5 pins vs. 4 on standard USB 1.0 connectors). 118 118 119 You just need to solder a USB connector onto t 119 You just need to solder a USB connector onto the cable and keep the 120 yellow wire unconnected. The other pins have t 120 yellow wire unconnected. The other pins have the same order on both 121 connectors so there is no magic to it. Detaile 121 connectors so there is no magic to it. Detailed info on these matters 122 can be found on the net ([1]_, [2]_, [3]_). 122 can be found on the net ([1]_, [2]_, [3]_). 123 123 124 Thanks to the trip splitter found on the cable 124 Thanks to the trip splitter found on the cable you don't even need to cut the 125 original one. You can buy an extension cable a 125 original one. You can buy an extension cable and cut that instead. That way, 126 you can still use the controller with your Xbo 126 you can still use the controller with your Xbox, if you have one ;) 127 127 128 128 129 129 130 Driver Installation 130 Driver Installation 131 =================== 131 =================== 132 132 133 Once you have the adapter cable, if needed, an 133 Once you have the adapter cable, if needed, and the controller connected 134 the xpad module should be auto loaded. To conf 134 the xpad module should be auto loaded. To confirm you can cat 135 /sys/kernel/debug/usb/devices. There should be 135 /sys/kernel/debug/usb/devices. There should be an entry like those: 136 136 137 .. code-block:: none 137 .. code-block:: none 138 :caption: dump from InterAct PowerPad Pro ( 138 :caption: dump from InterAct PowerPad Pro (Germany) 139 139 140 T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 D 140 T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0 141 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 141 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs= 1 142 P: Vendor=05fd ProdID=107a Rev= 1.00 142 P: Vendor=05fd ProdID=107a Rev= 1.00 143 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA 143 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA 144 I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Su 144 I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=(none) 145 E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 1 145 E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms 146 E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 1 146 E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms 147 147 148 .. code-block:: none 148 .. code-block:: none 149 :caption: dump from Redoctane Xbox Dance Pa 149 :caption: dump from Redoctane Xbox Dance Pad (US) 150 150 151 T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 D 151 T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0 152 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 152 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 153 P: Vendor=0c12 ProdID=8809 Rev= 0.01 153 P: Vendor=0c12 ProdID=8809 Rev= 0.01 154 S: Product=XBOX DDR 154 S: Product=XBOX DDR 155 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA 155 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA 156 I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Su 156 I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=xpad 157 E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4m 157 E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4ms 158 E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4m 158 E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms 159 159 160 160 161 Supported Controllers 161 Supported Controllers 162 ===================== 162 ===================== 163 163 164 For a full list of supported controllers and a 164 For a full list of supported controllers and associated vendor and product 165 IDs see the xpad_device[] array\ [4]_. 165 IDs see the xpad_device[] array\ [4]_. 166 166 167 As of the historic version 0.0.6 (2006-10-10) 167 As of the historic version 0.0.6 (2006-10-10) the following devices 168 were supported:: 168 were supported:: 169 169 170 original Microsoft XBOX controller (US), v 170 original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202 171 smaller Microsoft XBOX controller (US), v 171 smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289 172 original Microsoft XBOX controller (Japan), v 172 original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285 173 InterAct PowerPad Pro (Germany), v 173 InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a 174 RedOctane Xbox Dance Pad (US), v 174 RedOctane Xbox Dance Pad (US), vendor=0x0c12, product=0x8809 175 175 176 Unrecognized models of Xbox controllers should 176 Unrecognized models of Xbox controllers should function as Generic 177 Xbox controllers. Unrecognized Dance Pad contr 177 Xbox controllers. Unrecognized Dance Pad controllers require setting 178 the module option 'dpad_to_buttons'. 178 the module option 'dpad_to_buttons'. 179 179 180 If you have an unrecognized controller please 180 If you have an unrecognized controller please see 0.3 - Unknown Controllers 181 181 182 182 183 Manual Testing 183 Manual Testing 184 ============== 184 ============== 185 185 186 To test this driver's functionality you may us 186 To test this driver's functionality you may use 'jstest'. 187 187 188 For example:: 188 For example:: 189 189 190 > modprobe xpad 190 > modprobe xpad 191 > modprobe joydev 191 > modprobe joydev 192 > jstest /dev/js0 192 > jstest /dev/js0 193 193 194 If you're using a normal controller, there sho 194 If you're using a normal controller, there should be a single line showing 195 18 inputs (8 axes, 10 buttons), and its values 195 18 inputs (8 axes, 10 buttons), and its values should change if you move 196 the sticks and push the buttons. If you're us 196 the sticks and push the buttons. If you're using a dance pad, it should 197 show 20 inputs (6 axes, 14 buttons). 197 show 20 inputs (6 axes, 14 buttons). 198 198 199 It works? Voila, you're done ;) 199 It works? Voila, you're done ;) 200 200 201 201 202 202 203 Thanks 203 Thanks 204 ====== 204 ====== 205 205 206 I have to thank ITO Takayuki for the detailed 206 I have to thank ITO Takayuki for the detailed info on his site 207 http://euc.jp/periphs/xbox-controller.ja.h 207 http://euc.jp/periphs/xbox-controller.ja.html. 208 208 209 His useful info and both the usb-skeleton as w 209 His useful info and both the usb-skeleton as well as the iforce input driver 210 (Greg Kroah-Hartmann; Vojtech Pavlik) helped a 210 (Greg Kroah-Hartmann; Vojtech Pavlik) helped a lot in rapid prototyping 211 the basic functionality. 211 the basic functionality. 212 212 213 213 214 214 215 References 215 References 216 ========== 216 ========== 217 217 218 .. [1] http://euc.jp/periphs/xbox-controller.j 218 .. [1] http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki) 219 .. [2] http://xpad.xbox-scene.com/ 219 .. [2] http://xpad.xbox-scene.com/ 220 .. [3] http://www.markosweb.com/www/xboxhackz. 220 .. [3] http://www.markosweb.com/www/xboxhackz.com/ 221 .. [4] https://elixir.bootlin.com/linux/latest 221 .. [4] https://elixir.bootlin.com/linux/latest/ident/xpad_device 222 222 223 223 224 Historic Edits 224 Historic Edits 225 ============== 225 ============== 226 226 227 2002-07-16 - Marko Friedemann <mfr@bmx-chemnitz 227 2002-07-16 - Marko Friedemann <mfr@bmx-chemnitz.de> 228 - original doc 228 - original doc 229 229 230 2005-03-19 - Dominic Cerquetti <binary1230@yaho 230 2005-03-19 - Dominic Cerquetti <binary1230@yahoo.com> 231 - added stuff for dance pads, new d-pad->axes 231 - added stuff for dance pads, new d-pad->axes mappings 232 232 233 Later changes may be viewed with 233 Later changes may be viewed with 234 'git log --follow Documentation/input/devices/ 234 'git log --follow Documentation/input/devices/xpad.rst'
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.