GP2040 is no longer being maintained. Please check out the more fully-featured community fork called GP2040-CE. Documentation for GP2040-CE can be found at https://gp2040-ce.info. Thank you to the Open Stick Community members for picking up the slack and advancing this project in my absence.
GP2040 is a gamepad firmware for the Raspberry Pi Pico and other boards based on the RP2040 microcontroller, and provides high performance with a rich feature set across multiple platforms. GP2040 is compatible with PC, MiSTer, Android, Raspberry Pi, Nintendo Switch, PS3 and PS4 (legacy controller support).
Full documentation can be found at https://gp2040.info.
Take a look at the GP2040 Usage page for more details.
Input latency is tested using the methodology outlined at WydD's inputlag.science website, using the default 1000 Hz (1 ms) polling rate in the firmware.
Version | Mode | Poll Rate | Min | Max | Avg | Stdev | % on time | %1f skip | %2f skip |
---|---|---|---|---|---|---|---|---|---|
v0.3.1 | All | 1 ms | 0.56 ms | 1.32 ms | 0.85 ms | 0.24 ms | 95.95% | 4.05% | 0% |
Full results can be found in the GP2040 Firmware Latency Test Results Google Sheet.
Prebuilt uf2
files are available in the Releases section for the following boards and controllers:
Several other working example configurations are located in the configs folder.
The instructions will slightly vary based on your device. These instructions are for a Raspberry Pi Pico.
If the device has been previously used for something other than GP2040, please flash this file first to clear the on-board storage: flash_nuke.uf2. After flashing the nuke file, wait a minute for the clear program to run and the RPI-RP2 drive to reappear.
GP2040.uf2
file from the Releases section for your board (e.g. GP2040-PiPico.uf2
for the Raspberry Pi Pico).RPI-RP2
should appear in your file explorer.GP2040.uf2
file into the removable drive. This will flash the board.If you would like to discuss features, issues or anything else related to GP2040 please create an issue or join the OpenStick GP2040 Discord channel.
Generally speaking, XInput will be the mode of choice for everything except Nintendo Switch and PlayStation 3. XInput mode is the most fully-featured, has the best compatibility with PC games and is compatible with console adapters like the Brook Wingman product line. All things being equal, performance is the same in all modes.
GP2040 will work on PS4 games that implement support for legacy PS3 controllers. Many of the popular PS4 fighting games have this support.
These consoles implement security to prevent unauthorized accessories from being used. The process of cracking or bypassing that security may not be legal everywhere. These consoles could be supported in the future if a user-friendly and completely legal implementation method is found.
Yes! Each board with GP2040 is treated as a separate controller. The one thing to keep in mind would be to only run the web configurator for one controller at a time.
Yes...if your platform supports 1000 Hz USB polling. GP2040 is configured for 1000 Hz / 1 ms polling by default in all modes, however some systems override or ignore the polling rate the controller requests. PC and MiSTer are confirmed to work with 1000 Hz polling. Even if your system doesn't support a USB polling rate that high, you can feel comfortable knowing GP2040 is still reading and processing your inputs as fast as the target system will allow.
No! The RP2040 chip contains two processing cores. GP2040 dedicates one core to reading inputs and sending them via USB, while the second core is used to handle any auxiliary modules like LEDs and display support. No matter how crazy the feature set of GP2040 becomes, it's unlikely your controller's input latency will be affected.
GP2040 uses a generic system for handling button inputs that most closely maps to a traditional PlayStation controller layout with a few extra buttons. This means 4 face buttons (B1-B4), 4 shoulder buttons (L1, L2, R1, R2), Select and Start (S1, S2), 2 stick buttons (L3, R3) and 2 auxiliary buttons for things like Home and Capture (A1, A2) on the Switch. The GP2040 documentation and web configurator have a dropdown to change the labels to more familiar controller layouts. You can also refer to the button mapping table on the GP2040 Usage page.
Setting up a development environment to build Pico SDK projects is a manual process which requires several components to be installed and configured. Using PlatformIO allows easy installation and updating of build and project dependencies, and makes for a less confusing experience for new developers and people that just want to make a few tweaks for a custom build.
There's no magic here, just some useful libraries working together:
Want to help improve GP2040? There are a bunch of ways to contribute!
Pull requests are welcome and encouraged for enhancements, bug fixes and documentation updates.
Please respect the coding style of the file(s) you are working in, and enforce the use of the .editorconfig
file when present.
If you'd like to make a donation to my open source work, you can
or