Introduced the ability to parse audio tables from the ROM!

This commit is contained in:
MeltyPlayer
2022-10-24 02:05:59 -05:00
parent 37c8ce046c
commit 13fab60dd8
10 changed files with 551 additions and 15 deletions
+17 -1
View File
@@ -1,8 +1,24 @@
#include "load_audio_data.h"
#include "decomp/tools/convUtils.h"
#include "decomp/audio/load.h"
#include "decomp/audio/load_dat.h"
extern struct AudioBanks load_audio_banks() {
extern struct AudioBanks load_audio_banks( uint8_t *rom ) {
uint8_t *rom2 = malloc(0x800000);
memcpy(rom2, rom, 0x800000);
rom = rom2;
gSoundDataADSR = parse_seqfile(rom+0x57B720); //ctl
gSoundDataRaw = parse_seqfile(rom+0x593560); //tbl
gMusicData = parse_seqfile(rom+0x7B0860);
gBankSetsData = rom+0x7CC621;
memmove(gBankSetsData+0x45,gBankSetsData+0x45-1,0x5B);
gBankSetsData[0x45]=0x00;
ptrs_to_offsets(gSoundDataADSR);
audio_init();
int numBanks = 10;
for (int i = 0; i < 10; ++i) {
bank_load_immediate(i, 2);