• Stars
    star
    107
  • Rank 313,706 (Top 7 %)
  • Language
    C++
  • Created over 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

XB2X: User-mode Windows driver for Xbox OG controllers, supporting both XInput and DirectInput.

Xb2XInput - user-mode Xbox OG controller driver for Windows

Xb2XInput is a small application that can translate the input from an Xbox OG controller over to a virtual XInput/DirectInput device for games to make use of, without needing any unsigned drivers to be installed!

While there's already solutions such as XBCD or the signed Mayflash driver for this, unfortunately neither included support for my Madcatz controller out-of-the-box.
With those my only solution was to edit the driver files, breaking any signature on them and forcing me to run Windows with unsigned driver support enabled...

Keeping unsigned drivers enabled is a bit too risky for me though, and I also found those drivers have some issues of their own too (a controller driver shouldn't be able to cause BSoDs!).
Both of those only support DirectInput too, requiring another third-party app to translate that to XInput (with the best solution I found needing the app to be installed per-game...)

I decided to try looking into a user-mode solution instead, something with a smaller chance of taking my whole system down at will, ideally something that supports both Xbox OG controllers and XInput.
Sadly there doesn't seem to be much work done on something like that for Windows, but luckily others have worked on user-mode solutions for other kinds of controllers, which wasn't too hard to adapt to the Xbox OG controllers.
(major thanks to MTCKC for their ProconXInput project!)

While it's not fully user-mode as it needs the ViGEmBus driver to be installed, ViGEmBus does have its advantages over the other drivers:

  • Fully open source
  • Used & tested by tons of people
  • Not tied to Xbox - can be used to add support for pretty much any kind of controller
  • Signed!

Setup

Download the latest compiled version of Xb2XInput from the releases page.

To make use of Xb2XInput you'll need the ViGEmBus driver installed, this can be downloaded from here: https://github.com/ViGEm/ViGEmBus/releases (If you're a Windows 7 user, make sure to install the prerequisites listed on that page!)

Once ViGEmBus has been installed, the controllers will need to be setup to use the "WinUSB" driver, the included "install drivers.bat" can take care of setting up these drivers for you.

Simply extract the entire zip somewhere, navigate to your OS's directory (x86 for 32-bit, x64 for 64-bit) and then run the "install drivers.bat" as administrator (right-click -> Run as administrator).

Once the batch file is completed you should restart your computer to make sure they take effect.

To uninstall/remove the WinUSB driver you'll have to uninstall the driver from your gamepad in device manager (make sure "Delete the driver software for this device" is checked)

Usage

With the drivers setup, just extract the Xb2XInput-x.x.zip file somewhere (making sure the libusb-1.0 DLL is next to Xb2XInput.exe!)

Now run the Xb2XInput.exe and an icon for it should appear in your system tray.

Connecting a controller

To connect a controller just plug it into your system, after a few seconds Xb2XInput should detect it and a notification will appear once it starts translating it over to XInput.

Disconnecting a controller

Similarly, unplugging a controller will show a notification about the controller being disconnected.

Viewing status

