Communication Data Definitions; Transferring To The Printer - Nintendo GAME BOY Programming Manual

Hide thumbs Also See for GAME BOY:
Table of Contents

Advertisement

Game Boy Programming Manual

3. COMMUNICATION DATA DEFINITIONS

This section defines the following data items (packet types and data) by function.

3.1 Transferring to the Printer

The packet types are as follows.
Packet Type
Initialization and connection
packet
Print instruction packet
Data packet
Data end packet
Break packet
NUL packet
Each of the above packet types is in the following format.
Preamble
Preamble: 2 bytes of data: 88h x 1 + 33h x 1. Abbreviated PA below.
Header:
4 bytes of contiguous data that represent the following.
Byte 1:
Byte 2:
Bytes 3 and 4:
Data:
Data in Game Boy character data format. Print instruction data.
Checksum: 2 bytes of data representing the sum of the header + all data in the data portion of the
packet.
Dummy:
2 bytes of dummy data used to obtain status information from the printer.
In the data received from the printer in place of the dummy data, byte 1 holds the
peripheral device number and byte 2 holds the printer status.
Header
Data
Packet type
01: Initialization and connection packet
02: Print instruction packet
04: Data packet
08: Break packet
0F: NUL packet
In the case of a data packet, indicates compression/no
compression.
If another type of packet, fixed at 00h.
Data volume (2 bytes), number of bytes of data
Code
01
02
04
04
08
0F
Checksum
Dummy
238

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents