Gravis GamePad Pro USB

dododge at smart.net dododge at smart.net
Sun May 11 07:01:11 EDT 2003


I have a Gravis GamePad Pro USB. It's modeled after the standard
Playstation 1 controller. See:

http://www.gravis.com/products/pro_eli_d1019.html

Pyddr sees it, but the 2-axis/10-button configuration isn't
recognized so it doesn't get enabled for play. Here's a patch to
pyddr 0.6.2 which appears to make this controller work.

Note: I've only tried it on Linux, and since I haven't modified this
controller yet to wire in my DDR pad, I can't say for sure how
responsive it is.

BTW: is there a web-accessible mailing list archive?

                                        -Dave Dodge/dododge at smart.net

--- pyddr-0.6.2/input.py	Sun Apr 27 21:05:55 2003
+++ pyddr-0.6.2-gravis/input.py	Tue May  6 09:30:45 2003
@@ -33,6 +33,14 @@
 A4B16 = { 0: E_MARK, 1: E_PGUP, 3: E_PGDN, 8: E_SELECT, 9: E_START,
           15: E_LEFT, 13: E_RIGHT, 12: E_UP, 14: E_DOWN }
 
+# 10 buttons, 2 axis
+# Gravis GamePad Pro USB
+# buttons 0: square/red, 1: x/yellow, 2: circle/green, 3: triangle/blue
+# buttons 4: L1, 5: R1, 6: L2, 7: R2,http://www.gravis.com/products/pro_eli_d
+# buttons 8: select, 9: start
+A2B10 = { 0: E_LEFT, 1: E_DOWN, 2: E_RIGHT, 3: E_UP,
+          5: E_PGUP, 7: E_PGDN, 8: E_SELECT, 9: E_START }
+
 class EventManager:
   def __init__(self, handler = pygame.event):
     self.handler = handler
@@ -61,6 +69,9 @@
       elif ddrmat.get_numbuttons() == 12 and ddrmat.get_numaxes() == 6:
         if mat == None: mat = i
         elif mat2 == None: mat2 = i
+      elif ddrmat.get_numbuttons() == 10 and ddrmat.get_numaxes() == 2:
+        if mat == None: mat = i
+        elif mat2 == None: mat2 = i
       else:
         print "You have a joystick attached, but it doesn't seem to be a DDR mat."
         print "It has", ddrmat.get_numbuttons(), "buttons and", ddrmat.get_numaxes(), "axes."
@@ -85,6 +96,8 @@
         self.mergeEvents(A4B16, 0, "js" + str(mat))
       elif ddrmat.get_numbuttons() == 12:
         self.mergeEvents(A6B12, 0, "js" + str(mat))
+      elif ddrmat.get_numbuttons() == 10:
+        self.mergeEvents(A2B10, 0, "js" + str(mat))
       print "DDR mat 1 initialized: js", mat
       self.handler.set_allowed((JOYBUTTONUP, JOYBUTTONDOWN))
       if mat2 != None:



More information about the pyddr-discuss mailing list