Patch: add support for a specific Xbox dancepad

David Fifield <[email protected]> Thu, 6 Jan 2005 01:22:23 -0700
Newsgroups gmane.linux.ports.xbox.devel
Message-ID <[email protected]>
I had to apply this patch to have my Xbox dancepad recognized as a
joystick and work with pydance.

The dancepad is the DDR Deluxe Dance Mat V.3.1 from Level Six. The model
number is X-BOX638. There's some information about the pad at
http://www.levelsix.com/product_info.php?cPath=21&products_id=31.

The patch applies on top of the kernel-2.6 files from the Xbox-Linux
CVS. It works under 2.4 also.

Notice that the value for the field isMat is 0, even though the device
is a mat. This is because the pad acts as a controller, sending button
presses both as digital buttons and analog axes. In any case, I found
that it was necessary in order to make the pad show up as a mouse and a
joystick.

David Fifield
dancepad.diff (text/plain, 709 B)
diff -Nru linux-2.6.10.orig/drivers/usb/input/xpad-core.c linux-2.6.10/drivers/usb/input/xpad-core.c
--- linux-2.6.10.orig/drivers/usb/input/xpad-core.c	2004-07-03 17:39:09.000000000 -0600
+++ linux-2.6.10/drivers/usb/input/xpad-core.c	2005-01-06 00:30:23.000000000 -0700
@@ -79,6 +79,7 @@
 	{ 0x0738, 0x4540, 1, "Mad Catz Beat Pad" },
 	{ 0x0738, 0x4556, 0, "Mad Catz Lynx Wireless Controller" },
 	{ 0x0738, 0x6040, 1, "Mad Catz Beat Pad Pro" },
+	{ 0x0c12, 0x8809, 0, "Level Six Xbox DDR dancepad" },
 	{ 0x0c12, 0x9902, 0, "HAMA VibraX - *FAULTY HARDWARE*" }, /* these are broken */
 	{ 0x0e4c, 0x2390, 0, "Radica Games Jtech Controller"},	
 	{ 0x0e6f, 0x0003, 0, "Logic3 Freebird wireless Controller" },