prepare for new arp strategy
This commit is contained in:
parent
905329e1e4
commit
3eb3d8a6f1
54 changed files with 209 additions and 68 deletions
|
|
@ -162,7 +162,9 @@ void DivPlatformAmiga::tick(bool sysTick) {
|
|||
off=8363.0/(double)s->centerRate;
|
||||
}
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
// TODO: why the off mult? this may be a bug!
|
||||
chan[i].baseFreq=round(off*NOTE_PERIODIC_NOROUND(parent->calcArp(chan[i].note,chan[i].std.arp.val)));
|
||||
chan[i].freqChanged=true;
|
||||
|
|
|
|||
|
|
@ -159,7 +159,9 @@ void DivPlatformArcade::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_LINEAR(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -253,7 +253,9 @@ void DivPlatformAY8910::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -243,7 +243,9 @@ void DivPlatformAY8930::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,9 @@ void DivPlatformBubSysWSG::tick(bool sysTick) {
|
|||
chan[i].outVol=((chan[i].vol&15)*MIN(15,chan[i].std.vol.val))/15;
|
||||
rWrite(2+i,(chan[i].wave<<5)|chan[i].outVol);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,9 @@ void DivPlatformC64::tick(bool sysTick) {
|
|||
updateFilter();
|
||||
}
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,7 +119,9 @@ void DivPlatformFDS::tick(bool sysTick) {
|
|||
if (chan[i].outVol<0) chan[i].outVol=0;
|
||||
rWrite(0x4080,0x80|chan[i].outVol);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,9 @@ void DivPlatformGA20::tick(bool sysTick) {
|
|||
chan[i].volumeChanged=true;
|
||||
}
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,7 +163,9 @@ void DivPlatformGB::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (i==3) { // noise
|
||||
chan[i].baseFreq=parent->calcArp(chan[i].note,chan[i].std.arp.val,24);
|
||||
if (chan[i].baseFreq>255) chan[i].baseFreq=255;
|
||||
|
|
|
|||
|
|
@ -296,14 +296,18 @@ void DivPlatformGenesis::tick(bool sysTick) {
|
|||
}
|
||||
|
||||
if (i>=5 && chan[i].furnaceDac) {
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=parent->calcBaseFreq(1,1,parent->calcArp(chan[i].note,chan[i].std.arp.val),false);
|
||||
}
|
||||
chan[i].freqChanged=true;
|
||||
}
|
||||
} else {
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,7 +109,9 @@ void DivPlatformK007232::tick(bool sysTick) {
|
|||
chan[i].volumeChanged=true;
|
||||
}
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,7 +171,9 @@ void DivPlatformLynx::tick(bool sysTick) {
|
|||
}
|
||||
WRITE_VOLUME(i,(isMuted[i]?0:(chan[i].outVol&127)));
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].actualNote=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
||||
chan[i].baseFreq=NOTE_PERIODIC(chan[i].actualNote);
|
||||
|
|
|
|||
|
|
@ -102,7 +102,9 @@ void DivPlatformMMC5::tick(bool sysTick) {
|
|||
rWrite(0x5000+i*4,0x30|chan[i].outVol|((chan[i].duty&3)<<6));
|
||||
}
|
||||
// TODO: arp macros on NES PCM?
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,9 @@ void DivPlatformMSM5232::tick(bool sysTick) {
|
|||
if (chan[i].std.vol.had) {
|
||||
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&127,MIN(127,chan[i].std.vol.val),127);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_LINEAR(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -187,7 +187,9 @@ void DivPlatformN163::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,7 +204,9 @@ void DivPlatformNamcoWSG::tick(bool sysTick) {
|
|||
chan[i].noise=chan[i].std.duty.val;
|
||||
chan[i].freqChanged=true;
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -217,7 +217,9 @@ void DivPlatformNES::tick(bool sysTick) {
|
|||
rWrite(0x4000+i*4,(chan[i].envMode<<4)|chan[i].outVol|((chan[i].duty&3)<<6));
|
||||
}
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (i==3) { // noise
|
||||
chan[i].baseFreq=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
||||
if (chan[i].baseFreq>255) chan[i].baseFreq=255;
|
||||
|
|
|
|||
|
|
@ -304,7 +304,9 @@ void DivPlatformOPL::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
@ -489,7 +491,9 @@ void DivPlatformOPL::tick(bool sysTick) {
|
|||
immWrite(18,chan[adpcmChan].outVol);
|
||||
}
|
||||
|
||||
if (chan[adpcmChan].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[adpcmChan].handleArp();
|
||||
} else if (chan[adpcmChan].std.arp.had) {
|
||||
if (!chan[adpcmChan].inPorta) {
|
||||
chan[adpcmChan].baseFreq=NOTE_ADPCMB(parent->calcArp(chan[adpcmChan].note,chan[adpcmChan].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,9 @@ void DivPlatformOPLL::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,7 +167,9 @@ void DivPlatformPCE::tick(bool sysTick) {
|
|||
if (noiseSeek<0) noiseSeek=0;
|
||||
chWrite(i,0x07,chan[i].noise?(0x80|(parent->song.properNoiseLayout?(noiseSeek&31):noiseFreq[noiseSeek%12])):0);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
int noiseSeek=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
||||
chan[i].baseFreq=NOTE_PERIODIC(noiseSeek);
|
||||
|
|
|
|||
|
|
@ -128,7 +128,9 @@ void DivPlatformPCMDAC::tick(bool sysTick) {
|
|||
if (chan[0].std.vol.had) {
|
||||
chan[0].envVol=chan[0].std.vol.val;
|
||||
}
|
||||
if (chan[0].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[0].handleArp();
|
||||
} else if (chan[0].std.arp.had) {
|
||||
if (!chan[0].inPorta) {
|
||||
chan[0].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[0].note,chan[0].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -345,7 +345,9 @@ void DivPlatformPCSpeaker::tick(bool sysTick) {
|
|||
chan[i].outVol=(chan[i].vol && chan[i].std.vol.val);
|
||||
on=chan[i].outVol;
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,9 @@ void DivPlatformPET::tick(bool sysTick) {
|
|||
chan[0].outVol=chan[0].std.vol.val&chan[0].vol;
|
||||
writeOutVol();
|
||||
}
|
||||
if (chan[0].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[0].handleArp();
|
||||
} else if (chan[0].std.arp.had) {
|
||||
if (!chan[0].inPorta) {
|
||||
chan[0].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[0].note,chan[0].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@ void DivPlatformPokeMini::tick(bool sysTick) {
|
|||
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol,chan[i].std.vol.val,3);
|
||||
vol=(chan[i].outVol==2)?3:chan[i].outVol;
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,9 @@ void DivPlatformPong::tick(bool sysTick) {
|
|||
chan[i].outVol=(chan[i].vol && chan[i].std.vol.val);
|
||||
on=chan[i].outVol;
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -335,7 +335,9 @@ void DivPlatformQSound::tick(bool sysTick) {
|
|||
qsound_loop = length - loopStart;
|
||||
}
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=QS_NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,9 @@ void DivPlatformRF5C68::tick(bool sysTick) {
|
|||
chan[i].outVol=((chan[i].vol&0xff)*MIN(chan[i].macroVolMul,chan[i].std.vol.val))/chan[i].macroVolMul;
|
||||
chWrite(i,0,chan[i].outVol);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,9 @@ void DivPlatformSAA1099::tick(bool sysTick) {
|
|||
rWrite(i,applyPan(chan[i].outVol&15,chan[i].pan));
|
||||
}
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,9 @@ void DivPlatformSCC::tick(bool sysTick) {
|
|||
chan[i].outVol=((chan[i].vol&15)*MIN(15,chan[i].std.vol.val))/15;
|
||||
rWrite(regBase+10+i,chan[i].outVol);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,9 @@ void DivPlatformSegaPCM::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=(parent->calcArp(chan[i].note,chan[i].std.arp.val)<<6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,7 +156,9 @@ void DivPlatformSMS::tick(bool sysTick) {
|
|||
// ((chan[i].vol&15)*MIN(15,chan[i].std.vol.val))>>4;
|
||||
chan[i].writeVol=true;
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
// TODO: add compatibility flag. this is horrible.
|
||||
int areYouSerious=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
||||
|
|
@ -244,7 +246,9 @@ void DivPlatformSMS::tick(bool sysTick) {
|
|||
}
|
||||
} else { // 3 fixed values
|
||||
unsigned char value;
|
||||
if (chan[3].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[3].handleArp();
|
||||
} else if (chan[3].std.arp.had) {
|
||||
value=parent->calcArp(chan[3].note,chan[3].std.arp.val)%12;
|
||||
} else { // pardon?
|
||||
value=chan[3].note%12;
|
||||
|
|
|
|||
|
|
@ -106,7 +106,9 @@ void DivPlatformSNES::tick(bool sysTick) {
|
|||
if (chan[i].std.vol.had) {
|
||||
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&127,MIN(127,chan[i].std.vol.val),127);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,9 @@ void DivPlatformSoundUnit::tick(bool sysTick) {
|
|||
}
|
||||
chWrite(i,0x02,chan[i].outVol);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_SU(i,parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,7 +133,9 @@ void DivPlatformSwan::tick(bool sysTick) {
|
|||
}
|
||||
calcAndWriteOutVol(i,env);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,9 @@ void DivPlatformT6W28::tick(bool sysTick) {
|
|||
if (chan[i].std.vol.had) {
|
||||
chan[i].outVol=VOL_SCALE_LOG_BROKEN(chan[i].vol&15,MIN(15,chan[i].std.vol.val),15);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
int noiseSeek=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
||||
chan[i].baseFreq=NOTE_SN(i,noiseSeek);
|
||||
|
|
|
|||
|
|
@ -103,7 +103,9 @@ void DivPlatformTIA::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
// TODO: the way arps work on TIA is really weird
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
if (chan[i].std.arp.val<0 && (!(chan[i].std.arp.val&0x40000000))) {
|
||||
chan[i].baseFreq=0x80000000|(chan[i].std.arp.val|0x40000000);
|
||||
|
|
|
|||
|
|
@ -121,7 +121,9 @@ void DivPlatformTX81Z::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_LINEAR(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,9 @@ void DivPlatformVB::tick(bool sysTick) {
|
|||
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&15,MIN(15,chan[i].std.vol.val),15);
|
||||
writeEnv(i);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,7 +159,9 @@ void DivPlatformVERA::tick(bool sysTick) {
|
|||
chan[i].outVol=MAX(chan[i].vol+chan[i].std.vol.val-63,0);
|
||||
rWriteLo(i,2,chan[i].outVol);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=calcNoteFreq(0,parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
@ -201,7 +203,9 @@ void DivPlatformVERA::tick(bool sysTick) {
|
|||
chan[16].outVol=MAX(chan[16].vol+MIN(chan[16].std.vol.val/4,15)-15,0);
|
||||
rWritePCMVol(chan[16].outVol&15);
|
||||
}
|
||||
if (chan[16].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[16].handleArp();
|
||||
} else if (chan[16].std.arp.had) {
|
||||
if (!chan[16].inPorta) {
|
||||
chan[16].baseFreq=calcNoteFreq(16,parent->calcArp(chan[16].note,chan[16].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,9 @@ void DivPlatformVIC20::tick(bool sysTick) {
|
|||
int env=chan[i].std.vol.val;
|
||||
calcAndWriteOutVol(i,env);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,7 +152,9 @@ void DivPlatformVRC6::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -331,7 +331,9 @@ void DivPlatformX1_010::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
if ((!chan[i].pcm) || chan[i].furnacePCM) {
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NoteX1_010(i,parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,7 +230,9 @@ void DivPlatformYM2203::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -376,7 +376,9 @@ void DivPlatformYM2608::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
||||
}
|
||||
|
|
@ -595,7 +597,9 @@ void DivPlatformYM2608::tick(bool sysTick) {
|
|||
immWrite(0x10b,chan[15].outVol);
|
||||
}
|
||||
|
||||
if (chan[15].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[15].handleArp();
|
||||
} else if (chan[15].std.arp.had) {
|
||||
if (!chan[15].inPorta) {
|
||||
chan[15].baseFreq=NOTE_ADPCMB(parent->calcArp(chan[15].note,chan[15].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -313,7 +313,9 @@ void DivPlatformYM2610::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
||||
}
|
||||
|
|
@ -534,7 +536,9 @@ void DivPlatformYM2610::tick(bool sysTick) {
|
|||
immWrite(0x1b,chan[adpcmBChanOffs].outVol);
|
||||
}
|
||||
|
||||
if (chan[adpcmBChanOffs].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[adpcmBChanOffs].handleArp();
|
||||
} else if (chan[adpcmBChanOffs].std.arp.had) {
|
||||
if (!chan[adpcmBChanOffs].inPorta) {
|
||||
chan[adpcmBChanOffs].baseFreq=NOTE_ADPCMB(parent->calcArp(chan[adpcmBChanOffs].note,chan[adpcmBChanOffs].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -376,7 +376,9 @@ void DivPlatformYM2610B::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
||||
}
|
||||
|
|
@ -597,7 +599,9 @@ void DivPlatformYM2610B::tick(bool sysTick) {
|
|||
immWrite(0x1b,chan[adpcmBChanOffs].outVol);
|
||||
}
|
||||
|
||||
if (chan[adpcmBChanOffs].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[adpcmBChanOffs].handleArp();
|
||||
} else if (chan[adpcmBChanOffs].std.arp.had) {
|
||||
if (!chan[adpcmBChanOffs].inPorta) {
|
||||
chan[adpcmBChanOffs].baseFreq=NOTE_ADPCMB(parent->calcArp(chan[adpcmBChanOffs].note,chan[adpcmBChanOffs].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,9 @@ void DivPlatformYMZ280B::tick(bool sysTick) {
|
|||
chan[i].outVol=((chan[i].vol&0xff)*MIN(chan[i].macroVolMul,chan[i].std.vol.val))/chan[i].macroVolMul;
|
||||
writeOutVol(i);
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,9 @@ void DivPlatformZXBeeper::tick(bool sysTick) {
|
|||
chan[i].duty=chan[i].std.duty.val;
|
||||
chan[i].freqChanged=true;
|
||||
}
|
||||
if (chan[i].std.arp.had) {
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
if (!chan[i].inPorta) {
|
||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue