Skip to content

Add support for more controller types. #536

Open
1 of 3 issues completed
Open
1 of 3 issues completed
@Mysticial

Description

@Mysticial

So far, the entire project has been dependent on emulation of a single wired controller: https://github.com/progmem/Switch-Fightstick

This isn't great as it's a single point of failure for the entire project. Let's try to add more of them.

Here are some ideas:

  • Wired Pro Controller (Pokken Tournament Pro Pad) - this is what we have now
  • ARM Microcontrollers: Our only option right now are AVR8 chips (specifically ATmega16u2, ATmega32u4, and AT90USB1286). The most popular one (Teensy 2.0/++) has been discontinued so these are near EoL. See if we can get it work on something more modern.
  • Other wired pro controllers. (do they have the same or different protocols?)
  • Wireless Pro Controller
  • Joycons (left + right)
  • Sysbot: Interface with the popular Sysbot to allow button commands to be sent to a Switch that's running Sysbot on custom firmware without additional hardware.
  • Emulators: Interface with common emulators (which we will not name). This will allow automation of Switch games long after the console has reached end-of-life and the only way to play them is via emulator.

This is not going to be easy since this has never been our area of expertise. But we can't keep punting this down the road. If we can get Joycon emulation, we also get the ability to automate Let's Go Pikachu and Eevee.

In all cases, a tremendous amount of infra work will be needed to make this happen.

  • Our current host-side CC code is almost entirely hard-coded for the wired Pokken controller. The infra was never designed for any other controller type. This needs to change, and will likely require a lot of rewriting/refactoring.
  • We will likely need new firmware for other controller types. Our current PABotBase firmware for Pokken controller is extremely complicated and not ideal to port to other controllers. We should move as much of the logic onto the host as possible.

In all, there is a lot of tech-debt that we need to unwind before we will see our programs run on any new controllers/devices.

Misc. Notes:

  • CarefreeCrayon in our Discord has a PoC of wired controller emulation over an ARM microcontroller. I don't believe there are any further roadblocks so it's just a matter of work to take this to completion. This shouldn't require any changes CC-side since it's just implementing a different backend for the same protocol.
  • Joycon Droid and Joycontrol show that Joycon emulation is possible and practical. But it's not possible to use any Bluetooth device within Windows as it requires spoofing a cert which Windows does not allow. However, kichithewolf from our Discord found that it may be possible to do it via an ESP32 microcontroller connected to a computer over just USB.
  • If we can get either the wireless controller or either joycon working, it's likely that we get all 3. My current assessment says it may be possible to get them all under the same firmware such that we (the CC program) can select which one we want. IOW, a single ESP32 setup may be able to automate both the classic games (wired pro controller emulation) and LGPE (joycon emulation).
  • Tick-accurate timings are likely not possible for the majority of controllers. So for each program, we will need to either make it robust enough to work on imprecise controllers, or mark it as requiring tick-precision to block it from running on any controller that is imprecise.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions