2020-07-03 17:03:21 +00:00
|
|
|
DisableLCD::
|
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [rIF], a
|
|
|
|
ldh a, [rIE]
|
2020-07-03 17:03:21 +00:00
|
|
|
ld b, a
|
|
|
|
res 0, a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [rIE], a
|
2020-07-03 17:03:21 +00:00
|
|
|
|
|
|
|
.wait
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh a, [rLY]
|
2020-07-03 17:03:21 +00:00
|
|
|
cp LY_VBLANK
|
|
|
|
jr nz, .wait
|
|
|
|
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh a, [rLCDC]
|
2020-07-03 17:03:21 +00:00
|
|
|
and $ff ^ rLCDC_ENABLE_MASK
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [rLCDC], a
|
2020-07-03 17:03:21 +00:00
|
|
|
ld a, b
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [rIE], a
|
2020-07-03 17:03:21 +00:00
|
|
|
ret
|
|
|
|
|
|
|
|
EnableLCD::
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh a, [rLCDC]
|
2020-07-03 17:03:21 +00:00
|
|
|
set rLCDC_ENABLE, a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [rLCDC], a
|
2020-07-03 17:03:21 +00:00
|
|
|
ret
|