Skip to the content
2 layers67.7 × 86.4 mmGbc cart reader, the printed circuit board in 3D

Gameboy (Color) Cartridge adapter for Zeal 8-bit Computer!

Size
67.7 × 86.4 mm
Copper layers
2
Thickness
1.6 mm
Parts
3
Nets
61
Pads
106
Tracks, vias
289, 48
Pours
1
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
14 Jul 2023
Updated
22 Apr 2024

Overview

Gbc cart reader is an open-source printed circuit board by Zeal8bit, from the Zeal8bit/Zeal-GBC-Adapter repository on GitHub, published under the CC0-1.0 licence. It is a 2-layer board of 67.7 × 86.4 mm with 3 parts on 61 nets, routed with 289 tracks and 48 vias.

Its parts include 2 connectors and 1 IC. It belongs with the retro computing and games and interfaces and adapters boards and the FPGA and CPLD boards of this library.

README

README.md

Gameboy (Color) cartridge adapter for Zeal 8-bit Computer

PCB final result

This repository is part of this Youtube video, check it for more information and explanation about this project.

The goal of this project is to create an adapter for connecting any Gameboy or Gameboy Color cartridge to Zeal 8-bit Computer. This will offer the possibility to backup the ROM or RAM (saved data), restore the saved data or even modify the saved data in place.

This repository includes:

  • An example program, written in C, to communicate with the adapter. It will read RAM banks from the cartridge and send them through UART. This has been tested with MBC1 and MBC5 cartridges.
  • A Python script to run on a host that will receive the data from UART and save them inside a file
  • The source code to flash to the PLD (GAL16V8)
  • A Kicad (v6) project for the schematics and PCB board

DISCLAIMER: To prevent any data loss, NEVER plug or unplug the cartridges from the adapter when it is connected to a computer/board that is powered on! I am not responsible for any potential damage caused to the Gameboy cartridge when using the adapter. Use it at your own risk.

Requirements

To compile this example you will need:

  • python3
    • pyserial package (pip3 install pyserial)
  • bash
  • git (to clone this repo)
  • make
  • Zeal 8-bit OS source code. Only the kernel_headers directory is required, check this repository. z88dk v2.2 (or later). Only its assembler, z80asm, is strictly required. The latest version of z80asm must be used as earlier versions don't have support for MACRO. To install z88dk, please check out their GitHub project.

Build

To build the program, define the path to Zeal 8-bit OS, this will let us find the header files used to assemble the example:

text
export ZOS_PATH=/your/path/to/Zeal8bitOS

Then simply use the command:

text
cd software
make

After compiling, the folder bin/ in software/ should contain the binary dump.bin. This file can be then loaded to Zeal 8-bit OS through UART thanks to the load command.

The binary can also be embedded within the romdisk that will contain both the OS and a read-only file system. For example:

text
cd $ZOS_PATH
export EXTRA_ROMDISK_FILES="/path/to/this/repo/software/bin/dump.bin"
make

More info about compiling Zeal 8-bit OS here.

The resulting ROM image can then be provided to an emulator or directly flashed to the computer's ROM that will use it.

Usage

  • On the Zeal 8-bit Computer, execute the dump program from the command line:

    text
    A:/> ./dump.bin

    The program should detect the cartridge name, the RAM banks count and their size. The output should look like:

    text
    POKEMON BLUE
    Cartridge type: 0x3
    Cartridge RAM size: 32 KB
    Ready to send, start the dump script on the host computer
  • Close the serial monitor on the host computer! Else, the python script below will not be able to receive characters from the UART.

  • On the host, execute the python script, you can use -h to have more info about the parameters. For example, to save the file as PKM.sav from UART node /dev/ttyUSB0 with a baudrate of 57600, the following command can be used:

    text
    python3 dump.py -o PKM.sav -d /dev/ttyUSB0 -b57600 -v

    The output should look like this:

    text
    Connecting to /dev/ttyUSB0 with baudrate 57600
    Dumping 4 banks of 8192 bytes, 32768 bytes in total...
    PKM.sav successfully dumped

Troubleshooting

Upon execution of the binary on the Zeal 8-bit computer, you may encounter the Get attr error issue. This shows that the serial driver in the Zeal 8-bit OS kernel doesn't support setting attributes (raw) via ioctl. In that case, you should update your installation of the Zeal 8-bit OS to get the latest version of the serial driver.

License

Distributed under the Creative Commons Zero v1.0 Universal License. See LICENSE file for more information.

You are free to use it for personal and commercial use, the boilerplate present in each file must not be removed.

The zeal8bit.com silkscreen present on the PCB shall be kept.

Contact

For any suggestion or request, you can contact me at contact [at] zeal8bit [dot] com or on the Discord server https://discord.gg/UzEjwRvBBb

Parts

3
QtyValueFootprintReferences
1GAL16V8Package_DIP:DIP-20_W7.62mm_SocketU1
1GB_Slotgbc_cart_footprints:GB SlotJ2
1ZealExtConnectorConnector_PinHeader_2.54mm:PinHeader_2x25_P2.54mm_VerticalJ1

Similar boards

  • 2 layers40 × 30 mmBlinky, the printed circuit board in 3D

    Blinky

    earthtojake/text-to-cad

    Design physical products with AI

    3 parts26kMIT
  • 2 layers51.9 × 16 mmPassive2-rpi non standard adapter, the printed circuit board in 3D

    Passive2-rpi non standard adapter

    hzeller/rpi-rgb-led-matrix

    Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO

    3 parts4.4kGPL-2.0
  • 2 layers16.3 × 16.3 mmSensor, the printed circuit board in 3D

    Sensor

    scottbez1/splitflap

    DIY split-flap display

    3 parts4.2k
  • 2 layersSub, the printed circuit board in 3D

    Sub

    atopile/atopile

    Design circuit boards with code! ✨ Get software-like design reuse 🚀, validation, version control and collaboration in hardware; starting with electronics ⚡️

    3 parts4kMIT
  • 2 layers85 × 30 mmDual stomp, the printed circuit board in 3D

    Dual stomp

    torvalds/GuitarPedal

    Linus learns analog circuits

    3 parts2.5kGPL-2.0
  • 2 layers124.5 × 33.7 mm172319-1 connector, the printed circuit board in 3D

    172319-1 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    3 parts1.2k
  • 2 layers10.5 × 83 mmProgrammingAdapter, the printed circuit board in 3D

    ProgrammingAdapter

    stuartpittaway/diyBMSv4

    Version 4 of the diyBMS

    3 parts1.1k
  • 2 layers21.2 × 51.3 mmPico reset, the printed circuit board in 3D

    Pico reset

    hackclub/sprig

    🍃 Learn to code by making games in a JavaScript web-based game editor.

    3 parts1.1kMIT

Questions

How big is the Gbc cart reader PCB?

It measures 67.7 × 86.4 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Gbc cart reader use?

3 parts. 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 Gbc cart reader KiCad files?

From the Zeal8bit/Zeal-GBC-Adapter repository on GitHub, at the commit this page was made from: the board is pcb/gbc_cart_reader.kicad_pcb and its schematic pcb/gbc_cart_reader.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Gbc cart reader design in my own project?

Its repository publishes it under the CC0-1.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).