nefarius / DsHidMini

Virtual HID Mini-user-mode-driver for Sony DualShock 3 Controllers
https://docs.nefarius.at/projects/DsHidMini/
BSD 3-Clause "New" or "Revised" License
1.12k stars 47 forks source link

DsHidMini

Build status GitHub All Releases GitHub issues Discord Website

Virtual HID Mini-user-mode driver for Sony DualShock 3 Controllers

🚨 What to expect with Version 3 🚨

Next major version is available for Beta-testing! Here's an overview of what you'll get:

You can also follow development progress on Discord or get notified when a release happens on Mastodon.

Repository activity

Repository activity

Summary

DsHidMini is a self-contained, low footprint and feature-rich user-mode driver for Microsoft Windows 10/11. It presents the controller as a configurable variety of fully standard-compliant HID devices to the system and all games built on common APIs like DirectInput, Raw Input and the low-level HID API. XInput-emulation further increases the support in modern games built with only Xbox controllers in mind. The driver supports both wired connections by handling USB communication and wireless connections by building upon the BthPS3 driver suite. An optional .NET configuration tool is provided to alter driver behavior to fine-tune it to specific games or other use-cases.

Features

What's missing

Check the ⚑ issue tracker ⚑ for work-in-progress or known bugs!

The following features are not available (and most probably won't in the near future until more contributors join the party):

For in-progress features and bug-fixes please consult the issue tracker.

Technical details ## How it works DsHidMini is a filter driver sitting below `mshidumdf.sys` and acts as a function driver for USB and Bluetooth through the [User-mode Driver Framework Reflector](https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/detailed-view-of-the-umdf-architecture), handling translation of incoming HID I/O traffic to underlying USB/Bluetooth I/O and vice versa. On USB it replaces the Windows stock drivers for the Sony hardware and presents the device as a variety of user-configurable HID devices (see documentation). On Bluetooth in conjunction with BthPS3 it replaces the need for [Shibari](https://github.com/nefarius/Shibari) as the driver directly communicates over wireless channels and takes care of the necessary translation logic. As a user-mode driver it has limited access to the registry, therefore device-specific settings are stored and retrieved using the [Unified Device Property Model](https://docs.microsoft.com/en-us/windows-hardware/drivers/install/unified-device-property-model--windows-vista-and-later-) API. Most of the core HID heavy lifting is done by the amazing [DMF_VirtualHidMini](https://github.com/microsoft/DMF/blob/master/Dmf/Modules.Library/Dmf_VirtualHidMini.md) module which greatly reduced the need for boilerplate code and sped up development tremendously. ## Environment DsHidMini components (drivers, utilities) are designed for **Windows 10**, version 1809 or newer (x86, x64). The dependencies used in DsHidMini don't exist in Windows 7/8/8.1 so they can't be supported. ## How to build ### Prerequisites - [Step 1: Install Visual Studio 2022](https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk#download-icon-step-1-install-visual-studio-2022) - [Step 2: Install Windows 11, version 22H2 SDK](https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk#download-icon-step-2-install-windows-11-version-22h2-sdk) - [Step 3: Install Windows 11, version 22H2 WDK](https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk#download-icon-step-3-install-windows-11-version-22h2-wdk) - [Step 4: Clone the Driver Module Framework (DMF)](https://github.com/microsoft/DMF) into the same parent directory. - **Important:** requires *at least* [`v1.1.83`](https://github.com/microsoft/DMF/releases/tag/v1.1.83) or newer - Build the `DmfU` project with Release and Debug configurations for all architectures (x64 and Win32). You can build individual projects of the solution within Visual Studio.

Licensing

This solution contains BSD-3-Clause and other licensed components. For details, please consult the individual LICENSE files.

This is a community project and not affiliated with Sony Interactive Entertainment Inc. in any way.

"PlayStation", "PSP", "PS2", "PS one", "DUALSHOCK" and "SIXAXIS" are registered trademarks of Sony Interactive Entertainment Inc.

Documentation

Take a look at the project page for more information.

Installation

Pre-built binaries and instructions are provided on the releases page.

Support

To get support please follow these guidelines.

Sponsors

JetBrains

Sources & 3rd party credits

The following awesome resources have made this project possible.

Related projects

Dependencies

Tools & references

DevOps