Thursday, November 1, 2018

First week on Gateware and Researching controller input

 11/1/2018

Month 1, Week 2

Author: Devin Wright

I spent the first week reading through the documents and source code of the Gateware project. Also, I started my research into implementing controller support library for Gateware. I found that on the Windows OS there are three APIs for controller support; Xinput, Directinput, and RawController(which has a child class called Gamepad for handling hand-held controllers). RawController will not be a viable option as it is only available to UWP apps, and Gateware  currently runs as a win32. For now Xinput seems like the best choice for windows as of right now since, Directinput is harder to set up and even though it works with more controllers than Xinput it is unsure yet if the other OSs will be capable of the same. With this knowledge I made a small demo to test Xinput, it worked as expected and was very easy to set up meaning that Xinput will be a viable way to implement controller support on Windows.

This week I continued looking into controller support on Mac OS X. At First I believed that It could be implemented quite easily using the Mac Game Controller framework. However, when I went to implement the demo for it I discovered that the framework only works for MFI(Made for IPhone) controllers which our targeted controller(Xbox 360) is not supported as one.  With that dead end I began looking for an alternative approach, and with what I have found so far it appears I can use the Mac's IOKIT/HIDManager framework to read input from the controller as a HID device, and then translate it into the values representing the state of each button on the controller. Currently I do not know a lot about this framework, however it seem like a viable way to get the input that I need.



No comments:

Post a Comment