aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxspu/spusetkey.s
blob: 25a6107665599f989b426470abea607f57b4aa24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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, .Lkey_off
	nop
	
	jr		$ra
	sh		$a1, SPU_KEY_ON($v1)
	
.Lkey_off:

	jr		$ra
	sh		$a1, SPU_KEY_OFF($v1)