Skip to content

Commit 85d1dde

Browse files
committed
MSU1: speed up bulk PCM file scanning by some games
Some games, notably ALTTP Randomizer, perform a full scan of all PCM tracks on startup. After adding MSU1 SRAM checks, this led to a full SRAM check per track scanned (because it was considered a safe opportunity to always do an SRAM check on track change), resulting in 7+ seconds of one-time startup time for the game which was considered unacceptable. SRAM check is now relaxed to at most once per second on track change; startup time is reduced to about 600ms.
1 parent f849441 commit 85d1dde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/msu1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void prepare_audio_track(uint16_t msu_track, uint32_t audio_offset) {
9696
f_close(&msuaudio);
9797
msu_audio_usage = MSU_IDLE;
9898
if(is_msu_free_to_save()) {
99-
msu_savecheck(1);
99+
msu_savecheck(0);
100100
}
101101
snprintf(suffix, sizeof(suffix), "-%d.pcm", msu_track);
102102
strcpy((char*)file_buf, (char*)file_lfn);

0 commit comments

Comments
 (0)