kode54 / Game_Music_Emu

Game Music Emu - Multi-purpose console music emulator and player library
80 stars 16 forks source link

spc: clear_echo issue #1

Closed yoyofr closed 10 years ago

yoyofr commented 10 years ago

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::starttrack( int track )", change "apu.clear_echo();" to "apu.clear_echo(true);"

The same for Spc_Sfm

kode54 commented 10 years ago

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.

yoyofr commented 10 years ago

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

kode54 commented 10 years ago

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.