Hi all, I am attempting to write a kernel-space driver for Nintendo's USB Gamecube controller adapter they released at the end of last year. Basing my work off of an equivalent project for an Xbox 360 controller, I have made considerable progress, and have a single controller portworking. My source can be found at https://github.com/area/wiiu-gc-adapter-osx
The adapter has four controller ports, and I have confirmed that data from all four ports is read correctly by using IOLog. However, I seem to be unable to correctly report this data such that all four controllers can be used by applications that support HID controllers. I have created a HID report with four identical collections, save for the Report IDs. What is the correct way of calling handleReport for multiple report IDs? I have tried both: 1. Updating a struct for the whole descriptor, and calling handleReport once per interrupt, intending to update all four ports simultaneously 2. Updating a struct for each controller, and calling handleReport once for each controller on each interrupt, with a different report ID in each case. Neither of these approaches seem to work, with the additional controller ports either not working at all or mapping to the first controller port. It is Option 2 that is currently implemented in the repository I link to above. Am I doing something wrong, or is there an issue with multiple (identical?) collections on a single device that I'm running into? The behaviour I see seems to vary between programs; some programs report a single (huge) device with four controller's worth of axes and buttons, and others report four separate controllers, which suggests that maybe it is simple a poor implementation of HID standards in these programs that I am experiencing? I have also tried to work out if it is possible to fake four different USB HID devices through this driver, each with identical HID descriptors and no report ID, but have made zero progress on that front. Another solution takes this approach, but in userland ( https://github.com/mitchdzugan/osx-wiiu-gcc-adapter ). However, I have seen it suggested that using Frameworks in kernel-space is either ill-advised or impossible. Before embarking on this, I had no experience with USB devices / HID / developing for kernel-space on OSX, so I am hoping I am missing something simple that this mailing list can point me at. Many thanks, Alex _______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/usb/archive%40mail-archive.com This email sent to [email protected]
