Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Serial port gamepad driver...

This thread is locked; no one can reply to it. rss feed Print
Serial port gamepad driver...
Marcello
Member #1,860
January 2002
avatar

Hey, I have one of these gravis stinger gamepads that uses a serial port (designed as a 'laptop' gamepad), but unfortunately they do not have a w2k/xp driver for it.

So my question is, armed with the source code for a linux driver, how difficult would it be to port the linux code that reads the serial port and whatnot, and acts like a gamepad on w2k?

Marcello

PyroBoy
Member #725
October 2000
avatar

Depends what you want to be able to use the pad with... you could add a driver for the pad to allegro and then allegro games would see it just fine but im guessing youll really want to make a Direct Input Driver for it. I dont know if this is posible as Direct input is closed source.

Michael Jensen
Member #2,870
October 2002
avatar

Umm as far as I know you just need a windows joystick driver (compatible with your version of windows) and DirectInput/allegro(for direct X)/anything that runs on windows and works with a gamepad/joystick can use it -- I've heard the windows NT based operating systems are much easier for writing drivers than 9x based systems and that most beginnner driver programmers start on NT based or some other operating system than 9x

Marcello
Member #1,860
January 2002
avatar

How would one go about writing a driver then? Is there stuff you can download to work with?

Marcello

Kitty Cat
Member #2,815
October 2002
avatar

You'd probably need to get the full-blown DX SDK. MSDN might be able to give you more info, but AFAIK DX drivers have direct hardware access.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Marcello
Member #1,860
January 2002
avatar

Is that free? Can anyone who has it check if that would work? (I seem to recall it being like 5TB.)

Marcello

Kitty Cat
Member #2,815
October 2002
avatar

Last I knew, the full DX SDK is free, but yeah it's a big download. And MSDN is available online. http://msdn.microsoft.com/

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Thomas Fjellstrom
Member #476
June 2000
avatar

They will also send you a CD of the SDK for the price of shipping last I heard..

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Isn`t Direct X just calling proper DLL/VXD drivers?

Oscar Giner
Member #2,207
April 2002
avatar

You don't need DX SDK to write drivers. You need the MS DDK (Driver Development Kit). I think you can download it, but I don't think it will work on any compiler other than MSVC. Maybe mingw guys have done something.

There's also Directx DDK, but it seems it's only for developing video card drivers.

Marcello
Member #1,860
January 2002
avatar

I have a copy of MSVC++5.0 I bought back in '97... would that work?

Marcello

Oscar Giner
Member #2,207
April 2002
avatar

An old version of MS DDK should come with it (maybe you cannot even write a driver for win98 with that). You should download a recent version. Try to download a not too recent version, because the last one may not work with MSVC5.

Michael Jensen
Member #2,870
October 2002
avatar

Yeah -- you shouldn't need to do anything Direct X specific -- Direct X will automatically wrap your windows joystick drivers... you just need to be able to make an NT hardware device driver for a joystick -- if you are able to let us know how you did it and what tools you specifically used... I'd be interested to know. however the DDK does sound familiar like something I've heard before so it sounds like Oscar is on the right track...

Go to: