Home

Awesome

Arduino Gameboy Printer Emulator (V3)

CI

This project is a Game Boy Printer emulator for Arduino boards compatible and tested with the 110 games using the Game Boy Printer. Goal is to provide an easy way for people to quickly setup and download the images from their Game Boy. 100% game compatibility has been reached by reverse-engineering Real Packet Capture Examples.

This emulator have been tested with Game Boy DMG (the brick), Game Boy Pocket, Game Boy Color, Game boy Advance (regular and SP) and the Kong Feng GB Boy Colour. All work.

Despite using Arduino as main target, the emulator code is also compatible with ESP8266, ESP32 and Raspberry Pi Pico derived boards with very minor adjustments (considering that the relevant library, ESP8266 Arduino, ESP32 by Espressif System or the Arduino-Pico is installed on Arduino IDE). No support is provided for these boards, try them by yourself.

Note: V3 now uses raw packet decoder, rather than the original tile decoder. This allows us to better support gameboy printers enabled games using compression.

Official Releases

Downloads: Version Release Downloads at GitHub / Release Notes Located Here


Telegram Gameboy Camera Chatroom

Got telegram instant messaging and have some questions or need any advice, or just want to share? Invite link below:

https://t.me/gameboycamera


Quick installation/user guide for beginners

#!/bin/bash
#'Ctrl+a', then 'k' to kill the screen
#'screen -r' to reopen the monitor if window was closed
screen -L -Logfile "arduino_$(date +'%Y%m%d-%H%M%S').log" /dev/ttyUSB0 115200

Building the Arduino Gameboy Printer Emulator from scratch

Use an arduino Nano/Uno and wire the gameboy link cable according to the pinout shown below. Do not destroy old genuine gameboy link cables for this purpose, there is plenty new cables you can purchase online.

Else if you have a 3D printer, you can use a Game Boy DMG-01 Link Port plug for dupont jumper wire by Marko Štamcar from Slovenian Computer Museum, created as part of a retro tech exhibition.

Thanks to West McGowan (twitter: @imwestm) who was able to replicate this project on his Arduino Nano plus Gameboy Color and helpfully submitted a handy picture of how to wire this project up. You can find his tutorial in here

Gameboy Original/Color Link Cable Pinout
 ___________
|  6  4  2  |
 \_5__3__1_/   (view at cable)
Arduino PinGameboy Link Pin
unusedPin 1 : 5.0V
D4Pin 2 : Serial OUTPUT (SOUT)
D3Pin 3 : Serial INPUT (SIN)
unusedPin 4 : Serial Data
D2Pin 5 : Serial Clock (Interrupt)
GNDPin 6 : GND (Attach to GND Pin)

Two important things to note:

Building the Arduino Gameboy Printer Emulator with a dedicated PCB

You have some very basic skill in soldering and want a clean finish ? You can order dedicated PCBs compatible with the Arduino Nano/Uno and equipped with a GBC socket, so no need to cut cables anymore.

The whole project shipped to your door must cost about 10€ if you order components and PCB from China (shipping included).


Media Coverage And Other Projects Spinoff

There is more examples located in our showcase page page, but below is a few actively used cases:

Featured On Hack A Day Article

WestM's Arduino Gameboy Printer Emulator Tutorial

Rafael Zenaro: NeoGB Printer

Click For More Examples In Our Showcase Page


Alternative option of uploading precompiled arduino nano image via WebUSB

If your browser supports webusb, you have the option of uploading directly to the arduino nano the firmware using WebUSB (e.g. via google chrome)

Afterwards, you can check if it's working via the webusb serial console below as well

Download via Game Boy Printer Web (External Project)

For those who want to take the next step and take more photos regularly you may want to look at a partner project by Herrzatcke. Herrzatcke created a photo manager dedicated for gameboy cameras and have already integrated support for this project so you can easily upload photos via WebUSB or by copying and pasting raw packet data.

Enter Game Boy Printer Web

Download via Android app and use the Arduino as a generic output interface for the Game Boy Printer (External Project)

For those who want to use an Android to download photos in the field, you may want to consider this partner project by Mraulio. Mraulio created an Android app to manage a Game Boy Camera gallery and communicate via usb serial with Arduino Printer Emulator and GBxCart to get images. Additionaly, when booting the Arduino board connected with the serial cable to a Game Boy Printer switched ON, the device will boot in printer mode and allow you to output images from the Android App to the printer with the exact same wire configuration. In this mode, the LED connected to pin 13 will flash ON to indicate that the printer is ready.

Enter GBCamera Android Manager

Download the image (C) (Advance User)

For advance users, in the GameBoyPrinterDecoderC folder there is a PC based commandline program that when compiled would allow for decoding raw packet captures into bitmap.

Gameboy Printer Decoder C Readme


Project Makeup


Technical Information

Sniffer / Real Gameboy Printer Captures

Refer to https://github.com/mofosyne/GameboyPrinterSniffer for more information.

Protocol

  | BYTE POS :    |     0     |     1     |     2     |      3      |     4     |     5     |  6 + X    | 6 + X + 1 | 6 + X + 2 | 6 + X + 3 | 6 + X + 4 |
  |---------------|-----------|-----------|-----------|-------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
  | SIZE          |        2 Bytes        |  1 Byte   |   1 Byte    |  1 Bytes  |  1 Bytes  | Variable  |        2 Bytes        |  1 Bytes  |  1 Bytes  |
  | DESCRIPTION   |       SYNC_WORD       | COMMAND   | COMPRESSION |     DATA_LENGTH(X)    | Payload   |       CHECKSUM        |  DEVICEID |  STATUS   |
  | GB TO PRINTER |    0x88   |    0x33   | See Below | See Below   | Low Byte  | High Byte | See Below |       See Below       |    0x00   |    0x00   |
  | TO PRINTER    |    0x00   |    0x00   |    0x00   |   0x00      |    0x00   |    0x00   |    0x00   |    0x00   |    0x00   |    0x81   | See Below |

Gameboy Printer Timing

Below measurements was obtained via the ANALOG DISCOVERY via digilent

                       1.153ms
        <--------------------------------------->
         0   1   2   3   4   5   6   7             0   1   2   3   4   5   6   7
     __   _   _   _   _   _   _   _   ___________   _   _   _   _   _   _   _   _
CLK:   |_| |_| |_| |_| |_| |_| |_| |_|           |_| |_| |_| |_| |_| |_| |_| |_|
DAT: ___XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX____________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_
       <-->                           <---------->
       127.63 us                         229.26 us


Research/Dev log

2022-04-20

2021-01-26

2020-08-30

2017-11-30

2017-4-12

My Face In BW


Credits / Other Resources

Resources Referenced

Contributors / Thanks