Re: [AD] MS Sidewinder 3D Pro Family DOS Driver

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> There is a problem: your driver uses GCC's extended asm feature and this
> is incompatible with the Watcom compiler. I'll try to think about a
> solution.

Acho worked hard to resolve this issue and split his original driver into a C 
source file and an assembly source file. The driver has now been merged, 
alongside the necessary modifications to let it build (swpp.diff).

I also ran into a problem when merging the driver: it seems that my patch 
that had disabled the joystick in the GUI of the setup program was a bit 
gross, because it had also disabled autodetection in the joystick setup 
screen. Fixed thusly (setup_joy2.diff).

-- 
Eric Botcazou
--- /cvs/allegro/include/allegro/platform/aldos.h	Sat Nov  2 19:34:08 2002
+++ allegro/include/allegro/platform/aldos.h	Fri Jan 24 18:38:20 2003
@@ -71,6 +71,7 @@
 #define JOY_TYPE_WINGEX          AL_ID('W','I','N','G')
 #define JOY_TYPE_SIDEWINDER      AL_ID('S','W',' ',' ')
 #define JOY_TYPE_SIDEWINDER_AG   AL_ID('S','W','A','G')
+#define JOY_TYPE_SIDEWINDER_PP   AL_ID('S','W','P','P')
 #define JOY_TYPE_GAMEPAD_PRO     AL_ID('G','P','R','O')
 #define JOY_TYPE_GRIP            AL_ID('G','R','I','P')
 #define JOY_TYPE_GRIP4           AL_ID('G','R','I','4')
@@ -104,6 +105,7 @@
 AL_VAR(JOYSTICK_DRIVER, joystick_wingex);
 AL_VAR(JOYSTICK_DRIVER, joystick_sw);
 AL_VAR(JOYSTICK_DRIVER, joystick_sw_ag);
+AL_VAR(JOYSTICK_DRIVER, joystick_sw_pp);
 AL_VAR(JOYSTICK_DRIVER, joystick_gpro);
 AL_VAR(JOYSTICK_DRIVER, joystick_grip);
 AL_VAR(JOYSTICK_DRIVER, joystick_grip4);
@@ -139,7 +141,8 @@
 
 #define JOYSTICK_DRIVER_SIDEWINDER                                \
       { JOY_TYPE_SIDEWINDER,     &joystick_sw,        TRUE  },    \
-      { JOY_TYPE_SIDEWINDER_AG,  &joystick_sw_ag,     TRUE  },
+      { JOY_TYPE_SIDEWINDER_AG,  &joystick_sw_ag,     TRUE  },    \
+      { JOY_TYPE_SIDEWINDER_PP,  &joystick_sw_pp,     TRUE  },
 
 #define JOYSTICK_DRIVER_GAMEPAD_PRO                               \
       { JOY_TYPE_GAMEPAD_PRO,    &joystick_gpro,      TRUE  },
--- /cvs/allegro/makefile.lst	Tue Nov 19 16:25:04 2002
+++ allegro/makefile.lst	Fri Jan 24 18:56:22 2003
@@ -148,6 +148,8 @@
 	src/dos/sndscape.c \
 	src/dos/snespad.c \
 	src/dos/sw.c \
+	src/dos/swpp.c \
+	src/dos/swpps.s \
 	src/dos/vesa.c \
 	src/dos/vesas.s \
 	src/dos/wss.c \
--- /cvs/allegro/allegro.cfg	Mon Oct 28 00:11:20 2002
+++ allegro/allegro.cfg	Fri Jan 24 18:59:12 2003
@@ -469,6 +469,7 @@
 #  WING     - Logitech Wingman Extreme
 #  SW       - Microsoft Sidewinder digital pad
 #  SWAG     - Microsoft Sidewinder digital pad (aggressive)
+#  SWPP     - Microsoft Sidewinder 3D/Precision/Force Feedback Pro
 #  GPRO     - Gravis GamePad Pro
 #  GRIP     - Gravis GrIP
 #  GRI4     - Gravis GrIP (4-axis only)
--- /cvs/allegro/docs/src/allegro._tx	Wed Jan 22 16:50:34 2003
+++ allegro/docs/src/allegro._tx	Fri Jan 24 19:03:24 2003
@@ -7713,6 +7713,9 @@
       An alternative driver to JOY_TYPE_SIDEWINDER.
       Try this if your Sidewinder isn't recognized with JOY_TYPE_SIDEWINDER.
 <li>
+   JOY_TYPE_SIDEWINDER_PP<br>
+      The Microsoft Sidewinder 3D/Precision/Force Feedback Pro joysticks.
+<li>
    JOY_TYPE_GAMEPAD_PRO<br>
       The Gravis GamePad Pro (supports up to two controllers, each with ten 
       buttons and a digital direction control).
--- /cvs/allegro/setup/setup.c	Tue Jan 28 10:43:30 2003
+++ allegro/setup/setup.c	Tue Jan 28 11:25:24 2003
@@ -2654,6 +2654,8 @@
 	 joystick_dlg[2].d1 = 0;
 	 get_joystick_drivers(&list, &list_size);
 
+	 install_joystick(JOY_TYPE_AUTODETECT);
+
 	 for (i=0; list[i].driver; i++) {
 	    if (list[i].id == _joy_type) {
 	       joystick_dlg[2].d1 = i;
@@ -2661,6 +2663,8 @@
 	    }
 	 }
 
+	 remove_joystick();
+
 	 activate_dialog(joystick_dlg, joystick_handler, FALSE);
 	 break;
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/