[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.
But how does the humble RP2040 (be it in Pico guise or compatible) provide a web page, you ask? The quick answer comes thanks to Microsoft and their Remote Network Driver Interface Specification (RNDIS) support. RNDIS implements a network device over USB, and luckily, other OSs have caught up and implemented it also. The GP2040 firmware leverages TinyUSB to implement the RNDIS protocol, lwIP to implement a lightweight network stack (whilst only occupying a rather paltry 40k of flash), and finally react-bootstrap to code the actual web logic. (Aren’t modern open source libraries awesome?) If you feel the need to use the source (whether you are named Luke or not) the project can be found on the GP2040 GitHub.
If you’re into gaming on game pads, but quite like the responsiveness of the trusty mouse, look no farther than this neat hybrid controller. But if this modern stuff with 45 buttons and levers all over the place is just too much, and you’ve a hankering for the controllers of old, this might be more your style.
Thanks to [DJBiohazard] on the Hackaday Discord server for the tip!
Hmm, wonder of you could mod this to fake speed runs by playing back TAS (tool assisted speed runs). Not that it would be a positive thing.
Yep, you definitely could. I plugged an Arduino into a Xbox 360 controller years ago to “cheat” at Forza. https://hackaday.com/2011/02/02/automating-automatic-racing/
The speed running community has gotten pretty good in recent years at detecting fake runs so even though you could do it, I’m not sure you’d get away with it.
Yes, although there are already a few replay boards out there so I’m not sure if this in particular brings anything particularly new/better to the table versus just adapting something that was designed with TAS in mind.
Also, once you get past retro hardware and into modern consoles you’ll have a much much harder time syncing your TAS (I think arstechnica has an article on the efforts of the TASbot team in getting basic replay on a Switch)
TASBot has been going for close to a decade now!
It only works on systems that are deterministic enough for input playback not to desync.
Sure hope it can support original Xbox and/or Steam controller emulation. Would be cool. (Also Bt stack would be sweet for wireless XD
I am also wondering if it is flexible enough to run something like a SpaceORB 360° 6DOF onboard. The drivers are deprecated as of win98, and mostly consisted of translating the 16bit values from some optical “strain” sensors into a calibration and force curve then presenting it to windows as an input device. This could do it all inside the device.
(Yes I was addicted to playing Interplay’s Descent in 640×480 or 800×600 on MS-DOS. Also found a replacement for the Dos4GW driver so you can still run old games on newer systems or DosBOX, if you aren’t going the D1x/D2X project)
Took me a while to figure out what this was. Its firmware for a DIY game controller, that can pretend its a usb-gam-control for . Iow, take a pi-pico solder buttons to it, plug it into a PC, its a USB game pad. Plug it into a Nintendo, its a switch controller. E.g. DIY game controller.
I suppose what confused me is all those systems listed, making it sound like ‘convert to pc’.
Does it support force feedback?
There is a newer fork of the project, gp2040-ce.
We’re actively adding new features now, analog support, haptic feedback, and different controller types (dance pad anyone?), are on the backlog.
There is a more up to date fork of the project here: https://github.com/OpenStickFoundation/GP2040-CE
For a little more context: The original project developer (FeralAI) has gone dark, so a group of people forked the repo. All active development is now happening on the OpenStickFoundation fork.
Unfortunately the website (gp2040.info) belongs to the original dev, so for the time being we don’t have a way to point that at the new repo.
Just in time for my pi based diy steering wheel