Data Packet - Nintendo GAME BOY Programming Manual

Hide thumbs Also See for GAME BOY:
Table of Contents

Advertisement

Game Boy Programming Manual
Cautions Regarding Print Instructions (Caution Required)
! Although applications can print 2-255 pages continuously, this may take a long time. Thus, the
user should be provided with a means of halting a print job in progress. (See Section 4.5, Break
Packet.)
! Whenever possible, the print density data should be backed up to avoid the inconvenience of
adjusting the density at each startup.
! If a print instruction packet is set within 100 msec of when the motor is stopped, the position
where printing resumes may be incorrect. Always send print instruction packets at least 100
msec after the motor has been stopped.
! Always set the number of line feeds before printing to 1 or greater and the number after printing to
3 or greater, except in the case of the previously mentioned continuous printing , when both
values are 0. Other values for these parameters may in result in faulty operation, such as double
printing on the same line or failure of the last printed line to reach the paper cutter.

4.3 Data Packet

Sends print data that are in character data format. The print data is sent in 1-byte increments for the
specified number of bytes.
Example:
88
33
04
PA
Notification of compression/no compression:
(NoError through 0x3FF):
Nine of these packets represent 1 printed sheet. (160 dots x 144 dots)
Byte 2 of the header is the compression/no compression notification byte.
* 1: Compression (* upper 4 bits have no effect)
* 0: No compression
Transmission of compressed data is accomplished by compressing one line at a time— each line
consisting of 20 characters horizontally and 2 characters vertically— and sending the number of
compressed bytes in order, beginning from the first line.
If the compressed lines exceed 0x280 bytes, the non-compressed data is sent as is (mixture of
compressed and non-compressed packets). If the extended data do not fill an entire line when the
packets are processed, the printer returns a packet error.
If an instruction to stop printing is received while print data is being sent, an initialization packet can be
sent instead of the next data packet.
00
80
02
Data0 ~ DataN-1
Header
242
C1
Data
Checksum
Maximum number of data bytes is 0x280
(16 (bytes/color) x 20 (colors) x 2 (colors)).
C2
00
00
Dummy

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents