Giter Club home page Giter Club logo

vigembus's Introduction

ViGEm Bus Driver

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

Build status GitHub All Releases Discord Website GitHub followers Mastodon Follow


๐ŸงŸ THIS PROJECT HAS BEEN RETIRED ๐ŸงŸ

Users of this software are encouraged to read the end-of-life statement. So long, cheers ๐Ÿ––


About

The ViGEmBus driver and ViGEmClient libraries represent the core of the Virtual Gamepad Emulation Framework (or ViGEm , for short). ViGEm aims for a 100% accurate emulation of well-known gaming peripherals as pure software-based devices at kernel level. As it mimics "the real thing" games and other processes require no additional modification whatsoever to detect ViGEm-based devices (no Proxy-DLLs or API-Hooking) and simply work out of the box. While the (now obsolete) Scarlett.Crush Productions Virtual Bus Driver is the spiritual father of this project, ViGEm has been designed and written from the ground up utilizing Microsoft's Kernel-Mode Driver Framework.

Emulated devices

Emulation of the following USB Gamepads is supported:

Use cases

A few examples of the most common use cases for ViGEm are:

  • You have an unsupported input device you'd like to use within games without modifying said game.
  • You want the freedom to use a different controller of your choice in PS4 Remote Play.
  • You encountered a game not compatible with x360ce (prior to version 4.x).
  • You want to extend the reach of your input device (like send traffic to a different machine over a network).
  • You want to test/benchmark your game and need a replay mechanism for your user inputs.
  • You want to work around player slot assignment order issues in XInput.

Supported Systems

๐Ÿ›‘ Windows Server might work but is not supported ๐Ÿ›‘

Bug reports/support requests regarding running on a Server OS will be discarded.

Version 1.16 and below

The driver is built for Windows 7/8.1/10 (x86 and amd64).

Version 1.17 and above

The driver is built for Windows 10/11 only (x86, amd64 and ARM64).

License

The ViGEm Bus Driver is licensed under the BSD-3-Clause, see LICENSE for more information.

How to build

Prerequisites

You can build directly within Visual Studio.

Do bear in mind that you'll need to sign the driver to use it without test mode.

Contribute

Bugs & Features

Found a bug and want it fixed? Open a detailed issue on the GitHub issue tracker!

Have an idea for a new feature? Let's have a chat about your request on Discord.

Questions & Support

Please respect that the GitHub issue tracker isn't a helpdesk. We offer a range of support resources you're welcome to check out!

Installation

Pre-built production-signed binaries for Windows 10/11 are provided by Nefarius Software Solutions e.U. as an all-in-one setup.

Sponsors

Sponsors listed here have helped the project flourish by either financial support or by gifting licenses:

Known users of ViGEm

A brief listing of projects/companies/vendors known to build upon the powers of ViGEm.

This list is non-exhaustive, if you'd like to see your project included, contact us!

vigembus's People

Contributors

bozbez avatar chrisd1100 avatar dependabot[bot] avatar evilc avatar filoppi avatar jpflouret avatar megadrago88 avatar nefarius avatar ryochan7 avatar sitiom avatar ttsuki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vigembus's Issues

vigem_target_add with x360 target hangs Windows 7

Describe the bug
Calling vigem_target_add with x360 target hangs (freezes) Windows 7. There is no BSOD nor error message, system simply stops.

To Reproduce
Consider following sample code:

#include "utils/assert.h"
#include "windows.h"
#include "ViGEm/Client.h"
// g++ -Iinclude -Ivigemclient/include/ ViGEmClient.cpp c-sample.c -lsetupapi -lhid

static PVIGEM_CLIENT vigem;
static PVIGEM_TARGET target;
static XUSB_REPORT report;

int main(int argc, char** argv) {
	vigem = vigem_alloc();
	ASSERT(vigem != NULL);
	ASSERT(vigem_connect(vigem) == VIGEM_ERROR_NONE);
	XUSB_REPORT_INIT(&report);
	target = vigem_target_x360_alloc();
	ASSERT(vigem_target_add(vigem, target) == VIGEM_ERROR_NONE);
	
	while (1) {
		report.sThumbLX ++;
		ASSERT(vigem_target_x360_update(vigem, target, report) == VIGEM_ERROR_NONE);
		Sleep(10);
	}
}

... compiled with g++ from MinGW package.

When code reaches vigem_target_add, it blocks briefly and I can clearly hear "ding" from new device notification. Right after it, entire system freezes, often even with last audio sample looping indefinitely.

When ran on Windows 10 (recompiled or even same executable) or when DS4 target is used, code works exactly as expected.

Expected behavior
Not freezing.

Screenshots
I've captured output from serial console and uploaded it to pastebin, just in case it will be somehow useful. I believe it's same message repeated.

System details (please complete the following information):

  • OS: Windows 7
  • Everything 32bit
  • Driver Version: 01/19/2018,1.14.3.0
  • Tested both with Virtualbox and real hardware

What is the mistake?

Assertion failed: Could not find 'git' via 'C:\Windows\System32\where.exe'.
at Nuke.Common.ControlFlow.Fail(String text)
at Nuke.Common.ControlFlow.NotNull[T](T obj, String text)
at Nuke.Common.Tooling.ToolPathResolver.GetPathExecutable(String pathExecutable)
at Nuke.Common.Tools.Git.GitTasks.GitCurrentBranch(String workingDirectory)
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy1.CreateValue() at Nuke.Common.Git.GitRepositoryAttribute..ctor() at System.RuntimeTypeHandle.CreateCaInstance(RuntimeType type, IRuntimeMethodInfo ctor) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeFieldInfo field, RuntimeType caType) at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit) at System.Reflection.CustomAttributeExtensions.GetCustomAttributes[T](MemberInfo element) at Nuke.Common.Execution.BuildExtensions.<>c.<GetInjectionMembers>b__4_0(MemberInfo x) at System.Linq.Enumerable.WhereArrayIterator1.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Nuke.Common.Execution.BuildExtensions.GetInjectionMembers(NukeBuild build) at Nuke.Common.Execution.InjectionService.InjectValues(NukeBuild build) at Nuke.Common.Execution.BuildExecutor.Execute[T](Expression1 defaultTargetExpression)

Repeating warnings and errors:
Assertion failed: Could not find 'git' via 'C:\Windows\System32\where.exe'.

Xbox 360 and Xbox One Controller HID Report Descriptors

