Skip to contentSkip to conversation

PSX support in input/joystick/gamecon.c

PATCH New Peter Nelson 1 participant 1 message Feb 6, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PSX support in input/joystick/gamecon.c

Hi, this is my first kernel hack but it's fairly straight froward. I did a partial-rewrite of the PSX support in gamecon.c to make it far more usable. What this patch changes:

* Adds support for more than one controller. Previously more than one controller was initialized and the docs said they worked, but only one was actually read.
* Removes unnecessary detection on initialization. This allows the module to be initialized without controllers plugged in (hot swapping controllers works). This removes a warning if the user has an unrecognized controller plugged in, but the only unrecognized controller I have been able to find information about online is the PSX mouse, which I've never actually seen.
* Adds a gc_psx_ddr option to have direction presses register as buttons instead of axes. Allows the module to be used for Dance Dance Revolution emulators like Stepmania.
* Adds gc_psx_* to documentation.

I've tested this with a dualshock 2, clone digital controller, and DDR pads. The patch applies against both 2.6.1 and 2.6.2.

-Peter Nelson

Documentation/input/joystick-parport.txt renamed from Documentation/input/joystick-parport.txt.org +10 -2
@@ -453,8 +453,16 @@ uses the following kernel/module command
 	  6  | N64 pad
 	  7  | Sony PSX controller
 
-  The exact type of the PSX controller type is autoprobed, so you must have
-your controller plugged in before initializing.
+  The exact type of the PSX controller type is autoprobed with use so hot
+swapping should work.  There are two options specifically for PSX controllers:
+
+  gc_psx_delay=usec
+    The delay time between controller reads, default is 25 usec. Some users have
+    reported improved responsiveness at 10 usec.
+
+  gc_psx_ddr=1
+    Register directions events as buttons instead of axes.  Usefull for Dance
+    Dance Revolution emulators so up and down can be pressed at once.
 
   Should you want to use more than one of parallel ports at once, you can use
 gc_2 and gc_3 as additional command line parameters for two more parallel
drivers/input/joystick/gamecon.c renamed from drivers/input/joystick/gamecon.c.org +113 -97

308 lines not on this page · raw message