[haiku-development] Re: Joysticks in Haiku

  • From: Sean Collins <smc.collins@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 17 Mar 2011 10:45:05 +0000

Carwyn wrote:
I understand what you mean and have seen the changes you have made for
Quirky devices, this is clever idea and it should work, i can't test it yet as the Xbox 360 controller is not added when connected, when it's connected the usb_hid's usb_hid_device_added is not called. I've found that the Xbox 360 controller is returned as B_UNSUPPORTED in the file src/add-ons/kernel/bus_managers/usb/Device.cpp in the function status_t Device::ReportDevice. The reason being as far as i understand your code is that because the controller has the following rogue info,

Class .................. 0xff (Vendor specific)
Subclass ............... 0xff
Protocol ............... 0xff
Max Endpoint 0 Packet .. 8
USB Version ............ 0x0200
Vendor ID .............. 0x045e
Product ID ............. 0x028e
Product Version ........ 0x0110

Possible Kludge if(vendor_id == 0x045e && product_id == 0x028e) class = 0, subclass = 0 etc. I haven't tested this filthy kludge by the way yet.

You may have to add a kludge for this device and change the class, subclass etc to the correct values for your code when this vendor id etc is found, i don't think your a kludge type of person though. If your not then we just forget about the Xbox 360 controller.


Unfortunately a great many USB devices are in fact nonstandard implementations.I have been trying to compile a list of offenders in terms of manufacturers but at some point Kludges are simply going to be needed to get a great many USB devices to function. A great number of the USB class's are effected but specifically USB audio,video,joysticks,tablets,musical equipment are all pretty high on the non standard list.

would be nice if they could honor standards but for some reason communications protocols are often viewed as IP.


Ok, this sounds interesting. What do you recommend i should work on in relation to joysticks, gamepads etc. I may sound like i know what i'm talking about :-), but my knowledge of the USB isn't that great.


Hey, you weren't being harsh, you guys have worked hard to get Haiku where it is today and things must be done correctly. You don't want zombies like me coming out of the woodwork and eating your code :-0.

Carwyn




Well, you could always host any non standard drivers at www.haikuware.com if they fall outside of the cpliance standards for official inclusion. Its not pretty but its functional in the end.

Keep up the good work and if you want feel free to email a working Xbox driver. I'd like to try it out. There are a lot of Xbox 360 controller clones like Madcatz that use the nonstandard USB hid for xbox compatibility.

 Keep up the good work, there might be a way.

 Sean



Other related posts: