summaryrefslogtreecommitdiff
path: root/home/lcdc.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/lcdc.asm')
-rw-r--r--home/lcdc.asm20
1 files changed, 20 insertions, 0 deletions
diff --git a/home/lcdc.asm b/home/lcdc.asm
new file mode 100644
index 00000000..6172dd0d
--- /dev/null
+++ b/home/lcdc.asm
@@ -0,0 +1,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