Building a Game Bub unit is a fairly involved process:
- Manufacturing the PCB
- Assembling the PCB
- Printing the shell (and buttons)
- Assembling the whole device
- Building the FPGA bitstreams
- Setting up the microSD card
- Flashing the MCU firmware
Fab the PCB (in /pcb/handheld_rev2) using your manufacturer of choice. The board was initially designed to be fabricated and assembled by JLCPCB.
The board has 6 layers, and rectangular dimensions of 90.1 mm by 135 mm. Due to the fine pitch (0.8mm) BGA FPGA package, the smallest vias are 0.4/0.25mm, with a minimum track width of 0.1mm. The board must have an ENIG finish, as HASL is too uneven for fine-pitch BGA components.
The board should have a thickness of 1.6mm -- this isn't essential, but the enclosure was designed for this thickness. Only the JLCPCB default 6-layer JLC06161H-3313 stackup has been tested, but other stackups are likely to work too.
The board is primarily one-sided, and the vast majority of the components can be machine assembled. The board design files have LCSC component IDs (for easy JLCPCB assembly).
The remaining components are specialty or otherwise difficult to machine assemble:
Front:
- 3.5mm headphone jack: Same Sky SJ-43614-SMT-TR
- Rumble motor: generic 10mm diameter rumble motor
- Optional PMOD connector: 6-pin female 0.1 inch right angle SMD header
Rear:
- Generic GBA cartridge slot
- Generic GBA link port
- Cartridge slot shape detector: JJOV0UL650NONPRBK
- Battery connector: S2B-PH-SM4-TB (or generic 2-pin SMD JST-PH receptacle)
- Shoulder (L and R) buttons: C&K PTS645VN13SMTR92LFS (x2)
Solder each of these components (see the PCB design files if needed).
The shell consists of two pieces: the front and rear. Both have a wall thickness of 1.5mm, with some small features of 1.0mm or 0.8mm.
FDM (filament) printing is almost certainly not suitable: this should be printed with a high-precision technology such as SLA (photosensitive resin).
Additionally, all of the buttons are custom and need to be printed as well:
- 4x Large front buttons (A, B, X, and Y)
- D-pad
- 3x Small front buttons (Start, Select, Home)
- 3x Side buttons
- ER-TFT035IPS-6 LCD module
- LCD Cover glass (tempered glass or transparent acrylic)
- 2x Speakers (CMS-160903-18S-X8)
- 9x M2.5x4mm heat-set inserts
- CA glue to glue the inserts
- A set of Nintendo DSi button membranes (ABXY and D-pad)
- M2.5 screws:
- 5x 5mm (three PCB screws, 2 top screws)
- 4x 14mm (middle and bottom screws)
- A set of torsion springs (1x left, 1x right):
- Required: >1.5mm interior diameter
- Suggested: 0.3mm wire diameter, 5 turns, 135 degree angle
- 2x 1.5mm diameter dowel pins, 8mm to 9mm long.
- 755068 size flat Lipo battery with a JST-PH connector (verify polarity)
Before assembling, consider testing that the PCB works properly.
- Attach the LCD cover glass to the front shell with adhesive glue or tape
- Place the front shell face down on a surface
- Carefully align and press the LCD module onto the cover glass (ensure flex is facing the correct direction)
- Glue all 9 heat-set inserts into place, and let the glue harden
- Insert the speakers into the shell
- Place the face buttons into the shell, followed by the D-pad and ABXY membranes
- Open the LCD flex connector on the PCB
- Carefully set the PCB face down onto the shell, putting the LCD module flex into place on the PCB connector, and close it.
- Ensure the PCB is aligned well onto the front shell
- Use the 5mm screws to attach the PCB to the front shell (triangle of screw holes in the middle, towards the bottom half of the PCB). Tighten carefully.
- Insert the three side buttons into the front shell.
- Attach the battery to the rear shell with adhesive
- Assemble the shoulder buttons: align each shoulder button with the rear shell. Place the correct spring in line (inserting one end of the spring into the button), and then insert a dowel pin to hold the assembly together. Hook the other end of the spring into the hook in the rear shell.
- Plug the battery into the battery connector on the PCB
- Place the rear shell onto the front shell
- Use 6 screws (5mm on top, 14mm on the middle and bottom) to close up the shell
- Install Xilinx Vivado 2023.2 with support for Artix-7 devices
- Install JDK 8 or later, and Scala Build Tool (
sbt) - Install FuseSoC.
From the /fpga directory, use FuseSoC to build the bitstreams:
$ fusesoc --cores-root . --work-root=build/boot --target=handheld_rev2 --flag=boot elipsitz:gameboy:gameboy
$ fusesoc --cores-root . --work-root=build/gameboy --target=handheld_rev2 --flag=gameboy elipsitz:gameboy:gameboy
$ fusesoc --cores-root . --work-root=build/gba --target=handheld_rev2 --flag=gba elipsitz:gameboy:gameboySave the generated *.bit files.
Format a good quality microSD card with FAT32, then create the following directory structure:
system/
boot.bit.gz
gameboy.bit.gz
gameboy.bios-dmg.bin
gameboy.bios-cgb.bin
gba.bit.gz
gba.bios.bin
roms/
boot.bit.gzshould be a gzip'd copy of thebootbitstream built previously.gameboy.bit.gzshould be a gzip'd copy of thegameboybitstream.gba.bit.gzshould be a gzip'd copy of thegbabitstream.gameboy.bios-dmg.binandgameboy.bios-cgb.binshould be the bootrom files for the original Game Boy and Game Boy Color, or open-source alternatives (e.g. from SameBoy).gba.bios.binshould be the Game Boy Advance bootrom. Either the official one, extracted from a GBA (best compatibility), or a free alternative (e.g. this one).roms/should be a directory containing ROM files (if desired), with.gb,.gbc, and.gbaextensions. This directory can be further organized into more directories.
- Install Rust for ESP32 by following these instructions (Xtensa targets)
- Install espflash
Connect the device to your computer with a USB-C cable. Hold the "Home" button (in the center) while turning the device on (by pressing the power button in the top right).
From /firmware/handheld, run the following command to build and flash the firmware:
$ cargo run --release --features=rev2Then, flash the device-specific "factory" data:
$ python3 flash_nvs.py --serial serialno --revision 2The device should automatically reboot into the main menu.