Switch Support

Fire Red and Leaf Green releasing on Switch gives a new option for hunting in Generation III.

Capturing video from a docked switch is simple using an HDMI capture card. So that just leaves control.

The first attempt was to use a Pi Pico to emulate a GameCube controller using something along the lines of Pico Rectangle. However, inital attempts didn’t have much luck in getting it to be recognised as a controller. As a simpler (hopefully no foreshadowing) approach, NXBT was investigated as a way to control the Switch.

It turns out NXBT hasn’t been maintained in a while and was written against an older version of Python. It turns out the “simpler” approach involves recompiling Python from source, and going back and forth updating dependency versions until something works. The eventual versions that worked can be found on the Switch development branch. However, the precompiled versions of Python available in UV don’t include Bluetooth support and the version included in Raspbian was too recent so this needed Python to be compiled from source.

In order to keep the control mostly equivalent to controlling the DS-Lite a script was used to create a FIFO, and read from it, interpret as button presses and then send using NXBT. The control side then just writes to a file rather than to a serial port.

Unfortunately, NXBT sometimes seems to drop button presses, which can cause some soft resets to fail. It’s possible to make the state machines a bit more resilient to missed presses by adding timeouts and doing more image processing to advance states rather than relying on fixed delays, then becoming a trade-off between complexity of the state machine against reliability.

Also, using a Switch 2 it fails to reconnect and required pairing each time. The best option is probably to use a Pico as a USB controller using GP2040-CE. This hasn’t been developed all yet, but surely USB will be more reliable than Bluetooth… Which would be more convincing if the original control board hadn’t developed a fault and was continually pressing ‘R’. Luckily it seemed to just be a bridged connection that was easy to clear.

And hopefully when Home support is added for Fire Red and Leaf Green it’ll preserve the met location, leading to some unique opportunities when previously it would have been overwritten with “Poké Shifter”.


Last modified on 2026-02-27