libgambatte: fix lfsr reg init value

all bits should be high, not just the lower 8.

most likely this is a remnant from the initial implementation
based on GBSOUND.txt which has what is most likely a brain fart
0xFF value for this considering the rest of the description
is inconsistent whith that.

belmont's revenge (which has some great tracks) is affected by
this, so this one is a pretty big deal to me. konami collection
vol 4 has a pretty sweet color version of it which I recommend
checking out.
This commit is contained in:
sinamas 2013-06-01 14:54:59 +02:00
parent fb4feee1f0
commit 0d07cb7851
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ namespace gambatte {
Channel4::Lfsr::Lfsr()
: backupCounter_(counter_disabled)
, reg_(0xFF)
, reg_(0x7FFF)
, nr3_(0)
, master_(false)
{

View File

@ -56,7 +56,7 @@ private:
void reset(unsigned long cc);
void saveState(SaveState &state, unsigned long cc);
void loadState(SaveState const &state);
void disableMaster() { killCounter(); master_ = false; reg_ = 0xFF; }
void disableMaster() { killCounter(); master_ = false; reg_ = 0x7FFF; }
void killCounter() { counter_ = counter_disabled; }
void reviveCounter(unsigned long cc);