From ba670dcdd15011edd6f34c9981da10c6c7f85993 Mon Sep 17 00:00:00 2001 From: CrashOveride95 Date: Tue, 13 Jul 2021 12:10:53 -0400 Subject: [PATCH] Change sound_data to ASM, lowers build time significantly --- Makefile | 2 +- sound/sound_data.c | 17 ----------------- sound/sound_data.s | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 18 deletions(-) delete mode 100644 sound/sound_data.c create mode 100644 sound/sound_data.s diff --git a/Makefile b/Makefile index 9b67d458..16b3eac6 100644 --- a/Makefile +++ b/Makefile @@ -500,7 +500,7 @@ $(BUILD_DIR)/asm/boot.o: $(IPL3_RAW_FILES) $(BUILD_DIR)/src/game/crash_screen.o: $(CRASH_TEXTURE_C_FILES) $(BUILD_DIR)/src/game/version.o: $(BUILD_DIR)/src/game/version_data.h $(BUILD_DIR)/lib/rsp.o: $(BUILD_DIR)/rsp/rspboot.bin $(BUILD_DIR)/rsp/fast3d.bin $(BUILD_DIR)/rsp/audio.bin -$(SOUND_BIN_DIR)/sound_data.o: $(SOUND_BIN_DIR)/sound_data.ctl.inc.c $(SOUND_BIN_DIR)/sound_data.tbl.inc.c $(SOUND_BIN_DIR)/sequences.bin.inc.c $(SOUND_BIN_DIR)/bank_sets.inc.c +$(SOUND_BIN_DIR)/sound_data.o: $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/sound_data.tbl $(SOUND_BIN_DIR)/sequences.bin $(SOUND_BIN_DIR)/bank_sets $(BUILD_DIR)/levels/scripts.o: $(BUILD_DIR)/include/level_headers.h ifeq ($(VERSION),sh) diff --git a/sound/sound_data.c b/sound/sound_data.c deleted file mode 100644 index 84c6616a..00000000 --- a/sound/sound_data.c +++ /dev/null @@ -1,17 +0,0 @@ -unsigned char gSoundDataADSR[] = { -#include "sound/sound_data.ctl.inc.c" -}; - -unsigned char gSoundDataRaw[] = { -#include "sound/sound_data.tbl.inc.c" -}; - -unsigned char gMusicData[] = { -#include "sound/sequences.bin.inc.c" -}; - -#ifndef VERSION_SH -unsigned char gBankSetsData[] = { -#include "sound/bank_sets.inc.c" -}; -#endif diff --git a/sound/sound_data.s b/sound/sound_data.s new file mode 100644 index 00000000..2a31186d --- /dev/null +++ b/sound/sound_data.s @@ -0,0 +1,21 @@ +.include "macros.inc" + +.section .data + +glabel gSoundDataADSR +.incbin "sound/sound_data.ctl" +.balign 16 + +glabel gSoundDataRaw +.incbin "sound/sound_data.tbl" +.balign 16 + +glabel gMusicData +.incbin "sound/sequences.bin" +.balign 16 + +#ifndef VERSION_SH +glabel gBankSetsData +.incbin "sound/bank_sets" +.balign 16 +#endif \ No newline at end of file