summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluckytyphlosion <alan.rj.huang@gmail.com>2015-05-11 12:23:51 -0400
committerluckytyphlosion <alan.rj.huang@gmail.com>2015-05-11 12:23:51 -0400
commit2038dff3aa97d512cb1f2aab48cee9c513e2e0ec (patch)
tree05cf37a380369dac78e9bb5d2e4ba8b0253d35d9
parent7a249b901a949b98f2da9fc46bddc484ad2b5a54 (diff)
Update copy.asm
-rw-r--r--home/copy.asm20
1 files changed, 20 insertions, 0 deletions
diff --git a/home/copy.asm b/home/copy.asm
index ff66f027..bba8c4c0 100644
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -32,3 +32,23 @@ CopyData:: ; 00b1 (0:00b1)
dec c
jr nz, .copybytes
ret
+
+CopyVideoData:: ; note: fix other CopyVideoData function
+ ld a, [rLCDC]
+ bit 7,a ; LCD enabled?
+ jp nz, CopyVideoDataLCDEnabled ; if yes, then copy video data
+ push hl
+ ld h,d
+ ld l,e
+ pop de
+ ld a,b ; save bank
+ push af
+ swap c
+ ld a,$f
+ and c
+ ld b,a
+ ld a,$f0
+ and c
+ ld c,a
+ pop af
+ jp FarCopyData