Cette page a au moins 13 ans !
This page is at least 13 years old !








GameBoy Serial Link




Hexdump GameBoy to GameBoy Printer of this image:

The data on the GameBoy Serial link is shifted in and out simultaneously. The printer is in slave mode, so data can be clocked in at almost any frequency under1Khz (probably more).

Description Commande Argument 1 Argument 2 (lng) Argument 3 (lng)  
Initialize 0x01 0x00 0x00 0x00  
Start printing 0x02 0x00 0x00 0x04 0x01 ?
0x13 Margins (nibbles before 1, after 3)
0xE4 Palette
0x40 Exposure (7 bits)
? 0x03        
Tile data 0x04 0x00 Lenght LSB Lenght MSB Tile data in 2 bits per pixel (GameBoy format)
Read status 0x0F 0x00 0x00 0x00  


Écriture: Magic bytes Command Argument 1 Argument 2 (lng) Argument 3 (lng) (...) LSB CRC MSB CRC 0x00 0x00
Lecture: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x81 Status


E: Error code
S: Status code

Status 8: ready to receive data.
Status 6: printing.
Status: 4: printing done.

The CRC is a simple 16Bit sum of all the transmited bytes, except 0x88, 0x33 and the CRC itself.

The GameBoy Printer responds during the last two bytes by 0x81, 0xXX.

To print something:
Send init, send data, check status (must be 8), send data, check status... send 0 data, send print, check status (wait for 6), check status (wait for 4) serial clear (16* 0x00).
Always wait for an error code during status checks. The printer won't forget it, it's useless to continue sending data if there was a CRC mismatch or a buffer overflow.

The GameBoy Camera buffers tile data by blocs of 2 20 tiles wide lines.
Command 4: GameBoy Camera: ((8 pixels * 8 pixels ) * 20 tiles wide * 2 lines)/4 colorrs = 640 bytes (0x0280).

Sending a command 4 (0x88, 0x33, 0x04, 0x00, 0x80, 0x02..). 0xFF's are the first bytes of the graphical data.

Sending the first two 20 tiles wide lines with the "Nintendo" logo. You can see where the image is completely black (SOUT stuck at 1).

Total time for printing one pixel: 4ms.
With an exposure of 64 (middle), the pulse width is between 39% (black) et 24% (light grey).
39% gives almost a completely black pixel because of the cooling time.

GameBoy Printer answering: 0x00, (...), 0x81, 0x00.

symbol symbol symbol symbol symbol