Use Nintendo Switch JoyCons as a virtual Xbox 360 controller in Windows

Overview

XJoy

XJoy allows you to use a pair of Nintendo Joy-Cons as a virtual Xbox 360 controller on Windows. XJoy is made possible by ViGEm and hidapi.

Support this project

XJoy is a free product that I work on in my free time, so any contributions are greatly appreciated.

Note

Currently the newer versions containing analog support appear to have some issues. I recommend using the last version before analog support was introduced v0.1.8.

Installation

  1. Install the ViGEm Bus Driver (install all requirements as well)
  2. Install the Visual C++ Redistributable for Visual Studio 2017
  3. Download the latest zip from the releases page and extract it somewhere permanent like your Documents folder
  4. That's it!

Usage

  1. Pair each of your Joy-Cons with Windows (hold down the button on the side to put into pairing mode, then go to add bluetooth device in Windows)
  2. Ensure that both Joy-Cons show as "Connected" in your bluetooth devices page
  3. Run XJoy.exe
  4. Start playing games with your Joy-Cons. A virtual xbox controller should show up as soon as XJoy.exe starts running (you will hear the USB device inserted sound).
  5. To confirm that it is working, try pressing some buttons on your Joy-Cons. You should see the names of the buttons currently being pressed printed in the terminal.
  6. To exit, press [ENTER] in the terminal window. You can also simply close the window however this may not disconnect from the Joy-Cons and the virtual controller properly.

When you launch XJoy.exe, you should get output similar to this:

XJoy v0.1.0

initializing emulated Xbox 360 controller...
 => connected successfully
 => added target Xbox 360 Controller

initializing threads...
 => created report mutex
 => left Joy-Con thread started
 => found left Joy-Con
 => successfully connected to left Joy-Con
 => right Joy-Con thread started
 => found right Joy-Con
 => successfully connected to right Joy-Con

Customization

Right now all buttons are hard-coded to their "default" xbox equivalents. If you wish to customize these mappings, feel free to modify the process_button method in XJoy.cpp and recompile yourself. I plan to add support for a configuration file and maybe a GUI in later versions. The default mappings are shown below:

Joy-Con Button Xbox Button
A B
B A
X Y
Y X
Left Trigger Left Trigger
Right Trigger Right Trigger
Left Shoulder Left Shoulder
Right Shoulder Right Shoulder
D-PAD D-PAD
Left Analog Left Analog
Right Analog Right Analog
Left Stick Left Thumb
Right Stick Right Thumb
Home Start
Capture Back
Plus Start
Minus Back
SL on Joy-Con (L) A
SR on Joy-Con (L) X
SL on Joy-Con (R) B
SR on Joy-Con (R) Y

Building

If you wish to build XJoy yourself, simply install the ViGEm Bus Driver as outlined in the installation steps, open the XJoy.sln file in Visual Studio 2017, and build. Everything should work out of the box but if it does not feel free to submit an issue. Note that at least on my end it seems to be working in Visual Studio 2019 as well, which is good.

Contributing

  1. create a fork for your feature/bugfix/whatever
  2. make your additions/modifications, following our C++ Coding Style Guidelines
  3. test your changes, doing your best to ensure you aren't introducing any environment-specific behavior that may cause issues for users without your exact setup. XJoy's target audience is freshly installed Windows 10 users who have followed the ViGEm installation instructions.
  4. submit a pull request
