icone facebook icone facebook

 

 

This article covers the making of a PC to Gameboy Printer cable.

The USB cable I used is a fake CA-42 Nokia cable, known for housing a Prolific PL2303 chip, detected as a virtual serial port. I bought it from Dealextreme, SKU 466.

The picture linked on DX (this one) is outdated, the maker switched to a cheaper design, with a smaller circuit board and a COB as seen in the next pictures.

I used an ATiny45 microcontroler to buffer the RS232 signal, format them and send them to GB Printer using Nintendo's proprietary protocol.

 

The plastic case comes apart quite easily with the help of a flat screwdriver, nothing was glued on my cable.

Two cogs will have to be cut out to fit in the microcontroler.
The case still holds well together with the 4 remaining ones.

 

I purchased the Gameboy Link cable on eBay, since DX only sells some for GBA (they have some erratic descriptions).

Only 4 signals out of 6 will be used in the Gameboy Link cable.
+5V and SD won't be used.

SIN and SOUT are crossed in a normal cable.

The GB Printer is always in slave mode (the Gameboy sends the clock signal). The cable will send a clock signal 3 times faster than the one typically sent by a Gameboy. The printer is fast enough to follow.

 

After removing the original Nokia plug from the PCB, the microcontroler can be soldered directly to the pads by stretching pins 2 and 3 apart (they'll go respectively to the pads marked TX and RX)

The reset pin is wired to VCC, and a 15Kohms pull-up resistor is added to SIN (the ATTiny's pull-ups are apparently too weak).

Hex file for ATTiny45 (internal 8Mhz)

Source for AVRStudio

The microcontroler uses a fixed speed software UART since the 8-pins ATTinys don't have a hardware one.

 

Everything should fit nicely inside the case.

Add some hard PVC glue, neoprene gel or epoxy to prevent the cable from being torn off.

 

And this is what it'll be used for !
(No paper ? Take a used receipt)

The printer's resolution is approximately 110 pixels/inch and can print 160 pixels wide images, 16 lines at a time.

There's virtually no height limit (until the battery or the paper runs out).

Note: the code is specificaly made for the GB Printer, the cable can't be used as an universal full-duplex cable which transparently adapts data. See this article (French) for a detailed description of how the GB Printer works.

 

Transfer software, writen in VB6.
The runtime DLL and OCX controls might have to be registered for everything to work (see windows regsvr32 usage).

Gameboy Printer Link Version 0.1

Source

 

First version only:

You can write your own software with any language which allows you to handle serial communication.

To check if the GB Printer is connected, send "?" and the cable will reply "1" if it is, "0" if it's not.
That can also be used to detect if the cable is present when scanning ports.

To send a 160x16 pixels block to print, first send "!".
Wait for the cable to reply "a" and send 64 bytes of 2-bit Gameboy format graphics data. Do this 10 times, waiting for "a" each time.

The 640 bytes can't be sent directly since the software UART isn't fast enough to read bytes and send them to the printer one after the other.
The GB Printer also has a very annoying 130ms timeout while receiving data.

After the last 64 bytes are sent, wait for "1" then send 4 bytes: 0x01, 0x00, 0xE4 and 0x40 (the default exposure value).
The printing should then start after receiving "P".
Shortly after, "O" should be received and the next block can be sent (starting from "!" again).

The number of blocks is only limited by the paper length and battery life :)

 



Liste
creative commons
date
CC:BY,NC,SA - Engine V2.0
20ms
4508 *1
symbol symbol symbol symbol symbol