aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/input
diff options
context:
space:
mode:
authorDominic Cerquetti <binary1230@yahoo.com>2006-10-10 17:42:48 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-17 17:46:33 -0400
commitdeb8ee43a23d48116cb23eb8dd1de2348efb1e80 (patch)
treec30cede8edd09cc7aff7c01ea6fbcb7b0d900e5d /Documentation/input
parent4550718f6c75c9abe8b987fa4c625fd041aa95a2 (diff)
USB: xpad: dance pad support
Adds support for dance pads to the xpad driver. Dance pads require the d-pad to be mapped to four buttons instead of two axes, so that combinations of up/down and left/right can be hit simultaneously. Known dance pads are detected, and there is a module parameter added to default unknown xpad devices to map the d-pad to buttons if this is desired. (dpad_to_buttons). Minor modifications were made to port the changes in the original patch to a newer kernel version. This patch was originally from Dominic Cerquetti originally written for kernel 2.6.11.4, with minor modifications (API changes for USB, spelling fixes to the documentation added in the original patch) made to apply to the current kernel. I have modified Dominic's original patch per some suggestions from Dmitry Torokhov. (There was nothing in the patch format description about multiple From: lines, so I haven't added myself.) [akpm@osdl.org: cleanups] Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/input')
-rw-r--r--Documentation/input/xpad.txt115
1 files changed, 91 insertions, 24 deletions
diff --git a/Documentation/input/xpad.txt b/Documentation/input/xpad.txt
index b9111a703ce0..5427bdf225ed 100644
--- a/Documentation/input/xpad.txt
+++ b/Documentation/input/xpad.txt
@@ -3,20 +3,37 @@ xpad - Linux USB driver for X-Box gamepads
3This is the very first release of a driver for X-Box gamepads. 3This is the very first release of a driver for X-Box gamepads.
4Basically, this was hacked away in just a few hours, so don't expect 4Basically, this was hacked away in just a few hours, so don't expect
5miracles. 5miracles.
6
6In particular, there is currently NO support for the rumble pack. 7In particular, there is currently NO support for the rumble pack.
7You won't find many ff-aware linux applications anyway. 8You won't find many ff-aware linux applications anyway.
8 9
9 10
100. Status 110. Notes
11--------- 12--------
13
14Driver updated for kernel 2.6.17.11. (Based on a patch for 2.6.11.4.)
12 15
13For now, this driver has only been tested on just one Linux-Box. 16The number of buttons/axes reported varies based on 3 things:
14This one is running a 2.4.18 kernel with usb-uhci on an amd athlon 600. 17- if you are using a known controller
18- if you are using a known dance pad
19- if using an unknown device (one not listed below), what you set in the
20 module configuration for "Map D-PAD to buttons rather than axes for unknown
21 pads" (module option dpad_to_buttons)
15 22
16The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) reports 23If you set dpad_to_buttons to 0 and you are using an unknown device (one
178 axes and 10 buttons. 24not listed below), the driver will map the directional pad to axes (X/Y),
25if you said N it will map the d-pad to buttons, which is needed for dance
26style games to function correctly. The default is Y.
27
28dpad_to_buttons has no effect for known pads.
29
300.1 Normal Controllers
31----------------------
32With a normal controller, the directional pad is mapped to its own X/Y axes.
33The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) will report 8
34axes and 10 buttons.
18 35
19Alls 8 axes work, though they all have the same range (-32768..32767) 36All 8 axes work, though they all have the same range (-32768..32767)
20and the zero-setting is not correct for the triggers (I don't know if that 37and the zero-setting is not correct for the triggers (I don't know if that
21is some limitation of jstest, since the input device setup should be fine. I 38is some limitation of jstest, since the input device setup should be fine. I
22didn't have a look at jstest itself yet). 39didn't have a look at jstest itself yet).
@@ -30,16 +47,50 @@ in game functionality were OK. However, I find it rather difficult to
30play first person shooters with a pad. Your mileage may vary. 47play first person shooters with a pad. Your mileage may vary.
31 48
32 49
500.2 Xbox Dance Pads
51-------------------
52When using a known dance pad, jstest will report 6 axes and 14 buttons.
53
54For dance style pads (like the redoctane pad) several changes
55have been made. The old driver would map the d-pad to axes, resulting
56in the driver being unable to report when the user was pressing both
57left+right or up+down, making DDR style games unplayable.
58
59Known dance pads automatically map the d-pad to buttons and will work
60correctly out of the box.
61
62If your dance pad is recognized by the driver but is using axes instead
63of buttons, see section 0.3 - Unknown Controllers
64
65I've tested this with Stepmania, and it works quite well.
66
67
680.3 Unkown Controllers
69----------------------
70If you have an unkown xbox controller, it should work just fine with
71the default settings.
72
73HOWEVER if you have an unknown dance pad not listed below, it will not
74work UNLESS you set "dpad_to_buttons" to 1 in the module configuration.
75
76PLEASE if you have an unkown controller, email Dom <binary1230@yahoo.com> with
77a dump from /proc/bus/usb and a description of the pad (manufacturer, country,
78whether it is a dance pad or normal controller) so that we can add your pad
79to the list of supported devices, ensuring that it will work out of the
80box in the future.
81
82
331. USB adapter 831. USB adapter
34-------------- 84--------------
35 85
36Before you can actually use the driver, you need to get yourself an 86Before you can actually use the driver, you need to get yourself an
37adapter cable to connect the X-Box controller to your Linux-Box. 87adapter cable to connect the X-Box controller to your Linux-Box. You
88can buy these online fairly cheap, or build your own.
38 89
39Such a cable is pretty easy to build. The Controller itself is a USB compound 90Such a cable is pretty easy to build. The Controller itself is a USB
40device (a hub with three ports for two expansion slots and the controller 91compound device (a hub with three ports for two expansion slots and
41device) with the only difference in a nonstandard connector (5 pins vs. 4 on 92the controller device) with the only difference in a nonstandard connector
42standard USB connector). 93(5 pins vs. 4 on standard USB connector).
43 94
44You just need to solder a USB connector onto the cable and keep the 95You just need to solder a USB connector onto the cable and keep the
45yellow wire unconnected. The other pins have the same order on both 96yellow wire unconnected. The other pins have the same order on both
@@ -51,36 +102,36 @@ original one. You can buy an extension cable and cut that instead. That way,
51you can still use the controller with your X-Box, if you have one ;) 102you can still use the controller with your X-Box, if you have one ;)
52 103
53 104
542. driver installation 1052. Driver Installation
55---------------------- 106----------------------
56 107
57Once you have the adapter cable and the controller is connected, you need 108Once you have the adapter cable and the controller is connected, you need
58to load your USB subsystem and should cat /proc/bus/usb/devices. 109to load your USB subsystem and should cat /proc/bus/usb/devices.
59There should be an entry like the one at the end [4]. 110There should be an entry like the one at the end [4].
60 111
61Currently (as of version 0.0.4), the following three devices are included: 112Currently (as of version 0.0.6), the following devices are included:
62 original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202 113 original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202
114 smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289
63 original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285 115 original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285
64 InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a 116 InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a
117 RedOctane Xbox Dance Pad (US), vendor=0x0c12, product=0x8809
65 118
66If you have another controller that is not listed above and is not recognized 119The driver should work with xbox pads not listed above as well, however
67by the driver, please drop me a line with the appropriate info (that is, include 120you will need to do something extra for dance pads to work.
68the name, vendor and product ID, as well as the country where you bought it;
69sending the whole dump out of /proc/bus/usb/devices along would be even better).
70 121
71In theory, the driver should work with other controllers than mine 122If you have a controller not listed above, see 0.3 - Unknown Controllers
72(InterAct PowerPad pro, bought in Germany) just fine, but I cannot test this
73for I only have this one controller.
74 123
75If you compiled and installed the driver, test the functionality: 124If you compiled and installed the driver, test the functionality:
76> modprobe xpad 125> modprobe xpad
77> modprobe joydev 126> modprobe joydev
78> jstest /dev/js0 127> jstest /dev/js0
79 128
80There should be a single line showing 18 inputs (8 axes, 10 buttons), and 129If you're using a normal controller, there should be a single line showing
81it's values should change if you move the sticks and push the buttons. 13018 inputs (8 axes, 10 buttons), and its values should change if you move
131the sticks and push the buttons. If you're using a dance pad, it should
132show 20 inputs (6 axes, 14 buttons).
82 133
83It works? Voila, your done ;) 134It works? Voila, you're done ;)
84 135
85 136
863. Thanks 1373. Thanks
@@ -111,6 +162,22 @@ I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=(none)
111E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms 162E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms
112E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms 163E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms
113 164
1655. /proc/bus/usb/devices - dump from Redoctane Xbox Dance Pad (US):
166
167T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0
168D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
169P: Vendor=0c12 ProdID=8809 Rev= 0.01
170S: Product=XBOX DDR
171C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
172I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=xpad
173E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4ms
174E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms
175
114-- 176--
115Marko Friedemann <mfr@bmx-chemnitz.de> 177Marko Friedemann <mfr@bmx-chemnitz.de>
1162002-07-16 1782002-07-16
179 - original doc
180
181Dominic Cerquetti <binary1230@yahoo.com>
1822005-03-19
183 - added stuff for dance pads, new d-pad->axes mappings