mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-01 00:43:02 +00:00
Game Boy: fix bug involving hw sweep and zombie
This commit is contained in:
parent
f86b66b4b7
commit
474dfa2587
1 changed files with 14 additions and 16 deletions
|
@ -181,7 +181,6 @@ void DivPlatformGB::tick(bool sysTick) {
|
||||||
chan[i].soundLen=64;
|
chan[i].soundLen=64;
|
||||||
|
|
||||||
if (!chan[i].keyOn) chan[i].killIt=true;
|
if (!chan[i].keyOn) chan[i].killIt=true;
|
||||||
chan[i].freqChanged=true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -353,25 +352,24 @@ void DivPlatformGB::tick(bool sysTick) {
|
||||||
if (chan[i].keyOn) chan[i].keyOn=false;
|
if (chan[i].keyOn) chan[i].keyOn=false;
|
||||||
if (chan[i].keyOff) chan[i].keyOff=false;
|
if (chan[i].keyOff) chan[i].keyOff=false;
|
||||||
chan[i].freqChanged=false;
|
chan[i].freqChanged=false;
|
||||||
|
}
|
||||||
|
if (chan[i].killIt) {
|
||||||
|
if (i!=2) {
|
||||||
|
//rWrite(16+i*5+2,8);
|
||||||
|
int killDelta=chan[i].lastKill-chan[i].outVol+1;
|
||||||
|
if (killDelta<0) killDelta+=16;
|
||||||
|
chan[i].lastKill=chan[i].outVol;
|
||||||
|
|
||||||
if (chan[i].killIt) {
|
if (killDelta!=1) {
|
||||||
if (i!=2) {
|
rWrite(16+i*5+2,((chan[i].envVol<<4))|8);
|
||||||
//rWrite(16+i*5+2,8);
|
for (int j=0; j<killDelta; j++) {
|
||||||
int killDelta=chan[i].lastKill-chan[i].outVol+1;
|
rWrite(16+i*5+2,0x09);
|
||||||
if (killDelta<0) killDelta+=16;
|
rWrite(16+i*5+2,0x11);
|
||||||
chan[i].lastKill=chan[i].outVol;
|
rWrite(16+i*5+2,0x08);
|
||||||
|
|
||||||
if (killDelta!=1) {
|
|
||||||
rWrite(16+i*5+2,((chan[i].envVol<<4))|8);
|
|
||||||
for (int j=0; j<killDelta; j++) {
|
|
||||||
rWrite(16+i*5+2,0x09);
|
|
||||||
rWrite(16+i*5+2,0x11);
|
|
||||||
rWrite(16+i*5+2,0x08);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
chan[i].killIt=false;
|
|
||||||
}
|
}
|
||||||
|
chan[i].killIt=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
chan[i].soManyHacksToMakeItDefleCompatible=false;
|
chan[i].soManyHacksToMakeItDefleCompatible=false;
|
||||||
|
|
Loading…
Reference in a new issue