GP2040: A Configurable Game Pad Firmware

[feralAI] and fellow GitHub contributors present for your viewing pleasure GP2040: an open source game pad firmware for RP2040-based hardware. The dual-core RP2040 is a good platform to use for gaming inputs, as there is plenty of CPU grunt to get sub-1 ms USB polling time, regardless of any other tasks the controller may be performing. Currently the firmware supports PC, Android, RPi, Nintendo Switch, PS3, PS4 (legacy mode), and the sweet MiSTer FPGA-based retro-gaming platform.

The firmware supports the older DirectInput API and the newer shiny (but rather restrictive) XInput API (no, it’s not the old X11 input extension with the same name) — as well as the usual controller features like SOCD cleaning, D-pad mapping, and RGB support for additional distractions. There is even support for those tiny OLED displays (SSD1306 and friends), although we can’t think of a use case for that at the moment. Configuration is particularly interesting, however, as it is based upon an embedded web application. This is where the pin mappings to your actual hardware are defined, as well as all that RGB bling, if you so desire.

Continue reading “GP2040: A Configurable Game Pad Firmware”

RC Controller Becomes XInput Controller

XInput is an API that is used by applications to interface with the Xbox 360 Controller for Windows. The 360 controller became somewhat of a “standard” PC gamepad, and thus many games and applications support the XInput standard.

[James] is working on an entry for a robotics competition, and wanted a controller to use with their PC that was more suited to their build. They took an RC controller, and converted it to work with XInput instead.

The controller in question is the JJRC Q35-01, a trigger-type RC controller available for under $20. The conversion is executed neatly, with the original STM microcontroller being removed from the board, and the PCB traces instead being connected to a Teensy 3.5 which takes over running the show.

The conversion is remarkably complete, with the team not stopping at just reading the buttons and steering potentiometer. A USB logic analyzer was used to figure out how to control the LCD, and a calibration mode implemented just in case.

[James] has shared the work on Github so it’s reproducible for the average maker. We’ve seen plenty of builds in this space, like this tilt controller from [Electronoobs]. Video after the break.

Continue reading “RC Controller Becomes XInput Controller”