So I have this USB controller that I want to communicate with using my emulator. I have read a few tutorials on communication with USB ports etc. and I think that I'm on the right track. But how do emulators go about implementing controller support?
DirectInput--what you should be using for keyboard input as well.
kyuusaku wrote:
DirectInput--what you should be using for keyboard input as well.
Basically its my DualShock 3 controller, which under Control Panel->Game Controllers does actually appear with the correct name and settings too. Of course there are no drivers for the controller which means that whenever you try to calibrate it you get no response. Since my computer recognises the device, could I still use DirectInput (which I have always used for my keyboard) to access it, or since there is no driver would I have to go in directly with USB access?
Edit: Since its recognised by Windows, does that mean that I could read data from the controller directly via DirectInput?
kyuusaku wrote:
DirectInput--what you should be using for keyboard input as well.
Don't forget about cross-platform emulators! (Or else the linux penguin will seek his revenge)
Your cross-platform wrapper should wrap DirectInput on Windows or the counterpart on *n?x or Mac OS X. Allegro does, and so should SDL.
WedNESday:
I can has driver
tepples wrote:
Your cross-platform wrapper should wrap DirectInput on Windows or the counterpart on *n?x or Mac OS X. Allegro does, and so should SDL.
WedNESday:
I can has driver
No, that driver doesn't work for my computer. And sorry tepples, but the first sentence of that post means nothing to me.
WedNESday wrote:
And sorry tepples, but the first sentence of that post means nothing to me.
A lot of cross-platform games are developed using a library such as Allegro, SDL, or ClanLib. This library exposes a generic API to read game controllers. Under the Windows version of the library, the generic API calls DirectInput. Under the Linux version of the library, the generic API calls the Linux joystick interface. Or under the Mac OS X version of the library, the generic API calls the HID Manager.
Oh yeah sorry but I did understand after all. But anyway, under control panel my Dualshock 3 controller is recognised, and when I plugged it in it installed correctly and now appears under game controllers in the control panel (as a Playstation 3 controller with settings and calibrations). Even though there is obviously no driver for this (the one I tried didn't work (ps3sixaxis_en.exe)), could I still used DirectInput to read from the controller, or am I the proud owner of the world's most expensive paperweight?
Edit: I've just read somewhere that USB game controllers that are HID compliant don't need drivers, is this true?
WedNESday wrote:
Edit: I've just read somewhere that USB game controllers that are HID compliant don't need drivers, is this true?
Yeah. As long as it shows up in Device Manager and tests OK in the Game Controllers applet, you're good to go. Of course, controller-specific features (rumble, programmable buttons, motion sensors, etc.) usually won't work, unless they map to a standard axis or button.
It appears under device manager twice:
Human Interface Devices->HID-compliant Consumer Control Device
Human Interface Devices->HID-compliant game controller
Here is how it appears under Control Panel->Game Controllers. Go to this page and scroll down until you can see images with all kinds of red circles on them. That is what I get in my Control Panel->Game Controllers, except nothing responds onscreen whenever I press any buttons.
http://forums.ps2dev.org/viewtopic.php?p=65104
It's no use. After hours of searching the internet and trying all kinds of stuff, I just can't get it to work. The basic thing is, there're no drivers for this thing (at least ones that work for me). I can get it to show up in the Control Panel under Game Controllers, but cannot calibrate it and none of the buttons respond to it. When I plugged in my USB->PC Playstation controller thingy, it installed straight away (just like my Dualshock 3 did) but I could go straight into ZSNES and just configure the keys with it, unlike my Dualshock 3.
So I've basically wasted £50. Great. Does anyone know of a person/software house that could write me a driver? I might be prepared to pay for services too.
WedNESday wrote:
Does anyone know of a person/software house that could write me a driver? I might be prepared to pay for services too.
That might be more expensive than you think. Will probably make the money you've already spent on the thing look like pocket change.
*Bump*
Yes! There are some new drivers that finally make the thing work now, but my USB dongle doesn't detect the controller. Does anybody know of one that will, or can provide information on the PS3's bluetooth capability?
I have a pair of dongles (Big Microsoft 1.0 with the dock and iogear's 2.0 direct connect one).
Now I don't have any PS3 controllers aside from the RockBand stuff (I bought for PS2, all PS3 devices stickered "PS2 Compatible"...lol), but I do have plenty of Wii Remotes, which I've managed to get some working in GlovePIE (this is for VR tracking devices, and the WiiMote's accelerometer(s) is/are supported)...the only catch I've ran into is that you may need to obtain the Widcomm drivers or BlueSoleil software to support anything other than Keyboards, Mice, Networking Devices, and "Virtual Serial/Parallel Ports."
tl;dr WidComm or BlueSoleil allow more devices, and may be needed for it to work.