While looking at original xboxgip.sys (version 10.0.18362.267) and how it works I found gipControllerHidDescriptor var that this driver uses for its HID Physical Device Object. It was HID_DESCRIPTOR struct.
Stripped header and decoded it via RDD! HID Report Descriptor Decoder tool. Maybe could be userfull in this or other projects:

//--------------------------------------------------------------------------------
// Report descriptor data in hex (length 262 bytes)
//--------------------------------------------------------------------------------


// 05010905 A101A100 09300931 150027FF FF000095 02751081 02C0A100 09330934
// 150027FF FF000095 02751081 02C00501 09321500 26FF0395 01750A81 02150025
// 00750695 01810305 01093515 0026FF03 9501750A 81021500 25007506 95018103
// 05091901 290A950A 75018102 15002500 75069501 81030501 09391501 25083500
// 463B0166 14007504 95018142 75049501 15002500 35004500 65008103 A102050F
// 09971500 25017504 95019102 15002500 91030970 15002564 75089504 91020950
// 66011055 0E26FF00 95019102 09A79102 65005500 097C9102 C0050109 80A10009
// 85150025 01950175 01810215 00250075 07950181 03C00506 09201500 26FF0075
// 08950181 02C0      


//--------------------------------------------------------------------------------
// Decoded Application Collection
//--------------------------------------------------------------------------------

/*
05 01        (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
09 05        (LOCAL)  USAGE              0x00010005 Game Pad (Application Collection)  
A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0x00010005: Page=Generic Desktop Page, Usage=Game Pad, Type=Application Collection)
A1 00          (MAIN)   COLLECTION         0x00 Physical (Usage=0x0: Page=, Usage=, Type=) <-- Error: COLLECTION must be preceded by a USAGE <-- Warning: USAGE type should be CP (Physical Collection)
09 30            (LOCAL)  USAGE              0x00010030 X (Dynamic Value)  
09 31            (LOCAL)  USAGE              0x00010031 Y (Dynamic Value)  
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0)  <-- Info: Consider replacing 15 00 with 14
27 FFFF0000      (GLOBAL) LOGICAL_MAXIMUM    0x0000FFFF (65535)  
95 02            (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields  
75 10            (GLOBAL) REPORT_SIZE        0x10 (16) Number of bits per field  
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
C0             (MAIN)   END_COLLECTION     Physical 
A1 00          (MAIN)   COLLECTION         0x00 Physical (Usage=0x0: Page=, Usage=, Type=) <-- Error: COLLECTION must be preceded by a USAGE <-- Warning: USAGE type should be CP (Physical Collection)
09 33            (LOCAL)  USAGE              0x00010033 Rx (Dynamic Value)  
09 34            (LOCAL)  USAGE              0x00010034 Ry (Dynamic Value)  
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
27 FFFF0000      (GLOBAL) LOGICAL_MAXIMUM    0x0000FFFF (65535) <-- Redundant: LOGICAL_MAXIMUM is already 65535 
95 02            (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields <-- Redundant: REPORT_COUNT is already 2 
75 10            (GLOBAL) REPORT_SIZE        0x10 (16) Number of bits per field <-- Redundant: REPORT_SIZE is already 16 
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
C0             (MAIN)   END_COLLECTION     Physical 
05 01          (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page <-- Redundant: USAGE_PAGE is already 0x0001
09 32          (LOCAL)  USAGE              0x00010032 Z (Dynamic Value)  
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
26 FF03        (GLOBAL) LOGICAL_MAXIMUM    0x03FF (1023)  
95 01          (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields  
75 0A          (GLOBAL) REPORT_SIZE        0x0A (10) Number of bits per field  
81 02          (MAIN)   INPUT              0x00000002 (1 field x 10 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 00          (GLOBAL) LOGICAL_MAXIMUM    0x00 (0)  <-- Info: Consider replacing 25 00 with 24
75 06          (GLOBAL) REPORT_SIZE        0x06 (6) Number of bits per field  
95 01          (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
81 03          (MAIN)   INPUT              0x00000003 (1 field x 6 bits) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
05 01          (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page <-- Redundant: USAGE_PAGE is already 0x0001
09 35          (LOCAL)  USAGE              0x00010035 Rz (Dynamic Value)  
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
26 FF03        (GLOBAL) LOGICAL_MAXIMUM    0x03FF (1023)  
95 01          (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
75 0A          (GLOBAL) REPORT_SIZE        0x0A (10) Number of bits per field  
81 02          (MAIN)   INPUT              0x00000002 (1 field x 10 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 00          (GLOBAL) LOGICAL_MAXIMUM    0x00 (0)  <-- Info: Consider replacing 25 00 with 24
75 06          (GLOBAL) REPORT_SIZE        0x06 (6) Number of bits per field  
95 01          (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
81 03          (MAIN)   INPUT              0x00000003 (1 field x 6 bits) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
05 09          (GLOBAL) USAGE_PAGE         0x0009 Button Page 
19 01          (LOCAL)  USAGE_MINIMUM      0x00090001 Button 1 Primary/trigger (Selector, On/Off Control, Momentary Control, or One Shot Control)  
29 0A          (LOCAL)  USAGE_MAXIMUM      0x0009000A Button 10 (Selector, On/Off Control, Momentary Control, or One Shot Control)  
95 0A          (GLOBAL) REPORT_COUNT       0x0A (10) Number of fields  
75 01          (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field  
81 02          (MAIN)   INPUT              0x00000002 (10 fields x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 00          (GLOBAL) LOGICAL_MAXIMUM    0x00 (0) <-- Redundant: LOGICAL_MAXIMUM is already 0 <-- Info: Consider replacing 25 00 with 24
75 06          (GLOBAL) REPORT_SIZE        0x06 (6) Number of bits per field  
95 01          (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields  
81 03          (MAIN)   INPUT              0x00000003 (1 field x 6 bits) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
05 01          (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
09 39          (LOCAL)  USAGE              0x00010039 Hat switch (Dynamic Value)  
15 01          (GLOBAL) LOGICAL_MINIMUM    0x01 (1)  
25 08          (GLOBAL) LOGICAL_MAXIMUM    0x08 (8)  
35 00          (GLOBAL) PHYSICAL_MINIMUM   0x00 (0)  <-- Info: Consider replacing 35 00 with 34
46 3B01        (GLOBAL) PHYSICAL_MAXIMUM   0x013B (315)  
66 1400        (GLOBAL) UNIT               0x0014 Rotation in degrees [1ยฐ units] (4=System=English Rotation, 1=Rotation=Degrees)  <-- Info: Consider replacing 66 1400 with 65 14
75 04          (GLOBAL) REPORT_SIZE        0x04 (4) Number of bits per field  
95 01          (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
81 42          (MAIN)   INPUT              0x00000042 (1 field x 4 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 1=Null 0=NonVolatile 0=Bitmap 
75 04          (GLOBAL) REPORT_SIZE        0x04 (4) Number of bits per field <-- Redundant: REPORT_SIZE is already 4 
95 01          (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0)  <-- Info: Consider replacing 15 00 with 14
25 00          (GLOBAL) LOGICAL_MAXIMUM    0x00 (0)  <-- Info: Consider replacing 25 00 with 24
35 00          (GLOBAL) PHYSICAL_MINIMUM   0x00 (0) <-- Redundant: PHYSICAL_MINIMUM is already 0 <-- Info: Consider replacing 35 00 with 34
45 00          (GLOBAL) PHYSICAL_MAXIMUM   0x00 (0)  <-- Info: Consider replacing 45 00 with 44
65 00          (GLOBAL) UNIT               0x00 No unit (0=None)  <-- Info: Consider replacing 65 00 with 64
81 03          (MAIN)   INPUT              0x00000003 (1 field x 4 bits) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
A1 02          (MAIN)   COLLECTION         0x02 Logical (Usage=0x0: Page=, Usage=, Type=) <-- Error: COLLECTION must be preceded by a USAGE <-- Warning: USAGE type should be CL (Logical Collection)
05 0F            (GLOBAL) USAGE_PAGE         0x000F Physical Interface Device Page 
09 97            (LOCAL)  USAGE              0x000F0097 DC Enable Actuators (Selector)  
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 01            (GLOBAL) LOGICAL_MAXIMUM    0x01 (1)  
75 04            (GLOBAL) REPORT_SIZE        0x04 (4) Number of bits per field <-- Redundant: REPORT_SIZE is already 4 
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
91 02            (MAIN)   OUTPUT             0x00000002 (1 field x 4 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 00            (GLOBAL) LOGICAL_MAXIMUM    0x00 (0)  <-- Info: Consider replacing 25 00 with 24
91 03            (MAIN)   OUTPUT             0x00000003 (1 field x 4 bits) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
09 70            (LOCAL)  USAGE              0x000F0070 Magnitude (Dynamic Value)  
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 64            (GLOBAL) LOGICAL_MAXIMUM    0x64 (100)  
75 08            (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field  
95 04            (GLOBAL) REPORT_COUNT       0x04 (4) Number of fields  
91 02            (MAIN)   OUTPUT             0x00000002 (4 fields x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
09 50            (LOCAL)  USAGE              0x000F0050 Duration (Dynamic Value)  
66 0110          (GLOBAL) UNIT               0x1001 Time in seconds [1 s units] (1=System=SI Linear, 1=Time=Seconds)  
55 0E            (GLOBAL) UNIT_EXPONENT      0x0E (Unit Value x 10โปยฒ)  
26 FF00          (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255)  
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields  
91 02            (MAIN)   OUTPUT             0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
09 A7            (LOCAL)  USAGE              0x000F00A7 Start Delay (Dynamic Value)  
91 02            (MAIN)   OUTPUT             0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
65 00            (GLOBAL) UNIT               0x00 No unit (0=None)  <-- Info: Consider replacing 65 00 with 64
55 00            (GLOBAL) UNIT_EXPONENT      0x00 (Unit Value x 10โฐ)  <-- Info: Consider replacing 55 00 with 54
09 7C            (LOCAL)  USAGE              0x000F007C Loop Count (Dynamic Value)  
91 02            (MAIN)   OUTPUT             0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
C0             (MAIN)   END_COLLECTION     Logical 
05 01          (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
09 80          (LOCAL)  USAGE              0x00010080 System Control (Application Collection)  
A1 00          (MAIN)   COLLECTION         0x00 Physical (Usage=0x00010080: Page=Generic Desktop Page, Usage=System Control, Type=Application Collection) <-- Warning: USAGE type should be CP (Physical Collection)
09 85            (LOCAL)  USAGE              0x00010085 System Main Menu (One Shot Control)  
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 01            (GLOBAL) LOGICAL_MAXIMUM    0x01 (1)  
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 00            (GLOBAL) LOGICAL_MAXIMUM    0x00 (0)  <-- Info: Consider replacing 25 00 with 24
75 07            (GLOBAL) REPORT_SIZE        0x07 (7) Number of bits per field  
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
81 03            (MAIN)   INPUT              0x00000003 (1 field x 7 bits) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
C0             (MAIN)   END_COLLECTION     Physical 
05 06          (GLOBAL) USAGE_PAGE         0x0006 Generic Device Controls Page 
09 20          (LOCAL)  USAGE              0x00060020 Battery Strength (Dynamic Value)  
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
26 FF00        (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255)  
75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field  
95 01          (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
81 02          (MAIN)   INPUT              0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
C0           (MAIN)   END_COLLECTION     Application 
*/

