nes-to-xinput is a neat little budnle consisting of two parts. An Arduno program and a bridge program that reads the data from the Arduino and translates it into XInput equivalents to be sent to a virtual XInput controller via ViGEm.
- An Arduino or an Arduino-like development board
- Some wires
- A USB capable of connecting your Arduino to the PC
- ViGEm Bus Driver (Download)
- Rust (Download)
- Arduino IDE (Download)
-
Make sure you have all the requirements in check including the ViGEm Bus Driver.
-
Clone the project.
-
Open the Arduno sketch (
source/arduino/nes.ino
) and upload it to your Arduino. -
Connect the wires. You can find a pinout for your specific NES controller on the internet but it boils down to these pins:
- VCC +5V
- GND
- Clock
- Latch
- Data
Connect the pins on the arduino to the controller as follows:
- +5V -> VCC +5V
- GND -> GND
- D4 -> Clock
- D3 -> Latch
- D2 -> Output
-
Open up a terminal and
cd
intosource/bridge
and runcargo run -- <path_to_serial>
.Example:
cargo run -- COM1
-
If no error pops up that should be it, you can test your controller here.
If you want, you can build the bridge by running cargo build
and run it as an usual binary. That way you can have the setup be standalone from the project.