USB game controller driver development?

Started by
9 comments, last by Metaphorically 19 years, 3 months ago
I have a USB PC game controller that I want to work with. This particular controller doesn't actually have a driver; it's recognized by the USB HID subsystem, automatically registered as a game controller, and it just works. Quite nice, actually. But I want to mess around with it, for example, linking buttons to keyboard keys like some controller drivers do. So I have a couple questions: 1) Would it be legal to ask someone with an MSDN subscription to send me the Windows DDK? If not, can an MSDNAA subscription get me the DDK? Do I need the DDK to develop a driver? 2) Is is actually possible to partially override the USB HID layer to do this kind of stuff? 3) Where could I find some resources that would be specific to dealing with the controller? General stuff on sending and receiving across the USB port isn't that helpful.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Advertisement
Well you can order a DDK CD from here and as far as I can tell it'll only charge you for shipping and handling.
Perhaps instead of overriding the HID driver, you could create a "virtual keyboard" and "virtual mouse" driver that accepted messages from user-level applications that would simulate key and mouse movements. Then you could write a program that took inputs from ANY DirectInput device and use it to simulate keyboard presses.
Quote:Original post by Promit
1) Would it be legal to ask someone with an MSDN subscription to send me the Windows DDK?

I doubt it.
Quote: If not, can an MSDNAA subscription get me the DDK?

Yup.
Quote:Do I need the DDK to develop a driver?

In general, yes.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
Quote:Original post by Monder
Well you can order a DDK CD from here and as far as I can tell it'll only charge you for shipping and handling.


Indeed, it is only shipping and handling. I ordered it a few weeks ago. It arrived in a DVD case just 2 days later, though it is a CD, less than 200 MB in fact.
.
If you want joybutton->key mappings, you can get programs that run in the background and respond to joypad events. I use QJoyPad (in linux) for my game project with a hotwired SNES pad. The OS detects the SNES pad, but i don't have any SDL code to actually make it work. So i cheat. I use QJoyPad to assign each SNESpad button a key on the keyboard. SPACE is jump, TAB is fire, etc. When i press the button, QJoyPad intercepts it and fires off the appropriate keyboard key signal.

I'm sure there is a Windows equivilent.
Quote:Original post by Mastaba
Indeed, it is only shipping and handling. I ordered it a few weeks ago. It arrived in a DVD case just 2 days later, though it is a CD, less than 200 MB in fact.


"Only" shipping and handling is frickin $15! I'm not paying that kind of money for them to ship a DVD case...I'll go back to school and beg the physics dept for an MSDNAA account.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
15 dollars isn't exactly excessive. The $.2 for the CD is pretty cheap, and the case is another $.2 cents. And the UPS second day air option for this package would be about $13.58. That makes the total goods cost $14, leaving just $1 for the manpower that goes into burning, packaging, and shopping the CD.

IE, stop whining and spend the $15 :-P
Turring Machines are better than C++ any day ^_~
Ehm, I am pretty sure that some time ago you could just download the DDK from Microsoft, without any subscriptions. Did that change? Why?
You don't even need the DDK to make a joystick->keyboard/mouse mapper. All you need to do is make a program that polls the joystick state(via windows API or DirectInput or whatever since the joystick is already recognized by windows) and then use SendInput to simulate the keyboard/mouse events that you want to happen.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk

This topic is closed to new replies.

Advertisement