Skip to the content
2 layersGba bt hid, the printed circuit board in 3D

Turn your Game Boy Advance into a Bluetooth Gamepad.

Copper layers
2
Thickness
1.6 mm
Parts
13
Nets
41
Pads
96
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 5 (file 20171130)
Created
12 Jan 2018
Updated
6 Jun 2020

Overview

Gba bt hid is an open-source printed circuit board by Shyri, from the Shyri/gba-bt-hid repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board with 13 parts on 41 nets.

It is built around the ATMEGA328P-PU and 74LS157PC. Its parts include 4 ICs, 3 capacitors, 3 connectors, 2 resistors and 1 crystal. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

2

README

README.md

GBA as Bluetooth Gamepad

Turn your Game Boy Advance into a Bluetooth Controller :) Gameboy

How to use it:

After launching the rom the bluetooth module enters discoverable mode. This means you can pair to it from whatever device you are going to use it with (PC, phone, Android TV...). After pairing the program will start sending keys to the device. The device address is stored so next time you launch you just have to press A to automatically connect to that device.

How it works:

The project is basically an ESP32 connected to the GBA through the link port. With the device connected and without any cartridge inserted in the GBA, once the GBA turns on the ESP32 sends a small rom to be loaded in the GBA. This rom is a program made to enable communication between the ESP32 and GBA for both handling bluetooth conneciton and sending the user input to the ESP32 when it is connected to a bluetooth host and act as a gamepad. Unfortunatelly it only works with traditional GBA as I couln't make it work with GBA SP. I think GBA SP just doesn't give enough current.