Issues
  • Error

    Error

    Everytime I attempt to open the XJoy.exe I get an application error that reads "The application was unable to start correctly (0xc000007b). How do I fix this? Before this occurred it said I was missing msvcp140.dll and vcruntime140.dll although I had both of them installed so I put the before mentioned dlls into the folder where XJoy.exe resides and got the application error. error folder

    opened by DylanHanna 22
  • add full analog stick support

    add full analog stick support

    By default (with no calibration / messages sent back to the Joy-Con), the Joy-Con supports 8-direction movement of both analog sticks, which is sent via data slot 3. Looking at other Joy-Con libraries, it is difficult to determine whether this can be increased to something more analog with some calibration. If anyone has any idea whether it is possible to do this, and what the procedure is for getting the Joy-Con out of the default 8-direction mode for analog sticks, it would be greatly appreciated.

    update: this is fully possible, and I am working on adding it to XJoy

    enhancement 
    opened by sam0x17 18
  • user cal not found

    user cal not found

    for me it keeps saying "user cal not found". what can i do about that error? i followed all the instructions and can't seem to make it work.

    opened by ghost 11
  • Cannot connect 2 pairs of Joycons

    Cannot connect 2 pairs of Joycons

    Hello! I tried to use 4 joycons to play with a friends and it turns out Xjoy only recognize one pair of Joycons Do have any solution for us? Or is connecting 4 joycons juts impossible for now?

    Thank you for your help!

    opened by AcideA7X 8
  • Setting the LEDs

    Setting the LEDs

    Probably not a top priority or anything, but I'd find it nice if this Program set the LEDs of the Joycons once connected, instead of letting them continue cycling them.

    opened by Inari-Whitebear 8
  • my left joycon don't work with xjoy, apparently

    my left joycon don't work with xjoy, apparently

    my problem was partially solved, the delay was on the two joycons and one of them stopped, but now my left joycon when I press a button and it stops working, and I notice that its light stops, normally it keeps blinking only when I I press a button the light stops, I don't know what to do

    opened by Akagi430 7
  • initializing emulated Xbox 360 controller... connection error: bus not found

    initializing emulated Xbox 360 controller... connection error: bus not found

    I installed everything that was required for this to work. So when I run XJoy.exe I get this:

    XJoy v0.2.0

    initializing emulated Xbox 360 controller... connection error: bus not found press [ENTER] to exit

    opened by RiskiVR 7
  • Support for the SL and SR buttons on the attachment rails

    Support for the SL and SR buttons on the attachment rails

    When using a single joycon, the SL and SR buttons are quite useful. I tinkered with the code a bit and it looks like there is distinct signals detected, just that the code is not set up to handle that type of input yet.

    enhancement 
    opened by atofigh 7
  • CLI options

    CLI options

    Preparing to config automatically, I added some cli options:

    • /H: help
    • /V: version
    • /L: List

    In list option, interesting info is shown for each joy con (Example redacted):

    - Left Joycon , XCW11111111111, 11:22:33:44:55:66, Neon Blue, 3.89V - 63%
    - Left Joycon , XCW11111111111, 11:22:33:44:55:66, Animal crossing Green, 3.89V - 63%
    - Right Joycon, XCW11111111111, 11:22:33:44:55:66, HORI Red, 3.89V - 63%
    - Right Joycon, XCW11111111111, 11:22:33:44:55:66, Animal crossing Blue, 3.89V - 63%
    
    • Left or right
    • Serial
    • Body color (named if it is a know one)
    • MAC

    Testing several joycons the only different info is the MAC. With that info, an automatic config reading a yaml file can be created. Colors will be rendered in a --gui option showing a form with a treeview to select joycons and pair them visually.

    This is a temptative PR to discuss implementation and see how to better setup your joycons without relay on "sync last pair connected"

    opened by albfan 4
  • i only have left joycon

    i only have left joycon

    Hi, I want to be able to just use the left joycon as an xbox controller, but when I start up xjoy is detects the left controller, doesn't detect the right controller, and then tells me to hit enter to quit the program. I was hoping to do some PC gaming on steam using the left joycon as my WASD plus other functions that i'd be able to map in through steam, and then a mouse for aiming. but i didn't realize that i'd need both joycons if that's the case. an Xbox controller does seem to appear in my device list on steam, but the joy con won't do anything still. There's also no virtual controller appearing like the readme file suggests.

    opened by upwn 4
  • Error 0xc000007b

    Error 0xc000007b

    I see that others have been having the same issue a few months back, I have reinstalled multiple versions of Visual C++ and multiple versions of XJoy but I can't get it to work. First it gives the error Msvcp140.dll is missing so I found it online seperately and put it in the same folder, but then it brings out the 0xc000007b error and doesn't work, I have installed the ViGE bus drivers and what not and really want to get this working.

    opened by WhatIsRove 4
  • Crazy left and right stick

    Crazy left and right stick

    Hi,

    What a disappointment ! However, congratulations to the developer, it is the only software that works almost perfectly !

    But impossible to use it, the left and right stick goes crazy everywhere, at least remains blocked on the right/top position, impossible to calibrate it with the windows joytick tool.

    And with a error warning: user calibration data not found

    It's a shame, all the other buttons seem to work fine.

    image

    XJoy v0.2.0

    initializing emulated Xbox 360 controller... => connected successfully => added target Xbox 360 Controller

    initializing threads... => created report mutex => left Joy-Con thread started => found left Joy-Con => successfully connected to left Joy-Con warning: user calibration data not found => right Joy-Con thread started => found right Joy-Con => successfully connected to right Joy-Con warning: user calibration data not found

    opened by saiyanvip 0
  • JoyCon Analog Stick Signal Bounces - Debouncing Needed

    JoyCon Analog Stick Signal Bounces - Debouncing Needed

    Hello,

    I am experiencing an issue where the analog sticks of my two joy cons, connected using this solution, are demonstrating false actuation, typically in the down left and down right directions. These signals are bouncing frequently and seemingly randomly, regardless of physical input to the analog sticks themselves (i.e. I will be interacting in a game menu, and the selection will change on its own without me touching the controller). This is happening constantly currently and I imagine a simple de-bounce (20-50ms) baked into the signals of both the right and left analog sticks might be sufficient to filter this signal out and enable normal gameplay.

    The signal is especially painful while playing games like Madden 22, where the signal will suddenly cause a player to change direction uncontrollably. And because the emulator takes one signal at a time, it doesn't matter if I am actuating the analog sticks or not, the signal will interrupt the action.

    If you are aware of the place in which I might make this adjustment, please advise, and if you have other suggestions for lowering the sensitivity of the analog stick inputs, I would appreciate any suggestions.

    Best Regards,

    Kolbi

    opened by kcsc4848 0
  • MSVCP140.dll Not Found And VCRUNTIME140.dll Not Found.

    MSVCP140.dll Not Found And VCRUNTIME140.dll Not Found.

    Whenever I Go To Open Xjoy it Gives Me 4 Errors, But The Final 2 Are Repeats. it Says Reinstalling Might Help But Ive Tried 2 Different Versions, 1 That Someone Said Worked For Them, And The Latest (Not Prerelease).

    image

    opened by Jazztoasty101 0
  • not working

    not working

    i got the controllers to pair but the game does not sense any controller.the game im playing works when i play with single joycon but when i match them together the game does not sense any controller.also the game im playing supports xbox controller

    opened by Kitasa16 0
  • Issue Building Solution in Visual Studio 2019 (cant open openvr_api.lib )

    Issue Building Solution in Visual Studio 2019 (cant open openvr_api.lib )

    iim not the most versed with visual studio im a javascript coder

    but i was attempting to alter the button mapping on index360 github you cooked up

    and make the left controller A/B actually be A/B so that i can use left hand controller and right hand mouse

    when i download your github and open the solution and simply click build i get this error constantly

    Severity Code Description Project File Line Suppression State Error LNK1104 cannot open file 'openvr_api.lib' XJoy C:\Users\admin\Documents\IndeX360-master\XJoy\LINK 1

    with no idea how to fix it

    opened by phillypro 2
