ShieldControllerWinDriver

所属分类:GPU/显卡
开发工具:C
文件大小:794KB
下载次数:0
上传日期:2017-05-25 19:11:42
上 传 者sh-1993
说明:  NVIDIA Shield控制器的HIDUSB下滤波器驱动程序
(HIDUSB lower filter driver for NVIDIA Shield Controller)

文件列表:
Signing (0, 2017-05-26)
Signing\SIGN4PORTAL.CMD (512, 2017-05-26)
Signing\nvshldctrl.ddf (355, 2017-05-26)
doc (0, 2017-05-26)
doc\DevMgrByConnection.png (199790, 2017-05-26)
doc\ShieldControllerPID.png (410092, 2017-05-26)
doc\ShieldCtrlDriverStep1.png (62627, 2017-05-26)
doc\ShieldCtrlDriverStep2.png (56614, 2017-05-26)
doc\ShieldCtrlDriverStep3.png (60233, 2017-05-26)
nvshldctrl.sln (1546, 2017-05-26)
sys (0, 2017-05-26)
sys\driver.c (5549, 2017-05-26)
sys\hid.c (58709, 2017-05-26)
sys\hidusbfx2.h (2944, 2017-05-26)
sys\hidusbfx2.rc (2062, 2017-05-26)
sys\hidusbfx2.vcxproj (12063, 2017-05-26)
sys\hidusbfx2.vcxproj.Filters (2219, 2017-05-26)
sys\hidusbfx2.vcxproj.user (1185, 2017-05-26)
sys\nvshldctrl.inx (4078, 2017-05-26)
sys\resource.h (72039, 2017-05-26)
x360ce (0, 2017-05-26)
x360ce\x360ce.ini (4290, 2017-05-26)

**IMPORTANT: this driver doesn't support the 2017 Shield Controller yet. Support is planned but until then, the new model is already partially supported out-of-the-box by the generic Windows driver.** # NVIDIA Shield Controller Windows driver This small USB filter driver intercepts and tweaks the HID Report Descriptor to make DirectInput detect it as a gamepad. It also emulates a force feedback device for rumble support in both DirectInput and Xinput games, tweaks the input data of the trackpad to make it usable, and adds support for the volume increment/decrement buttons. NVIDIA previously released a driver that was bundled with GeForce Experience and only usable by NVIDIA graphics card users, and also suffered from a variety of issues according to forum discussions. Excluding AMD and Intel graphics card owners has made a lot of people extremely displeased. I've bought Tegra hardware (nVidia Shield tablet and Jetson) and used to applaud their open source efforts, but screwing their game controller buyers like this makes me regret my decision. ## What was the issue? The controller is a HID-compliant game controller, it's supported out-of-the-box on Linux and applications accessing it through raw HID. So theoretically it should be supported by generic Windows drivers, but it wasn't being detected by DirectInput. By playing with the `vhidmini` driver from the DDK which provides a virtual HID device, I managed to find what prevented the detection inside the HID Report Descriptor: ```cpp 0x09, 0x34, /* Usage (Ry), */ 0x81, 0x02, /* Input (Variable), */ 0xC0, /* End Collection, */ //0xA1, 0x01, /* Collection (Application), */ // <===== The root cause was this "output collection" part of the same report //0x19, 0x01, /* Usage Minimum (01h), */ //0x29, 0x03, /* Usage Maximum (03h), */ //0x26, 0xFF, 0xFF, /* Logical Maximum (-1), */ //0x95, 0x03, /* Report Count (3), */ //0x75, 0x10, /* Report Size (16), */ //0x91, 0x02, /* Output (Variable), */ //0xC0, /* End Collection, */ 0xC0, /* End Collection, */ 0x05, 0x01, /* Usage Page (Desktop), */ 0x09, 0x02, /* Usage (Mouse), */ ``` Commenting those lines made the virtual device show up in the game controller applet of the configuration panel. So based on this finding a small lower filter driver under HidUsb was written to modify the descriptor reported to HidUsb, changing "Usage Minimum" and "Usage Maximum" (which are the actual lines preventing the detection) to "Usage". The triggers were still not being detected by DirectInput, so another tweak provided by the filter driver is to change their "HID usage" from Accelerator and Brake axis to Rx and Ry axis. To support rumble in any game, old and new (while GeForce Experience only supports Xinput games), emulation of a HID Physical Input Device (PID) was added. The hack could be replicated for other controllers that don't bother with PID which is a way too complicated standard for basic gamepad rumble. Finally, the trackpad input gets tweaked to work like a standard trackpad, and because the HID gamepad client driver doesn't handle volume inc/dec buttons (while Linux picks them up without flinching), a virtual HID consumer control device was added that receives the input from those two buttons. Ironically that device was detected as a gamepad (and poor DirectInput has trouble when two different gamepads have the same IDs), so the above output collection was inserted to get rid of DirectInput. Making this driver was helped tremendously by `usbhid-dump`, `hidrd-convert`, UsbLyzer, Wireshark, the `gc_n***_usb` firmware source code, and the vague yet helpful instructions that someone who managed to change a USB descriptor gave on the ntdev mailing-list. ## Binaries (Windows 7 and later) [Download latest release](https://github.com/nefarius/ShieldControllerWinDriver/releases/latest). ## Installation To install the driver right-click on the .inf file and select `Install`. Disconnect and reconnect the controller as switching drivers sometimes causes problems. It should now be detected as a DirectInput gamepad, in games, x360ce, etc.

近期下载者

相关文件


收藏者