7. PROCESSING OF CONNECTION EVALUATION AND PREAMBLE DETECTION
FAILURE
7.1 Connection Evaluation (includes cable disconnection)
To check whether a printer is connected to the Game Boy, it sends a NUL packet. If nothing is
connected, the value 0xFF is received; if there is a connection, 0x00 is received.
Game Boy
NUL packet sent
↓
0xFF received
↓
Evaluates as not connected
NUL packet sent
↓
0x00 received
↓
Evaluates as connected
↓
Connection-check packet
sent after 100 msec delay
.
.
.
.
The printer prepares to print data again; it is not cleared while data is received.
7.2 Preamble Detection Failure
If preamble detection fails during data reception, the flow of the Game Boy and printer sequences are
as shown below in parallel.
Not Connected
Cable connected here
247
Chapter 9: Pocket Printer
Printer
No data reception detected
↓
No data for 120 ms
↓
Evaluates as not connected;
print data cleared
NUL packet detected
↓
Status of 0x00 sent
↓
Evaluates as connected
↓
Connection confirmed, ACK returned
.
.
.
.