aboutsummaryrefslogtreecommitdiffstats
path: root/home/lcd.asm
blob: aef6d43fd8c8b4c0f2b4cf47232568f9ef4fd36b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
DisableLCD::
	xor a
	ldh [rIF], a
	ldh a, [rIE]
	ld b, a
	res rIE_VBLANK, a
	ldh [rIE], a

.wait
	ldh a, [rLY]
	cp LY_VBLANK
	jr nz, .wait

	ldh a, [rLCDC]
	and ~(1 << rLCDC_ENABLE)
	ldh [rLCDC], a
	ld a, b
	ldh [rIE], a
	ret

EnableLCD::
	ldh a, [rLCDC]
	set rLCDC_ENABLE, a
	ldh [rLCDC], a
	ret