Friday, November 9, 2018

Second week on Gateware, researching Mac controller support

 11/9/2018

Month 1, Week3

Author: Devin Wright

This last week I spent looking into implementing controller support for the Xbox 360 controller on Mac OS X. After, discovering last week that Mac's Game Controller framework does not support them I had began to look into IOHIDManager as a potential work around. However, for the IOHIDManager to work the device being detected has to registered to belong in one of the categories available for creating a matching dictionary used for searching for connected devices. The problem being that since the Xbox 360 controller is not detected as a controller by the OS, it is unclear how to search for the controller using the IOHIDManager ( or if it is possible at all). I am tipped in the direction that the IOHIDManager is not usable for reading input from a Xbox 360 controller, as none of the sources I have found have incorporated it. Instead all of them use a different part of the IOKIT framework to read the bytes sent by the controller and then interoperate the results. However, as these sources are attached to drivers designed to implement Xbox 360 controller support, I might risk making my Implementation depended on a driver if I follow their implementation, as it is unclear how much they affect the output from the controller.

As of right now I am currently testing available controllers to see if I can find one that work as a MFI controller. So, that I can use the Game Controller framework for proving it as a reliable backup, and if needed move Xbox 360 controller support to a B-Level feature to be implemented when I have more time to look into it.  Since, I still have to look into and implement my demo of controller support on Linux, as well as write up my API documentation. For Linux I am looking into using the edev library, or a library that wraps up its complexities as it is a fairly low level library. However, no testing has been done yet to see what the library will support, and Linux documentation is scarce.

 

No comments:

Post a Comment