Identify more bit flags (#1153)

This commit is contained in:
Sylvie
2024-11-29 19:29:30 -05:00
committed by GitHub
parent 8894e29da2
commit 644bd42fb0
78 changed files with 539 additions and 472 deletions

View File

@@ -524,12 +524,12 @@ CheckPrinterStatus:
jr z, .error_2
.printer_connected
ld a, [wPrinterStatusFlags]
and %11100000
and PRINTER_STATUS_ERROR_3 | PRINTER_STATUS_ERROR_4 | PRINTER_STATUS_ERROR_1
ret z ; no error
bit 7, a
bit PRINTER_STATUS_ERROR_1_F, a
jr nz, .error_1
bit 6, a
bit PRINTER_STATUS_ERROR_4_F, a
jr nz, .error_4
; paper error
ld a, PRINTER_ERROR_3

View File

@@ -8,7 +8,7 @@ Printer_StartTransmission:
ldh [rSC], a
ld [wPrinterOpcode], a
ld hl, wPrinterConnectionOpen
set 0, [hl]
set PRINTER_CONNECTION_OPEN, [hl]
ld a, [wGBPrinterBrightness]
ld [wPrinterExposureTime], a
xor a
@@ -199,7 +199,7 @@ Printer_CheckConnectionStatus:
cp $0
jr nz, .printer_error
ld hl, wPrinterConnectionOpen
set 1, [hl]
set PRINTER_CONNECTION_SUCCESS, [hl]
ld a, $5
ld [wHandshakeFrameDelay], a
call _Printer_NextSection