Remove unused buffers

This commit is contained in:
CrashOveride95
2021-02-02 17:50:20 -05:00
parent 82f1b1c433
commit 1d564a8043
6 changed files with 21 additions and 35 deletions

35
sm64.ld
View File

@@ -86,11 +86,6 @@ SECTIONS
BEGIN_NOLOAD(buffers)
{
BUILD_DIR/src/buffers/buffers.o(.bss*);
#ifdef HVQM
BUILD_DIR/src/buffers/hvqmwork.o(.bss*);
BUILD_DIR/src/buffers/adpcmbuf.o(.bss*);
BUILD_DIR/src/buffers/hvqbuf.o(.bss*);
#endif
BUILD_DIR/src/audio/globals_start.o(.bss*);
BUILD_DIR/src/audio/synthesis.o(.bss*);
BUILD_DIR/src/audio/heap.o(.bss*);
@@ -102,9 +97,28 @@ SECTIONS
}
END_NOLOAD(buffers)
/*ASSERT((. <= SEG_MAIN), "Error: buffers segment extended into main")*/
. = _buffersSegmentNoloadEnd;
#ifdef HVQM
BEGIN_NOLOAD(hvqmwork)
{
BUILD_DIR/src/hvqm/hvqmwork.o(.bss*);
}
END_NOLOAD(hvqmwork)
BEGIN_NOLOAD(adpcmbuf)
{
BUILD_DIR/src/hvqm/adpcmbuf.o(.bss*);
}
END_NOLOAD(adpcmbuf)
BEGIN_NOLOAD(hvqbuf)
{
BUILD_DIR/src/hvqm/hvqbuf.o(.bss*);
}
END_NOLOAD(hvqbuf)
. = _hvqbufSegmentNoloadEnd;
#endif
BEGIN_SEG(main, .) SUBALIGN(16)
{
BUILD_DIR/asm/entry.o(.text);
@@ -434,13 +448,6 @@ SECTIONS
BUILD_DIR/data/capcom.o(.data);
}
END_SEG(capcom)
#endif
#if 0
BEGIN_SEG(sein, __romPos) SUBALIGN(2)
{
BUILD_DIR/data/sein.o(.data);
}
END_SEG(sein)
#endif
/* Discard everything not specifically mentioned above. */
/DISCARD/ :

View File

@@ -799,16 +799,8 @@ struct SPTask *create_next_audio_frame_task(void) {
task->output_buff_size = NULL;
task->data_ptr = gAudioCmdBuffers[index];
task->data_size = writtenCmds * sizeof(u64);
// The audio task never yields, so having a yield buffer is pointless.
// This wastefulness was fixed in US.
#ifdef VERSION_JP
task->yield_data_ptr = (u64 *) gAudioSPTaskYieldBuffer;
task->yield_data_size = OS_YIELD_AUDIO_SIZE;
#else
task->yield_data_ptr = NULL;
task->yield_data_size = 0;
#endif
decrease_sample_dma_ttls();
return gAudioTask;

View File

@@ -24,8 +24,6 @@ extern f32 gGlobalSoundSource[3];
// defined in data.c, used by the game
extern u32 gAudioRandom;
extern u8 gAudioSPTaskYieldBuffer[]; // ucode yield data ptr; only used in JP
struct SPTask *create_next_audio_frame_task(void);
#ifdef VERSION_SH
struct SPTask *func_sh_802f5a80(void);

View File

@@ -62,8 +62,6 @@ u8 gAudioResetPresetIdToLoad;
s32 gAudioResetFadeOutFramesLeft;
#endif
u8 gAudioUnusedBuffer[0x1000];
extern s32 gMaxAudioCmds;
#ifdef VERSION_SH

View File

@@ -31,10 +31,3 @@ ALIGNED8 u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE];
ALIGNED8 struct SaveBuffer gSaveBuffer;
// 0x190a0 bytes
struct GfxPool gGfxPools[2];
// Yield buffer for audio, 0x400 bytes. Stubbed out post-JP since the audio
// task never yields.
#ifdef VERSION_JP
ALIGNED8 u8 gAudioSPTaskYieldBuffer[OS_YIELD_AUDIO_SIZE];
#endif

View File

@@ -12,8 +12,6 @@ extern u8 gDecompressionHeap[];
extern u8 gAudioHeap[];
extern u8 gAudioSPTaskYieldBuffer[];
extern u8 gIdleThreadStack[];
extern u8 gThread3Stack[];
extern u8 gThread4Stack[];