First post, by itsgallus
hi, is there a driver that I can use for the MS Sidewinder Gamepad in MS DOS that supports all of it's buttuns not just 4 + directions?
hi, is there a driver that I can use for the MS Sidewinder Gamepad in MS DOS that supports all of it's buttuns not just 4 + directions?
Try SDWRGMPD from http://www.bretjohnson.us/
DOS Driver for a Microsoft SideWinder digital GamePad. Microsoft doesn't make a DOS driver for any of their SideWinder products - they want to force you into using Win95. SDWRGMPD will let you use your GamePad in just plain old DOS.
But most games have 4 button support max. So you might need some software to map the gamepad buttons to keyboard buttons.
Hi,
Were you able to make it work in DOS even with 4 buttons only? I tried using SDWRGMPD and it never works for me (the testing program works fine, but none of my games can detect it). Do you know of any games that work with that driver?
Only way I was able use the Sidewinder in DOS games is running them from windows. Some games (i.e Super Street Fighter 2) can use 6 sidewinder buttons if you set it as a capcom pad in game option, but in general you are limited by the number of buttons each game supports (mostly 4). A workaround to add more buttons in games that don't support it is to use JOYEMU to map joystick buttons to keyboard keys, only problem is that it uses more than 20k of conventional memory.
LO-RES, HI-FUN
gaffa2002 wrote on 2020-06-05, 14:58:Were you able to make it work in DOS even with 4 buttons only? I tried using SDWRGMPD and it never works for me (the testing program works fine, but none of my games can detect it). Do you know of any games that work with that driver?
Looking at the SDWRGMPD documentation, it seems to work by replacing the System BIOS Service INT 15h, AX=84h. This doesn't work for any games that access the game port directly on port 0x201. So look for games that use the BIOS to access the joystick:
;------------------------------------------------------------------------------;HAVE INTERRUPT 15h DO THIS EVERY TIME IT OCCURS;Inputs : AH = 84h (Joystick support); DX = -1 (Installed & Enabled?) - Returns CF=Clear, DX=0; DX = 0 (Get buttons) - Returns high nibble of AL, CF=Clear; DX = 1 (Get Coordinates) - Returns AX,BX,CX,DX, CF=Clear;Outputs: Depends on DX input;Changes: Buff;------------------------------------------------------------------------------Int15:PUSH BP ;Save used registerMOV BP,SP ;Point at the stack; [BP]=BP,[BP+2]=IP,[BP+4]=CS,[BP+6]=FlagsPUSHF ;Save flagsSTI ;Enable interruptsPUSH DS,ES ;Save used registersMOV DS,CS ;Point DS and ESMOV ES,CS ; at our data areaCLD ;Go forward with string functionsCMP AH,84h ;Is it the joystick function?JNE Int15Old ;If not, just the the old routine handle itCMP Enabled,Yes ;Are we enabled right now?JNE Int15Old ;If not, just the the old routine handle itCMP DX,-1 ;Is it our special "is it installed" function?JNE >I10 ;If not, try the next possibilityINC DX ;If so, set DX=0 (the "it's installed" flag)JMP >I90 ;And we're doneI10: ;Test for function 0OR DX,DX ;Is it function 0?JNZ >I40 ;If not, see if it's function 1CALL DoButtons ;If so, calculate the status of the buttonsJMP >I90 ;And we're doneI40: ;Test for function 1CMP DX,1 ;Is it function 1?JNE Int15Old ;If not, let the old routine handle itCALL DoCoords ;If so, calculate the coordinatesI90: ;We're donePOP ES,DS ;Restore used registersPOPF ;Restore flagsAND B [BP+6],0FEh ;Clear the carry flag for the returnPOP BP ;Restore used registerIRET
This is the part that installs the new interrupt routine for int 15h (and some others):
;------------------------------------------------------------------------------;CHANGE INTERRUPTS TO OUR CODE;Inputs :;Outputs:;Changes: Several Interupt vectors;------------------------------------------------------------------------------ChangeInts:PUSH AX,DX,DI ;Save used registersMOV AL,08h ;Need to change Int 08h to our codeMOV DX,Int08 ;Point at our codeMOV DI,OFFSET Int08Vect ;Place to store the old vectorCALL ChangeInt ;Change itMOV AL,15h ;Need to change Int 08h to our codeMOV DX,Int15 ;Point at our codeMOV DI,OFFSET Int15Vect ;Place to store the old vectorCALL ChangeInt ;Change itMOV AL,2Fh ;Need to change Int 2Fh to our codeMOV DX,Int2F ;Point at our codeMOV DI,OFFSET Int2FVect ;Place to store the old vectorCALL ChangeInt ;Change itPOP DI,DX,AX ;Restore used registersRET
Using EMM386/QEMM's I/O Virtualization Handler feature, it would probably be possible to write a TSR that hooks I/O on port 0x201, like ADLIPT does to virtualize the Adlib port access (0x388, 0x389) and SoftMPU does to virtualize the MPU-401 port access (0x330, 0x331). Of course, that'd only work for games that run with EMM386/QEMM running in the background (and a 386+ CPU).
The source code of SDWRGMPD is available.
Hey, thanks for replying,
The TSR solution is nice, but can be somehow achieved by just running the games from inside Windows. Then the sidewinder is recognized as a regular joystick and can even work as a Capcom pad for games like Super Street Fighter 2.
My only reason for wanting a way to use the sidewinder in pure DOS was to have a single gamepad for everything (right now I have the gravis gamepad and the sidewinder on my older PCs).
Sadly, all my favorite DOS games seem to access the port directly. In fact, it seems the majority of DOS games tend to avoid using interrupts to do anything.
LO-RES, HI-FUN