Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
5ab506c8
Commit
5ab506c8
authored
Jul 25, 2002
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update of the X-Box USB pad driver and documentation to version 0.0.5.
parent
e9c3815e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
127 additions
and
107 deletions
+127
-107
Documentation/input/xpad.txt
Documentation/input/xpad.txt
+59
-27
drivers/usb/input/xpad.c
drivers/usb/input/xpad.c
+68
-80
No files found.
Documentation/input/xpad.txt
View file @
5ab506c8
usb-xpad - Linux USB driver for XBOX HID gamecontroller
s
xpad - Linux USB driver for X-Box gamepad
s
This is the very first release of a driver for X
BOX gamecontroller
s.
This is the very first release of a driver for X
-Box gamepad
s.
Basically, this was hacked away in just a few hours, so don't expect
miracles.
In particular, there is currently NO support for the rumble pack.
You won't find many ff-aware linux applications anyway.
0. Status
---------
...
...
@@ -14,31 +17,38 @@ The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) reports
8 axes and 10 buttons.
Alls 8 axes work, though they all have the same range (-32768..32767)
and the zero-setting is not correct for the triggers.
9 of the 10 buttons work (my black button does not work, though I can
see no reason for it not to), all of them are in digital mode, though
(the six buttons on the right side are "analog" ones).
and the zero-setting is not correct for the triggers (I don't know if that
is some limitation of jstest, since the input device setup should be fine. I
didn't have a look at jstest itself yet).
All of the 10 buttons work (in digital mode). The six buttons on the
right side (A, B, X, Y, black, white) are said to be "analog" and
report their values as 8 bit unsigned, not sure what this is good for.
I tested the controller with quake3, and configuration and
in game functionality were OK. However, I find it rather difficult to
play first person shooters with a pad. Your mileage may vary.
1. USB adapter
--------------
Before you can actually use the driver, you need to get yourself an
adapter cable to connect the X
BOX-
controller to your Linux-Box.
adapter cable to connect the X
-Box
controller to your Linux-Box.
Such a cable is pretty easy to build. The Controller itself is a USB
device
(a hub with three ports; two expansion slots and the controller device)
with the only differ
nce in a nonstandard connector (5 pins vs. 4 on
Such a cable is pretty easy to build. The Controller itself is a USB
compound
device (a hub with three ports for two expansion slots and the controller
device) with the only differe
nce in a nonstandard connector (5 pins vs. 4 on
standard USB connector).
You just need to solder a
n
USB connector onto the cable and keep the
You just need to solder a USB connector onto the cable and keep the
yellow wire unconnected. The other pins have the same order on both
connectors so there
no magic to it. Detailed info on these matters can be found
on the net
.
connectors so there
is no magic to it. Detailed info on these matters
can be found on the net ([1], [2], [3])
.
Thanks to the trip splitter found on the cable you don't even need to cut the
original
cable, y
ou can buy an extension cable and cut that instead. That way,
you can still use the controller with your X
BOX
, if you have one ;)
original
one. Y
ou can buy an extension cable and cut that instead. That way,
you can still use the controller with your X
-Box
, if you have one ;)
2. driver installation
...
...
@@ -46,22 +56,26 @@ you can still use the controller with your XBOX, if you have one ;)
Once you have the adapter cable and the controller is connected, you need
to load your USB subsystem and should cat /proc/bus/usb/devices.
There should be an entry like the one in InterAct_german.dump.
There should be an entry like the one at the end [4].
Currently (as of version 0.0.4), the following three devices are included:
original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202
original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285
InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a
Don't worry if the vendor and/or product ID don't match, those are easy to
add to the driver. You could do it yourself, just add the appropriate line
into the list after the line
'} xpad_device[] = {'
, but before the line that says
'{ 0x0000, 0x0000, "unknown...." }'.
If you have another controller that is not listed above and is not recognized
by the driver, please drop me a line with the appropriate info (that is, include
the name, vendor and product ID, as well as the country where you bought it;
sending the whole dump out of /proc/bus/usb/devices along would be even better).
In theory, the driver should work with other controllers than mine
(InterAct PowerPad pro, bought in Germany) just fine, but see for yourself.
(InterAct PowerPad pro, bought in Germany) just fine, but I cannot test this
for I only have this one controller.
If you compiled and installed the driver, test the functionality:
> modprobe
usb-
xpad
> modprobe xpad
> modprobe joydev
> jstest /dev/
input/
js0
> jstest /dev/js0
There should be a single line showing 18 inputs (8 axes, 10 buttons), and
it's values should change if you move the sticks and push the buttons.
...
...
@@ -76,9 +90,27 @@ I have to thank ITO Takayuki for the detailed info on his site
http://euc.jp/periphs/xbox-controller.ja.html.
His useful info and both the usb-skeleton as well as the iforce input driver
helped a lot in rapid prototyping the basic functionality.
(Greg Kroah-Hartmann; Vojtech Pavlik) helped a lot in rapid prototyping
the basic functionality.
4. References
-------------
1. http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki)
2. http://xpad.xbox-scene.com/
3. http://www.xboxhackz.com/Hackz-Reference.htm
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
P: Vendor=05fd ProdID=107a Rev= 1.00
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms
E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms
--
Marko Friedemann <mfr@bmx-chemnitz.de>
2002-07-
02
2002-07-
16
drivers/usb/input/xpad.c
View file @
5ab506c8
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment