diff options
Diffstat (limited to 'home/lcd.asm')
-rw-r--r-- | home/lcd.asm | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/home/lcd.asm b/home/lcd.asm index b488cbec..6ccfaece 100644 --- a/home/lcd.asm +++ b/home/lcd.asm @@ -1,14 +1,14 @@ LCD:: ; 41b (0:041b) push af - ld a, [hLCDCPointer] + ldh a, [hLCDCPointer] and a jr z, .done push hl - ld a, [rLY] + ldh a, [rLY] ld l, a ld h, wLYOverrides >> 8 ld h, [hl] - ld a, [hLCDCPointer] + ldh a, [hLCDCPointer] ld l, a ld a, h ld h, rSCY >> 8 @@ -22,37 +22,37 @@ DisableLCD:: ; Turn the LCD off ; Don't need to do anything if the LCD is already off - ld a, [rLCDC] + ldh a, [rLCDC] bit 7, a ret z xor a - ld [rIF], a - ld a, [rIE] + ldh [rIF], a + ldh a, [rIE] ld b, a ; Disable VBlank res 0, a - ld [rIE], a + ldh [rIE], a .wait ; Wait until VBlank would normally happen - ld a, [rLY] + ldh a, [rLY] cp 145 jr nz, .wait - ld a, [rLCDC] + ldh a, [rLCDC] and %01111111 - ld [rLCDC], a + ldh [rLCDC], a xor a - ld [rIF], a + ldh [rIF], a ld a, b - ld [rIE], a + ldh [rIE], a ret EnableLCD:: - ld a, [rLCDC] + ldh a, [rLCDC] set 7, a - ld [rLCDC], a + ldh [rLCDC], a ret |