diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-03 13:03:21 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-03 13:03:21 -0400 |
commit | 6bd86e10c32cd7b464425adfc01621f3ff6726aa (patch) | |
tree | 808b190bd43f5024cc694c4e229167ce7928b4d4 /home/lcd.asm | |
parent | c9c59dc34323a5e0b1886db5f845c8d41620826e (diff) |
Reorganize home header
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..e88a42b3 --- /dev/null +++ b/home/lcd.asm @@ -0,0 +1,25 @@ +DisableLCD:: + xor a + ld [rIF], a + ld a, [rIE] + ld b, a + res 0, a + ld [rIE], a + +.wait + ld a, [rLY] + cp LY_VBLANK + jr nz, .wait + + ld a, [rLCDC] + and $ff ^ rLCDC_ENABLE_MASK + ld [rLCDC], a + ld a, b + ld [rIE], a + ret + +EnableLCD:: + ld a, [rLCDC] + set rLCDC_ENABLE, a + ld [rLCDC], a + ret |