Writing a game controller driver for some devices connected via USB

I am looking to create a driver for a game controller that I have (cobalt stream www.cobaltflux.com). The physical controller itself has nine front panel buttons and two control buttons (start / select). The control unit has a USB port, but as far as I can tell, no one has ever written drivers for it. The end result I want is to plug in a cobalt stream through the USB port and recognize it as a game controller.

I have programming experience. I am a senior graduate student in computer science at UC Davis and an intern at a large company with embedded systems, but this project includes several aspects that I don’t have: the interaction of hardware and software via a USB port, research on the feedback from the equipment that I did 't build (what bits light up when I press the button?), and creating drivers and indeed programs in general for windows.

Since I personally do not know anyone who could set me on the right track for the workflow to solve this problem, I ask here. I assume the approach looks something like this:

I connect the device via usb

I open a program for polling which button press effects are on the USB channel

I am writing a program that associates these signals from a USB port with game controller drivers that have

It may be worth noting that I need joyPAD support, not joySTICK support for buttons, since playback will include clicking on any number of buttons at the same time, and joysticks usually register only one input direction at any one time.

Any advice or help is appreciated. It’s hard for me to figure out where to start.

+7
windows usb driver joystick
source share
1 answer

I have had the exact same problem for over a year now and have not yet found the right solution.

When you connect the pad via USB, it announces the device identifier and the identifier of the provider which device it is. Windows Plug-and-Play begins a driver search. This mechanism indicates that it is a pointing device (in my case, one or two mice) and ensures that it is treated as a raw data input device. Input from these devices is converted to messages processed by the OS. It seems that the solution is to send messages from such an input source device to the right handler. In my case, both mice are recognized as mice, and the messages are used by the same handler as those from the third mouse, which is actually my pointing device. I'm not good enough in C ++ coding to delve into the rawinput API. I just got an interesting link as an answer to my question: http://www.icculus.org/manymouse/ , at least this gives an answer to my problem. Maybe this will give you ideas for writing your driver! Good luck !!! Stephen

+4
source share

All Articles