PORTS Forum

Ports and Interfaces => USB => Topic started by: ulao on December 01, 2017, 10:08:46 am

Title: xinput WTF is it?
Post by: ulao on December 01, 2017, 10:08:46 am
Could anyone here please talk to me at a firmware level? This so called xinput, what is it really? From what I gather xinput is an API that supports xbox controllers. So when someone says "can you support xinput in your device" my answer has to be no... My device being a HID gamepad.

Though in reading I find this xbox controller is nothing more then a limited USB device that communicate with raw hid. So what is raw hid, is that feature reports?

So more specific to my point and if any of that is true, can't I just answer the raw report from my HID device and act as a xbox controller? This then would suggest there is a document (or hidden, proprietary) protocol to follow.
Title: Re: xinput WTF is it?
Post by: Jan Axelson on December 03, 2017, 12:29:17 pm
At the firmware level, HIDs send and receive HID reports using interrupt and control transfers.

On the host, a particular API might require supporting a specific report or report type.
Title: Re: xinput WTF is it?
Post by: ulao on December 06, 2017, 12:25:12 pm
So you think it may be as simple as building a report to match the transfers needed to be xinput?

looks like someone want to do it.
https://forum.pjrc.com/threads/28536-Creating-XUSB-gamepad-device-for-XInput
Title: Re: xinput WTF is it?
Post by: Jan Axelson on December 06, 2017, 09:42:58 pm
Yes, it's just a HID.
Title: Re: xinput WTF is it?
Post by: ulao on February 08, 2018, 09:01:50 am
Could one write a xinput device without a driver? That is to say so that windows installs a driver for it.  I'm wondering if just changing the device and descriptor reports are enough to get it to show as a xinput.
Title: Re: xinput WTF is it?
Post by: Jan Axelson on February 08, 2018, 12:35:26 pm
Start here

https://msdn.microsoft.com/en-us/library/windows/desktop/hh405052(v=vs.85).aspx
Title: Re: xinput WTF is it?
Post by: ulao on February 08, 2018, 03:01:13 pm

I did like this stament.
Quote
The XUSB driver implements both an XUSB class interface and a HID class interface for devices in order to support both XINPUT and DirectInput usage.

It sounds like xusb is a dll, that support hid and xinput. but my issue is that I want my device to work or emulate a xinput because software developers are expecting xinput. More of them need to support xusb but I can not change what exists.