diff options
Diffstat (limited to 'home/lcd.asm')
-rw-r--r-- | home/lcd.asm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/home/lcd.asm b/home/lcd.asm new file mode 100644 index 00000000..72fc70ed --- /dev/null +++ b/home/lcd.asm @@ -0,0 +1,25 @@ +DisableLCD:: + xor a + ldh [rIF], a + ldh a, [rIE] + ld b, a + res 0, a + ldh [rIE], a + +.wait + ldh a, [rLY] + cp LY_VBLANK + jr nz, .wait + + ldh a, [rLCDC] + and $ff ^ rLCDC_ENABLE_MASK + ldh [rLCDC], a + ld a, b + ldh [rIE], a + ret + +EnableLCD:: + ldh a, [rLCDC] + set rLCDC_ENABLE, a + ldh [rLCDC], a + ret |