aboutsummaryrefslogtreecommitdiffstats
path: root/home/lcdc.asm
blob: 6172dd0d2b6b00f9eeb69aea58acafda4d25b67b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
LCDC::
	push af
	ld a, [hLCDCPointer] ; doubles as enabling byte
	and a
	jr z, .noLCDCInterrupt
	push hl
	; [C700 + [rLY]] --> [FF00 + [hLCDCPointer]]
	ld a, [rLY]
	ld l, a
	ld h, wLYOverrides / $100
	ld h, [hl] ; h != not part of pointer
	ld a, [hLCDCPointer]
	ld l, a
	ld a, h
	ld h, $ff
	ld [hl], a
	pop hl
.noLCDCInterrupt
	pop af
	reti