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
|
2024-09-24 14:48:10 +00:00
|
|
|
res rIE_VBLANK, 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]
|
2024-09-24 14:48:10 +00:00
|
|
|
and ~(1 << rLCDC_ENABLE)
|
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
|