aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxspu/spusetkey.s
diff options
context:
space:
mode:
authorJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-04-06 10:11:07 +0800
committerJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-04-06 10:11:07 +0800
commitf3e040230772f978540a71aea43dfde200992922 (patch)
treebd8ca31b72dd01e24980b073854e263589530f56 /libpsn00b/psxspu/spusetkey.s
downloadpsn00bsdk-f3e040230772f978540a71aea43dfde200992922.tar.gz
First commit
Diffstat (limited to 'libpsn00b/psxspu/spusetkey.s')
-rw-r--r--libpsn00b/psxspu/spusetkey.s26
1 files changed, 26 insertions, 0 deletions
diff --git a/libpsn00b/psxspu/spusetkey.s b/libpsn00b/psxspu/spusetkey.s
new file mode 100644
index 0000000..1270b2a
--- /dev/null
+++ b/libpsn00b/psxspu/spusetkey.s
@@ -0,0 +1,26 @@
+.set noreorder
+
+.include "hwregs_a.h"
+
+.section .data
+
+
+.global SpuSetKey
+.type SpuSetKey, @function
+SpuSetKey:
+ # a0 - 0: key off, 1: key on
+ # a1 - Voice bit mask
+
+ lui $a2, IOBASE
+
+ beqz $a0, .key_off
+ nop
+
+ jr $ra
+ sh $a1, SPU_KEY_ON($v1)
+
+.key_off:
+
+ jr $ra
+ sh $a1, SPU_KEY_OFF($v1)
+ \ No newline at end of file