Releases(v0.2.0)
Owner
DuroSoft
High security software development and research, creators of BitFort
DuroSoft
A cheap,simple,Ongeki controller Use Keyboard Simulation and Mouse Simulation to controller the ongeki game. Using Pro-micro control.

N.A.G.E.K.I. A cheap,simple,Ongeki controller Use Keyboard Simulation and Mouse Simulation to controller the ongeki game. Using Pro-micro control. 中文版

NanaNana 28 Jul 21, 2022
A cheap,simple,Ongeki controller Use Keyboard Simulation and Mouse Simulation to controller the ongeki game. Using Pro-micro control.

N.A.G.E.K.I. PLEASE CHECK Main Project A cheap,simple,Ongeki controller Use Keyboard Simulation and Mouse Simulation to controller the ongeki game. Us

NanaNana 11 Dec 30, 2021
A Nintendo Switch homebrew for importing and exporting Miis.

MiiPort A Nintendo Switch homebrew for importing and exporting Miis. Installation Download a release and then place the .nro file at sd:/switch/MiiPor

null 21 Jun 3, 2022
Moonlight port for Nintendo Switch

Moonlight-Switch Moonlight-Switch is a port of Moonlight Game Streaming Project for Nintendo Switch. Thanks a lot to Rock88 and his Moonlight-NX, lots

