

GP2040-RE
GP2040-Retro Edition
- Size
- 77.7 × 33 mm
- Copper layers
- 4
- Thickness
- 1.6 mm
- Parts
- 71
- Nets
- 72
- Pads
- 280
- Tracks, vias
- 82, 14
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 8.0 (file 20240108)
- Created
- 11 Mar 2024
- Updated
- 11 Aug 2024
Overview
GP2040-RE is an open-source printed circuit board by Fortinbra, from the Fortinbra/GP2040-RE repository on GitHub, published under the MIT licence. It is a 4-layer board of 77.7 × 33 mm with 71 parts on 72 nets, routed with 82 tracks and 14 vias.
It is built around the RP2040, BSS138 and SIT1602BC-33-33E-12.000000T, with the SM03B-SRSS-TB(LF)(SN)(P) and USB4105-GF-A among its other parts. Its parts include 24 resistors, 18 capacitors, 9 connectors, 6 transistors and 3 ICs. It belongs with the RP2040 boards of this library.
Main components
5RP2040
LQFN-56(7x7)12bit 133MHz 30 LQFN-56(7x7) Microcontrollers (MCU/MPU/SOC) ROHSRaspberry PiMicrocontrollers (MCU/MPU/SOC)BSS138
SOT-23-55℃~+150℃ 1 N-channel 1.1Ω@10V、1.2Ω@4.5V 1.2V 1.7nC@10V 17.5pF 340mA 350mW 50V 6.5pF N-Channel SOT-23 MOSFETs ROHShongjiachengMOSFETsSIT1602BC-33-33E-12.000000T
SMD5032-4P-20℃~+70℃ 12MHz 3.3V 4.5mA LVCMOS、HCMOS ±50ppm SMD5032-4P Programmable Oscillators ROHSSiTimeProgrammable OscillatorsSM03B-SRSS-TB(LF)(SN)(P)
-- Lack of specifications ROHSJSTUncategorisedUSB4105-GF-A
SMD-40℃~+85℃ 1 12P 48V 5A Black Female Surface Mount, Right Angle Type-C USB 2.0 SMD USB Connectors ROHSGlobal Connector Technology (GCT)USB Connectors
README
README.mdGP2040-RE
GP2040-Retro Edition
What this is
The purpose here is to add the ability to use your GP2040-CE controller with older consoles that do not have USB support. So this project is not a contoller on it's own, and requires the use of another gamepad for the actual controller functions. This is just the transport level to connect to the consoles themselves.
Getting Started
GP2040-CE
The features required on the GP2040-CE side of this have not been released yet, and this will be updated with the version number as soon as they are.
Hardware
This project operates as a target I2C device. (Formerly called a slave device). At minimum a Raspberry Pi Pico is required. Pico W will not be supported, as wireless is not on the roadmap here, and we will be utilizing all the RP2040 pins eventually, not leaving any for the SPI bus required for wireless functions. A level shifter is used to bring the 3.3V logic of the Pico up to the 5V logic of the SNES (the only suppored retro console so far). A diode is necessary so that we can use the 5V line from the SNES as the reference voltage for the high side of the level shifter, and not accidentally backfeed anyting to the SNES. A pull up resistor is required on the Data line, as it's an open-drain, and should be normallly high. The SNES does have a 5V line that is documented to provide up to 25mA across both controller ports, and there are examples of devices utilizing that as a power source for similar projects to this. To be safe with the geriatric console, I'm opting for external power.
Firmware
This document assumes you know how to build and flash your own firmware. All pin configurations are in config.h.
Building your own
So this will be a breadboard edition.
Required Materials
-
Raspberry Pi Pico
-
3.3v-> 5v level shifter
- must support open-drain signals
- must be bi-directional
-
SNES controller cable
-
Powersource for the Pico
- can be USB or a battery bank
- can be powered directly from GP2040-CE controller
-
GP2040-CE controller with available I2C connection
- does not work with the OLED
Starting with the SNES controller cable, you'll need to identify which wires are attached to which pins. Official nintendo cables do follow a specific wiring color scheme but are increasingly hard to acquire.
SNES Controller Connector:
----------------------------- ---------------------
| | \
| (1) (2) (3) (4) | (5) (6) (7) |
| | /
----------------------------- ---------------------- Vcc (+5V)
- Clock
- Latch
- Data
- Not Connected
- Not Connected
- Ground
Breadboarding at it's best
With the Pico attached to your breadboard, you'll want to add your level shifter, and wire it to the Pico with jumpers. If using the TXS0108 from Texas instruments, you would need GPIO pins 2-7 on the Pico to connect to pins A2-A7 on the level shifter. You'll want to connect the level shifter's ground to the Pico's ground (the entire project will have common ground, so make sure everything is connected). We also want to connect the level shifter's VCCA pin to the Pico's 3v3 pin. If your OE pin does not have a resisotor in it' breakout board, you'll want to use one to pull it to ground.
On the other side, let's connect the SNES controller to the level shifter. Pin 1 will go to a diode first, then the diode will connect to the VCCB pin on the level shifter. Ground will connect to our common ground. Pin 4 (Data) will connect to B5 on the shifter. Pin 3 (Latch), will connect to B3, and Pin 2 (Clock), will connect to B1. (Diagrams to come soon)
Next lets connect to the GP2040-CE controller. This is I2C, so we'll have four pins to deal with. The 3v3 pin from the I2C should connect to the VSYS pin on our Pico. The ground pin should be connected to our common ground setup. And finally, the SDA and SCL pins should be connected to GPIO 16 (SDA), and GPIO 17 (SCL) which is part of I2C0 on the Pico.
If you'd like to do UART monitoring, the button outputs can be seen using the UART on GPIO 0 and 1.
The Future
- NES Support
- Need a console to test against
- Same protocol as SNES
- SNES Support
- In progress
- N64
- Uses JoyBus protocol
- Memory card support
- GameCube
- Uses JoyBus protocal
- Playstation 1 & 2
- No Analog face button support at this time (PS2).
- Dreamcast
- VMU suppport
Would be nice
- Readily available connector with more than 8 pins, to support Sega, Atari, and NEOGEO consoles too.
Deeper Dive - SNES
Communication protocol
The communication protocol on the SNES is based on a 4021 PISO shift register, and depending the manufacture date of the controller, it may physically have two shift registers in a chain, or one 16bit register. Ether way, the output is the same.
When the Latch pin is high, it signals the shift register to start sending data according to the clock pulses. What is commonly documented incorrectly, is regarding the first data pulse. The data is sent as a low signal on the rising edge of the clock pin. However, when the latch is high at the beginning, the clock is also already high, so the first data pulse needs to begin immediatly. Overall, there will be 16 data pulses sent, the first twelve will be active low pulses representing the button state of the 12 buttons on the controller. The last 4 will be always high. On the trailing edge of the last clock pulse, the data will be pulled low one last time, before going back to it's default high state, and the cycle starts all over again. The entire report is done in 16.67ms. The button reports are always in the same order: B, Y, SELECT, START, UP, DOWN, LEFT, RIGHT, A, X, L, and R. The NES uses this same protocol, with a slightly different button order. A, B, SELECT, START, UP, DOWN, LEFT, and RIGHT
Parts
71| Qty | Value | Footprint | References |
|---|---|---|---|
| 12 | 10K | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R6, R7, R15, R16, R17, R18, R19, R20, R21, R22, R23, R24 |
| 11 | 100n 6.3V X5R 10% | Capacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolder | C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C15 |
| 6 | BSS138 | Package_TO_SOT_SMD:SOT-23 | Q1, Q2, Q3, Q4, Q5, Q6 |
| 4 | 2.2u 6.3V X5R 20% | Capacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolder | C1, C12, C13, C14 |
| 4 | MountingHole | MountingHole:MountingHole_2.5mm | H1, H2, H3, H4 |
| 3 | 100K 50mW 1% | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R8, R10, R14 |
| 3 | 20V 1A | GP2040-RE:SDO_SOD-123FL_ONS | D1, D2, D3 |
| 3 | 47u 6.3V X5R 20% | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C16, C17, C18 |
| 2 | 27 50mW 1% M0603 | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R12, R13 |
| 2 | 4.7k | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R2, R3 |
| 2 | 5K1 | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R4, R5 |
| 2 | Buttons | GP2040-RE:SW_EVP-BB2A9B000 | S1, S2 |
| 1 | 16M | GP2040-RE:USON-8_UX_2x3x0p6_WIN | U2 |
| 1 | 1K 50mW 1% | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R1 |
| 1 | 1uH | GP2040-RE:IND_SRN2512_BRN | L1 |
| 1 | 560K 50mW 1% | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R9 |
| 1 | CONN HEADER R/A 6POS 2.54MM | GP2040-RE:WURTH_61200621721 | J2 |
| 1 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J9 |
| 1 | Conn_01x03 | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J5 |
| 1 | Conn_01x10 | Connector_PinHeader_2.54mm:PinHeader_1x10_P2.54mm_Vertical | J8 |
| 1 | I2C Target | GP2040-RE:CONN_SM04B-SRSS-TB_JST | J1 |
| 1 | Linear Regulator | GP2040-RE:QFN_4AGQW_RIT | U3 |
| 1 | RJ-45 | GP2040-RE:CONN8_2-908LF_AMP | J7 |
| 1 | RP2040 | GP2040-RE:QFN56_7X7_RPI | U1 |
| 1 | SIT1602BC-33-33E-12.000000T | GP2040-RE:SON4_SIT1602-3_SIT | XTAL1 |
| 1 | SM03B-SRSS-TB_LF__SN_ | GP2040-RE:JST_SM03B-SRSS-TB_LF__SN_ | J3 |
| 1 | USB4105-GF-A | GP2040-RE:GCT_USB4105-GF-A | J4 |
| 1 | VREF SHUNT 2% | GP2040-RE:DBZ3 | R11 |
| 1 | microSD | GP2040-RE:MEM2061-01-188-00-A_GCT | J6 |
More from Fortinbra/GP2040-RE
1- 2 layers96.4 × 45.3 mm

Similar boards
- 4 layers70 × 82 mm

- 2 layers39.5 × 64.7 mm

- 4 layers56.4 × 56.4 mm

- 2 layers30 × 30 mm

- 6 layers67.6 × 50 mm

- 4 layers102 × 70 mm

- 4 layers21 × 51 mm

- 6 layers40 × 40 mm

Questions
How big is the GP2040-RE PCB?
It measures 77.7 × 33 mm and has 4 copper layers, 1.6 mm thick.
What parts does the GP2040-RE use?
71 parts, built around the RP2040, BSS138, SIT1602BC-33-33E-12.000000T and SM03B-SRSS-TB(LF)(SN)(P). The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the GP2040-RE KiCad files?
From the Fortinbra/GP2040-RE repository on GitHub, at the commit this page was made from: the board is GP2040-RE/GP2040-RE.kicad_pcb and its schematic GP2040-RE/GP2040-RE.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the GP2040-RE design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).