//--------------------------------------------------------------------------------
// Generic Desktop Page inputReport (Device --> Host)
//--------------------------------------------------------------------------------

typedef struct
{
                                                     // No REPORT ID byte
                                                     // Collection: CA:GamePad CP:
  uint16_t GD_GamePadX;                              // Usage 0x00010030: X, Value = 0 to 65535
  uint16_t GD_GamePadY;                              // Usage 0x00010031: Y, Value = 0 to 65535
  uint16_t GD_GamePadRx;                             // Usage 0x00010033: Rx, Value = 0 to 65535
  uint16_t GD_GamePadRy;                             // Usage 0x00010034: Ry, Value = 0 to 65535
                                                     // Collection: CA:GamePad
  uint16_t GD_GamePadZ : 10;                         // Usage 0x00010032: Z, Value = 0 to 1023
  uint8_t  : 6;                                      // Pad
  uint16_t GD_GamePadRz : 10;                        // Usage 0x00010035: Rz, Value = 0 to 1023
  uint8_t  : 6;                                      // Pad
  uint8_t  BTN_GamePadButton1 : 1;                   // Usage 0x00090001: Button 1 Primary/trigger, Value = 0 to 0
  uint8_t  BTN_GamePadButton2 : 1;                   // Usage 0x00090002: Button 2 Secondary, Value = 0 to 0
  uint8_t  BTN_GamePadButton3 : 1;                   // Usage 0x00090003: Button 3 Tertiary, Value = 0 to 0
  uint8_t  BTN_GamePadButton4 : 1;                   // Usage 0x00090004: Button 4, Value = 0 to 0
  uint8_t  BTN_GamePadButton5 : 1;                   // Usage 0x00090005: Button 5, Value = 0 to 0
  uint8_t  BTN_GamePadButton6 : 1;                   // Usage 0x00090006: Button 6, Value = 0 to 0
  uint8_t  BTN_GamePadButton7 : 1;                   // Usage 0x00090007: Button 7, Value = 0 to 0
  uint8_t  BTN_GamePadButton8 : 1;                   // Usage 0x00090008: Button 8, Value = 0 to 0
  uint8_t  BTN_GamePadButton9 : 1;                   // Usage 0x00090009: Button 9, Value = 0 to 0
  uint8_t  BTN_GamePadButton10 : 1;                  // Usage 0x0009000A: Button 10, Value = 0 to 0
  uint8_t  : 6;                                      // Pad
  uint8_t  GD_GamePadHatSwitch : 4;                  // Usage 0x00010039: Hat switch, Value = 1 to 8, Physical = (Value - 1) x 45 in degrees
  uint8_t  : 4;                                      // Pad
                                                     // Collection: CA:GamePad CP:SystemControl
  uint8_t  GD_GamePadSystemControlSystemMainMenu : 1; // Usage 0x00010085: System Main Menu, Value = 0 to 1
  uint8_t  : 7;                                      // Pad
                                                     // Collection: CA:GamePad
  uint8_t  GEN_GamePadBatteryStrength;               // Usage 0x00060020: Battery Strength, Value = 0 to 255
} inputReport_t;


