kode54/Game_Music_Emu

spc: clear_echo issue

yoyofr opened this issue · 3 comments

Hello,

when "void Snes_Spc::clear_echo()" is called, it checks if echo buffer has to be cleared or not based on dsp flag and "m.echo_cleared". The issue is that when you go from one subsong to another, it does not reset the "m.echo_cleared" flag.

I propose to amend the method and have instead
"void Snes_Spc::clear_echo(bool force=false)
{
if (force) m.echo_cleared=false;
etc ....
}"

in "blargg_err_t Spc_Emu::start_track_( int track )", change "apu.clear_echo();" to "apu.clear_echo(true);"

The same for Spc_Sfm

I would like to point out that SPC files do not have multiple subsongs. Although you are correct, clearing the echo buffer should occur on track start, regardless of whether it has already been done or not. I'll fix this.

thanks. In fact multiple song in one spc used to exist but it is not the standard nowadays.

Actually, SPC can contain as many songs as the game developers wanted to stuff into the SPC RAM at once, with song changes commanded by IO port write sequences that depended on how they wrote the player code. For instance, The Legend of Zelda: A Link to the Past uploaded banks of up to 16 songs at once.