summaryrefslogtreecommitdiff
path: root/common/transfer_data.asm
diff options
context:
space:
mode:
Diffstat (limited to 'common/transfer_data.asm')
-rw-r--r--common/transfer_data.asm31
1 files changed, 31 insertions, 0 deletions
diff --git a/common/transfer_data.asm b/common/transfer_data.asm
new file mode 100644
index 0000000..0276d7c
--- /dev/null
+++ b/common/transfer_data.asm
@@ -0,0 +1,31 @@
+ API_106 $0040, UNKNOWN_VALUE
+
+.asm_1bfe
+ waita $01
+
+ ld hl, Space_3
+ API $0C8
+
+ or a
+ jr nz, .asm_1c18
+
+ IS_SOUND_PLAYING 1 ; return
+
+.asm_1c18
+ LD_HL_IND Space_3
+ LD_IND_HL Space_4
+ ld a, l
+ cp $22
+ jr nz, .asm_1bfe
+
+ ld a, h
+ cp $22
+ jr nz, .asm_1bfe
+
+ ld de, 60 ; transfer length
+ ld hl, Prologue
+ call TransferData
+
+ ld de, DATA_TRANSFER_LENGTH ; transfer length
+ ld hl, DataPacket
+ call TransferData \ No newline at end of file