summaryrefslogtreecommitdiff
path: root/common/wait_for_ready.asm
diff options
context:
space:
mode:
Diffstat (limited to 'common/wait_for_ready.asm')
-rw-r--r--common/wait_for_ready.asm30
1 files changed, 30 insertions, 0 deletions
diff --git a/common/wait_for_ready.asm b/common/wait_for_ready.asm
new file mode 100644
index 0000000..8344422
--- /dev/null
+++ b/common/wait_for_ready.asm
@@ -0,0 +1,30 @@
+.asm_1baf
+ waita $01
+ API $0DB
+
+ ld l, a
+ ld h, $00
+ LD_IND_HL Space_5
+ API $0CA
+
+ cp $02
+ jr nc, .asm_1bd4
+
+ ld hl, UNKNOWN_VALUE
+ SOUND_PAUSE
+
+ IS_SOUND_PLAYING 1 ; return
+
+.asm_1bd4
+ LD_HL_IND Space_5
+ ld a, l
+ sub $04
+ or h
+ jr z, .asm_1be6
+
+ LD_HL_IND Space_5
+ ld a, l
+ sub $03
+ or h
+ jr nz, .asm_1baf
+.asm_1be6 \ No newline at end of file