//--------------------------------------------------------------------------------
// Physical Interface Device Page outputReport (Device <-- Host)
//--------------------------------------------------------------------------------

typedef struct
{
                                                     // No REPORT ID byte
                                                     // Collection: CA:GamePad CL:
  uint8_t  PID_GamePadDcEnableActuators : 4;         // Usage 0x000F0097: DC Enable Actuators, Value = 0 to 1
  uint8_t  : 4;                                      // Pad
  uint8_t  PID_GamePadMagnitude[4];                  // Usage 0x000F0070: Magnitude, Value = 0 to 100
  uint8_t  PID_GamePadDuration;                      // Usage 0x000F0050: Duration, Value = 0 to 255, Physical = Value in 10โปยฒ s units
  uint8_t  PID_GamePadStartDelay;                    // Usage 0x000F00A7: Start Delay, Value = 0 to 255, Physical = Value in 10โปยฒ s units
  uint8_t  PID_GamePadLoopCount;                     // Usage 0x000F007C: Loop Count, Value = 0 to 255
} outputReport_t;

An unexpected error has occurred

Describe the bug

I downloaded the latest installer (1.16.116) and tried to run it.
but this error always occurs

An unexpected error has occurred. please run the setup program again.
if problems continue, see the microsoft hardware web site for software updates and additional product information to help you troubleshoot the issue.

To Reproduce

  1. Download the setup file
  2. Try to run it

System details

Windows 10 pro 1903 (1836.2.720)

How to safely uninstall Fireshock by ViGEm ?

Hi there. Can someone tell me how I completely uninstall Fireshock?
I basically would like to revert my system back to the time before I installed Fireshock. And no I dont have a System backup. i uninstalled in my Programs already, but there are traces.
for example, i have this folder left: Windows\System32\drivers\UMDF
do i need to completele delete this folder? or is only the fireshock.ddl related to fireshock instead of the whole folder?

I would like to know a safe method to delete all traces of firechock.

EDIT : it is the same with vigembus. i uninstalled it, but there are still a few traces. like this folder here Windows\System32\DriverStore\FileRepository\vigembus.inf_amd64_dc012c700833063e
(i already used sc delete vigembus and deleted vigembus.sys)
can i delete safely the stated folder without anny worries?

Stadia Controller Support

Is your feature request related to a problem? Please describe.
I would like to use a Stadia Controller with Parsec but it is misidentified. Buttons are registering as triggers and the joysticks are double mapped to the triggers and joysticks simultaneously.

Describe the solution you'd like
Stadia Controller support.

Describe alternatives you've considered
I'm attempting to use SDL2 Gamepad Tool to interpret the Stadia Controller for Parsec

Additional context
none

KMODE_EXCEPTION_NOT_HANDLED (1e) on systems with HVCI

Describe the bug
On a system with Hypervisor Code Integrity (HVCI) enabled a KMODE_EXCEPTION_NOT_HANDLED bugcheck is triggered.

To Reproduce
Turn on Code Integrity checks in Driver Verifier and spawn a new x360 or ds4 pad.

Expected behavior
No crash obviously ๐Ÿ˜›

Screenshots
If applicable, add screenshots to help explain your problem.

System details (please complete the following information):

  • OS: Windows 10 (all builds)
  • Feeder software: doesn't matter
  • Driver Version: 1.14.3.0 until 1.16.102.0

Closing connection to ViGEmBus error

Describe the bug
I can connect the controller and it'll work for a while. Yet after a while the controller will loose connection and a message appears on the left side of the bottom bar, it reads "closing connection to ViGEmBus

To Reproduce
Steps to reproduce the behavior (example):

  1. Start program
  2. Plug in device '....'
  3. See error after a bit

System details (please complete the following information):

  • OS: Fresh install of Windows 7 Ultimate
  • Feeder software: DS4Windows
  • Driver Version: 1.7.9

Additional context
I've never had this issue before reinstalling Windows.

Setup crashes when encountering a substitute drive

Describe the bug
Setup fails to install if there any any substitute/virtual drives with the message: Invalid Drive: X:\
I guess this isn't a bug with the driver itself but more of the setup, but I couldn't find a repository for that.

To Reproduce

  1. Create a substitute drive, e.g. subst X: C:\SomeFolder
  2. Run the setup
  3. See the error message box appear when the status "Computing space requirements" is shown

Expected behavior
The setup shouldn't crash when trying to compute space requirements for substituted drives

Screenshots
ViGEmBus_Setup_1 16 116_dXUgQtU0bV

System details (please complete the following information):

  • OS: Windows 10 Pro (18363)
  • Driver Version: 1.16.116

Workaround
A simple workaround is simply to delete the substituted drive with e.g. subst /D X: but this is undesirable.

