YM2612: hopefully the final pitch slide fix

This commit is contained in:
tildearrow 2022-04-25 11:59:02 -05:00
parent 17cf657f6a
commit 1b97d3912b
2 changed files with 5 additions and 5 deletions

View file

@ -148,7 +148,7 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
}
// what the heck!
if (!opChan[ch].portaPause) {
if ((newFreq&0x7ff)>1288) {
if ((newFreq&0x7ff)>1288 && (newFreq&0xf800)<0x3800) {
if (parent->song.fbPortaPause) {
opChan[ch].portaPauseFreq=(644)|((newFreq+0x800)&0xf800);
opChan[ch].portaPause=true;
@ -157,7 +157,7 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
newFreq=(newFreq>>1)|((newFreq+0x800)&0xf800);
}
}
if ((newFreq&0x7ff)<644) {
if ((newFreq&0x7ff)<644 && (newFreq&0xf800)>0) {
if (parent->song.fbPortaPause) {
opChan[ch].portaPauseFreq=newFreq=(1287)|((newFreq-0x800)&0xf800);
opChan[ch].portaPause=true;