Convert Figma logo to code with AI

nefarius logoDsHidMini

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

1,186
53
1,186
25

Top Related Projects

Windows kernel-mode driver emulating well-known USB game controllers.

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

Windows Driver and XInput Wrapper for Sony DualShock 3/4 Controllers

Quick Overview

DsHidMini is an open-source Windows driver for DualShock 3 and DualShock 4 controllers. It aims to provide a seamless experience for using these PlayStation controllers on Windows systems, offering improved compatibility and features compared to the default Windows drivers.

Pros

  • Improved compatibility with a wide range of games and applications
  • Enhanced customization options for button mapping and controller behavior
  • Lower input latency compared to default Windows drivers
  • Active development and community support

Cons

  • Requires manual installation and setup, which may be challenging for less tech-savvy users
  • Potential conflicts with other controller drivers or software
  • Limited to DualShock 3 and DualShock 4 controllers, not supporting newer PlayStation controllers

Getting Started

  1. Download the latest release from the GitHub releases page.
  2. Extract the downloaded ZIP file.
  3. Run the DsHidMini.inf file to install the driver.
  4. Connect your DualShock controller via USB or Bluetooth.
  5. Use the DsHidMini Control Center application to configure and customize your controller settings.

For detailed installation and troubleshooting instructions, refer to the project's wiki.

Competitor Comparisons

Windows kernel-mode driver emulating well-known USB game controllers.

Pros of ViGEmBus

  • Broader compatibility with various virtual game controllers
  • More extensive documentation and community support
  • Actively maintained with frequent updates

Cons of ViGEmBus

  • More complex setup and configuration
  • Larger codebase, potentially harder to troubleshoot
  • May require additional drivers or software for full functionality

Code Comparison

ViGEmBus (C++):

NTSTATUS
Bus_EvtDeviceAdd(
    _In_ WDFDRIVER Driver,
    _Inout_ PWDFDEVICE_INIT DeviceInit
)
{
    NTSTATUS status;
    WDFDEVICE device;
    PDEVICE_CONTEXT deviceContext;

DsHidMini (C):

NTSTATUS
DsHidMini_EvtDeviceAdd(
    _In_ WDFDRIVER Driver,
    _Inout_ PWDFDEVICE_INIT DeviceInit
)
{
    NTSTATUS status;
    WDF_OBJECT_ATTRIBUTES attributes;
    WDFDEVICE device;

Both projects aim to enhance game controller support on Windows, but ViGEmBus focuses on creating virtual game controllers, while DsHidMini specifically targets DualShock controllers. ViGEmBus offers more flexibility and broader compatibility, but may be more complex to set up. DsHidMini is more specialized and potentially easier to use for its specific purpose. The code structures are similar, reflecting their shared goal of device management on Windows.

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

Pros of DsHidMini

  • Provides enhanced functionality for DualShock controllers on Windows
  • Supports both DualShock 3 and DualShock 4 controllers
  • Offers customizable button mapping and sensitivity settings

Cons of DsHidMini

  • May require additional setup and configuration
  • Potential compatibility issues with some games or applications
  • Limited support for newer PlayStation controller models

Code Comparison

Both repositories contain the same codebase, as they are the same project. Here's a sample of the code structure:

// DsHidMini.c
NTSTATUS
DriverEntry(
    _In_ PDRIVER_OBJECT  DriverObject,
    _In_ PUNICODE_STRING RegistryPath
)
{
    // Driver initialization code
}

The code is identical in both repositories, focusing on driver implementation for DualShock controllers on Windows systems. The project aims to provide a lightweight and efficient driver solution for PlayStation controllers, enhancing their functionality and compatibility with Windows PCs.

Windows Driver and XInput Wrapper for Sony DualShock 3/4 Controllers

Pros of ScpToolkit

  • Supports a wider range of PlayStation controllers (PS3, PS4)
  • Includes a graphical user interface for easier configuration
  • More established project with a larger user base

Cons of ScpToolkit

  • No longer actively maintained or updated
  • May have compatibility issues with newer Windows versions
  • Requires additional drivers and services, potentially impacting system performance

Code Comparison

ScpToolkit (C#):

public static Boolean IsValidSerial(String Serial)
{
    return !String.IsNullOrEmpty(Serial) && Serial.Length == 12 && Serial.All(Char.IsLetterOrDigit);
}

DsHidMini (C):

NTSTATUS
DsHidMini_EvtDevicePrepareHardware(
    _In_ WDFDEVICE Device,
    _In_ WDFCMRESLIST ResourceList,
    _In_ WDFCMRESLIST ResourceListTranslated
)
{
    // Device initialization code
}

DsHidMini is a more modern, lightweight alternative to ScpToolkit, focusing specifically on DualShock 3 controllers. It uses a different approach, implementing a virtual HID device instead of emulating an Xbox 360 controller. This results in better compatibility with modern Windows systems and improved performance. However, DsHidMini has a steeper learning curve and lacks a graphical interface, which may be challenging for less technical users.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

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:

  • New driver installer
  • New configuration app
  • ARM64 support
  • Full Windows 11 compatibility
  • Complete LED customization
  • Customize dead-zone thresholds
  • Customize HAT/POV behaviour
  • Adjust rumble strengths
  • Switch DPad to individual buttons
  • Customize the Quick-Disconnect button combination
  • Configure flipping/inverting axes
  • Proper Xbox One Emulation out-of-the-box
  • ...and maybe more?

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

  • Bluetooth support if used in conjunction with BthPS3 (requires at least v2.0.144 or newer)
  • Automatically pairs the controller to Windows Bluetooth (if Bluetooth host radio is present)
  • Multiple configurable HID Report Descriptors for wide range of compatibility
    • Single Gamepad device exposing all controls including pressure sensitive buttons
    • Split/multi device emulation to overcome DirectInput axis limits
    • Sony sixaxis.sys emulation (both wired and wireless)
    • DualShock 4 emulation for compatibility with DS4Windows
    • Xbox Controller emulation (XInput) for best compatibility with most modern games
  • Quick disconnect (on Bluetooth) by pressing L1 + R1 + PS together for over one second
  • Automatic disconnect (on Bluetooth) after idle timeout (5 minutes) expired to conserve battery
  • Custom LED states indicate battery charge level
    • Wired: Charging will cycle through 1 to 4, if fully charged will stay on 4
    • Wireless: 4 = Full, 3 = High, 2 = Medium/low, 1 = Low/dying
  • Rumble exposure via Force Feedback
    • The rumble motors are exposed as Force Feedback effects, allowing for great game compatibility
  • Supports the PCSX2 PlayStation 2 Emulator
    • Controller gets picked up by LilyPad plugin with all device features
  • Supports the RPCS3 PlayStation 3 Emulator
    • Controller gets picked up by DualShock 3 handler with all device features
  • Supports DS4Windows (requires at least Version 2.2.10 or newer)
    • Controller gets presented as a DualShock 4 compatible variant
    • Read #40 for details about XInput and DS4 emulation
  • Supports RetroArch emulation platform
  • Supports x360ce for XInput emulation
  • Supports Dolphin Emulator
  • Supports DuckStation - PlayStation 1, aka. PSX Emulator

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):

  • Motion controls a.k.a. SIXAXIS (Gyroscope, Accelerometer)
    • Contributions welcome!
    • See #217
  • Navigation Controller
    • Majority is done
    • See #48
  • Motion Controller
    • Not considered in design at all

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, 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 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 API. Most of the core HID heavy lifting is done by the amazing DMF_VirtualHidMini 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

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