xpad.txt 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. xpad - Linux USB driver for X-Box gamepads
  2. This is the very first release of a driver for X-Box gamepads.
  3. Basically, this was hacked away in just a few hours, so don't expect
  4. miracles.
  5. In particular, there is currently NO support for the rumble pack.
  6. You won't find many ff-aware linux applications anyway.
  7. 0. Status
  8. ---------
  9. For now, this driver has only been tested on just one Linux-Box.
  10. This one is running a 2.4.18 kernel with usb-uhci on an amd athlon 600.
  11. The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) reports
  12. 8 axes and 10 buttons.
  13. Alls 8 axes work, though they all have the same range (-32768..32767)
  14. and the zero-setting is not correct for the triggers (I don't know if that
  15. is some limitation of jstest, since the input device setup should be fine. I
  16. didn't have a look at jstest itself yet).
  17. All of the 10 buttons work (in digital mode). The six buttons on the
  18. right side (A, B, X, Y, black, white) are said to be "analog" and
  19. report their values as 8 bit unsigned, not sure what this is good for.
  20. I tested the controller with quake3, and configuration and
  21. in game functionality were OK. However, I find it rather difficult to
  22. play first person shooters with a pad. Your mileage may vary.
  23. 1. USB adapter
  24. --------------
  25. Before you can actually use the driver, you need to get yourself an
  26. adapter cable to connect the X-Box controller to your Linux-Box.
  27. Such a cable is pretty easy to build. The Controller itself is a USB compound
  28. device (a hub with three ports for two expansion slots and the controller
  29. device) with the only difference in a nonstandard connector (5 pins vs. 4 on
  30. standard USB connector).
  31. You just need to solder a USB connector onto the cable and keep the
  32. yellow wire unconnected. The other pins have the same order on both
  33. connectors so there is no magic to it. Detailed info on these matters
  34. can be found on the net ([1], [2], [3]).
  35. Thanks to the trip splitter found on the cable you don't even need to cut the
  36. original one. You can buy an extension cable and cut that instead. That way,
  37. you can still use the controller with your X-Box, if you have one ;)
  38. 2. driver installation
  39. ----------------------
  40. Once you have the adapter cable and the controller is connected, you need
  41. to load your USB subsystem and should cat /proc/bus/usb/devices.
  42. There should be an entry like the one at the end [4].
  43. Currently (as of version 0.0.4), the following three devices are included:
  44. original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202
  45. original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285
  46. InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a
  47. If you have another controller that is not listed above and is not recognized
  48. by the driver, please drop me a line with the appropriate info (that is, include
  49. the name, vendor and product ID, as well as the country where you bought it;
  50. sending the whole dump out of /proc/bus/usb/devices along would be even better).
  51. In theory, the driver should work with other controllers than mine
  52. (InterAct PowerPad pro, bought in Germany) just fine, but I cannot test this
  53. for I only have this one controller.
  54. If you compiled and installed the driver, test the functionality:
  55. > modprobe xpad
  56. > modprobe joydev
  57. > jstest /dev/js0
  58. There should be a single line showing 18 inputs (8 axes, 10 buttons), and
  59. it's values should change if you move the sticks and push the buttons.
  60. It works? Voila, your done ;)
  61. 3. Thanks
  62. ---------
  63. I have to thank ITO Takayuki for the detailed info on his site
  64. http://euc.jp/periphs/xbox-controller.ja.html.
  65. His useful info and both the usb-skeleton as well as the iforce input driver
  66. (Greg Kroah-Hartmann; Vojtech Pavlik) helped a lot in rapid prototyping
  67. the basic functionality.
  68. 4. References
  69. -------------
  70. 1. http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki)
  71. 2. http://xpad.xbox-scene.com/
  72. 3. http://www.xboxhackz.com/Hackz-Reference.htm
  73. 4. /proc/bus/usb/devices - dump from InterAct PowerPad Pro (Germany):
  74. T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
  75. D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs= 1
  76. P: Vendor=05fd ProdID=107a Rev= 1.00
  77. C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
  78. I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=(none)
  79. E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms
  80. E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms
  81. --
  82. Marko Friedemann <mfr@bmx-chemnitz.de>
  83. 2002-07-16