提交 3f0a2975 编写于 作者: M Mauro Carvalho Chehab 提交者: Dmitry Torokhov

Input: xpad - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 de3d27fc
=======================================================
xpad - Linux USB driver for Xbox compatible controllers xpad - Linux USB driver for Xbox compatible controllers
=======================================================
This driver exposes all first-party and third-party Xbox compatible This driver exposes all first-party and third-party Xbox compatible
controllers. It has a long history and has enjoyed considerable usage controllers. It has a long history and has enjoyed considerable usage
...@@ -15,9 +17,11 @@ the Xbox One's rumble protocol has not been reverse engineered but in ...@@ -15,9 +17,11 @@ the Xbox One's rumble protocol has not been reverse engineered but in
the future could be supported. the future could be supported.
0. Notes Notes
-------- =====
The number of buttons/axes reported varies based on 3 things: The number of buttons/axes reported varies based on 3 things:
- if you are using a known controller - if you are using a known controller
- if you are using a known dance pad - if you are using a known dance pad
- if using an unknown device (one not listed below), what you set in the - if using an unknown device (one not listed below), what you set in the
...@@ -35,8 +39,9 @@ This is not true. Both dpad_to_buttons and triggers_to_buttons only affect ...@@ -35,8 +39,9 @@ This is not true. Both dpad_to_buttons and triggers_to_buttons only affect
unknown controllers. unknown controllers.
0.1 Normal Controllers Normal Controllers
---------------------- ------------------
With a normal controller, the directional pad is mapped to its own X/Y axes. With a normal controller, the directional pad is mapped to its own X/Y axes.
The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) will report 8 The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) will report 8
axes and 10 buttons. axes and 10 buttons.
...@@ -55,8 +60,9 @@ in game functionality were OK. However, I find it rather difficult to ...@@ -55,8 +60,9 @@ in game functionality were OK. However, I find it rather difficult to
play first person shooters with a pad. Your mileage may vary. play first person shooters with a pad. Your mileage may vary.
0.2 Xbox Dance Pads Xbox Dance Pads
------------------- ---------------
When using a known dance pad, jstest will report 6 axes and 14 buttons. When using a known dance pad, jstest will report 6 axes and 14 buttons.
For dance style pads (like the redoctane pad) several changes For dance style pads (like the redoctane pad) several changes
...@@ -73,8 +79,9 @@ of buttons, see section 0.3 - Unknown Controllers ...@@ -73,8 +79,9 @@ of buttons, see section 0.3 - Unknown Controllers
I've tested this with Stepmania, and it works quite well. I've tested this with Stepmania, and it works quite well.
0.3 Unknown Controllers Unknown Controllers
---------------------- -------------------
If you have an unknown xbox controller, it should work just fine with If you have an unknown xbox controller, it should work just fine with
the default settings. the default settings.
...@@ -88,9 +95,11 @@ to the list of supported devices, ensuring that it will work out of the ...@@ -88,9 +95,11 @@ to the list of supported devices, ensuring that it will work out of the
box in the future. box in the future.
1. USB adapters USB adapters
-------------- ============
All generations of Xbox controllers speak USB over the wire. All generations of Xbox controllers speak USB over the wire.
- Original Xbox controllers use a proprietary connector and require adapters. - Original Xbox controllers use a proprietary connector and require adapters.
- Wireless Xbox 360 controllers require a 'Xbox 360 Wireless Gaming Receiver - Wireless Xbox 360 controllers require a 'Xbox 360 Wireless Gaming Receiver
for Windows' for Windows'
...@@ -101,8 +110,9 @@ All generations of Xbox controllers speak USB over the wire. ...@@ -101,8 +110,9 @@ All generations of Xbox controllers speak USB over the wire.
1.1 Original Xbox USB adapters Original Xbox USB adapters
-------------- --------------------------
Using this driver with an Original Xbox controller requires an Using this driver with an Original Xbox controller requires an
adapter cable to break out the proprietary connector's pins to USB. adapter cable to break out the proprietary connector's pins to USB.
You can buy these online fairly cheap, or build your own. You can buy these online fairly cheap, or build your own.
...@@ -123,8 +133,8 @@ you can still use the controller with your X-Box, if you have one ;) ...@@ -123,8 +133,8 @@ you can still use the controller with your X-Box, if you have one ;)
2. Driver Installation Driver Installation
---------------------- ===================
Once you have the adapter cable, if needed, and the controller connected Once you have the adapter cable, if needed, and the controller connected
the xpad module should be auto loaded. To confirm you can cat the xpad module should be auto loaded. To confirm you can cat
...@@ -132,13 +142,15 @@ the xpad module should be auto loaded. To confirm you can cat ...@@ -132,13 +142,15 @@ the xpad module should be auto loaded. To confirm you can cat
3. Supported Controllers Supported Controllers
------------------------ =====================
For a full list of supported controllers and associated vendor and product For a full list of supported controllers and associated vendor and product
IDs see the xpad_device[] array[6]. IDs see the xpad_device[] array[6].
As of the historic version 0.0.6 (2006-10-10) the following devices As of the historic version 0.0.6 (2006-10-10) the following devices
were supported: were supported::
original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202 original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202
smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289 smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289
original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285 original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285
...@@ -152,14 +164,16 @@ the module option 'dpad_to_buttons'. ...@@ -152,14 +164,16 @@ the module option 'dpad_to_buttons'.
If you have an unrecognized controller please see 0.3 - Unknown Controllers If you have an unrecognized controller please see 0.3 - Unknown Controllers
4. Manual Testing Manual Testing
----------------- ==============
To test this driver's functionality you may use 'jstest'. To test this driver's functionality you may use 'jstest'.
For example: For example::
> modprobe xpad
> modprobe joydev > modprobe xpad
> jstest /dev/js0 > modprobe joydev
> jstest /dev/js0
If you're using a normal controller, there should be a single line showing If you're using a normal controller, there should be a single line showing
18 inputs (8 axes, 10 buttons), and its values should change if you move 18 inputs (8 axes, 10 buttons), and its values should change if you move
...@@ -170,57 +184,59 @@ It works? Voila, you're done ;) ...@@ -170,57 +184,59 @@ It works? Voila, you're done ;)
5. Thanks Thanks
--------- ======
I have to thank ITO Takayuki for the detailed info on his site I have to thank ITO Takayuki for the detailed info on his site
http://euc.jp/periphs/xbox-controller.ja.html. http://euc.jp/periphs/xbox-controller.ja.html.
His useful info and both the usb-skeleton as well as the iforce input driver His useful info and both the usb-skeleton as well as the iforce input driver
(Greg Kroah-Hartmann; Vojtech Pavlik) helped a lot in rapid prototyping (Greg Kroah-Hartmann; Vojtech Pavlik) helped a lot in rapid prototyping
the basic functionality. the basic functionality.
6. References References
------------- ==========
[1]: http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki) [1]: http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki)
[2]: http://xpad.xbox-scene.com/ [2]: http://xpad.xbox-scene.com/
[3]: http://www.markosweb.com/www/xboxhackz.com/ [3]: http://www.markosweb.com/www/xboxhackz.com/
[4]: /proc/bus/usb/devices - dump from InterAct PowerPad Pro (Germany):
[4]: /proc/bus/usb/devices - dump from InterAct PowerPad Pro (Germany)::
T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs= 1 T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
P: Vendor=05fd ProdID=107a Rev= 1.00 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs= 1
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA P: Vendor=05fd ProdID=107a Rev= 1.00
I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=(none) C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=(none)
E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms
E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms
[5]: /proc/bus/usb/devices - dump from Redoctane Xbox Dance Pad (US):
[5]: /proc/bus/usb/devices - dump from Redoctane Xbox Dance Pad (US)::
T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0
P: Vendor=0c12 ProdID=8809 Rev= 0.01 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
S: Product=XBOX DDR P: Vendor=0c12 ProdID=8809 Rev= 0.01
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA S: Product=XBOX DDR
I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=xpad C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4ms I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=xpad
E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4ms
E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms
[6]: http://lxr.free-electrons.com/ident?i=xpad_device [6]: http://lxr.free-electrons.com/ident?i=xpad_device
7. Historic Edits Historic Edits
----------------- ==============
Marko Friedemann <mfr@bmx-chemnitz.de>
2002-07-16 2002-07-16 - Marko Friedemann <mfr@bmx-chemnitz.de>
- original doc - original doc
Dominic Cerquetti <binary1230@yahoo.com> 2005-03-19 - Dominic Cerquetti <binary1230@yahoo.com>
2005-03-19
- added stuff for dance pads, new d-pad->axes mappings - added stuff for dance pads, new d-pad->axes mappings
Later changes may be viewed with 'git log Documentation/input/xpad.txt' Later changes may be viewed with 'git log Documentation/input/xpad.txt'
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册