summaryrefslogtreecommitdiff
path: root/home/lcdc.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/lcdc.asm')
-rw-r--r--home/lcdc.asm25
1 files changed, 13 insertions, 12 deletions
diff --git a/home/lcdc.asm b/home/lcdc.asm
index 7057f755..f94cdb19 100644
--- a/home/lcdc.asm
+++ b/home/lcdc.asm
@@ -1,19 +1,20 @@
LCDC:: ; 15ac (0:15ac)
push af
- ld a,[hLCDCPointer] ; doubles as enabling byte
+ ld a, [hLCDCPointer] ; doubles as enabling byte
and a
- jr z,.noLCDCInterrupt
+ jr z, .noLCDCInterrupt
push hl
- ld a,[rLY]
- ld l,a
- ld h,$c7
- ld h,[hl] ; h != not part of pointer
- ld a,[hLCDCPointer]
- ld l,a
- ld a,h
- ld h,$ff
- ld [hl],a
+ ; [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 \ No newline at end of file
+ reti