summaryrefslogtreecommitdiff
path: root/arm9/asm/SND_main.s
diff options
context:
space:
mode:
authorMade-s <made111@gmx.de>2020-05-04 17:15:10 +0200
committerMade-s <made111@gmx.de>2020-05-04 17:15:10 +0200
commit88d142a33b9973f35c913b3fdad7f6a4394a05cd (patch)
treec6ad861213ccebb62919e27f6d7f3f1080e1ee76 /arm9/asm/SND_main.s
parentab28b0b37f2fd9fba6010e48e15bd31170d678d7 (diff)
parentc82690dca094b624944b155e5119631c185bca5c (diff)
Merge branch 'master' of https://github.com/martmists/pokediamond
Diffstat (limited to 'arm9/asm/SND_main.s')
-rw-r--r--arm9/asm/SND_main.s45
1 files changed, 45 insertions, 0 deletions
diff --git a/arm9/asm/SND_main.s b/arm9/asm/SND_main.s
new file mode 100644
index 00000000..6ae5e845
--- /dev/null
+++ b/arm9/asm/SND_main.s
@@ -0,0 +1,45 @@
+ .include "asm/macros.inc"
+ .include "global.inc"
+
+ .text
+
+ arm_func_start SNDi_UnlockMutex
+SNDi_UnlockMutex: ; 0x020CEC18
+ ldr ip, _020CEC24 ; =OS_UnlockMutex
+ ldr r0, _020CEC28 ; =0x021D3820
+ bx r12
+ .balign 4
+_020CEC24: .word OS_UnlockMutex
+_020CEC28: .word 0x021D3820
+
+ arm_func_start SNDi_LockMutex
+SNDi_LockMutex: ; 0x020CEC2C
+ ldr ip, _020CEC38 ; =OS_LockMutex
+ ldr r0, _020CEC3C ; =0x021D3820
+ bx r12
+ .balign 4
+_020CEC38: .word OS_LockMutex
+_020CEC3C: .word 0x021D3820
+
+ arm_func_start SND_Init
+SND_Init: ; 0x020CEC40
+ stmdb sp!, {lr}
+ sub sp, sp, #0x4
+ ldr r1, _020CEC84 ; =0x021D381C
+ ldr r0, [r1, #0x0]
+ cmp r0, #0x0
+ addne sp, sp, #0x4
+ ldmneia sp!, {lr}
+ bxne lr
+ ldr r0, _020CEC88 ; =0x021D3820
+ mov r2, #0x1
+ str r2, [r1, #0x0]
+ bl OS_InitMutex
+ bl SND_CommandInit
+ bl SND_AlarmInit
+ add sp, sp, #0x4
+ ldmia sp!, {lr}
+ bx lr
+ .balign 4
+_020CEC84: .word 0x021D381C
+_020CEC88: .word 0x021D3820