When turned on the ESP32 (using the code found in esp32 peforms a multiboot sequence through the SPI to the GBA sending a rom that the ESP32 has stored in the flash memory. The code for this rom can be found in gba. Once loaded the ESP32 enables the UART port in the same pins and the rom communicates with the ESP32 using UART through the link port.

This project was tested with ESP-IDF v3.3.2 that you can find here:

https://github.com/espressif/esp-idf/releases

You also will need to install btstack. Commit https://github.com/bluekitchen/btstack/commit/a0a4507b35ea396d076a62a67efb1a5a800c5ff9 is the most recent version that is proved to work in this project.

Just follow the ESP32 environment instructions here

The ESP32 is powered by the 3.3V the GBA gives through the port. Once the ESP32 is programmed the male link port connector should be wired to it like the following diagram: ESP32Diagram

The first prototype was made with an Atmega and HC-05:

Old version prototype:

Gameboy The gba contains the code for a GBA program that uses the link port to communicate with a HC-05 bluetooth module using UART (HC-05 flashed with RN-42 firmware, find how to do it in the links at the bottom).

This rom is stored in a W25Q32 flash chip. An Atmega328P performs a multiboot sequence reading from this chip and sending to the GBA through the link port. You can find the Atmega code here (It is actually written for arduino so you'll need to burn arduino's bootloader if you want to use it).

Once multiboot ends, the gba program runs and talks to the HC-05 to handle bluetooth connection, and key presses.

Additional 74XX157 quad 2-input multiplexer makes possible to multiplex SPI to read from the flash chip and send the multiboot, it alternates byte reads from the flash chip and send them to the GBA. Then using hcf4066 switch link port pins are switched from the spi to the HC-05 uart pins.

The whole circuit runs at 3.3V provided by GBA through the link port.

Final version of the circuit includes a 6 pin port that allows to reprogram the atmega if necessary. Also it lets to turn the atmega into a special write mode to reprogram the flash memory. You can find the code for the memory programmer here it needs to run in a separate board (not arduino due to the large size of the rom to program, I used a Stellaris Launchpad)

There's a KiCad project here that includes this diagram: Diagram

Gameboy

Links that helped me to get this done:

ESP32 as a bluetooth Gamepad: Thanks to the Bluecubemod from Nathan Reeves I learned how to turn ESP32 into a bluetooth gamepad https://github.com/NathanReeves/BlueCubeMod

HC-05 as bluetooth HID device:

https://www.youtube.com/watch?v=y8PcNbAA6AQ

https://www.youtube.com/watch?v=BBqsVKMYz1I

GBA Multiboot:

http://www.akkit.org/info/gbatek.htm

https://github.com/akkera102/gba_01_multiboot

https://github.com/ataulien/elm-gba-multiboot

https://github.com/cartr/MSMCcable

https://github.com/tangrs/usb-gba-multiboot

https://github.com/MerryMage/gba-multiboot

Parts

13
QtyValueFootprintReferences
222pFCapacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mmC1, C2
10.1uFCapacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mmC3
110KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1
116MhzCrystal:Resonator-2Pin_W10.0mm_H5.0mmY1
11KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2
174LS157Package_DIP:DIP-16_W7.62mmU3
1ATmega328P-PUPackage_DIP:DIP-28_W7.62mmU1
1Conn_01x06Connector_PinSocket_2.00mm:PinSocket_1x06_P2.00mm_VerticalJ1
1GBAConnector_PinSocket_2.00mm:PinSocket_1x06_P2.00mm_VerticalJ2
1HC-05_breakoutSensor:HC-05_breakoutJ3
1HCF4066BEPackage_DIP:DIP-14_W7.62mmU4
1W25Q32DIPPackage_DIP:DIP-8_W7.62mmU2

Similar boards

  • 4 layers218.4 × 114 mmVideo v2.0, the printed circuit board in 3D

    Video v2.0

    ksr/YACC1-D

    YACC1 (Yet Another Custom CPU) - definitive tree: hardware, firmware, software, tools and docs for the hand-built TTL computer. Supersedes ksr/YACC1-2020.

    121 parts
  • 2 layers45.7 × 58.4 mmCanNode, the printed circuit board in 3D

    CanNode

    Raggii/RocketryIgniter

    To design and prototype a dual ignition system that can receive commands over UART and CANBUS. The device must be able to receive commands that arm and fire two separate but identical ignition circuits while also…

    20 parts
  • 2 layers297.2 × 180.3 mm8bit computer, the printed circuit board in 3D

    8bit computer

    vascofazza/8bit-cpu

    Schematics & code for my 74LS-based 8-bit MK1 CPU

    377 parts317MIT
  • 2 layers365.1 × 203.2 mmDIAG, the printed circuit board in 3D

    DIAG

    Nakazoto/CenturionComputer

    This is just a simple backup of all the files related to the Centurion that I have stored on my HD. The Wiki itself has far more in-depth information about the Centurion and it's individual cards.

    150 parts172
  • 2 layers370.8 × 298.5 mm8 Bit Computer, the printed circuit board in 3D

    8 Bit Computer

    The-Invent0r/8-bit-Computer-PCB

    These are the KiCAD files for my 8-Bit Computer.

    323 parts142
  • 2 layers100 × 71.5 mmOpenAmiga500FastRamExpansion, the printed circuit board in 3D

    OpenAmiga500FastRamExpansion

    SukkoPera/OpenAmiga500FastRamExpansion

    4/8 MB Fast RAM Expansion for the Commodore Amiga 500

    35 parts88
  • 2 layers407 × 184 mmTRS-80-Model I G E1, the printed circuit board in 3D

    TRS-80-Model I G E1

    RetroStack/TRS-80-Model-I-G-E1

    Hardware Replica of the TRS-80 Model I Revision G

    230 parts57MIT
  • 2 layers74.4 × 72.5 mmOpenAmiga600FastRamExpansion, the printed circuit board in 3D

    OpenAmiga600FastRamExpansion

    SukkoPera/OpenAmiga600FastRamExpansion

    4 MB Fast RAM Expansion for the Commodore Amiga 600

    27 parts47

Questions

What parts does the Gba bt hid use?

13 parts, built around the ATMEGA328P-PU and 74LS157PC. 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 Gba bt hid KiCad files?

From the Shyri/gba-bt-hid repository on GitHub, at the commit this page was made from: the board is circuit/GBA-BT-HID.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Gba bt hid design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).