Source: Gameboy_Printer.md (raw Pan Docs Markdown, CC0, read 2026-11-19, kept in the site’s sample sources with SHA-256 in the sample README), in our own words. Pan Docs is the only source and nothing here was tried on a printer. The link port itself is described on DMA, joypad and serial.
The device
The Game Boy Printer is a portable thermal printer made by SII for Nintendo. A few games used it to print bonus artwork, certificates and pictures, notably the Game Boy Camera. It takes standard 38 mm paper and connects to the link port. An embedded 8-bit microcontroller runs it. It has 8 KiB of RAM to hold the incoming graphics. That allows a bitmap of at most 160 × 200 pixels (8192 ÷ 160 × 4) between prints.
Packets
The printer does not use the full-duplex ability of the link port. It takes packets of variable length and answers with its status after two $00 bytes. A packet has this layout (the printer’s side of each byte is $00 except at the end):
| Part | Bytes | Game Boy sends | Printer returns |
|---|---|---|---|
| Magic bytes | 2 | $88, $33 | $00 |
| Command | 1 | see below | $00 |
| Compression flag | 1 | 0 or 1 | $00 |
| Length of data | 2 | low byte, high byte | $00 |
| Command data | variable | see below | $00 |
| Checksum | 2 | low byte, high byte | $00 |
| Printer acknowledge | 1 | $00 | $81 |
| Status | 1 | $00 | see the status byte |
The checksum is the sum of every byte sent except the two magic bytes and the checksum itself. Pan Docs does not say how wide the sum is kept; the checksum field is 16 bits.
Detecting a printer
Send the bytes $88 $33 $0F $00 $00 $00 $0F $00 (command $0F with no data; Pan Docs says “9 bytes” but lists eight, and we follow the list). Then send $00 and read the answer. If it is $81, a printer is there. Send one more $00 “just for good measure”; its answer can be ignored.
Commands
| Command | Name | Data |
|---|---|---|
| 1 | Initialise | none. Clears the printer’s buffer RAM. The normal status reply is $00. |
| 2 | Start printing | 4 bytes, below |
| 4 | Fill buffer | up to $280 bytes, below |
$0F | Read status | none. A “no-op” used only to read the status byte. |
Command 2: start printing (4 data bytes)
- Number of sheets to print, 0 to 255. 0 means a line feed only.
- Margins: the high nibble is the feed before printing and the low nibble the feed after. The Game Boy Camera sends
$13by default. - Palette, typically
$E4(binary 11 10 01 00). - Exposure, 7 bits: the burning time of the print head. The Game Boy Camera sends
$40by default. The printer’s official manual, says Pan Docs, mentions −25 % darkness for$00and +25 % for$7F.
Command 4: fill buffer
The data length is at most $280 bytes, which is 160 × 16 pixels at 2 bits per pixel. To send more, send several command 4 packets. The graphics are in the normal tile format (16 bytes per tile), sent in the order the tiles occur on the tile map. Pan Docs reminds us that the printer has room for only 20 × 18 tiles, not 32 × 32. An empty data packet must be sent before command 2, or the print command is ignored.
The status byte
A non-zero high nibble means something went wrong.
| Bit | Name | Pan Docs’ description |
|---|---|---|
| 7 | Low battery | Set when the voltage is below the threshold. |
| 6 | Other error | (no description) |
| 5 | Paper jam | Set when the encoder gives no pulses while the motor is powered. |
| 4 | Packet error | (no description) |
| 3 | Unprocessed data | Set when there is unprocessed data in memory, in other words “ready to print”. |
| 2 | Image data full | (no description) |
| 1 | Currently printing | Set as long as the printer is “burning” paper. |
| 0 | Checksum error | Set when the calculated checksum does not match the one received. |
A worked exchange
Pan Docs’ example, as (acknowledge, status) pairs:
- Send command 1. The answer should be
$81,$00. - Send command 4 with
$280bytes of graphics. The answer should still be$81,$00. - Ask for the status with command
$0F. The answer is now$81,$08(ready to print). - Send an empty command 4 packet. The answer is still
$81,$08. - Send command 2 with the margins, palette and exposure. The answer is still
$81,$08. - Ask for the status with command
$0Funtil it changes to$81,$06(printing). - Ask again until it changes to
$81,$04(printing done). - Optionally send 16 zero bytes to clear the printer’s receive buffer (the Game Boy Camera does).
Timing and large pictures
- The printer has a 100 ms timeout between packets. If no packet arrives in that time, it returns to its initialised state, which resets the link and graphics buffers.
- There seems to be a timeout, not documented, between the bytes of one packet. Send a packet whole or with very little delay between bytes, or it may not be accepted.
- To print more than 20 × 18 tiles (for example Camera pictures with big borders), send several data packets followed by a print command. Set that command to no line feed before or after (margins
$00, as we read “neither before nor after”), so printing is continuous.
Compression
The packet has a compression flag ($00 or $01). Pan Docs says only “some sort of RLE?”, adds that the Game Boy Camera does not use it, and links a page by furrtek with details and pictures that “need to be copied here”. The format is a run-length encoding of the data bytes of the data packet, described below from two sources that were found by searching for the protocol (the furrtek page itself was not read):
- A protocol document “gb-printer.txt” (attributed to “anonymous”, first version 8 September 2001, last update 1 December 2001; it carries no licence statement, so its text is not stored here: it was read through the fetch tool, which returns a summary, so the wording below is ours; found as an attachment on mikrocontroller.net). It describes the compressed payload as a series of runs, each starting with a control byte whose bit 7 gives the run type.
- The Arduino Game Boy Printer Emulator by mofosyne and contributors (GPL 3),
GameBoyPrinterEmulator/gbp_pkt.cpp, functiongbp_pkt_decompressor, raw copy insamples/gb/sources/gbp-emulator(read in full for this section). Its comments credit “Raphael-Boichot” for the run lengths. Its test folder holds a capture named “Pokemon trading card compressiontest” (the Pokémon Trading Card game sends compressed data; the capture was not read).
| Control byte | Run type | What follows | Bytes produced |
|---|---|---|---|
bit 7 = 0 ($00–$7F), n = the low 7 bits | literal (uncompressed) run | n + 1 bytes, copied as they are | n + 1 (1 to 128) |
bit 7 = 1 ($80–$FF), n = the low 7 bits | repeated (compressed) run | 1 byte, the value to repeat | n + 2 copies of it (2 to 129) |
The code in the emulator: a control byte b at or below $7F sets a run length of b + 1 and takes the following bytes as they are; a control byte at or above $80 sets a run length of b − 128 + 2 and repeats the next byte that many times. The document adds that, from experience, a repeated run expands to at most 32 bytes (so the largest control byte it expects is $9E), with no such limit for literal runs; the emulator does not enforce that limit (our reading of its code, and the document’s limit comes from a summary).
Worked example (from the document, 16 bytes of tile data; checked by hand here, the run lengths add up to 16): 00 00 00 00 FF 00 FF 00 00 FF 00 FF FF FF FF FF is sent as 82 00 | 06 FF 00 FF 00 00 FF 00 | 83 FF: $82 is a repeated run of 2 + 2 = 4 bytes of $00; $06 is a literal run of 6 + 1 = 7 bytes (FF 00 FF 00 00 FF 00); $83 is a repeated run of 3 + 2 = 5 bytes of $FF.
Where the data length and the checksum count the compressed bytes: the document says the data length field of the packet is the number of bytes after compression, that is, the length of the run stream as sent, and Pan Docs’ checksum covers the command, compression flag, length and data bytes as sent, so it is over the compressed stream (our reading of both). The decompressed stream is the usual 640 bytes of 2 bits per pixel tile data per packet (see Packets). What is still not read is the furrtek page’s pictures; they would add nothing to the byte format above.
Sources
- Raw Pan Docs Markdown (CC0):
Gameboy_Printer.md, read 2026-11-19, insamples/gb/sources/pandocswith SHA-256 in the sample README. - Game Boy Printer – Pan Docs
Not described
Known, not yet covered
- The furrtek page that Pan Docs links for the compression was not read (the format is given above from two other sources); its pictures are not reproduced.
Unknown
- The meaning of status bits 6, 4 and 2, which Pan Docs gives only names for, and the exact timeout between bytes of a packet.