百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

arduino-gameboy-printer-emulator

> 编程语言
开源

用于通过 Gameboy 连接线模拟 Gameboy 打印机的代码

364 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于通过 Gameboy 连接线模拟 Gameboy 打印机的代码

Arduino Game Boy Printer Emulator (V3)

An Arduino-based emulator for the Game Boy Printer, tested against 110 Game Boy Printer–compatible games. 100% game compatibility has been reached by reverse-engineering real packet capture examples. Connect any compatible Game Boy to an Arduino, print as normal, and download your images to a PC or phone.

Tested hardware: Game Boy DMG (brick), Game Boy Pocket, Game Boy Color, Game Boy Advance (regular and SP), and the Kong Feng GB Boy Colour.

Despite using Arduino as the main target, the emulator code is also compatible with ESP8266, ESP32 and Raspberry Pi Pico derived boards with very minor adjustments (the relevant libraries — ESP8266 Arduino, ESP32 by Espressif System, or Arduino-Pico — must be installed in the Arduino IDE). No support is provided for these boards; use them at your own risk.

V3 note: Raw packet mode is now the default. This gives better compatibility with games that use compression, with all decoding handled on the PC side rather than on the Arduino.

Main project website: https://mofosyne.github.io/arduino-gameboy-printer-emulator/

Downloads: GitHub Releases · Release Notes


Telegram Game Boy Camera Chatroom

Questions, advice, or images to share? Join the community:

https://t.me/gameboycamera


Quick Start

There are three steps: flash the firmware, wire the Game Boy, then get your images.


Step 1 — Flash the firmware

Option A: Web flasher (easiest — Arduino Nano only)

No software to install. Requires Chrome or Chromium (WebUSB support).

  1. Open the Arduino Nano WebSerial Firmware Flasher in Chrome or Chromium.
  2. Connect your Arduino Nano via USB.
  3. Click "Flash Newer Arduino Nano (Test Blink Firmware)" or "Flash Older Arduino Nano (Test Blink Firmware)" depending on your board's bootloader.
  4. Confirm the onboard LED is blinking — this means the microcontroller is working.
  5. Click "Flash Newer Arduino Nano (GameBoy Printer Emulator)" or "Flash Older Arduino Nano (GameBoy Printer Emulator)".
  6. Open the Web Serial Monitor, set the baud rate to 115200, and confirm a welcome message appears.

Option B: Arduino IDE (any compatible board)

  1. Install the Arduino IDE.
  2. Download this project from GitHub (Code → Download ZIP) and unzip it.
  3. Open GameBoyPrinterEmulator/GameBoyPrinterEmulator.ino in the Arduino IDE.
  4. Connect your Arduino, then select the correct board (Tools → Board) and port (Tools → Port).
  5. Upload the sketch (Sketch → Upload).
  6. Open the Web Serial Monitor (or any serial monitor), set the baud rate to 115200, and confirm a welcome message appears.

Step 2 — Wire the Game Boy link cable

Use an Arduino Nano or Uno. Do not cut up original Game Boy link cables — replacement cables are cheap and widely available online. If you have a 3D printer, this Game Boy DMG-01 link port plug for Dupont wires (by Marko Štamcar) lets you make a clean connection without any cable at all.

Photo and tutorial by West McGowan (@imwestm) — full tutorial here.

Link cable pinout

Gameboy Original/Color Link Cable Pinout
 ___________
|  6  4  2  |
 \_5__3__1_/   (view at cable end)
Arduino pin Game Boy link pin
(unused) Pin 1 — 5.0V
D4 Pin 2 — Serial OUT (SOUT)
D3 Pin 3 — Serial IN (SIN)
(unused) Pin 4 — Serial Data
D2 Pin 5 — Clock (Interrupt)
GND Pin 6 — GND

⚠️ SIN and SOUT are crossed inside the cable. If nothing happens when you print, swap pins D3 and D4 — either physically, or by swapping them in the sketch. Wire colour is not a reliable guide to which is which.

⚠️ Avoid third-generation (purple, AGB-005) link cables. These have a completely different pinout from GB/GBC cables and will not work unless you can confidently identify the correct pins.

Using a dedicated PCB

For a cleaner build, dedicated PCBs are available that include a GBC socket and fit an Arduino Nano or Uno — no soldering to cables required. Complete builds ordered from China typically cost around €10.

Once wired, print from any compatible game. The Arduino will receive the data and output it over serial.


Step 3 — Save your images

If you want to save the serial output first

Some workflows (especially if you're not using a Web Serial tool) require capturing the raw serial output to a log file first, then decoding it.

Windows: Use PuTTY to log serial output to a file.

Linux/macOS: Use screen:

bash
#!/bin/bash
# Press Ctrl+a then k to end the session
# Run 'screen -r' to reattach if you close the window
screen -L -Logfile "arduino_$(date +'%Y%m%d-%H%M%S').log" /dev/ttyUSB0 115200

Note: Arduino IDE v2 no longer makes it easy to copy serial output to a file — PuTTY or screen are the recommended alternatives.

The saved log file can be pasted into GBP Downloader's manual input field or decoded with any of the tools below.

Decoding tools

Tool Best for
Game Boy Printer Web (Source Code) Full-featured: palette control, photo library, WebUSB direct connection. To connect via WebUSB: Settings → Enable WebUSB, then WebUSB Serial devices → Open Web Serial devices
GBP Downloader (Source Code) Fast and lightweight: connect, print, export PNG or ZIP — works offline
GBCamera Android Manager Field use with an Android phone over USB serial. If you boot the Arduino with a real Game Boy Printer connected and switched on, it will boot in printer mode — allowing the app to output images directly to the physical printer. The LED on pin 13 flashes to indicate ready
JavaScript decoder (Source Code) Browser-based, works offline
GNU Octave / MATLAB decoder (Source Code) Scripted or batch processing workflows
Python decoder Command-line / scripting
C decoder Compiled command-line tool

Game Boy Printer Web and GBP Downloader both support direct Web Serial connections (Chrome, Edge, or Opera on desktop) — you can print and watch images appear live without saving a log file at all.


Technical Reference

Project structure

Component Description
GameBoyPrinterEmulator/gpb_emulator.ino Main Arduino sketch
GameBoyPrinterEmulator/gameboy_printer_protocol.h Reusable header with protocol definitions
GameBoyPrinterDecoderJS/gameboy_printer_js_raw_decoder.html Raw packet decoder (recommended)
GameBoyPrinterDecoderJS/gameboy_printer_js_decoder.html Tile-based decoder

Raw mode (default since V3): outputs raw packets as hex, with the printer's response as the final two bytes of each packet. Example:

88 33 01 00 00 00 01 00 81 00

Tile mode: outputs one Game Boy tile per line as hex. Example:

55 00 FB 00 5D 00 FF 00 55 00 FF 00 55 00 FF 00

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言