Rumble state is not always sent to client code

Describe the bug

DS4Windows users have brought up the issue and I can reproduce it. There are times when a (0,0) feedback state is not sent to the client code so DS4Windows will replay old rumble data and the DS4 will constantly rumble. I did some digging using the trace messages and I have concluded that the issue is with the code that handles IOCTL_XUSB_REQUEST_NOTIFICATION requests in ViGEmBus.

Ryochan7/DS4Windows#616

The major issue is that a game can send an updated rumble state while a previous rumble state update is still being processed by the client code. The ViGEmClient will then send the next notify request to the bus, that request will then be put into a queue and then have to wait until the game sends another rumble state change before the client code will retrieve an updated rumble state.

To Reproduce

  1. Run Retroarch 1.7.6, use ParallelN64 core with rumble pack set for player 1,
  2. Load Legend of Zelda: Ocarina of Time ROM and run
  3. Cause Link to get hurt. Roll into a fence in the first area
  4. DS4 will constantly rumble until stopped in Options menu in DS4Windows or by disconnecting controller

Expected behavior

Controller will rumble briefly followed by having the controller rumble motors stop

System details (please complete the following information):

  • OS: Windows 10 x64
  • Feeder software: DS4Windows 1.7.2
  • Driver Version: 1.14.3.0

Additional context

I made a temporary fix but it might not be a good idea to implement as is; there might be a better approach. Instead of forwarding the notify request immediately to a queue, check if the current xusb device has different rumble data than the data retrieved with the request. If the data differs, process the data immediately. Here is an example diff.

diff --git a/sys/busenum.c b/sys/busenum.c
index 1f7df12..365a62f 100644
--- a/sys/busenum.c
+++ b/sys/busenum.c
@@ -493,9 +493,33 @@ NTSTATUS Bus_QueueNotification(WDFDEVICE Device, ULONG SerialNo, WDFREQUEST Requ
             break;
         }
 
-        status = WdfRequestForwardToIoQueue(Request, pdoData->PendingNotificationRequests);
-
-        break;
+		PXUSB_REQUEST_NOTIFICATION notify = NULL;
+
+		status = WdfRequestRetrieveOutputBuffer(Request, sizeof(XUSB_REQUEST_NOTIFICATION), (PVOID)&notify, NULL);
+
+		if (NT_SUCCESS(status) && (notify->LargeMotor != xusbData->Rumble[3] || notify->SmallMotor != xusbData->Rumble[4]))
+		{
+			// State changed since last request. Update now.
+			// Assign values to output buffer
+			notify->Size = sizeof(XUSB_REQUEST_NOTIFICATION);
+			notify->SerialNo = pdoData->SerialNo;
+			notify->LedNumber = xusbData->LedNumber;
+			notify->LargeMotor = xusbData->Rumble[3];
+			notify->SmallMotor = xusbData->Rumble[4];
+
+			TraceEvents(TRACE_LEVEL_VERBOSE,
+				TRACE_USBPDO,
+				"-- Test Rumble Buffer: %02X %02X",
+				notify->LargeMotor, notify->SmallMotor);
+
+			WdfRequestCompleteWithInformation(Request, status, notify->Size);
+		}
+		else
+		{
+			status = WdfRequestForwardToIoQueue(Request, pdoData->PendingNotificationRequests);
+		}
+
+		break;
     case DualShock4Wired:
 
         ds4Data = Ds4GetData(hChild);

Emulated DS4 controller is not seen by PSNow

Describe the bug
If I emulate a DS4 controller using VDX, it is not detected by PSNow. If I change the type to XBox 360 and reconnect, the controller is detected immediately and if I change it back to DS4, it is not seen anymore. I've also tried it with UCR, but no difference.

To Reproduce
Steps to reproduce the behavior (example):

  1. Start program VDX via Steam (for Steam controller support)
  2. Change the controller type in VDX to DS4 and click connect
  3. Start PSNow
  4. No controller available
  5. Try various reconnects as DS4
  6. Still no controller avaliable

Expected behavior
I'd expect that PSNow detects the virtual DS4 controller

System details (please complete the following information):

  • OS: Windows 10 Pro 10.0.18363 Build 18363
  • Feeder software: VDX, UCR
  • Driver Version: 1.16.116

cannot install ViGEmBus driver

No idea what's going on. EVERY TIME I try to install the driver I get a "driver failed, please try again" message and restarting the pc/redownloading DS4 does not work./

Win7 First Boot Gamepads in Joy.cpl DS4Windows Ryochan Issue

Ryochan7/DS4Windows#1414

Any way something can be done on this end regarding this issue? Windows 7 Ultimate 64 bit here.

I do not have quickboot because it is not a feature of win7. System restore is not on, nor is hibernation mode. So nothing is being stored to memory when my cpu is shut down.

