diff options
author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-07-04 16:19:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-04 16:19:15 -0400 |
commit | 2718c36065e7eb201a149938bcdd51987c4e56b6 (patch) | |
tree | 4a1c0294193a497e15ec8e6be59390eb1f84b5d3 /home/lcd.asm | |
parent | c85050497c1bd062e9cd40bf5b32fa3beca366cc (diff) | |
parent | 36f8cd1477b8ebe0537e99abd3ba53471a2e16c4 (diff) |
Merge pull request #257 from Rangi42/master
More reorganization
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 |