mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 22:43:01 +00:00
YM2612: hopefully the final pitch slide fix
This commit is contained in:
parent
17cf657f6a
commit
1b97d3912b
2 changed files with 5 additions and 5 deletions
|
@ -434,7 +434,7 @@ void DivPlatformGenesis::tick(bool sysTick) {
|
||||||
off=(double)s->centerRate/8363.0;
|
off=(double)s->centerRate/8363.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,false,4)+chan[i].std.pitch.val;;
|
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,false,4)+chan[i].std.pitch.val;
|
||||||
dacRate=chan[i].freq*off;
|
dacRate=chan[i].freq*off;
|
||||||
if (dacRate<1) dacRate=1;
|
if (dacRate<1) dacRate=1;
|
||||||
if (dumpWrites) addWrite(0xffff0001,dacRate);
|
if (dumpWrites) addWrite(0xffff0001,dacRate);
|
||||||
|
@ -686,12 +686,12 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
|
||||||
// check for octave boundary
|
// check for octave boundary
|
||||||
// what the heck!
|
// what the heck!
|
||||||
if (!chan[c.chan].portaPause) {
|
if (!chan[c.chan].portaPause) {
|
||||||
if ((newFreq&0x7ff)>1288) {
|
if ((newFreq&0x7ff)>1288 && (newFreq&0xf800)<0x3800) {
|
||||||
chan[c.chan].portaPauseFreq=(644)|((newFreq+0x800)&0xf800);
|
chan[c.chan].portaPauseFreq=(644)|((newFreq+0x800)&0xf800);
|
||||||
chan[c.chan].portaPause=true;
|
chan[c.chan].portaPause=true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((newFreq&0x7ff)<644) {
|
if ((newFreq&0x7ff)<644 && (newFreq&0xf800)>0) {
|
||||||
chan[c.chan].portaPauseFreq=newFreq=(1287)|((newFreq-0x800)&0xf800);
|
chan[c.chan].portaPauseFreq=newFreq=(1287)|((newFreq-0x800)&0xf800);
|
||||||
chan[c.chan].portaPause=true;
|
chan[c.chan].portaPause=true;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -148,7 +148,7 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
|
||||||
}
|
}
|
||||||
// what the heck!
|
// what the heck!
|
||||||
if (!opChan[ch].portaPause) {
|
if (!opChan[ch].portaPause) {
|
||||||
if ((newFreq&0x7ff)>1288) {
|
if ((newFreq&0x7ff)>1288 && (newFreq&0xf800)<0x3800) {
|
||||||
if (parent->song.fbPortaPause) {
|
if (parent->song.fbPortaPause) {
|
||||||
opChan[ch].portaPauseFreq=(644)|((newFreq+0x800)&0xf800);
|
opChan[ch].portaPauseFreq=(644)|((newFreq+0x800)&0xf800);
|
||||||
opChan[ch].portaPause=true;
|
opChan[ch].portaPause=true;
|
||||||
|
@ -157,7 +157,7 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
|
||||||
newFreq=(newFreq>>1)|((newFreq+0x800)&0xf800);
|
newFreq=(newFreq>>1)|((newFreq+0x800)&0xf800);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((newFreq&0x7ff)<644) {
|
if ((newFreq&0x7ff)<644 && (newFreq&0xf800)>0) {
|
||||||
if (parent->song.fbPortaPause) {
|
if (parent->song.fbPortaPause) {
|
||||||
opChan[ch].portaPauseFreq=newFreq=(1287)|((newFreq-0x800)&0xf800);
|
opChan[ch].portaPauseFreq=newFreq=(1287)|((newFreq-0x800)&0xf800);
|
||||||
opChan[ch].portaPause=true;
|
opChan[ch].portaPause=true;
|
||||||
|
|
Loading…
Reference in a new issue