Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/home/lcd.asm
1270 views
1
DisableLCD::
2
xor a
3
ldh [rIF], a
4
ldh a, [rIE]
5
ld b, a
6
res B_IE_VBLANK, a
7
ldh [rIE], a
8
9
.wait
10
ldh a, [rLY]
11
cp LY_VBLANK + 1
12
jr nz, .wait
13
14
ldh a, [rLCDC]
15
and ~LCDC_ON
16
ldh [rLCDC], a
17
ld a, b
18
ldh [rIE], a
19
ret
20
21
EnableLCD::
22
ldh a, [rLCDC]
23
set B_LCDC_ENABLE, a
24
ldh [rLCDC], a
25
ret
26
27