All Projects → javmarina → Nintendo-Switch-Remote-Control

javmarina / Nintendo-Switch-Remote-Control

Licence: MIT license
Remote play system for the Nintendo Switch

Programming Languages

java
68154 projects - #9 most used programming language
c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
kotlin
9241 projects
Makefile
30231 projects

Projects that are alternatives of or similar to Nintendo-Switch-Remote-Control

switch-launcher
GUI-Based desktop switch payload launcher based on a modified reswitched injector
Stars: ✭ 19 (-72.06%)
Mutual labels:  nintendo-switch
SlideNX
A work in progress module to change JoyCon attach/detach sound
Stars: ✭ 24 (-64.71%)
Mutual labels:  nintendo-switch
MiiPort
A Nintendo Switch homebrew for importing and exporting Miis.
Stars: ✭ 22 (-67.65%)
Mutual labels:  nintendo-switch
ShallowSea
ShallowSea - The AIO CFW package for the Nintendo Switch with Atmosphere
Stars: ✭ 513 (+654.41%)
Mutual labels:  nintendo-switch
Universal-Manager
Multimedia tool for Nintendo DSi, Nintendo 3DS and Nintendo Switch.
Stars: ✭ 26 (-61.76%)
Mutual labels:  nintendo-switch
RingfitAdventure-BotW-Mod
Using a Ring Fit Adventure mod for The Legend of Zelda: Breath of the Wild. This allows the user to control the game with exercises.
Stars: ✭ 66 (-2.94%)
Mutual labels:  nintendo-switch
joyconpi
An attempt at emulating a Nintendo Switch Joy-Con controller with a Raspberry Pi
Stars: ✭ 24 (-64.71%)
Mutual labels:  nintendo-switch
nxbt
Control your Nintendo Switch through a website, terminal, or macro.
Stars: ✭ 340 (+400%)
Mutual labels:  nintendo-switch
botw-unexplored
Easily view the unexplored korok seeds and locations in your BotW savefile on your Switch
Stars: ✭ 79 (+16.18%)
Mutual labels:  nintendo-switch
sys-clk-Overlay
Editor for your sys-clk configuration using ovl-loader!
Stars: ✭ 53 (-22.06%)
Mutual labels:  nintendo-switch
NSW-Custom-Game-Icons
Nintendo Switch custom game icons, icon repo for NX-GiC
Stars: ✭ 33 (-51.47%)
Mutual labels:  nintendo-switch
switch-cmake
CMake toolchain for Nintendo Switch homebrew development
Stars: ✭ 38 (-44.12%)
Mutual labels:  nintendo-switch
Miyamoto
A supercharged fork of the modern day level editor.
Stars: ✭ 67 (-1.47%)
Mutual labels:  nintendo-switch
sarc
Nintendo SARC archive reader and writer
Stars: ✭ 16 (-76.47%)
Mutual labels:  nintendo-switch
sdl-hello-world
Draw "hello world" on the screen of the Nintendo Switch
Stars: ✭ 36 (-47.06%)
Mutual labels:  nintendo-switch
Switch-Screenshots
Script to organize Nintendo Switch screenshots by directory instead of date.
Stars: ✭ 50 (-26.47%)
Mutual labels:  nintendo-switch
fusee-nano
A minimalist re-implementation of the Fusée Gelée exploit (http://memecpy.com), designed to run on embedded Linux devices. (Zero dependencies)
Stars: ✭ 49 (-27.94%)
Mutual labels:  nintendo-switch
nx
Userland library for Nintendo Switch homebrew (and other potential purposes), written in pure Rust and some assembly bits
Stars: ✭ 67 (-1.47%)
Mutual labels:  nintendo-switch
sead
Decompilation of sead: the standard C++ library for first-party Nintendo games
Stars: ✭ 91 (+33.82%)
Mutual labels:  nintendo-switch
BetterJoyForDolphin
Allows the Nintendo Switch Pro Controller and Joycons to be used with the Dolphin Emulator
Stars: ✭ 44 (-35.29%)
Mutual labels:  nintendo-switch

License: MIT Build Status

Nintendo-Switch-Remote-Control

Remote play for the Nintendo Switch via WebRTC (with video streaming). Pro Controller emulation in AVR firmware.

This project uses the LUFA library and reverse-engineering of the Pro Controller for Nintendo Switch for remote control of the console. It consists on three main parts:

  • GUI: Java project with two programs, client and server.

    The client takes input from a real controller, keyboard or a Discord bot and sends it to the server over WebRTC.

    The server receives the input and sends it to an AVR microcontroller which acts as a controller. The MCU is plugged into the Switch dock and the console recognizes it as a Pro Controller. If you have a USB-C adapter, you should also be able to use this in handheld mode/Switch Lite.

    Finally, the server sends a real-time video and audio stream acquired from an HDMI capture card, over WebRTC (the technology used for Stadia and Google Meet).

  • Firmware: firmware that runs on the microcontroller. The server PC sends the received commands to the microcontroller via UART. When the Switch requests HID reports, the microcontroller sends them. It uses the LUFA library.

  • Small Python code for fast prototyping (python folder).

The goal of this project is to provide a way to play Switch games remotely (two computers), or control the console locally or automate tasks (one computer).

A complete diagram is shown below: Hardware diagram

NOTE: if you're using a FTDI-based serial adapter, yo need to reduce the latency timer value.

Additional information can be found on the specific README files.

  • The README inside the gui folder contains information about the Java project, required setup and steps, known issues and instructions for configuring a Discord bot.

  • Inside firmware folder there are instructions for compiling and flashing the firmware for different boards, as well as a list of changes made to the original code.

Is it fast/usable?

Depends on your setup. My goal has been to optimize the software, which is the part I can control, but performance can also be affected by the hardware.

  • Critical software parts, such as controller input, real-time video streaming and serial communication, use native libraries. Java is used for the user interface (in particular, JavaFX, which is fairly efficient).

  • Serial communication runs at 1 Mbps by default, which is the maximum baud rate the Arduino Uno R3 can safely work with. This means one controller packet is sent in under 0.1 ms.

  • For audio and video streaming, WebRTC is used. WebRTC is the state-of-the-art videoconference technology, used by Google Meet and, more importantly, Stadia. WebRTC has sub-500-millisecond latency, is open-source and has become an industry standard.

  • There is an option to select the video codec for the remote play. Users can take advantage of recent codecs, such as VP9 or AV1, with improved quality and reduced bandwidth.

Therefore, if you experience high latency and can't play games, your hardware setup is probably to blame. The most critical components are the HDMI capture card and the internet connection. Low quality HDMI capture devices introduce high latency that can affect the user experience. A high bandwith and low latency internet connection is also desirable.

Prerequisites

  • A LUFA-compatible microcontroller such as the Teensy 2.0++, Arduino UNO R3, or the Arduino Micro
  • A USB-to-UART (TTL) adapter. Popular ones are based on FTDI and CH340 chip. Can be easily found online.
  • An HDMI capture card compatible with libuvc (in general, any with USB output). Device quality can dramatically affect streaming performance.
  • A PC with Java and JDK installed (Java 11 or newer required).

TODO list

List of things that I might do in the future, no guarantee. Pull requests are welcome.

  • Automatically decrease read timeout for FTDI-based serial adapters (see https://github.com/projectgus/hairless-midiserial/blob/master/src/PortLatency_win32.cpp).
  • Power the board from the serial adapter and not USB (Switch), so that console can suspend without turning off the MCU. In that case, the Switch could be remotely turned on by long pressing the HOME button.
  • Power reduction techniques (section 9.9 from ATmega16U2 datasheet).
  • Refactoring of SerialAdapter.java. Blocking/non-blocking operations, use default procedures for syncing.
  • Migrate from Jamepad to sdl2gdx (?).

Acknowledgments

  • devopvoid for his work on the webrtc-java project.
  • mzyy94 for his work on Pro Controller emulation using a Raspberry Pi.
  • wchill for the SwitchInputEmulator project. My firmware was initially based on his work.
  • progmem for the Switch-Fightstick repository, which itself is the base of wchill work and created the opportunity to control the Switch with a LUFA-compatible MCU.
  • ItsDeidara author of the CommunityController repository and host of the namesake Twitch channel. Gave some tips for hardware configuration and some of the serial port code is based on his work.
  • abcminiuser, who created the LUFA library (Lightweight USB Framework for AVRs).
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].