Open DJm00n opened 4 years ago
Also I dumped HID descriptors from xusb22.sys
(version 10.0.18362.267) driver:
https://gist.github.com/DJm00n/07e1b7bb21643725e53b16f45e0e7022
It is interesting that driver supports separate LT and RT axis under the hood but this functionality is disabled! There are two HID Gamepad and RacingWheel descriptors for that purpose.
Vibration support is only avalible via IOCTL_XUSB_SET_STATE
(0x8000a010). :(
Heh. I found a way how to make Xbox360 Gamepad's LT and RT separate axis via HID API!
There is xusb22
driver option for that:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\xusb22\Parameters]
"GamepadTriggerUsage"=dword:00003532
"GamepadStickUsage"=dword:31303433
Make it report LT/RT on Rx/Ry (0x33/0x34 usage) and RStick on Z/Rz (0x32/0x35 usage) HID Axis - just like DualShock4
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\xusb22\Parameters]
"GamepadTriggerUsage"=dword:00003334
"GamepadStickUsage"=dword:31303532
char __fastcall XenonBusInformation::Initialize(XenonBusInformation *this, struct WDFDRIVER__ *a2, struct WDFDEVICE__ *a3)
HidGamepad *__fastcall HidGamepad::HidGamepad(HidGamepad *this, GamepadInformation *a2)
__int64 __fastcall HidGamepad::GetHidDescriptor(HidGamepad *this, unsigned __int8 *outBuf, unsigned __int16 outSize)
This is absolutely beautiful, nice find! 😍
While looking at original
xboxgip.sys
(version 10.0.18362.267) and how it works I foundgipControllerHidDescriptor
var that this driver uses for its HID Physical Device Object. It wasHID_DESCRIPTOR
struct. Stripped header and decoded it via RDD! HID Report Descriptor Decoder tool. Maybe could be userfull in this or other projects: