Audio_Load OK and Documented (#620)

* Copy audio_load progress from main branch

* Fix warning

* fix UB

* cleanup WIP

* Add docs, bss still broken

* bss fix

* bytesRemaining with size_t

* PR Suggestions

* PR Suggestions

* Fix bss

* Fix bss

* PR Suggestions
This commit is contained in:
engineer124
2022-03-24 12:22:13 +11:00
committed by GitHub
parent 92c4d42f44
commit b852a9a930
18 changed files with 2558 additions and 568 deletions
+14 -14
View File
@@ -6,29 +6,29 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B250.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B318.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_DiscardFont.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B3FC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B474.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B4F8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_WritebackDCache.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B520.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B578.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_AllocAttemptExternal.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_AllocDmaMemory.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B608.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B640.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_AllocZeroed.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B69C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B6E8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_Alloc.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B740.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_AllocPoolInit.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B768.s")
@@ -38,7 +38,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B7BC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B8FC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_InitMainPool.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018B95C.s")
@@ -48,9 +48,9 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018BB28.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018BBEC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_AllocCached.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018C380.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_SearchCaches.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018C3D8.s")
@@ -70,15 +70,15 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018CC3C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018CCA8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_ResetStep.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018CFAC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018D57C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_SearchPermanentCache.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018D5D4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_AllocPermanent.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018D658.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_AllocSampleCache.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018D6C8.s")
@@ -100,7 +100,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018DFE0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018E00C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/AudioHeap_ApplySampleBankCache.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_8018E03C.s")
+2159 -159
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -982,7 +982,7 @@ void AudioPlayback_NoteInitAll(void) {
note->playbackState.portamento.speed = 0;
note->playbackState.stereoHeadsetEffects = false;
note->playbackState.unk_84 = 0;
note->synthesisState.synthesisBuffers = AudioHeap_AllocDmaMemory(&gAudioContext.notesAndBuffersPool, 0x2E0);
note->playbackState.attributes.filterBuf = AudioHeap_AllocDmaMemory(&gAudioContext.notesAndBuffersPool, 0x10);
note->synthesisState.synthesisBuffers = AudioHeap_AllocDmaMemory(&gAudioContext.miscPool, 0x2E0);
note->playbackState.attributes.filterBuf = AudioHeap_AllocDmaMemory(&gAudioContext.miscPool, 0x10);
}
}
+1 -1
View File
@@ -64,7 +64,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_8019AAF0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_8019AB40.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/AudioSeq_ResetSequencePlayer.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_8019AC10.s")
+1 -1
View File
@@ -78,4 +78,4 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/func_80194668.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/func_801946E4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/Audio_InitMesgQueues.s")
+1 -1
View File
@@ -79,7 +79,7 @@ void AudioMgr_ThreadEntry(void* arg) {
s32 exit;
func_801A4C30();
func_80190B38(DmaMgr_DmaCallback0);
AudioLoad_SetDmaHandler(DmaMgr_DmaHandler);
func_801A4D00();
osSendMesg(&audioMgr->lockMsgQ, NULL, OS_MESG_BLOCK);
IrqMgr_AddClient(audioMgr->irqMgr, &irqClient, &audioMgr->interruptMsgQ);
+1
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
Vec3f D_801EDE00;