summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2021-12-27 14:51:37 +1100
committerGitHub <noreply@github.com>2021-12-27 03:51:37 +0000
commit27903c62868653b58e751cffac0a2d1c50985caa (patch)
treeca0dbd544dc17d62e77f874fbc6aa4953edbd308
parent76c39482bccb5e24d10a0b8dfaf9e9c747bc4ecb (diff)
code_80194710 OK (Audio libultra_code_O2) (#474)
* code_80194710.c OK * Add new line after variable declaration * format * Function declarations * Name changes to match OoT * Rename file * s32 -> size_t
-rw-r--r--include/functions.h4
-rw-r--r--spec2
-rw-r--r--src/code/audio/audio_dcache.c15
-rw-r--r--src/code/audio/code_80194710.c5
-rw-r--r--tools/disasm/files.txt2
-rw-r--r--tools/disasm/functions.txt4
-rw-r--r--tools/sizes/code_functions.csv4
7 files changed, 23 insertions, 13 deletions
diff --git a/include/functions.h b/include/functions.h
index 6502f1f92..312dfbe57 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -3642,8 +3642,8 @@ AudioTask* func_80192BE0(void);
// void func_80194568(void);
// void func_80194668(void);
// void func_801946E4(void);
-// void func_80194710(void);
-// void func_80194750(void);
+void Audio_InvalDCache(void* buf, size_t size);
+void Audio_WritebackDCache(void* buf, size_t size);
// void func_80194790(void);
// void func_80194840(void);
// void func_801948B0(void);
diff --git a/spec b/spec
index 305663172..f826ad300 100644
--- a/spec
+++ b/spec
@@ -639,7 +639,7 @@ beginseg
include "build/data/code/audio_load.bss.o"
include "build/src/code/audio/code_80192BE0.o"
include "build/data/code/code_80192BE0.data.o"
- include "build/src/code/audio/code_80194710.o"
+ include "build/src/code/audio/audio_dcache.o"
include "build/src/code/audio/code_80194790.o"
include "build/data/code/code_80194790.data.o"
include "build/src/code/audio/audio_playback.o"
diff --git a/src/code/audio/audio_dcache.c b/src/code/audio/audio_dcache.c
new file mode 100644
index 000000000..27f019fef
--- /dev/null
+++ b/src/code/audio/audio_dcache.c
@@ -0,0 +1,15 @@
+#include "global.h"
+
+void Audio_InvalDCache(void* buf, size_t size) {
+ OSIntMask prevMask = osSetIntMask(1);
+
+ osInvalDCache(buf, size);
+ osSetIntMask(prevMask);
+}
+
+void Audio_WritebackDCache(void* buf, size_t size) {
+ OSIntMask prevMask = osSetIntMask(1);
+
+ osWritebackDCache(buf, size);
+ osSetIntMask(prevMask);
+}
diff --git a/src/code/audio/code_80194710.c b/src/code/audio/code_80194710.c
deleted file mode 100644
index 090c5735b..000000000
--- a/src/code/audio/code_80194710.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "global.h"
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194710/func_80194710.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194710/func_80194750.s")
diff --git a/tools/disasm/files.txt b/tools/disasm/files.txt
index 199e5ac14..9a5d36677 100644
--- a/tools/disasm/files.txt
+++ b/tools/disasm/files.txt
@@ -483,7 +483,7 @@
0x8018B0F0 : "audio_heap",
0x8018EB60 : "audio_load",
0x80192BE0 : "code_80192BE0",
- 0x80194710 : "code_80194710",
+ 0x80194710 : "audio_dcache",
0x80194790 : "code_80194790",
0x80194930 : "audio_playback",
0x80196A00 : "audio_effects",
diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt
index bf36e9da5..6033d4d29 100644
--- a/tools/disasm/functions.txt
+++ b/tools/disasm/functions.txt
@@ -3720,8 +3720,8 @@
0x80194568:("func_80194568",),
0x80194668:("func_80194668",),
0x801946E4:("func_801946E4",),
- 0x80194710:("func_80194710",),
- 0x80194750:("func_80194750",),
+ 0x80194710:("Audio_InvalDCache",),
+ 0x80194750:("Audio_WritebackDCache",),
0x80194790:("func_80194790",),
0x80194804:("func_80194804",),
0x80194840:("func_80194840",),
diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv
index b14278276..02830ae3b 100644
--- a/tools/sizes/code_functions.csv
+++ b/tools/sizes/code_functions.csv
@@ -3238,8 +3238,8 @@ asm/non_matchings/code/code_80192BE0/func_80194548.s,func_80194548,0x80194548,0x
asm/non_matchings/code/code_80192BE0/func_80194568.s,func_80194568,0x80194568,0x40
asm/non_matchings/code/code_80192BE0/func_80194668.s,func_80194668,0x80194668,0x1F
asm/non_matchings/code/code_80192BE0/func_801946E4.s,func_801946E4,0x801946E4,0xB
-asm/non_matchings/code/code_80194710/func_80194710.s,func_80194710,0x80194710,0x10
-asm/non_matchings/code/code_80194710/func_80194750.s,func_80194750,0x80194750,0x10
+asm/non_matchings/code/code_80194710/Audio_InvalDCache.s,Audio_InvalDCache,0x80194710,0x10
+asm/non_matchings/code/code_80194710/Audio_WritebackDCache.s,Audio_WritebackDCache,0x80194750,0x10
asm/non_matchings/code/code_80194710/func_80194790.s,func_80194790,0x80194790,0x1D
asm/non_matchings/code/code_80194710/func_80194804.s,func_80194804,0x80194804,0xF
asm/non_matchings/code/code_80194710/func_80194840.s,func_80194840,0x80194840,0x1C