aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxspu/spusetkey.s
blob: 4ad0cff22c64c4151b9f0775c51fbc226fc55a53 (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
	sw		$a1, SPU_KEY_ON($a2)
	
.Lkey_off:

	jr		$ra
	sw		$a1, SPU_KEY_OFF($a2)