Skip to content

Commit

Permalink
Add automated method of installing WinUSB driver
Browse files Browse the repository at this point in the history
  • Loading branch information
emoose committed Dec 10, 2018
1 parent 1ded49d commit 07e79f1
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 16 deletions.
29 changes: 13 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ I decided to try looking into a user-mode solution instead, something with a sma
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](https://github.com/MTCKC/ProconXInput/)!)

While it's not fully user-mode as it needs the ScpVBus driver to be installed, that driver does have its advantages over the other Xbox dedicated ones:
While it's not fully user-mode as it needs the ScpVBus driver to be installed, that driver does have its advantages over the other ones:

- Fully open source
- Used & tested by tons of people
Expand All @@ -25,22 +25,13 @@ Setup
---
Download the latest compiled version of Xb2XInput from the [releases page](https://github.com/emoose/Xb2XInput/releases).

**To make use of Xb2XInput you'll need the ScpVBus driver installed, and your controller will need to be setup to use the "WinUSB" driver.**
To make use of Xb2XInput you'll need the ScpVBus driver installed, and your controller will need to be setup to use the "WinUSB" driver. The included "install driver.bat" will take care of setting up these drivers for you.

The included "install driver.bat" file will install the ScpVBus driver for you, just extract the entire zip somewhere and run that as administrator (right-click -> Run as administrator), make sure to run it from the correct folder for your OS (x86 for 32-bit machines, x64 for 64-bit)
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 driver.bat" as administrator (right-click -> Run as administrator).

Setting up the controller for WinUSB is a little more complicated:
1. Make sure the controller is plugged in.
2. Open Device Manager and locate the device.
3. Right-click the device and select "Update driver" from the context menu.
4. In the wizard, select "Browse my computer for driver software"
5. Select "Let me pick from a list of device drivers on my computer"
6. From the list of device classes, select "Universal Serial Bus devices"
7. The wizard should now display "WinUsb Device" on the left, click on it, and then choose "WinUsb Device" from the list on the right.
8. A warning might appear about Windows not recommending this driver etc, click "Yes" to continue installing the driver.
9. If all went well it should say that the "WinUsb Device" was installed successfully.
Once the batch file is completed you should restart your computer to make sure they take effect.

After both drivers are setup you should restart your computer to make sure they take effect.
To uninstall the drivers run the "uninstall driver.bat" as administrator, to 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
---
Expand All @@ -55,7 +46,7 @@ Now run the Xb2XInput.exe and an icon for it should appear in your system tray.
- 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, if only one controller is being translated it'll list details about that controller, otherwise if there's more than 1 it'll give the number of controllers connected.
- 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)

##### 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.
Expand Down Expand Up @@ -88,6 +79,8 @@ Big thanks to the [libusb](https://libusb.info/) developers too.

Xbox icon was taken from starvingartist's [Antiseptic Videogame Systems icon set](https://www.deviantart.com/starvingartist/art/Antiseptic-Videogame-Systems-23217105)

wdi-simple.exe taken from the pbatard's [libwdi project](https://github.com/pbatard/libwdi)

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

Contributing
Expand All @@ -104,4 +97,8 @@ Todo

License
---
"install/uninstall driver.bat" and XOutput.cpp/XOutput.hpp is taken from [ProconXInput](https://github.com/MTCKC/ProconXInput/) which is MIT (Expat) licensed, rest of the code is licensed under GPLv3.
"install/uninstall driver.bat" and XOutput.cpp/XOutput.hpp is taken from [ProconXInput](https://github.com/MTCKC/ProconXInput/) which is MIT (Expat) licensed

wdi-simple taken from [libwdi project](https://github.com/pbatard/libwdi) which is LGPL 3 licensed.

The rest of the code is licensed under GPLv3.
Binary file added dist/x64/Drivers/wdi-simple.exe
Binary file not shown.
43 changes: 43 additions & 0 deletions dist/x64/install drivers.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,48 @@ echo Installing system drivers...

devcon install .\ScpVBus\ScpVBus.inf Root\ScpVBus

echo Installing WinUSB drivers for known gamepads (this might take a minute or two)
wdi-simple --vid 0x044F --pid 0x0F07 --type 0 --name "Thrustmaster Controller"
wdi-simple --vid 0x045E --pid 0x0202 --type 0 --name "Microsoft Xbox Controller v1 (US)"
wdi-simple --vid 0x045E --pid 0x0285 --type 0 --name "Microsoft Xbox Controller S (Japan)"
wdi-simple --vid 0x045E --pid 0x0287 --type 0 --name "Microsoft Xbox Controller S"
wdi-simple --vid 0x045E --pid 0x0288 --type 0 --name "Microsoft Xbox Controller S v2"
wdi-simple --vid 0x045E --pid 0x0289 --type 0 --name "Microsoft Xbox Controller v2 (US)"
wdi-simple --vid 0x046D --pid 0xCA84 --type 0 --name "Logitech Cordless Precision"
wdi-simple --vid 0x046D --pid 0xCA88 --type 0 --name "Logitech Thunderpad"
wdi-simple --vid 0x05FD --pid 0x1007 --type 0 --name "Mad Catz Controller (unverified)"
wdi-simple --vid 0x05FD --pid 0x107A --type 0 --name "InterAct PowerPad Pro X-box pad"
wdi-simple --vid 0x05FE --pid 0x3030 --type 0 --name "Chic Controller"
wdi-simple --vid 0x05FE --pid 0x3031 --type 0 --name "Chic Controller"
wdi-simple --vid 0x062A --pid 0x0020 --type 0 --name "Logic3 Xbox GamePad"
wdi-simple --vid 0x06A3 --pid 0x0201 --type 0 --name "Saitek Adrenalin"
wdi-simple --vid 0x0738 --pid 0x4506 --type 0 --name "MadCatz 4506 Wireless Controller"
wdi-simple --vid 0x0738 --pid 0x4516 --type 0 --name "MadCatz Control Pad"
wdi-simple --vid 0x0738 --pid 0x4520 --type 0 --name "MadCatz Control Pad Pro"
wdi-simple --vid 0x0738 --pid 0x4526 --type 0 --name "MadCatz Control Pad Pro"
wdi-simple --vid 0x0738 --pid 0x4536 --type 0 --name "MadCatz MicroCON"
wdi-simple --vid 0x0738 --pid 0x4556 --type 0 --name "MadCatz Lynx Wireless Controller"
wdi-simple --vid 0x0738 --pid 0x4586 --type 0 --name "MadCatz MicroCon Wireless Controller"
wdi-simple --vid 0x0738 --pid 0x4588 --type 0 --name "MadCatz Blaster"
wdi-simple --vid 0x0C12 --pid 0x0005 --type 0 --name "Intec wireless"
wdi-simple --vid 0x0C12 --pid 0x8801 --type 0 --name "Nyko Xbox Controller"
wdi-simple --vid 0x0C12 --pid 0x8802 --type 0 --name "Zeroplus Xbox Controller"
wdi-simple --vid 0x0C12 --pid 0x880A --type 0 --name "Pelican Eclipse PL-2023"
wdi-simple --vid 0x0C12 --pid 0x8810 --type 0 --name "Zeroplus Xbox Controller"
wdi-simple --vid 0x0C12 --pid 0x9902 --type 0 --name "HAMA VibraX - "FAULTY HARDWARE""
wdi-simple --vid 0x0E4C --pid 0x1097 --type 0 --name "Radica Gamester Controller"
wdi-simple --vid 0x0E4C --pid 0x2390 --type 0 --name "Radica Games Jtech Controller"
wdi-simple --vid 0x0E4C --pid 0x3510 --type 0 --name "Radica Gamester"
wdi-simple --vid 0x0E6F --pid 0x0003 --type 0 --name "Logic3 Freebird wireless Controller"
wdi-simple --vid 0x0E6F --pid 0x0005 --type 0 --name "Eclipse wireless Controller"
wdi-simple --vid 0x0E6F --pid 0x0006 --type 0 --name "Edge wireless Controller"
wdi-simple --vid 0x0E6F --pid 0x0008 --type 0 --name "After Glow Pro Controller"
wdi-simple --vid 0x0F30 --pid 0x010B --type 0 --name "Philips Recoil"
wdi-simple --vid 0x0F30 --pid 0x0202 --type 0 --name "Joytech Advanced Controller"
wdi-simple --vid 0x0F30 --pid 0x8888 --type 0 --name "BigBen XBMiniPad Controller"
wdi-simple --vid 0x102C --pid 0xFF0C --type 0 --name "Joytech Wireless Advanced Controller"
wdi-simple --vid 0x0738 --pid 0x4522 --type 0 --name "MadCatz LumiCON"

echo Driver installation complete!
:exit
pause
Binary file added dist/x86/Drivers/wdi-simple.exe
Binary file not shown.
43 changes: 43 additions & 0 deletions dist/x86/install drivers.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,48 @@ echo Installing system drivers...

devcon install .\ScpVBus\ScpVBus.inf Root\ScpVBus

echo Installing WinUSB drivers for known gamepads (this might take a minute or two)
wdi-simple --vid 0x044F --pid 0x0F07 --type 0 --name "Thrustmaster Controller"
wdi-simple --vid 0x045E --pid 0x0202 --type 0 --name "Microsoft Xbox Controller v1 (US)"
wdi-simple --vid 0x045E --pid 0x0285 --type 0 --name "Microsoft Xbox Controller S (Japan)"
wdi-simple --vid 0x045E --pid 0x0287 --type 0 --name "Microsoft Xbox Controller S"
wdi-simple --vid 0x045E --pid 0x0288 --type 0 --name "Microsoft Xbox Controller S v2"
wdi-simple --vid 0x045E --pid 0x0289 --type 0 --name "Microsoft Xbox Controller v2 (US)"
wdi-simple --vid 0x046D --pid 0xCA84 --type 0 --name "Logitech Cordless Precision"
wdi-simple --vid 0x046D --pid 0xCA88 --type 0 --name "Logitech Thunderpad"
wdi-simple --vid 0x05FD --pid 0x1007 --type 0 --name "Mad Catz Controller (unverified)"
wdi-simple --vid 0x05FD --pid 0x107A --type 0 --name "InterAct PowerPad Pro X-box pad"
wdi-simple --vid 0x05FE --pid 0x3030 --type 0 --name "Chic Controller"
wdi-simple --vid 0x05FE --pid 0x3031 --type 0 --name "Chic Controller"
wdi-simple --vid 0x062A --pid 0x0020 --type 0 --name "Logic3 Xbox GamePad"
wdi-simple --vid 0x06A3 --pid 0x0201 --type 0 --name "Saitek Adrenalin"
wdi-simple --vid 0x0738 --pid 0x4506 --type 0 --name "MadCatz 4506 Wireless Controller"
wdi-simple --vid 0x0738 --pid 0x4516 --type 0 --name "MadCatz Control Pad"
wdi-simple --vid 0x0738 --pid 0x4520 --type 0 --name "MadCatz Control Pad Pro"
wdi-simple --vid 0x0738 --pid 0x4526 --type 0 --name "MadCatz Control Pad Pro"
wdi-simple --vid 0x0738 --pid 0x4536 --type 0 --name "MadCatz MicroCON"
wdi-simple --vid 0x0738 --pid 0x4556 --type 0 --name "MadCatz Lynx Wireless Controller"
wdi-simple --vid 0x0738 --pid 0x4586 --type 0 --name "MadCatz MicroCon Wireless Controller"
wdi-simple --vid 0x0738 --pid 0x4588 --type 0 --name "MadCatz Blaster"
wdi-simple --vid 0x0C12 --pid 0x0005 --type 0 --name "Intec wireless"
wdi-simple --vid 0x0C12 --pid 0x8801 --type 0 --name "Nyko Xbox Controller"
wdi-simple --vid 0x0C12 --pid 0x8802 --type 0 --name "Zeroplus Xbox Controller"
wdi-simple --vid 0x0C12 --pid 0x880A --type 0 --name "Pelican Eclipse PL-2023"
wdi-simple --vid 0x0C12 --pid 0x8810 --type 0 --name "Zeroplus Xbox Controller"
wdi-simple --vid 0x0C12 --pid 0x9902 --type 0 --name "HAMA VibraX - "FAULTY HARDWARE""
wdi-simple --vid 0x0E4C --pid 0x1097 --type 0 --name "Radica Gamester Controller"
wdi-simple --vid 0x0E4C --pid 0x2390 --type 0 --name "Radica Games Jtech Controller"
wdi-simple --vid 0x0E4C --pid 0x3510 --type 0 --name "Radica Gamester"
wdi-simple --vid 0x0E6F --pid 0x0003 --type 0 --name "Logic3 Freebird wireless Controller"
wdi-simple --vid 0x0E6F --pid 0x0005 --type 0 --name "Eclipse wireless Controller"
wdi-simple --vid 0x0E6F --pid 0x0006 --type 0 --name "Edge wireless Controller"
wdi-simple --vid 0x0E6F --pid 0x0008 --type 0 --name "After Glow Pro Controller"
wdi-simple --vid 0x0F30 --pid 0x010B --type 0 --name "Philips Recoil"
wdi-simple --vid 0x0F30 --pid 0x0202 --type 0 --name "Joytech Advanced Controller"
wdi-simple --vid 0x0F30 --pid 0x8888 --type 0 --name "BigBen XBMiniPad Controller"
wdi-simple --vid 0x102C --pid 0xFF0C --type 0 --name "Joytech Wireless Advanced Controller"
wdi-simple --vid 0x0738 --pid 0x4522 --type 0 --name "MadCatz LumiCON"

echo Driver installation complete!
:exit
pause

0 comments on commit 07e79f1

Please sign in to comment.