When first starting windows (after their permanent controller feature was introduced, and turning on ds4windows for the first time nomatter with autoboot or manually, virtual xbox controllers are seen in the joy.cpl when no controller is connected and when ds4windows is not on permanent mode. I have to stop and restart ds4windows (the whole program) for everything to function correctly. If I just press stop/start, the output slots are not cleared inside ds4windows.

So is there any way that something on the driver end can be adjusted to fix this issue for win7?

Hacked PS2 running as a controller over the network

Is your feature request related to a problem? Please describe.
I have a hacked ps2 with freemcboot. I'm interested in writing some homebrew to use the ps2 network and ps2 controller to use it as a game pad.

Describe the solution you'd like
Before I build the developer tools I want to know if this is even possible or the write tool to build such a project.

Describe alternatives you've considered
I couldn't find anything that supported a socket connection as a game pad.
I could look at more source code for android wifi controllers. Those are the only thing I know that work.

UNEXPECTED_KERNEL_MODE_TRAP Bluescreen

Describe the bug
While playing Forza Horizon 4 my machine bluescreened

To Reproduce
Not sure on the exact way to reproduce, Yesterday it worked fine all day and then today within an hour of playing I got hit by this bluescreen.

Here is the kernel minidump:
092918-10375-01.zip

Expected behavior
No bluescreen

Screenshots
NA

System details (please complete the following information):

Additional context

*******************************************************************************
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *
*******************************************************************************

UNEXPECTED_KERNEL_MODE_TRAP (7f)
This means a trap occurred in kernel mode, and it's a trap of a kind
that the kernel isn't allowed to have/catch (bound trap) or that
is always instant death (double fault).  The first number in the
bugcheck params is the number of the trap (8 = double fault, etc)
Consult an Intel x86 family manual to learn more about what these
traps are. Here is a *portion* of those codes:
If kv shows a taskGate
        use .tss on the part before the colon, then kv.
Else if kv shows a trapframe
        use .trap on that value
Else
        .trap on the appropriate frame will show where the trap was taken
        (on x86, this will be the ebp that goes with the procedure KiTrap)
Endif
kb will then show the corrected stack.
Arguments:
Arg1: 0000000000000008, EXCEPTION_DOUBLE_FAULT
Arg2: ffffab817b00a150
Arg3: ffff86860dfd0f60
Arg4: fffff802c02442df

Debugging Details:
------------------


DUMP_CLASS: 1

DUMP_QUALIFIER: 400

BUILD_VERSION_STRING:  17134.1.amd64fre.rs4_release.180410-1804

SYSTEM_MANUFACTURER:  System manufacturer

SYSTEM_PRODUCT_NAME:  System Product Name

SYSTEM_SKU:  SKU

SYSTEM_VERSION:  System Version

BIOS_VENDOR:  American Megatrends Inc.

BIOS_VERSION:  0403

BIOS_DATE:  09/26/2017

BASEBOARD_MANUFACTURER:  ASUSTeK COMPUTER INC.

BASEBOARD_PRODUCT:  ROG STRIX Z370-H GAMING

BASEBOARD_VERSION:  Rev 1.xx

DUMP_TYPE:  2

BUGCHECK_P1: 8

BUGCHECK_P2: ffffab817b00a150

BUGCHECK_P3: ffff86860dfd0f60

BUGCHECK_P4: fffff802c02442df

BUGCHECK_STR:  0x7f_8

TRAP_FRAME:  ffffab817b00a150 -- (.trap 0xffffab817b00a150)
NOTE: The trap frame does not contain all registers.
Some register values may be zeroed or incorrect.
rax=ffffd004aaff0ccb rbx=0000000000000000 rcx=ffffab817b000180
rdx=ffff8789fb608080 rsi=0000000000000000 rdi=0000000000000000
rip=fffff802c02442df rsp=ffff86860dfd0f60 rbp=ffff86860dfd1031
 r8=ffff86860dfd10d0  r9=ffff86860dfd10c4 r10=ffffab817b000180
r11=0000000000000000 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000000000000000
iopl=0         nv up ei ng nz na pe nc
nt!KiChooseTargetProcessor+0x2f:
fffff802`c02442df 4c894da7        mov     qword ptr [rbp-59h],r9 ss:0018:ffff8686`0dfd0fd8=????????????????
Resetting default scope

CPU_COUNT: c

CPU_MHZ: e70

CPU_VENDOR:  GenuineIntel

CPU_FAMILY: 6

CPU_MODEL: 9e

CPU_STEPPING: a

CPU_MICROCODE: 6,9e,a,0 (F,M,S,R)  SIG: 70'00000000 (cache) 70'00000000 (init)

CUSTOMER_CRASH_COUNT:  1

DEFAULT_BUCKET_ID:  WIN8_DRIVER_FAULT

PROCESS_NAME:  ForzaHorizon4.

CURRENT_IRQL:  2

ANALYSIS_SESSION_HOST:  DESKTOP-VBK1LOK

ANALYSIS_SESSION_TIME:  09-29-2018 15:01:22.0118

ANALYSIS_VERSION: 10.0.10586.567 x86fre

STACK_OVERFLOW: Stack Limit: ffff86860dfd1000. Use (kF) and (!stackusage) to investigate stack usage.

LAST_CONTROL_TRANSFER:  from fffff802c03bef69 to fffff802c03ae380

STACK_TEXT:  
ffffab81`7b00a008 fffff802`c03bef69 : 00000000`0000007f 00000000`00000008 ffffab81`7b00a150 ffff8686`0dfd0f60 : nt!KeBugCheckEx
ffffab81`7b00a010 fffff802`c03ba87f : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KiBugCheckDispatch+0x69
ffffab81`7b00a150 fffff802`c02442df : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KiDoubleFaultAbort+0x27f
ffff8686`0dfd0f60 fffff802`c0243670 : 006408d2`01006d00 1a49d201`00c44273 9a650201`40003e10 f0004e06`49171124 : nt!KiChooseTargetProcessor+0x2f
ffff8686`0dfd1090 fffff802`c0243313 : ffffab81`7b000180 fd220449`410c077d 003c3106`4941088c 7dfe077d`00000000 : nt!KiDeferredReadyThread+0x240
ffff8686`0dfd1150 fffff802`c024311f : ffff8789`fb6081f0 00000000`00000000 00f13e00`f1fe5500 63206f66`6e690d18 : nt!KiReadyThread+0x33
ffff8686`0dfd1180 fffff802`c0242111 : ed0200f5`212ef5fc 65636c65`00000000 ffffab81`7b000180 07526e60`e1020240 : nt!KiExitDispatcher+0xff
ffff8686`0dfd11f0 fffff802`c0241a97 : ffff8789`e3ce4e10 00000000`00000200 fffff802`a122de40 00000000`0000000a : nt!IopfCompleteRequest+0x661
ffff8686`0dfd1310 fffff802`a1189627 : ffff8789`ddac4740 ffff8789`e79c3e10 00000000`00000000 ffff8789`d93bec20 : nt!IofCompleteRequest+0x17
ffff8686`0dfd1340 fffff802`a11b2cfb : 00000000`00000001 00000000`00000000 00007876`00186628 00000000`ec393ac8 : Wdf01000!FxRequest::CompleteInternal+0x247 [minkernel\wdf\framework\shared\core\fxrequest.cpp @ 869]
ffff8686`0dfd1400 fffff802`a5772c49 : 00000000`0000000c ffff8789`ddac4740 ffff8686`0dfd14c0 00000000`0000000c : Wdf01000!imp_WdfRequestCompleteWithInformation+0x9b [minkernel\wdf\framework\shared\core\fxrequestapi.cpp @ 571]
ffff8686`0dfd1470 00000000`0000000c : ffff8789`ddac4740 ffff8686`0dfd14c0 00000000`0000000c 00000000`00000000 : ViGEmBus+0x2c49
ffff8686`0dfd1478 ffff8789`ddac4740 : ffff8686`0dfd14c0 00000000`0000000c 00000000`00000000 7865646e`49657461 : 0xc
ffff8686`0dfd1480 ffff8686`0dfd14c0 : 00000000`0000000c 00000000`00000000 7865646e`49657461 02490249`00490261 : 0xffff8789`ddac4740
ffff8686`0dfd1488 00000000`0000000c : 00000000`00000000 7865646e`49657461 02490249`00490261 75335859`6f312c22 : 0xffff8686`0dfd14c0
ffff8686`0dfd1490 00000000`00000000 : 7865646e`49657461 02490249`00490261 75335859`6f312c22 535f5849`784b364e : 0xc


STACK_COMMAND:  kb

THREAD_SHA1_HASH_MOD_FUNC:  85625f0957ec52a96cb59fdde7de0916a8ec6c01

THREAD_SHA1_HASH_MOD_FUNC_OFFSET:  ca0370ea1c8bdef62e5e9ba0b2b19af343425704

THREAD_SHA1_HASH_MOD:  b802136d69383a2aa5f21aef7abf1e3e0ef84681

FOLLOWUP_IP: 
ViGEmBus+2c49
fffff802`a5772c49 33c0            xor     eax,eax

FAULT_INSTR_CODE:  8b48c033

SYMBOL_STACK_INDEX:  b

SYMBOL_NAME:  ViGEmBus+2c49

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: ViGEmBus

IMAGE_NAME:  ViGEmBus.sys

DEBUG_FLR_IMAGE_TIMESTAMP:  5a624d2c

BUCKET_ID_FUNC_OFFSET:  2c49

FAILURE_BUCKET_ID:  0x7f_8_ViGEmBus!Unknown_Function

BUCKET_ID:  0x7f_8_ViGEmBus!Unknown_Function

PRIMARY_PROBLEM_CLASS:  0x7f_8_ViGEmBus!Unknown_Function

TARGET_TIME:  2018-09-29T13:44:55.000Z

OSBUILD:  17134

OSSERVICEPACK:  0

SERVICEPACK_NUMBER: 0

OS_REVISION: 0

SUITE_MASK:  272

PRODUCT_TYPE:  1

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

OSEDITION:  Windows 10 WinNt TerminalServer SingleUserTS

OS_LOCALE:  

USER_LCID:  0

OSBUILD_TIMESTAMP:  2018-09-15 03:18:09

BUILDDATESTAMP_STR:  180410-1804

BUILDLAB_STR:  rs4_release

BUILDOSVER_STR:  10.0.17134.1.amd64fre.rs4_release.180410-1804

ANALYSIS_SESSION_ELAPSED_TIME: 474

ANALYSIS_SOURCE:  KM

FAILURE_ID_HASH_STRING:  km:0x7f_8_vigembus!unknown_function

FAILURE_ID_HASH:  {696f4673-2ffc-9435-98a6-63b09e22f46d}

Followup:     MachineOwner
---------

Vigem 1.16.116 rumble problem (Dualshock 4 v2)

Some problems when the Vigem 1.16.116 are installed on the system. When a rumble event comes on some games (Using different emulators) the controller freezes and the character keeps walking/shooting/whatever. After uninstalling the Vigem, the problem was solved.

This reminds me a similar problem on another software called ScpServer:

nefarius/ScpToolkit#39

The thing is that I need Vigem in order to use DS4Windows + Cemu emulator. In this emulator, the problem happens in every game with rumble functions.

On another emulators such as RPCS3, the problem happens also in the games. But if I uninstall Vigem (Since RPCS3 haves dualshock passthrough and it doesn't need an external software) the problem is solved again.

There are any plans for releasing a new Vigem version? The latest one was on Dec 19. Almost a year ago.

My specs:

Windows 10 x64
GTX 970
i7 4790k
16 GB DDR3

Thank you for this awesome software.

Installer "Invalied drive Z:"

Describe the bug
Installer (1.16.116) show warninng window "Invalied drive Z:" and installation is interrupted

To Reproduce
Just start installer and click install

System:

  • OS: 10 1806
  • Driver Version: 1.16.116

Additional context
Drive Z: is webdav

PARSEC ViGEmBus issues

Hi! My friend install Parsec to play online but it doesn't allow me to use my gamepad (the game pad is okay, it works in my computer). I asked in a Parsec forum and they told me to reinstall Parsec and install ViGEmBus manually.
My friend did all of that but it still doesnt work (VigemBus doesn't appears in the devices manager)

Driver deadlock

Describe the bug
With a virtual Xbox 360 controller enabled, programs that poll controller input will be unable to launch. They deadlock attempting to open a handle to the device. This happens with feeder applications as well.

It also prevents any real devices from connecting to or disconnecting from my system.

To Reproduce
I've been unable to consistently reproduce it. It happens fairly frequently, but with no specific steps that I could identify. If applications begin failing to launch with a feeder and Xbox 360 endpoint, however:

  1. Launch an application that polls for controller input (a game, Uplay, Steam, Battle.net).
  2. The application will stall or fail to launch.
  3. Attempt to disable the device with Device Manager/etc, and it will also stall.
  4. When the feeder is killed, the Xbox 360 endpoint device will enter an error state, displayed in Device Manager.

Expected behavior
Some kind of error handling or error logging. ViGEmClient has error logging, but it doesn't appear to encounter any errors when this deadlock occurs.

Screenshots
image

I attempted to disable the device, Device Manager stalled, and both the Game Controllers dialog and Battle.net immediately launched. Opening another instance of Device Manager reveals that the device is still enabled:

image

System details (please complete the following information):

  • OS: Windows 10 Pro 1903
  • Feeder software: ds4wizard
  • Driver Version: 1.14.3.0

Additional context
It very well could be something I'm doing with my feeder, but I've been unable to figure it out.

Setup isn't working here

Describe the bug
I downloaded the latest installer (ViGEmBus_Setup_1.16.115.exe) and tried to run it. Absolutely nothing happens. I already tried as admin and through powershell, nothing is printed either. I found out that GloSC wasn't working because the driver wasn't installed, so I tried to install it manually.

To Reproduce

  1. Download the setup file
  2. Try to run it (double-click)
  3. Nothing opens

Expected behavior
The driver to be installed.

System details (please complete the following information):

  • OS: Windows 10 Pro 1909 x64
  • Feeder software: GloSC
  • Driver Version: 1.16.115

Are there any flags I can pass to the installer to make it verbose and give me any clues on what is happening?

Add support for Xbox One Controller Emulation

I have had issues with games that support xbox one controllers, but do not support xbox 360 controllers.

Edit: I now suspect it's not working at all due to some fault of my own.

D-pad Y-axis will unexpectedly invert

Describe the bug
The Y-axis of a DS4 D-pad will flip if either the UP or DOWN arrow is held, and either the LEFT or RIGHT arrows is tapped.

So holding: โ†‘โ†—โ†‘ or โ†‘โ†–โ†‘ will result in โ†‘โ†—โ†“ or โ†‘โ†–โ†“
The same will also occur in reverse if the DOWN arrow is pressed in place of the UP arrow.

To Reproduce
As stated above, when either UP or DOWN is held on the Dpad, then a diagonal direction is toggled, the direction of the UP or DOWN movement inverts temporarily until the arrow button is released. The LEFT and RIGHT arrow, however, never invert.

Also notable, When using the DS4 controller on Steam, if an arrow button is pressed, it causes the cursor to move 1 unit in that direction; so to get to the bottom of a list requires repeatedly pressing the DOWN button where the ViGEm driver will 'rapid fire' when an arrow is held. This seemed unusual to me, but I can't be sure it's related.

System details
My Setup: A DS4 controller on Linux Mint 19.1 running ShadowPC Official release. I followed the guide here (https://www.reddit.com/r/linux_gaming/comments/9cf6ip/guide_how_to_make_all_of_your_controllers_work_at/) to interpret my DS4 controller as SDL2 output. Without this ShadowPC doesn't register the D-pad at all. All outputs were verified to work correctly with jstest-gtk on the Linux system.

  • OS: Windows 10 1903 (host system)
  • OS: Linux Mint 19.1 (client system)
  • Feeder software: ShadowPC Official Release
  • Driver Version: 1.16.115

Additional context
After installing the driver the problem has been seen with 2 separate PS4 controllers and 1 PS3 controller using both Linux Mint and Windows 10 as the client system.

WiFi HID emulator

hi , sorry to open a ticket for my question, but I have a question that may related to your field of repository and any possible hint really appreciated
Actually I interested to send game-pad data by WiFi bridge(ESP8266) to my laptop, but generic joystick only use USB port, Is there a way to emulate "HID-compliant game controller" driver which listen to IP message instead of USB port
Tnx

How can I disable the updater

It was mentioned that the updater can be disabled by the user. Unfortunately he forgot to say how this is done. So, tell me, please.

Hot to emulate ps4 controller to play ps4 remote play?

sorry for my question but i didn't find the discord server on the read.me .
i have xbox one gamepad and DS4 gamepad but i don't have the DS4 usb wireless adaptor, so i was find a solution to use my DS4 without the adapter but with my bluetooth dongle.
i followed the installation instruction of vigembus but i don't how to reach one of the purpouse of this git :
"You want the freedom to use a different controller of your choice in PS4 Remote Play."
can you help me please?

Release notes are confusing

Describe the bug
The release notes start with "Necessary preparations for Windows 7" and finish with "These steps are not necessary for Windows 8.1 or 10!". There are no clear install instructions for windows 8.1 or 10 and some users have skipped installing the drivers due to the ambiguity of the description.

To Reproduce
Steps to reproduce the behavior (example):

  1. Navigate to the releases page.
  2. Observe release notes.

Expected behavior
A clear and concise description on how to install ViGEmBus drivers for Windows 8.1 and 10 is included in addition to the Windows 7 instructions.

Screenshots
Not applicable.

System details (please complete the following information):

  • OS: Windows 10
  • Feeder software: RdpGamepad
  • Driver Version: 1.16.116

Additional context
None

Rename some GUIDs

Possibly add Touchmote to Known users of ViGEm list

To preface this, Touchmote is a Wiimote mapper utility that can be used to navigate the Windows desktop with a Wiimote and for playing games with the Wiimote by emulating an Xbox 360 controller. Although the official Touchmote project is pretty much dead, I have forked it and I have been updating it for about two months. One of the big updates was to rewrite the XInput output handler to use ViGEmBus rather than ScpVBus.

Official site:
http://touchmote.net/

Official repo:
https://github.com/simphax/Touchmote

Forked version repo:
https://github.com/Ryochan7/Touchmote/tree/ryochan7

I have only one old example of using Xbox 360 controller emulation in Touchmote; my main experiments have been improving the FPS mouse routine. There is a short video showing Star Wars Episode 1: Racer being played with a Wiimote. The Wiimote was placed in a Wheel shell to mimic playing the game with steering wheel. Although updates to Touchmote would make this type of configuration better now, the game was pretty fun playing this way and I played through the whole campaign using the Wiimote.

https://www.youtube.com/watch?v=XgwFgKQwczk

As an aside, HidGuardian was needed to get controller support working properly in the game. The game initially detected the inactive DolphinBar created controllers and would refuse to detect the emulated Xbox 360 controller. Hiding the 4 DolphinBar created controllers was required for the game to detect the virtual Xbox 360 controller.

[Cannot Build] inf2cat fails

I'm trying to build the driver from source, but the inf2cat stage keeps failing.

Errors: 22.9.1: vigembus.sys in [drivers_dir] of ViGEmBus\vigembus.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.

22.9.1: wdfcoinstaller01009.dll in [vigembus_device_coinstaller_copyfiles] of ViGEmBus\vigembus.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.

I've tried next to everything -- playing around with the WDK versions and MSVC versions, but nothing seems to help. Any advice?

How?

sorry im really new and i need this for some joy-con software and im not sure how to install it

Less intrusive updater notifications

Is your feature request related to a problem? Please describe.
Kinda. The ViGEm Updater is completely silent for most of the time, however, when an update is available, it is intrusive since it immediately opens a window on top of everything else asking if you want to update. I've also noticed the updater window will even kick you off of any running fullscreen application (similar to the Windows Firewall notification when it blocks something) if the update check happens while a fullscreen app or game is running.

Describe the solution you'd like
I have no issues with the actual updater window, in fact its wizard-based approach is very concise and direct to the point. However, I do think it shouldn't immediately open on top of everything else whenever an update is available.

I think displaying a system tray icon and pushing a regular notification when an update is available (e.g. similar to the behavior of safely removing an USB device), then bringing the updater window only upon clicking on the system tray icon or on the notification is way less intrusive, while still retaining the current update flow.

Describe alternatives you've considered
I considered disabling the updater and manually checking for new versions, but I ended leaving it enabled despite the current intrusive behavior, as in the end it still is way more practical than manually checking for new versions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.