Vinogradov Daniil 236 Aug 6, 2022
Gamepad firmware for RP2040 microcontrollers supporting Nintendo Switch, XInput and DirectInput

GP2040 Firmware GP2040 is a gamepad firmware for the RP2040 microcontroller that provides high performance and a rich feature set across multiple plat

null 223 Aug 1, 2022
Tesla cheat trainers for Grand Theft Auto: The Trilogy - The Definitive Edition for the Nintendo Switch.

nxGTA-Trainers This is a set of tools for cheating in Grand Theft Auto: The Trilogy - The Definitive Edition for the Nintendo Switch. While I will try

null 24 Jul 29, 2022
English Translation Mod for Air Nintendo Switch version

AIR-ENX English translation mod for Nintendo Switch version of "Air" 1.0.1 Current status: Alpha Chapters translation status: Dream 100% Summer 100% A

MasaGratoR 4 May 22, 2022
Nintendo Switch Emulator

yuzu yuzu is the world's most popular, open-source, Nintendo Switch emulator — started by the creators of Citra. It is written in C++ with portability

null 21.2k Aug 9, 2022
Read Books On Your Nintendo Switch

eBookReaderSwitch Features: Saves last page number Reads PDF, EPUB, CBZ, and XPS files Dark and light mode Landscape reading view Portrait reading vie

null 47 Jun 13, 2022
A decompilation of the Nintendo Switch version of Captain Toad: Treasure Tracker [v1.3.0].

cttt-decomp A decompilation of the Nintendo Switch version of Captain Toad: Treasure Tracker [v1.3.0]. Build Instructions Obtain a clean copy of a mai

shibbs 13 May 22, 2022
Open source Splatoon 2 save editor for the Nintendo Switch (NX) built on top of the effective-spoon project

Open source Splatoon 2 save editor for the Nintendo Switch (NX) built on top of the effective-spoon project

Crusty ★ 5 Mar 25, 2022
Simulator of an IBM System/360 Model 50

A simulator for the IBM System/360 Model 50 This simulator runs the microcode for this computer, to execute System/360 instructions. This is under dev

Ken Shirriff 33 Jul 18, 2022
Home automation light switch controller

Home Automation Light Switch Controller Copyright 2019-2021 SuperHouse Automation Pty Ltd www.superhouse.tv A modular Light Switch Controller for DIY

SuperHouse Automation 11 Mar 27, 2022
Dump the ROM from an Original Xbox DVD Movie Playback IR Dongle

Dongle Dumper. Dump the firmware off a Original Xbox DVD Movie Playback Dongle straight from the console. The dongle contains a ROM with an XBE which

null 10 Jul 27, 2022
A gdnative plugin for Godot's UWP export to add xbox live integration

GodotXbox Current instructions for setting up DLL, steps to setup project for contributing/modifying are coming soon. It should be noted that Godot's

Cregg Hancock 31 Jul 20, 2022
Sea of Thieves - Advanced ESP /w ImGui for XBox Version (Steam has to be written)

??‍☠️ Sea of Thieves - External Tool Premium Sea of Thieves - Advanced ESP /w ImGui for XBox Version (Steam has to be written) How to: Check latest ga

Kamil 9 Jul 27, 2022
custom esp8266 controller for driving the pwm led controller

room8266 custom esp8266 controller for driving the pwm led controller designed to drive this: https://github.com/austinscreations/PWM-LED-Controller t

null 1 Nov 1, 2021
sc-ble-bridge is a utility that for every connected Steam Controller creates a virtual one acting as a bridge between SC and Steam

sc-ble-bridge The main goal of this utility is to provide workaround for steam-for-linux issue which makes Valve's Steam Controller unusable in BLE mo

null 5 Apr 19, 2022
Professor Terence Parr has taught us how to create a virtual machine Now it is time to pwn virtual machine

My First real world CTF Simple Virtual Machine Challenge description Professor Terence Parr has taught us how to create a virtual machine Now it is ti

null 1 Feb 17, 2022