aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxspu
diff options
context:
space:
mode:
authorJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-07-17 11:30:07 +0800
committerJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-07-17 11:30:07 +0800
commit0d4345a9bf2623df079c50a3bc73cbb7deca1176 (patch)
tree6cda70b844f39fc2d65a806b91a6010066433b56 /libpsn00b/psxspu
parentb956c5391b955e793a4d54572aa58872b4c66c30 (diff)
downloadpsn00bsdk-0d4345a9bf2623df079c50a3bc73cbb7deca1176.tar.gz
Added C++ support, updated build instructions and makefiles, consolidated libc and libgcc (during build process), libraries now v0.12b and more
Diffstat (limited to 'libpsn00b/psxspu')
-rw-r--r--libpsn00b/psxspu/makefile6
-rw-r--r--libpsn00b/psxspu/spuinit.s5
2 files changed, 6 insertions, 5 deletions
diff --git a/libpsn00b/psxspu/makefile b/libpsn00b/psxspu/makefile
index d6b3604..661a32b 100644
--- a/libpsn00b/psxspu/makefile
+++ b/libpsn00b/psxspu/makefile
@@ -1,4 +1,4 @@
-PREFIX = mipsel-unknown-elf-
+include ../common.mk
TARGET = ../libpsxspu.a
@@ -6,9 +6,7 @@ CFILES = $(notdir $(wildcard ./*.c))
AFILES = $(notdir $(wildcard ./*.s))
OFILES = $(addprefix build/,$(CFILES:.c=.o) $(AFILES:.s=.o))
-INCLUDE = -I../include
-
-CFLAGS = -O2 -g -msoft-float -Wa,--strip-local-absolute
+CFLAGS = -g -O2 -msoft-float -Wa,--strip-local-absolute
AFLAGS = -g -msoft-float --strip-local-absolute
CC = $(PREFIX)gcc
diff --git a/libpsn00b/psxspu/spuinit.s b/libpsn00b/psxspu/spuinit.s
index 51a54ea..6bfe143 100644
--- a/libpsn00b/psxspu/spuinit.s
+++ b/libpsn00b/psxspu/spuinit.s
@@ -77,7 +77,7 @@ SpuInit:
or $v0, $at
sw $v0, DPCR($v1)
- li $v0, 0xc000 # Enable SPU
+ li $v0, 0x8001 # Enable SPU
sh $v0, SPUCNT($v1)
jal SpuCtrlSync
move $a0, $v0
@@ -89,6 +89,9 @@ SpuInit:
sh $v0, SPU_CD_VOL($v1) # Activate CD volume
sh $v0, SPU_CD_VOL+2($v1)
+ sh $v0, SPU_CD_VOL($v1) # Activate CD volume
+ sh $v0, SPU_CD_VOL+2($v1)
+
lw $ra, 0($sp)
addiu $sp, 4
jr $ra