To view the status of Xb2XInput just hover over the icon, any details about connected devices should be shown in the tooltip (if tooltip doesn't appear, click the icon instead)

Guide button emulation

Sadly the Xbox OG controller doesn't contain the guide button usually found on XInput devices. However as of Xb2XInput v1.3.2 this button can now be emulated, through the use of the LT+RT+LS+RS button combination.

By default this button combination will be enabled, but if desired you can easily disable it through the system tray menu, in case it interferes with something else you need the combination for.

(right now you'll have to disable the combination manually each time XB2X is ran, but hopefully in future we can store your preference somewhere instead)

Deadzone settings

Similarly to the Guide button emulation, use the LT+RT+(LS/RS)+DPAD Up/Dn combinaiton for analog stick deadzone and (LT/RT)+LS+RS+DPAD Up/Dn for trigger deadzone adjustment. The deadzone may be set individually on each controller. The current deadzones will be displayed in the context menu each time it is displayed (not live updating). For example, to increase the left analog stick deadzone radius use the button combination LT+RT+LS+DPAD Up (Keep pressing DPAD Up while holding LT+RT+LS to increase by increments of 500). A setting of 3500-4000 works well on my XBOX Controller v2 (US), but ymmv. Xb2XInput does remap the remaining useable range of the axes from origin to max extent. To disable the deadzone button combination, deselect the option through the system tray menu. The deadzone will remain active if the button combination is disabled.

(right now you'll have to set the deadzone manually each time XB2X is ran, but hopefully in future we can store your preference somewhere instead)

Vibration toggle

In case you wish to disable your controllers vibration function, eg. if a game has issues with it, or your controller has problems with the motors, you can also do this through the context-menu.

(As with the guide button emulation toggle above, your choice isn't saved yet unfortunately, so you will have to disable it manually each time XB2X is ran)

Run on startup

To run Xb2XInput on startup just click the icon and choose the "Run on startup" option, a registry entry will be made for Xb2XInput to be ran from it's current path.
If you move the Xb2XInput exe (and associated dlls) make sure to choose the "Run on startup" option again to update the startup path.

Exit

To exit the application just click the icon and choose Exit, any connected gamepads will stop translating to XInput.

Support

If you have any problems with Xb2XInput please don't hesitate to make an issue on the issue tracker, just be sure to include the hardware ID of your device (can be found in Device Manager -> double-click device -> Details -> Hardware IDs, should look something like "USB\VID_0738&PID_4522&REV_0384")

Supported controllers

Xb2XInput should support all the controllers that XBCD has support for, minus any steering wheels/DDR pads.
(no wheel/DDR support since I don't have any and I'm not sure how they translate to XInput, if anyone has one and can connect it to their PC I'd be happy to try debugging it with you though, just make an issue on the issue tracker!)

For a list of all supported controllers see the top section of XboxController.cpp

While a controller might be supported that doesn't mean it's been tested or works, the majority should hopefully all work without problem, but there could be some edge cases.

If you have any issues, or have a controller that isn't on this list, please make an issue on the issues page (including the hardware ID, see Support section above)

Thanks

MTCKC's ProconXInput project (for supporting Nintendo Switch Pro Controllers) was invaluable in creating Xb2XInput.

Thanks to nefarius & ViGEm team for ViGEmBus (part of the awesome ViGEm project).

Big thanks to the libusb developers too.

Xbox icon was taken from starvingartist's Antiseptic Videogame Systems icon set

wdi-simple.exe taken from the pbatard's libwdi project

(No thanks to MS for requiring 3rd-party tools to use an OG controller, but their signed WinUSB driver is nice I guess)

Contributing

Contributions & improvements would be gladly accepted, ideally you should make any changes in a new branch seperate to master, and then create a pull request from that branch.

This way if I update any code while you're working, you should be able to merge any changes in pretty easily.

Todo

  • Allow setting deadzones / calibrating the analog sticks
  • Test x86 version

License

"install/uninstall driver.bat" is taken from ProconXInput which is MIT (Expat) licensed.

ViGEmClient code taken from ViGEmClient, licensed under MIT license.

wdi-simple taken from libwdi project which is LGPL 3 licensed.

The rest of the code is licensed under GPLv3.

More Repositories

1

DLSSTweaks

Tweak DLL for NVIDIA DLSS, allows forcing DLAA on DLSS-supported titles, tweaking scaling ratios & DLSS 3.1 presets, and overriding DLSS versions without overwriting game files.
C#
1,082
star
2

xvdtool

A command-line tool for manipulating Xbox One XVD & XVC files.
C#
128
star
3

idaxex

Xbox360/Xenon loader plugin for IDA 7.2+, and xex1tool, supporting most known Xbox360/Xenon .XEX executable file formats.
C++
85
star
4

xbox-winfsp

Brings native support for Xbox filesystems (FATX, STFS & GDFX/XGD/XDVDFS) to Windows.
C#
60
star
5

Arise-SDK

Improvement extension for Tales of Arise
C++
55
star
6

MBINCompiler

Now maintained by monkeyman192: https://github.com/monkeyman192/MBINCompiler
C#
42
star
7

xbox-reversing

Information & parsers for some under-documented Xbox360 structures/file formats (STFS/GDFX/XDBF/XEX...)
Python
41
star
8

DOOMExtract

C# command-line tool for extracting/repacking DOOM 2016 resources.
C#
41
star
9

MGSV-QAR-Dictionary-Project

A community project to name every file used in Fox Engine game archives.
C
38
star
10

re4-research

Various tools & modding research for Resident Evil 4
C++
35
star
11

NieRAutomata-LodMod

Wrapper DLL for NieR Automata (PC ver.) to disable LODs & fix AO issues
C++
32
star
12

HaloFreeLoader

The original de-restrictor/map force loader proof-of-concept for Halo Online / Halo Free2Play
C#
26
star
13

DQXIS-SDK

Wrapper DLL & SDK for Dragon Quest XI S
C++
24
star
14

ExCrypt

Open source replacement for the Xbox360 XeCrypt suite.
C
24
star
15

sh2proxy

A D3D8 wrapper and patcher for Silent Hill 2
C
20
star
16

DQXIHook

Console enabler & unpacked file loader for UE4 (Dragon Quest XI)
C
18
star
17

XbRecUnpack

Tool for fully extracting Xbox/Xbox360 SDKs & recoveries.
C#
17
star
18

iQueTool

神游机 (iQue Player) file manipulator
C#
14
star
19

OculusHydraTuscany

Oculus Rift Tuscany demo modded to use Razer Hydra for headtracking
C
10
star
20

DQXIAsset

UAsset <-> CSV converter for DQXIS/UE4 DataTables, supporting almost all DQXIS table structs.
C#
10
star
21

iQueDiagExtend

ique_diag.exe hook
C
9
star
22

openhotel

some node.js/socket.io javascript tile thing
JavaScript
5
star
23

DyingLightDocketServer

A proxy application for Dying Light that allows rewards (dockets) to be modified, using node.js.
JavaScript
4
star
24

HaloFreeLoader2

HaloFreeLoader ported to C++
C++
3
star
25

emoose

3
star
26

RGBuildPP

A project to remake the C# RGBuild used by RGLoader as an X360+Win32 program. Sadly left uncompleted.
C++
3
star
27

game-patches

Game Patches for the Xenia Emulator.
2
star
28

MunchPC-HQ-Cutscenes-Tool-Pack

Scripts used to convert Xbox BIK cutscenes to WMV files for MunchPC
Batchfile
1
star