giga-refactor, part 9
new format saving compatibility flags now part of own struct
This commit is contained in:
parent
9b3e6cea5b
commit
90a9a86e09
99 changed files with 1145 additions and 1047 deletions
|
|
@ -596,7 +596,7 @@ bool DivCSPlayer::tick() {
|
|||
}
|
||||
|
||||
if (chan[i].portaSpeed) {
|
||||
e->dispatchCmd(DivCommand(DIV_CMD_NOTE_PORTA,i,chan[i].portaSpeed*(e->song.linearPitch?e->song.pitchSlideSpeed:1),chan[i].portaTarget));
|
||||
e->dispatchCmd(DivCommand(DIV_CMD_NOTE_PORTA,i,chan[i].portaSpeed*(e->song.compatFlags.linearPitch?e->song.compatFlags.pitchSlideSpeed:1),chan[i].portaTarget));
|
||||
}
|
||||
if (chan[i].arp && !chan[i].portaSpeed) {
|
||||
if (chan[i].arpTicks==0) {
|
||||
|
|
|
|||
|
|
@ -1082,10 +1082,10 @@ class DivDispatch {
|
|||
#define NOTE_FNUM_BLOCK(x,bits,blk) parent->calcBaseFreqFNumBlock(chipClock,CHIP_FREQBASE,x,bits,blk)
|
||||
|
||||
// this is for volume scaling calculation.
|
||||
#define VOL_SCALE_LINEAR(x,y,range) ((parent->song.ceilVolumeScaling)?((((x)*(y))+(range-1))/(range)):(((x)*(y))/(range)))
|
||||
#define VOL_SCALE_LINEAR(x,y,range) ((parent->song.compatFlags.ceilVolumeScaling)?((((x)*(y))+(range-1))/(range)):(((x)*(y))/(range)))
|
||||
#define VOL_SCALE_LOG(x,y,range) (CLAMP(((x)+(y))-(range),0,(range)))
|
||||
#define VOL_SCALE_LINEAR_BROKEN(x,y,range) ((parent->song.newVolumeScaling)?(VOL_SCALE_LINEAR(x,y,range)):(VOL_SCALE_LOG(x,y,range)))
|
||||
#define VOL_SCALE_LOG_BROKEN(x,y,range) ((parent->song.newVolumeScaling)?(VOL_SCALE_LOG(x,y,range)):(VOL_SCALE_LINEAR(x,y,range)))
|
||||
#define VOL_SCALE_LINEAR_BROKEN(x,y,range) ((parent->song.compatFlags.newVolumeScaling)?(VOL_SCALE_LINEAR(x,y,range)):(VOL_SCALE_LOG(x,y,range)))
|
||||
#define VOL_SCALE_LOG_BROKEN(x,y,range) ((parent->song.compatFlags.newVolumeScaling)?(VOL_SCALE_LOG(x,y,range)):(VOL_SCALE_LINEAR(x,y,range)))
|
||||
|
||||
// these are here for convenience.
|
||||
// it is encouraged to use these, since you get an exact value this way.
|
||||
|
|
@ -1098,7 +1098,7 @@ class DivDispatch {
|
|||
if ((x)<(xMin)) (x)=(xMin); \
|
||||
if ((x)>(xMax)) (x)=(xMax);
|
||||
|
||||
#define NEW_ARP_STRAT (parent->song.linearPitch && !parent->song.oldArpStrategy)
|
||||
#define NEW_ARP_STRAT (parent->song.compatFlags.linearPitch && !parent->song.compatFlags.oldArpStrategy)
|
||||
#define HACKY_LEGATO_MESS chan[c.chan].std.arp.will && !chan[c.chan].std.arp.mode && !NEW_ARP_STRAT
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ const char* DivEngine::getEffectDesc(unsigned char effect, int chan, bool notNul
|
|||
return _("FFxx: Stop song");
|
||||
default:
|
||||
if ((effect&0xf0)==0x90) {
|
||||
if (song.oldSampleOffset) {
|
||||
if (song.compatFlags.oldSampleOffset) {
|
||||
return _("9xxx: Set sample offset*256");
|
||||
}
|
||||
switch (effect) {
|
||||
|
|
@ -205,7 +205,7 @@ const char* DivEngine::getEffectDesc(unsigned char effect, int chan, bool notNul
|
|||
|
||||
void DivEngine::calcSongTimestamps() {
|
||||
if (curSubSong!=NULL) {
|
||||
curSubSong->calcTimestamps(song.chans,song.grooves,song.jumpTreatment,song.ignoreJumpAtEnd,song.brokenSpeedSel,song.delayBehavior);
|
||||
curSubSong->calcTimestamps(song.chans,song.grooves,song.compatFlags.jumpTreatment,song.compatFlags.ignoreJumpAtEnd,song.compatFlags.brokenSpeedSel,song.compatFlags.delayBehavior);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1813,7 +1813,7 @@ int DivEngine::calcBaseFreq(double clock, double divider, int note, bool period)
|
|||
}*/
|
||||
|
||||
double DivEngine::calcBaseFreq(double clock, double divider, int note, bool period) {
|
||||
if (song.linearPitch) { // linear
|
||||
if (song.compatFlags.linearPitch) { // linear
|
||||
return (note<<7);
|
||||
}
|
||||
double base=(period?(song.tuning*0.0625):song.tuning)*pow(2.0,(float)(note+3)/12.0);
|
||||
|
|
@ -1863,7 +1863,7 @@ double DivEngine::calcBaseFreq(double clock, double divider, int note, bool peri
|
|||
return bf|((block)<<(bits));
|
||||
|
||||
int DivEngine::calcBaseFreqFNumBlock(double clock, double divider, int note, int bits, int fixedBlock) {
|
||||
if (song.linearPitch) { // linear
|
||||
if (song.compatFlags.linearPitch) { // linear
|
||||
return (note<<7);
|
||||
}
|
||||
int bf=calcBaseFreq(clock,divider,note,false);
|
||||
|
|
@ -1876,10 +1876,10 @@ int DivEngine::calcBaseFreqFNumBlock(double clock, double divider, int note, int
|
|||
|
||||
int DivEngine::calcFreq(int base, int pitch, int arp, bool arpFixed, bool period, int octave, int pitch2, double clock, double divider, int blockBits, int fixedBlock) {
|
||||
// linear pitch
|
||||
if (song.linearPitch) {
|
||||
if (song.compatFlags.linearPitch) {
|
||||
// do frequency calculation here
|
||||
int nbase=base+pitch+pitch2;
|
||||
if (!song.oldArpStrategy) {
|
||||
if (!song.compatFlags.oldArpStrategy) {
|
||||
if (arpFixed) {
|
||||
nbase=(arp<<7)+pitch+pitch2;
|
||||
} else {
|
||||
|
|
@ -2178,7 +2178,7 @@ void DivEngine::reset() {
|
|||
chan[i].volMax=(disCont[song.dispatchOfChan[i]].dispatch->dispatch(DivCommand(DIV_CMD_GET_VOLMAX,song.dispatchChanOfChan[i]))<<8)|0xff;
|
||||
}
|
||||
chan[i].volume=chan[i].volMax;
|
||||
if (!song.linearPitch) chan[i].vibratoFine=4;
|
||||
if (!song.compatFlags.linearPitch) chan[i].vibratoFine=4;
|
||||
}
|
||||
extValue=0;
|
||||
extValuePresent=0;
|
||||
|
|
@ -2436,7 +2436,7 @@ double DivEngine::getSamplePreviewRate() {
|
|||
}
|
||||
|
||||
double DivEngine::getCenterRate() {
|
||||
return song.oldCenterRate?8363.0:8372.0;
|
||||
return song.compatFlags.oldCenterRate?8363.0:8372.0;
|
||||
}
|
||||
|
||||
String DivEngine::getConfigPath() {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class DivWorkPool;
|
|||
|
||||
#define DIV_UNSTABLE
|
||||
|
||||
#define DIV_VERSION "inf2 - DO NOT SAVE!"
|
||||
#define DIV_VERSION "inf2/dev240 - DO NOT LOAD!"
|
||||
#define DIV_ENGINE_VERSION 240
|
||||
// for imports
|
||||
#define DIV_VERSION_MOD 0xff01
|
||||
|
|
|
|||
|
|
@ -172,56 +172,56 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
|
|||
|
||||
// compatibility flags
|
||||
if (!getConfInt("noDMFCompat",0)) {
|
||||
ds.limitSlides=true;
|
||||
ds.linearPitch=1;
|
||||
ds.loopModality=0;
|
||||
ds.properNoiseLayout=false;
|
||||
ds.waveDutyIsVol=false;
|
||||
ds.compatFlags.limitSlides=true;
|
||||
ds.compatFlags.linearPitch=1;
|
||||
ds.compatFlags.loopModality=0;
|
||||
ds.compatFlags.properNoiseLayout=false;
|
||||
ds.compatFlags.waveDutyIsVol=false;
|
||||
// TODO: WHAT?! geodude.dmf fails when this is true
|
||||
// but isn't that how Defle behaves???
|
||||
ds.resetMacroOnPorta=false;
|
||||
ds.legacyVolumeSlides=true;
|
||||
ds.compatibleArpeggio=true;
|
||||
ds.noteOffResetsSlides=true;
|
||||
ds.targetResetsSlides=true;
|
||||
ds.arpNonPorta=false;
|
||||
ds.algMacroBehavior=false;
|
||||
ds.brokenShortcutSlides=false;
|
||||
ds.ignoreDuplicateSlides=true;
|
||||
ds.brokenDACMode=true;
|
||||
ds.oneTickCut=false;
|
||||
ds.newInsTriggersInPorta=true;
|
||||
ds.arp0Reset=true;
|
||||
ds.brokenSpeedSel=true;
|
||||
ds.noSlidesOnFirstTick=false;
|
||||
ds.rowResetsArpPos=false;
|
||||
ds.ignoreJumpAtEnd=true;
|
||||
ds.buggyPortaAfterSlide=true;
|
||||
ds.gbInsAffectsEnvelope=true;
|
||||
ds.ignoreDACModeOutsideIntendedChannel=false;
|
||||
ds.e1e2AlsoTakePriority=true;
|
||||
ds.fbPortaPause=true;
|
||||
ds.snDutyReset=true;
|
||||
ds.oldOctaveBoundary=false;
|
||||
ds.noOPN2Vol=true;
|
||||
ds.newVolumeScaling=false;
|
||||
ds.volMacroLinger=false;
|
||||
ds.brokenOutVol=true;
|
||||
ds.brokenOutVol2=true;
|
||||
ds.e1e2StopOnSameNote=true;
|
||||
ds.brokenPortaArp=false;
|
||||
ds.snNoLowPeriods=true;
|
||||
ds.disableSampleMacro=true;
|
||||
ds.preNoteNoEffect=true;
|
||||
ds.oldDPCM=true;
|
||||
ds.delayBehavior=0;
|
||||
ds.jumpTreatment=2;
|
||||
ds.oldAlwaysSetVolume=true;
|
||||
ds.compatFlags.resetMacroOnPorta=false;
|
||||
ds.compatFlags.legacyVolumeSlides=true;
|
||||
ds.compatFlags.compatibleArpeggio=true;
|
||||
ds.compatFlags.noteOffResetsSlides=true;
|
||||
ds.compatFlags.targetResetsSlides=true;
|
||||
ds.compatFlags.arpNonPorta=false;
|
||||
ds.compatFlags.algMacroBehavior=false;
|
||||
ds.compatFlags.brokenShortcutSlides=false;
|
||||
ds.compatFlags.ignoreDuplicateSlides=true;
|
||||
ds.compatFlags.brokenDACMode=true;
|
||||
ds.compatFlags.oneTickCut=false;
|
||||
ds.compatFlags.newInsTriggersInPorta=true;
|
||||
ds.compatFlags.arp0Reset=true;
|
||||
ds.compatFlags.brokenSpeedSel=true;
|
||||
ds.compatFlags.noSlidesOnFirstTick=false;
|
||||
ds.compatFlags.rowResetsArpPos=false;
|
||||
ds.compatFlags.ignoreJumpAtEnd=true;
|
||||
ds.compatFlags.buggyPortaAfterSlide=true;
|
||||
ds.compatFlags.gbInsAffectsEnvelope=true;
|
||||
ds.compatFlags.ignoreDACModeOutsideIntendedChannel=false;
|
||||
ds.compatFlags.e1e2AlsoTakePriority=true;
|
||||
ds.compatFlags.fbPortaPause=true;
|
||||
ds.compatFlags.snDutyReset=true;
|
||||
ds.compatFlags.oldOctaveBoundary=false;
|
||||
ds.compatFlags.noOPN2Vol=true;
|
||||
ds.compatFlags.newVolumeScaling=false;
|
||||
ds.compatFlags.volMacroLinger=false;
|
||||
ds.compatFlags.brokenOutVol=true;
|
||||
ds.compatFlags.brokenOutVol2=true;
|
||||
ds.compatFlags.e1e2StopOnSameNote=true;
|
||||
ds.compatFlags.brokenPortaArp=false;
|
||||
ds.compatFlags.snNoLowPeriods=true;
|
||||
ds.compatFlags.disableSampleMacro=true;
|
||||
ds.compatFlags.preNoteNoEffect=true;
|
||||
ds.compatFlags.oldDPCM=true;
|
||||
ds.compatFlags.delayBehavior=0;
|
||||
ds.compatFlags.jumpTreatment=2;
|
||||
ds.compatFlags.oldAlwaysSetVolume=true;
|
||||
|
||||
// 1.1 compat flags
|
||||
if (ds.version>24) {
|
||||
ds.waveDutyIsVol=true;
|
||||
ds.legacyVolumeSlides=false;
|
||||
ds.compatFlags.waveDutyIsVol=true;
|
||||
ds.compatFlags.legacyVolumeSlides=false;
|
||||
}
|
||||
|
||||
// Neo Geo detune is caused by Defle running Neo Geo at the wrong clock.
|
||||
|
|
|
|||
|
|
@ -147,12 +147,12 @@ bool DivEngine::loadFC(unsigned char* file, size_t len) {
|
|||
DivSong ds;
|
||||
ds.tuning=436.0;
|
||||
ds.version=DIV_VERSION_FC;
|
||||
//ds.linearPitch=0;
|
||||
//ds.pitchMacroIsLinear=false;
|
||||
//ds.noSlidesOnFirstTick=true;
|
||||
//ds.rowResetsArpPos=true;
|
||||
ds.pitchSlideSpeed=8;
|
||||
ds.ignoreJumpAtEnd=false;
|
||||
//ds.compatFlags.linearPitch=0;
|
||||
//ds.compatFlags.pitchMacroIsLinear=false;
|
||||
//ds.compatFlags.noSlidesOnFirstTick=true;
|
||||
//ds.compatFlags.rowResetsArpPos=true;
|
||||
ds.compatFlags.pitchSlideSpeed=8;
|
||||
ds.compatFlags.ignoreJumpAtEnd=false;
|
||||
|
||||
// load here
|
||||
if (!reader.seek(0,SEEK_SET)) {
|
||||
|
|
|
|||
|
|
@ -495,7 +495,7 @@ bool DivEngine::loadFTM(unsigned char* file, size_t len, bool dnft, bool dnft_si
|
|||
}
|
||||
ds.subsong.clear();
|
||||
|
||||
ds.linearPitch = 0;
|
||||
ds.compatFlags.linearPitch = 0;
|
||||
|
||||
unsigned int pal = 0;
|
||||
|
||||
|
|
@ -2378,7 +2378,7 @@ bool DivEngine::loadFTM(unsigned char* file, size_t len, bool dnft, bool dnft_si
|
|||
CHECK_BLOCK_VERSION(3);
|
||||
unsigned int linear_pitch = reader.readI();
|
||||
|
||||
ds.linearPitch = linear_pitch == 0 ? 0 : 1;
|
||||
ds.compatFlags.linearPitch = linear_pitch == 0 ? 0 : 1;
|
||||
|
||||
if (blockVersion >= 2) {
|
||||
int fineTuneCents = reader.readC() * 100;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -219,10 +219,10 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
|
|||
try {
|
||||
DivSong ds;
|
||||
ds.version=DIV_VERSION_IT;
|
||||
ds.noSlidesOnFirstTick=true;
|
||||
ds.rowResetsArpPos=true;
|
||||
ds.ignoreJumpAtEnd=false;
|
||||
ds.pitchSlideSpeed=8;
|
||||
ds.compatFlags.noSlidesOnFirstTick=true;
|
||||
ds.compatFlags.rowResetsArpPos=true;
|
||||
ds.compatFlags.ignoreJumpAtEnd=false;
|
||||
ds.compatFlags.pitchSlideSpeed=8;
|
||||
|
||||
logV("Impulse Tracker module");
|
||||
|
||||
|
|
@ -277,9 +277,9 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
|
|||
}
|
||||
|
||||
if (flags&8) {
|
||||
ds.linearPitch=1;
|
||||
ds.compatFlags.linearPitch=1;
|
||||
} else {
|
||||
ds.linearPitch=0;
|
||||
ds.compatFlags.linearPitch=0;
|
||||
}
|
||||
|
||||
unsigned char globalVol=reader.readC();
|
||||
|
|
@ -1667,7 +1667,7 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
|
|||
for (int i=0; i<(maxChan+32)>>5; i++) {
|
||||
ds.system[i]=DIV_SYSTEM_ES5506;
|
||||
ds.systemFlags[i].set("amigaVol",true);
|
||||
if (!ds.linearPitch) {
|
||||
if (!ds.compatFlags.linearPitch) {
|
||||
ds.systemFlags[i].set("amigaPitch",true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,11 +41,11 @@ bool DivEngine::loadMod(unsigned char* file, size_t len) {
|
|||
DivSong ds;
|
||||
ds.tuning=436.0;
|
||||
ds.version=DIV_VERSION_MOD;
|
||||
ds.linearPitch=0;
|
||||
ds.noSlidesOnFirstTick=true;
|
||||
ds.rowResetsArpPos=true;
|
||||
ds.ignoreJumpAtEnd=false;
|
||||
ds.delayBehavior=0;
|
||||
ds.compatFlags.linearPitch=0;
|
||||
ds.compatFlags.noSlidesOnFirstTick=true;
|
||||
ds.compatFlags.rowResetsArpPos=true;
|
||||
ds.compatFlags.ignoreJumpAtEnd=false;
|
||||
ds.compatFlags.delayBehavior=0;
|
||||
|
||||
int insCount=31;
|
||||
bool bypassLimits=false;
|
||||
|
|
|
|||
|
|
@ -79,12 +79,12 @@ bool DivEngine::loadS3M(unsigned char* file, size_t len) {
|
|||
try {
|
||||
DivSong ds;
|
||||
ds.version=DIV_VERSION_S3M;
|
||||
ds.linearPitch=0;
|
||||
ds.pitchMacroIsLinear=false;
|
||||
ds.noSlidesOnFirstTick=true;
|
||||
ds.rowResetsArpPos=true;
|
||||
ds.ignoreJumpAtEnd=false;
|
||||
ds.pitchSlideSpeed=12;
|
||||
ds.compatFlags.linearPitch=0;
|
||||
ds.compatFlags.pitchMacroIsLinear=false;
|
||||
ds.compatFlags.noSlidesOnFirstTick=true;
|
||||
ds.compatFlags.rowResetsArpPos=true;
|
||||
ds.compatFlags.ignoreJumpAtEnd=false;
|
||||
ds.compatFlags.pitchSlideSpeed=12;
|
||||
|
||||
logV("Scream Tracker 3 module");
|
||||
|
||||
|
|
|
|||
|
|
@ -551,7 +551,7 @@ bool DivEngine::loadTFMv1(unsigned char* file, size_t len) {
|
|||
ds.systemLen=1;
|
||||
|
||||
ds.system[0]=DIV_SYSTEM_YM2612;
|
||||
ds.loopModality=1;
|
||||
ds.compatFlags.loopModality=1;
|
||||
|
||||
unsigned char speed=reader.readCNoRLE();
|
||||
unsigned char interleaveFactor=reader.readCNoRLE();
|
||||
|
|
@ -746,7 +746,7 @@ bool DivEngine::loadTFMv2(unsigned char* file, size_t len) {
|
|||
ds.systemLen=1;
|
||||
|
||||
ds.system[0]=DIV_SYSTEM_YM2612;
|
||||
ds.loopModality=1;
|
||||
ds.compatFlags.loopModality=1;
|
||||
|
||||
unsigned char magic[8]={0};
|
||||
|
||||
|
|
|
|||
|
|
@ -207,12 +207,12 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
|||
try {
|
||||
DivSong ds;
|
||||
ds.version=DIV_VERSION_XM;
|
||||
//ds.linearPitch=0;
|
||||
//ds.pitchMacroIsLinear=false;
|
||||
ds.noSlidesOnFirstTick=true;
|
||||
ds.rowResetsArpPos=true;
|
||||
ds.ignoreJumpAtEnd=false;
|
||||
ds.pitchSlideSpeed=8;
|
||||
//ds.compatFlags.linearPitch=0;
|
||||
//ds.compatFlags.pitchMacroIsLinear=false;
|
||||
ds.compatFlags.noSlidesOnFirstTick=true;
|
||||
ds.compatFlags.rowResetsArpPos=true;
|
||||
ds.compatFlags.ignoreJumpAtEnd=false;
|
||||
ds.compatFlags.pitchSlideSpeed=8;
|
||||
|
||||
logV("Extended Module");
|
||||
|
||||
|
|
@ -251,7 +251,7 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
|||
unsigned short totalChans=reader.readS();
|
||||
unsigned short patCount=reader.readS();
|
||||
ds.insLen=(unsigned short)reader.readS();
|
||||
ds.linearPitch=(reader.readS()&1)?1:0;
|
||||
ds.compatFlags.linearPitch=(reader.readS()&1)?1:0;
|
||||
ds.subsong[0]->speeds.val[0]=reader.readS();
|
||||
ds.subsong[0]->speeds.len=1;
|
||||
double bpm=(unsigned short)reader.readS();
|
||||
|
|
@ -304,7 +304,7 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
|||
for (int i=0; i<(totalChans+31)>>5; i++) {
|
||||
ds.system[i]=DIV_SYSTEM_ES5506;
|
||||
ds.systemFlags[i].set("amigaVol",true);
|
||||
ds.systemFlags[i].set("amigaPitch",(ds.linearPitch==0));
|
||||
ds.systemFlags[i].set("amigaPitch",(ds.compatFlags.linearPitch==0));
|
||||
ds.systemFlags[i].set("volScale",3900);
|
||||
}
|
||||
ds.systemLen=(totalChans+31)>>5;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ void DivMacroStruct::prepare(DivInstrumentMacro& source, DivEngine* e) {
|
|||
mode=source.mode;
|
||||
type=(source.open>>1)&3;
|
||||
activeRelease=source.open&8;
|
||||
linger=(source.macroType==DIV_MACRO_VOL && e->song.volMacroLinger);
|
||||
linger=(source.macroType==DIV_MACRO_VOL && e->song.compatFlags.volMacroLinger);
|
||||
lfoPos=LFO_PHASE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -668,7 +668,7 @@ int DivPlatformAmiga::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
chan[c.chan].writeVol=true;
|
||||
}
|
||||
|
|
@ -752,9 +752,9 @@ int DivPlatformAmiga::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_POS:
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ void DivPlatformArcade::tick(bool sysTick) {
|
|||
} else {
|
||||
rWrite(chanOffs[i]+ADDR_LR_FB_ALG,(chan[i].state.alg&7)|(chan[i].state.fb<<3)|((chan[i].chVolL&1)<<6)|((chan[i].chVolR&1)<<7));
|
||||
}
|
||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
if (!parent->song.compatFlags.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
unsigned short baseAddr=chanOffs[i]|opOffs[j];
|
||||
DivInstrumentFM::Operator& op=chan[i].state.op[j];
|
||||
if (isMuted[i] || !op.enable) {
|
||||
|
|
@ -379,7 +379,7 @@ void DivPlatformArcade::tick(bool sysTick) {
|
|||
for (int i=0; i<8; i++) {
|
||||
if (chan[i].freqChanged) {
|
||||
chan[i].freq=chan[i].baseFreq+chan[i].pitch-128+chan[i].pitch2;
|
||||
if (!parent->song.oldArpStrategy) {
|
||||
if (!parent->song.compatFlags.oldArpStrategy) {
|
||||
if (chan[i].fixedArp) {
|
||||
chan[i].freq=(chan[i].baseNoteOverride<<7)+chan[i].pitch-128+chan[i].pitch2;
|
||||
} else {
|
||||
|
|
@ -862,7 +862,7 @@ int DivPlatformArcade::dispatch(DivCommand c) {
|
|||
return 127;
|
||||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_LINEAR(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_LINEAR(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_PRE_NOTE:
|
||||
|
|
|
|||
|
|
@ -716,7 +716,7 @@ int DivPlatformAY8910::dispatch(DivCommand c) {
|
|||
}
|
||||
chan[c.chan].active=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
//chan[c.chan].keyOn=true;
|
||||
|
|
@ -735,7 +735,7 @@ int DivPlatformAY8910::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (!(chan[c.chan].nextPSGMode.val&8)) {
|
||||
|
|
@ -942,9 +942,9 @@ int DivPlatformAY8910::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AY));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AY));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_PRE_NOTE:
|
||||
|
|
|
|||
|
|
@ -544,7 +544,7 @@ int DivPlatformAY8930::dispatch(DivCommand c) {
|
|||
}
|
||||
chan[c.chan].active=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
//chan[c.chan].keyOn=true;
|
||||
|
|
@ -563,7 +563,7 @@ int DivPlatformAY8930::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (!(chan[c.chan].nextPSGMode.val&8)) {
|
||||
|
|
@ -764,9 +764,9 @@ int DivPlatformAY8930::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AY8930));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AY8930));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_PRE_NOTE:
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ int DivPlatformBifurcator::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -250,9 +250,9 @@ int DivPlatformBifurcator::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_BIFURCATOR_STATE_LOAD:
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ int DivPlatformBubSysWSG::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOn=true;
|
||||
rWrite(2+c.chan,(chan[c.chan].wave<<5)|chan[c.chan].vol);
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (chan[c.chan].wave<0) {
|
||||
|
|
@ -243,9 +243,9 @@ int DivPlatformBubSysWSG::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SCC));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SCC));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ int DivPlatformC140::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
chan[c.chan].volChangedL=true;
|
||||
chan[c.chan].volChangedR=true;
|
||||
|
|
@ -445,9 +445,9 @@ int DivPlatformC140::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_POS:
|
||||
|
|
|
|||
|
|
@ -574,12 +574,12 @@ int DivPlatformC64::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta || parent->song.preNoteNoEffect) {
|
||||
if (parent->song.compatFlags.resetMacroOnPorta || parent->song.compatFlags.preNoteNoEffect) {
|
||||
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_C64));
|
||||
chan[c.chan].keyOn=true;
|
||||
}
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_PRE_NOTE:
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ int DivPlatformDave::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].writeVol=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
chan[c.chan].insChanged=false;
|
||||
|
|
@ -471,9 +471,9 @@ int DivPlatformDave::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_DAVE));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_DAVE));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_POS:
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include <math.h>
|
||||
|
||||
#define PITCH_OFFSET ((double)(16*2048*(chanMax+1)))
|
||||
#define NOTE_ES5506(c,note) ((amigaPitch && !parent->song.linearPitch)?parent->calcBaseFreq(COLOR_NTSC*16,chan[c].pcm.freqOffs,note,true):parent->calcBaseFreq(chipClock,chan[c].pcm.freqOffs,note,false))
|
||||
#define NOTE_ES5506(c,note) ((amigaPitch && !parent->song.compatFlags.linearPitch)?parent->calcBaseFreq(COLOR_NTSC*16,chan[c].pcm.freqOffs,note,true):parent->calcBaseFreq(chipClock,chan[c].pcm.freqOffs,note,false))
|
||||
|
||||
#define rWrite(a,...) {if(!skipRegisterWrites) {hostIntf32.push_back(QueuedHostIntf(4,(a),__VA_ARGS__)); }}
|
||||
#define immWrite(a,...) {hostIntf32.push_back(QueuedHostIntf(4,(a),__VA_ARGS__));}
|
||||
|
|
@ -603,7 +603,7 @@ void DivPlatformES5506::tick(bool sysTick) {
|
|||
const unsigned int length=s->samples-1;
|
||||
const unsigned int end=start+(length<<11);
|
||||
const unsigned int nextBank=(offES5506>>22)&3;
|
||||
const double nextFreqOffs=((amigaPitch && !parent->song.linearPitch)?16:PITCH_OFFSET)*off;
|
||||
const double nextFreqOffs=((amigaPitch && !parent->song.compatFlags.linearPitch)?16:PITCH_OFFSET)*off;
|
||||
chan[i].pcm.loopMode=loopMode;
|
||||
chan[i].pcm.bank=nextBank;
|
||||
chan[i].pcm.start=start;
|
||||
|
|
@ -746,7 +746,7 @@ void DivPlatformES5506::tick(bool sysTick) {
|
|||
chan[i].pcm.nextPos=0;
|
||||
}
|
||||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||
if (amigaPitch && !parent->song.linearPitch) {
|
||||
if (amigaPitch && !parent->song.compatFlags.linearPitch) {
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch*16,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,true,2,chan[i].pitch2*16,16*COLOR_NTSC,chan[i].pcm.freqOffs);
|
||||
chan[i].freq=PITCH_OFFSET*(COLOR_NTSC/chan[i].freq)/(chipClock/16.0);
|
||||
chan[i].freq=CLAMP(chan[i].freq,0,0x1ffff);
|
||||
|
|
@ -767,7 +767,7 @@ void DivPlatformES5506::tick(bool sysTick) {
|
|||
}
|
||||
chan[i].pcm.loopStart=(chan[i].pcm.start+(s->loopStart<<11))&0xfffff800;
|
||||
chan[i].pcm.loopEnd=(chan[i].pcm.start+((s->loopEnd)<<11))&0xffffff80;
|
||||
chan[i].pcm.freqOffs=((amigaPitch && !parent->song.linearPitch)?16:PITCH_OFFSET)*off;
|
||||
chan[i].pcm.freqOffs=((amigaPitch && !parent->song.compatFlags.linearPitch)?16:PITCH_OFFSET)*off;
|
||||
unsigned int startPos=chan[i].pcm.direction?chan[i].pcm.end:chan[i].pcm.start;
|
||||
if (chan[i].pcm.nextPos) {
|
||||
const unsigned int start=chan[i].pcm.start;
|
||||
|
|
@ -1212,7 +1212,7 @@ int DivPlatformES5506::dispatch(DivCommand c) {
|
|||
int nextFreq=chan[c.chan].baseFreq;
|
||||
int destFreq=NOTE_ES5506(c.chan,c.value2+chan[c.chan].sampleNoteDelta);
|
||||
bool return2=false;
|
||||
if (amigaPitch && !parent->song.linearPitch) {
|
||||
if (amigaPitch && !parent->song.compatFlags.linearPitch) {
|
||||
c.value*=16;
|
||||
}
|
||||
if (destFreq>nextFreq) {
|
||||
|
|
@ -1244,9 +1244,9 @@ int DivPlatformES5506::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_ES5506));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_ES5506));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||
chan[c.chan].nextNote=chan[c.chan].note;
|
||||
chan[c.chan].noteChanged.note=1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ void DivPlatformESFM::tick(bool sysTick) {
|
|||
if (chan[i].freqChanged) {
|
||||
int mul=2;
|
||||
int fixedBlock=chan[i].state.fm.block;
|
||||
if (!parent->song.linearPitch) {
|
||||
if (!parent->song.compatFlags.linearPitch) {
|
||||
mul=octave(chan[i].baseFreq,fixedBlock)*2;
|
||||
}
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,mul,chan[i].pitch2,chipClock,CHIP_FREQBASE);
|
||||
|
|
@ -569,7 +569,7 @@ int DivPlatformESFM::dispatch(DivCommand c) {
|
|||
bool return2=false;
|
||||
int mul=1;
|
||||
int fixedBlock=0;
|
||||
if (!parent->song.linearPitch) {
|
||||
if (!parent->song.compatFlags.linearPitch) {
|
||||
fixedBlock=chan[c.chan].state.fm.block;
|
||||
mul=octave(chan[c.chan].baseFreq,fixedBlock);
|
||||
}
|
||||
|
|
@ -586,7 +586,7 @@ int DivPlatformESFM::dispatch(DivCommand c) {
|
|||
return2=true;
|
||||
}
|
||||
}
|
||||
if (!chan[c.chan].portaPause && !parent->song.linearPitch) {
|
||||
if (!chan[c.chan].portaPause && !parent->song.compatFlags.linearPitch) {
|
||||
if (mul!=octave(newFreq,fixedBlock)) {
|
||||
chan[c.chan].portaPause=true;
|
||||
break;
|
||||
|
|
@ -987,7 +987,7 @@ int DivPlatformESFM::dispatch(DivCommand c) {
|
|||
return 63;
|
||||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||
chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
}
|
||||
chan[c.chan].inPorta=c.value;
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ void DivPlatformFDS::tick(bool sysTick) {
|
|||
if (chan[i].std.duty.had) {
|
||||
chan[i].duty=chan[i].std.duty.val;
|
||||
if (i==3) {
|
||||
if (parent->song.properNoiseLayout) {
|
||||
if (parent->song.compatFlags.properNoiseLayout) {
|
||||
chan[i].duty&=1;
|
||||
} else if (chan[i].duty>1) {
|
||||
chan[i].duty=1;
|
||||
|
|
@ -264,7 +264,7 @@ int DivPlatformFDS::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (chan[c.chan].wave<0) {
|
||||
|
|
@ -390,9 +390,9 @@ int DivPlatformFDS::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_FDS));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_FDS));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
int newFreq; \
|
||||
bool return2=false; \
|
||||
if (_targetChan.portaPause) { \
|
||||
if (parent->song.oldOctaveBoundary) { \
|
||||
if (parent->song.compatFlags.oldOctaveBoundary) { \
|
||||
if ((_targetChan.portaPauseFreq&0xf800)>(_targetChan.baseFreq&0xf800)) { \
|
||||
_targetChan.baseFreq=((_targetChan.baseFreq&0x7ff)>>1)|(_targetChan.portaPauseFreq&0xf800); \
|
||||
} else { \
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
/* what the heck! */ \
|
||||
if (!_targetChan.portaPause) { \
|
||||
if ((newFreq&0x7ff)>boundaryTop && (newFreq&0xf800)<0x3800) { \
|
||||
if (parent->song.fbPortaPause) { \
|
||||
if (parent->song.compatFlags.fbPortaPause) { \
|
||||
_targetChan.portaPauseFreq=(boundaryBottom)|((newFreq+0x800)&0xf800); \
|
||||
_targetChan.portaPause=true; \
|
||||
break; \
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
} \
|
||||
} \
|
||||
if ((newFreq&0x7ff)<boundaryBottom && (newFreq&0xf800)>0) { \
|
||||
if (parent->song.fbPortaPause) { \
|
||||
if (parent->song.compatFlags.fbPortaPause) { \
|
||||
_targetChan.portaPauseFreq=newFreq=(boundaryTop-1)|((newFreq-0x800)&0xf800); \
|
||||
_targetChan.portaPause=true; \
|
||||
break; \
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ int DivPlatformGA20::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
chan[c.chan].volumeChanged=true;
|
||||
}
|
||||
|
|
@ -332,9 +332,9 @@ int DivPlatformGA20::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_POS:
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ void DivPlatformGB::tick(bool sysTick) {
|
|||
if (i!=2) {
|
||||
rWrite(16+i*5+1,((chan[i].duty&3)<<6)|(63-(chan[i].soundLen&63)));
|
||||
} else if (!chan[i].softEnv) {
|
||||
if (parent->song.waveDutyIsVol) {
|
||||
if (parent->song.compatFlags.waveDutyIsVol) {
|
||||
rWrite(16+i*5+2,(model==GB_MODEL_AGB_NATIVE?gbVolMapEx:gbVolMap)[(chan[i].std.duty.val&3)<<2]);
|
||||
}
|
||||
}
|
||||
|
|
@ -439,7 +439,7 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
|||
chan[c.chan].outVol=chan[c.chan].envVol;
|
||||
}
|
||||
} else if (chan[c.chan].softEnv && c.chan!=2) {
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
chan[c.chan].envVol=chan[c.chan].outVol;
|
||||
}
|
||||
|
|
@ -478,7 +478,7 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
|||
chan[c.chan].soundLen=ins->gb.soundLen;
|
||||
chan[c.chan].vol=chan[c.chan].envVol;
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
if (parent->song.gbInsAffectsEnvelope) {
|
||||
if (parent->song.compatFlags.gbInsAffectsEnvelope) {
|
||||
rWrite(16+c.chan*5+2,((chan[c.chan].vol<<4))|(chan[c.chan].envLen&7)|((chan[c.chan].envDir&1)<<3));
|
||||
}
|
||||
}
|
||||
|
|
@ -567,9 +567,9 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_GB));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_GB));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GB_SWEEP_DIR:
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ int DivPlatformGBADMA::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].envVol=2;
|
||||
}
|
||||
if (chan[c.chan].useWave) {
|
||||
|
|
@ -321,7 +321,7 @@ int DivPlatformGBADMA::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
}
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ int DivPlatformGBAMinMod::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -503,9 +503,9 @@ int DivPlatformGBAMinMod::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_POS:
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ void DivPlatformGenesis::processDAC(int iRate) {
|
|||
if (chan[i].dacSample!=-1) {
|
||||
DivSample* s=parent->getSample(chan[i].dacSample);
|
||||
if (!isMuted[i] && s->samples>0 && chan[i].dacPos<s->samples) {
|
||||
if (parent->song.noOPN2Vol) {
|
||||
if (parent->song.compatFlags.noOPN2Vol) {
|
||||
chan[i].dacOutput=s->data8[chan[i].dacDirection?(s->samples-chan[i].dacPos-1):chan[i].dacPos];
|
||||
} else {
|
||||
chan[i].dacOutput=(s->data8[chan[i].dacDirection?(s->samples-chan[i].dacPos-1):chan[i].dacPos]*dacVolTable[chan[i].outVol])>>7;
|
||||
|
|
@ -110,7 +110,7 @@ void DivPlatformGenesis::processDAC(int iRate) {
|
|||
if (s->samples>0 && chan[5].dacPos<s->samples) {
|
||||
if (!isMuted[5]) {
|
||||
int sample;
|
||||
if (parent->song.noOPN2Vol) {
|
||||
if (parent->song.compatFlags.noOPN2Vol) {
|
||||
sample=s->data8[chan[5].dacDirection?(s->samples-chan[5].dacPos-1):chan[5].dacPos];
|
||||
} else {
|
||||
sample=(s->data8[chan[5].dacDirection?(s->samples-chan[5].dacPos-1):chan[5].dacPos]*dacVolTable[chan[5].outVol])>>7;
|
||||
|
|
@ -122,7 +122,7 @@ void DivPlatformGenesis::processDAC(int iRate) {
|
|||
chan[5].dacPos=s->loopStart;
|
||||
} else if (chan[5].dacPos>=s->samples) {
|
||||
chan[5].dacSample=-1;
|
||||
if (parent->song.brokenDACMode) {
|
||||
if (parent->song.compatFlags.brokenDACMode) {
|
||||
rWrite(0x2b,0);
|
||||
}
|
||||
}
|
||||
|
|
@ -768,7 +768,7 @@ void DivPlatformGenesis::tick(bool sysTick) {
|
|||
if (chan[i].std.alg.had) {
|
||||
chan[i].state.alg=chan[i].std.alg.val;
|
||||
rWrite(chanOffs[i]+ADDR_FB_ALG,(chan[i].state.alg&7)|(chan[i].state.fb<<3));
|
||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
if (!parent->song.compatFlags.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
unsigned short baseAddr=chanOffs[i]|opOffs[j];
|
||||
DivInstrumentFM::Operator& op=chan[i].state.op[j];
|
||||
if (isMuted[i] || !op.enable) {
|
||||
|
|
@ -863,7 +863,7 @@ void DivPlatformGenesis::tick(bool sysTick) {
|
|||
|
||||
for (int i=0; i<512; i++) {
|
||||
if (pendingWrites[i]!=oldWrites[i]) {
|
||||
if (i==0x2b && pendingWrites[i]!=0 && !parent->song.brokenDACMode) {
|
||||
if (i==0x2b && pendingWrites[i]!=0 && !parent->song.compatFlags.brokenDACMode) {
|
||||
if (chan[5].keyOn) chan[5].keyOn=false;
|
||||
chan[5].keyOff=true;
|
||||
}
|
||||
|
|
@ -894,7 +894,7 @@ void DivPlatformGenesis::tick(bool sysTick) {
|
|||
for (int i=0; i<csmChan; i++) {
|
||||
if (i==2 && extMode) continue;
|
||||
if (chan[i].freqChanged) {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,2,chan[i].pitch2,chipClock,CHIP_FREQBASE,11,chan[i].state.block);
|
||||
} else {
|
||||
int fNum=parent->calcFreq(chan[i].baseFreq&0x7ff,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,2,chan[i].pitch2,chipClock,CHIP_FREQBASE,11);
|
||||
|
|
@ -1131,7 +1131,7 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
|
|||
if (c.chan>=5 && c.chan<csmChan) {
|
||||
chan[c.chan].dacSample=-1;
|
||||
if (dumpWrites) addWrite(0xffff0002,0);
|
||||
if (parent->song.brokenDACMode) {
|
||||
if (parent->song.compatFlags.brokenDACMode) {
|
||||
rWrite(0x2b,0);
|
||||
if (chan[c.chan].dacMode) break;
|
||||
}
|
||||
|
|
@ -1200,7 +1200,7 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
|
|||
break;
|
||||
}
|
||||
case DIV_CMD_NOTE_PORTA: {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
int destFreq=NOTE_FREQUENCY(c.value2+chan[c.chan].sampleNoteDelta);
|
||||
bool return2=false;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
|
|||
} else {
|
||||
opChan[ch].pan=(c.value2>0)|((c.value>0)<<1);
|
||||
}
|
||||
if (parent->song.sharedExtStat) {
|
||||
if (parent->song.compatFlags.sharedExtStat) {
|
||||
for (int i=0; i<4; i++) {
|
||||
if (ch==i) continue;
|
||||
opChan[i].pan=opChan[ch].pan;
|
||||
|
|
@ -169,7 +169,7 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
|
|||
break;
|
||||
}
|
||||
case DIV_CMD_NOTE_PORTA: {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
int destFreq=NOTE_FREQUENCY(c.value2);
|
||||
bool return2=false;
|
||||
if (destFreq>opChan[ch].baseFreq) {
|
||||
|
|
@ -197,7 +197,7 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_SAMPLE_MODE: {
|
||||
// not ignored actually!
|
||||
if (!parent->song.ignoreDACModeOutsideIntendedChannel) {
|
||||
if (!parent->song.compatFlags.ignoreDACModeOutsideIntendedChannel) {
|
||||
chan[5].dacMode=c.value;
|
||||
rWrite(0x2b,c.value<<7);
|
||||
}
|
||||
|
|
@ -547,7 +547,7 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
|
|||
if (opChan[i].std.alg.had) {
|
||||
chan[extChanOffs].state.alg=opChan[i].std.alg.val;
|
||||
rWrite(chanOffs[extChanOffs]+ADDR_FB_ALG,(chan[extChanOffs].state.alg&7)|(chan[extChanOffs].state.fb<<3));
|
||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
if (!parent->song.compatFlags.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[j];
|
||||
DivInstrumentFM::Operator& op=chan[extChanOffs].state.op[j];
|
||||
if (isOpMuted[j] || !op.enable) {
|
||||
|
|
@ -578,7 +578,7 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
|
|||
|
||||
if (opChan[i].std.panL.had) {
|
||||
opChan[i].pan=opChan[i].std.panL.val&3;
|
||||
if (parent->song.sharedExtStat) {
|
||||
if (parent->song.compatFlags.sharedExtStat) {
|
||||
for (int j=0; j<4; j++) {
|
||||
if (i==j) continue;
|
||||
opChan[j].pan=opChan[i].pan;
|
||||
|
|
@ -648,7 +648,7 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
|
|||
unsigned char hardResetMask=0;
|
||||
if (extMode) for (int i=0; i<4; i++) {
|
||||
if (opChan[i].freqChanged) {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
opChan[i].freq=parent->calcFreq(opChan[i].baseFreq,opChan[i].pitch,opChan[i].fixedArp?opChan[i].baseNoteOverride:opChan[i].arpOff,opChan[i].fixedArp,false,2,opChan[i].pitch2,chipClock,CHIP_FREQBASE,11,chan[extChanOffs].state.block);
|
||||
} else {
|
||||
int fNum=parent->calcFreq(opChan[i].baseFreq&0x7ff,opChan[i].pitch,opChan[i].fixedArp?opChan[i].baseNoteOverride:opChan[i].arpOff,opChan[i].fixedArp,false,2,opChan[i].pitch2);
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ int DivPlatformK007232::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
if (!isMuted[c.chan]) {
|
||||
chan[c.chan].volumeChanged=true;
|
||||
|
|
@ -405,9 +405,9 @@ int DivPlatformK007232::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_POS:
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ int DivPlatformK053260::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -331,9 +331,9 @@ int DivPlatformK053260::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_POS:
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ int DivPlatformLynx::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
WRITE_VOLUME(c.chan,(isMuted[c.chan]?0:(chan[c.chan].vol&127)));
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -429,7 +429,7 @@ int DivPlatformLynx::dispatch(DivCommand c) {
|
|||
}
|
||||
}
|
||||
chan[c.chan].freqChanged=true;
|
||||
if (chan[c.chan].pcm && parent->song.linearPitch) {
|
||||
if (chan[c.chan].pcm && parent->song.compatFlags.linearPitch) {
|
||||
chan[c.chan].sampleBaseFreq=chan[c.chan].baseFreq;
|
||||
}
|
||||
if (return2) {
|
||||
|
|
@ -451,9 +451,9 @@ int DivPlatformLynx::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_MIKEY));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_MIKEY));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_POS:
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ int DivPlatformMMC5::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_STD));
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
rWrite(0x5000+c.chan*4,0x30|chan[c.chan].vol|((chan[c.chan].duty&3)<<6));
|
||||
|
|
@ -313,9 +313,9 @@ int DivPlatformMMC5::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_STD));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_STD));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ void DivPlatformMSM5232::tick(bool sysTick) {
|
|||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||
//DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_PCE);
|
||||
chan[i].freq=chan[i].baseFreq+chan[i].pitch+chan[i].pitch2-(12<<7);
|
||||
if (!parent->song.oldArpStrategy) {
|
||||
if (!parent->song.compatFlags.oldArpStrategy) {
|
||||
if (chan[i].fixedArp) {
|
||||
chan[i].freq=(chan[i].baseNoteOverride<<7)+(chan[i].pitch)-(12<<7);
|
||||
} else {
|
||||
|
|
@ -206,7 +206,7 @@ int DivPlatformMSM5232::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
chan[c.chan].insChanged=false;
|
||||
|
|
@ -249,13 +249,13 @@ int DivPlatformMSM5232::dispatch(DivCommand c) {
|
|||
int destFreq=NOTE_LINEAR(c.value2);
|
||||
bool return2=false;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
chan[c.chan].baseFreq+=c.value*parent->song.pitchSlideSpeed;
|
||||
chan[c.chan].baseFreq+=c.value*parent->song.compatFlags.pitchSlideSpeed;
|
||||
if (chan[c.chan].baseFreq>=destFreq) {
|
||||
chan[c.chan].baseFreq=destFreq;
|
||||
return2=true;
|
||||
}
|
||||
} else {
|
||||
chan[c.chan].baseFreq-=c.value*parent->song.pitchSlideSpeed;
|
||||
chan[c.chan].baseFreq-=c.value*parent->song.compatFlags.pitchSlideSpeed;
|
||||
if (chan[c.chan].baseFreq<=destFreq) {
|
||||
chan[c.chan].baseFreq=destFreq;
|
||||
return2=true;
|
||||
|
|
@ -291,9 +291,9 @@ int DivPlatformMSM5232::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_PCE));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_PCE));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_LINEAR(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_LINEAR(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ void DivPlatformMSM6258::acquire(short** buf, size_t len) {
|
|||
|
||||
void DivPlatformMSM6258::tick(bool sysTick) {
|
||||
for (int i=0; i<1; i++) {
|
||||
if (!parent->song.disableSampleMacro) {
|
||||
if (!parent->song.compatFlags.disableSampleMacro) {
|
||||
chan[i].std.next();
|
||||
if (chan[i].std.duty.had) {
|
||||
if (rateSel!=(chan[i].std.duty.val&3)) {
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ void DivPlatformMSM6295::acquire(short** buf, size_t len) {
|
|||
|
||||
void DivPlatformMSM6295::tick(bool sysTick) {
|
||||
for (int i=0; i<4; i++) {
|
||||
if (!parent->song.disableSampleMacro) {
|
||||
if (!parent->song.compatFlags.disableSampleMacro) {
|
||||
chan[i].std.next();
|
||||
if (chan[i].std.vol.had) {
|
||||
chan[i].outVol=VOL_SCALE_LOG_BROKEN(chan[i].std.vol.val,chan[i].vol,8);
|
||||
|
|
|
|||
|
|
@ -389,9 +389,9 @@ int DivPlatformMultiPCM::dispatch(DivCommand c) {
|
|||
return 127;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_MULTIPCM));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_MULTIPCM));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||
chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
}
|
||||
chan[c.chan].inPorta=c.value;
|
||||
|
|
|
|||
|
|
@ -386,13 +386,13 @@ int DivPlatformN163::dispatch(DivCommand c) {
|
|||
int destFreq=destFreqD;
|
||||
bool return2=false;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
chan[c.chan].baseFreq+=c.value*((parent->song.linearPitch)?1:16);
|
||||
chan[c.chan].baseFreq+=c.value*((parent->song.compatFlags.linearPitch)?1:16);
|
||||
if (chan[c.chan].baseFreq>=destFreq) {
|
||||
chan[c.chan].baseFreq=destFreq;
|
||||
return2=true;
|
||||
}
|
||||
} else {
|
||||
chan[c.chan].baseFreq-=c.value*((parent->song.linearPitch)?1:16);
|
||||
chan[c.chan].baseFreq-=c.value*((parent->song.compatFlags.linearPitch)?1:16);
|
||||
if (chan[c.chan].baseFreq<=destFreq) {
|
||||
chan[c.chan].baseFreq=destFreq;
|
||||
return2=true;
|
||||
|
|
@ -456,12 +456,12 @@ int DivPlatformN163::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) {
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) {
|
||||
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_N163));
|
||||
chan[c.chan].keyOn=true;
|
||||
}
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ int DivPlatformNamcoWSG::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (chan[c.chan].wave<0) {
|
||||
|
|
@ -406,13 +406,13 @@ int DivPlatformNamcoWSG::dispatch(DivCommand c) {
|
|||
int destFreq=NOTE_FREQUENCY(c.value2);
|
||||
bool return2=false;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
chan[c.chan].baseFreq+=c.value*((parent->song.linearPitch)?1:8);
|
||||
chan[c.chan].baseFreq+=c.value*((parent->song.compatFlags.linearPitch)?1:8);
|
||||
if (chan[c.chan].baseFreq>=destFreq) {
|
||||
chan[c.chan].baseFreq=destFreq;
|
||||
return2=true;
|
||||
}
|
||||
} else {
|
||||
chan[c.chan].baseFreq-=c.value*((parent->song.linearPitch)?1:8);
|
||||
chan[c.chan].baseFreq-=c.value*((parent->song.compatFlags.linearPitch)?1:8);
|
||||
if (chan[c.chan].baseFreq<=destFreq) {
|
||||
chan[c.chan].baseFreq=destFreq;
|
||||
return2=true;
|
||||
|
|
@ -440,9 +440,9 @@ int DivPlatformNamcoWSG::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_PCE));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_PCE));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ int DivPlatformNDS::dispatch(DivCommand c) {
|
|||
chan[c.chan].busy=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -422,9 +422,9 @@ int DivPlatformNDS::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_NDS));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_NDS));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_POS:
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ void DivPlatformNES::tick(bool sysTick) {
|
|||
if (chan[i].std.duty.had) {
|
||||
chan[i].duty=chan[i].std.duty.val;
|
||||
if (i==3) {
|
||||
if (parent->song.properNoiseLayout) {
|
||||
if (parent->song.compatFlags.properNoiseLayout) {
|
||||
chan[i].duty&=1;
|
||||
} else if (chan[i].duty>1) {
|
||||
chan[i].duty=1;
|
||||
|
|
@ -372,7 +372,7 @@ void DivPlatformNES::tick(bool sysTick) {
|
|||
ntPos+=chan[i].pitch2;
|
||||
if (isE) {
|
||||
chan[i].freq=31-(ntPos&31);
|
||||
} else if (parent->song.properNoiseLayout) {
|
||||
} else if (parent->song.compatFlags.properNoiseLayout) {
|
||||
chan[i].freq=15-(ntPos&15);
|
||||
} else {
|
||||
if (ntPos<0) ntPos=0;
|
||||
|
|
@ -578,12 +578,12 @@ int DivPlatformNES::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_NES));
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (c.chan==2) {
|
||||
rWrite(0x4000+c.chan*4,linearCount);
|
||||
} else if (!parent->song.brokenOutVol2) {
|
||||
} else if (!parent->song.compatFlags.brokenOutVol2) {
|
||||
rWrite(0x4000+c.chan*4,(chan[c.chan].envMode<<4)|chan[c.chan].vol|((chan[c.chan].duty&3)<<6));
|
||||
}
|
||||
if (resetSweep && c.chan<2) {
|
||||
|
|
@ -752,9 +752,9 @@ int DivPlatformNES::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_NES));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_NES));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -1515,7 +1515,7 @@ void DivPlatformOPL::tick(bool sysTick) {
|
|||
if (chan[i].freqChanged) {
|
||||
int mul=2;
|
||||
int fixedBlock=chan[i].state.block;
|
||||
if (!parent->song.linearPitch) {
|
||||
if (!parent->song.compatFlags.linearPitch) {
|
||||
mul=octave(chan[i].baseFreq,fixedBlock)*2;
|
||||
}
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,mul,chan[i].pitch2,chipClock,CHIP_FREQBASE);
|
||||
|
|
@ -2082,7 +2082,7 @@ int DivPlatformOPL::dispatch(DivCommand c) {
|
|||
bool return2=false;
|
||||
int mul=1;
|
||||
int fixedBlock=0;
|
||||
if (!parent->song.linearPitch) {
|
||||
if (!parent->song.compatFlags.linearPitch) {
|
||||
fixedBlock=chan[c.chan].state.block;
|
||||
mul=octave(chan[c.chan].baseFreq,fixedBlock);
|
||||
}
|
||||
|
|
@ -2099,7 +2099,7 @@ int DivPlatformOPL::dispatch(DivCommand c) {
|
|||
return2=true;
|
||||
}
|
||||
}
|
||||
if (!chan[c.chan].portaPause && !parent->song.linearPitch) {
|
||||
if (!chan[c.chan].portaPause && !parent->song.compatFlags.linearPitch) {
|
||||
if (mul!=octave(newFreq,fixedBlock)) {
|
||||
chan[c.chan].portaPause=true;
|
||||
break;
|
||||
|
|
@ -2583,9 +2583,9 @@ int DivPlatformOPL::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (PCM_CHECK(c.chan) && chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_MULTIPCM));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_MULTIPCM));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||
chan[c.chan].baseFreq=(PCM_CHECK(c.chan))?NOTE_PCM(chan[c.chan].note):
|
||||
((c.chan==adpcmChan)?(NOTE_ADPCMB(chan[c.chan].note)):(NOTE_FREQUENCY(chan[c.chan].note)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ void DivPlatformOPLL::tick(bool sysTick) {
|
|||
if (chan[i].freqChanged) {
|
||||
int mul=2;
|
||||
int fixedBlock=chan[i].state.block;
|
||||
if (!parent->song.linearPitch) {
|
||||
if (!parent->song.compatFlags.linearPitch) {
|
||||
mul=octave(chan[i].baseFreq,fixedBlock)*2;
|
||||
}
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,mul,chan[i].pitch2,chipClock,CHIP_FREQBASE);
|
||||
|
|
@ -684,7 +684,7 @@ int DivPlatformOPLL::dispatch(DivCommand c) {
|
|||
bool return2=false;
|
||||
int mul=1;
|
||||
int fixedBlock=0;
|
||||
if (!parent->song.linearPitch) {
|
||||
if (!parent->song.compatFlags.linearPitch) {
|
||||
fixedBlock=chan[c.chan].state.block;
|
||||
mul=octave(chan[c.chan].baseFreq,fixedBlock);
|
||||
}
|
||||
|
|
@ -956,7 +956,7 @@ int DivPlatformOPLL::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (c.chan>=9 && !properDrums) return 0;
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_PRE_NOTE:
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ void DivPlatformPCE::acquireDirect(blip_buffer_t** bb, size_t len) {
|
|||
signed char dacData=((signed char)((unsigned char)s->data8[chan[i].dacPos]^0x80))>>3;
|
||||
chan[i].dacOut=CLAMP(dacData,-16,15);
|
||||
if (!isMuted[i]) {
|
||||
chWrite(i,0x04,parent->song.disableSampleMacro?0xdf:(0xc0|chan[i].outVol));
|
||||
chWrite(i,0x04,parent->song.compatFlags.disableSampleMacro?0xdf:(0xc0|chan[i].outVol));
|
||||
chWrite(i,0x06,chan[i].dacOut&0x1f);
|
||||
} else {
|
||||
chWrite(i,0x04,0xc0);
|
||||
|
|
@ -233,7 +233,7 @@ void DivPlatformPCE::tick(bool sysTick) {
|
|||
chan[i].dacPos=0;
|
||||
}
|
||||
chan[i].dacPeriod=0;
|
||||
chWrite(i,0x04,parent->song.disableSampleMacro?0xdf:(0xc0|chan[i].vol));
|
||||
chWrite(i,0x04,parent->song.compatFlags.disableSampleMacro?0xdf:(0xc0|chan[i].vol));
|
||||
addWrite(0xffff0000+(i<<8),chan[i].dacSample);
|
||||
chan[i].keyOn=true;
|
||||
}
|
||||
|
|
@ -269,11 +269,11 @@ void DivPlatformPCE::tick(bool sysTick) {
|
|||
|
||||
if (i>=4) {
|
||||
int noiseSeek=(chan[i].fixedArp?chan[i].baseNoteOverride:(chan[i].note+chan[i].arpOff))+chan[i].pitch2;
|
||||
if (!parent->song.properNoiseLayout && noiseSeek<0) noiseSeek=0;
|
||||
if (!parent->song.compatFlags.properNoiseLayout && noiseSeek<0) noiseSeek=0;
|
||||
if (!NEW_ARP_STRAT) {
|
||||
noiseSeek=chan[i].noiseSeek;
|
||||
}
|
||||
chWrite(i,0x07,chan[i].noise?(0x80|(parent->song.properNoiseLayout?(noiseSeek&31):noiseFreq[noiseSeek%12])):0);
|
||||
chWrite(i,0x07,chan[i].noise?(0x80|(parent->song.compatFlags.properNoiseLayout?(noiseSeek&31):noiseFreq[noiseSeek%12])):0);
|
||||
}
|
||||
if (chan[i].keyOn) {
|
||||
//rWrite(16+i*5,0x80);
|
||||
|
|
@ -324,7 +324,7 @@ int DivPlatformPCE::dispatch(DivCommand c) {
|
|||
break;
|
||||
} else {
|
||||
if (dumpWrites) {
|
||||
chWrite(c.chan,0x04,parent->song.disableSampleMacro?0xdf:(0xc0|chan[c.chan].vol));
|
||||
chWrite(c.chan,0x04,parent->song.compatFlags.disableSampleMacro?0xdf:(0xc0|chan[c.chan].vol));
|
||||
addWrite(0xffff0000+(c.chan<<8),chan[c.chan].dacSample);
|
||||
}
|
||||
}
|
||||
|
|
@ -341,7 +341,7 @@ int DivPlatformPCE::dispatch(DivCommand c) {
|
|||
}
|
||||
chan[c.chan].active=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -359,7 +359,7 @@ int DivPlatformPCE::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOn=true;
|
||||
chWrite(c.chan,0x04,0x80|chan[c.chan].vol);
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (chan[c.chan].wave<0) {
|
||||
|
|
@ -476,9 +476,9 @@ int DivPlatformPCE::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_PCE));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_PCE));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
@ -503,7 +503,7 @@ void DivPlatformPCE::muteChannel(int ch, bool mute) {
|
|||
isMuted[ch]=mute;
|
||||
chWrite(ch,0x05,isMuted[ch]?0:chan[ch].pan);
|
||||
if (!isMuted[ch] && (chan[ch].pcm && chan[ch].dacSample!=-1)) {
|
||||
chWrite(ch,0x04,parent->song.disableSampleMacro?0xdf:(0xc0|chan[ch].outVol));
|
||||
chWrite(ch,0x04,parent->song.compatFlags.disableSampleMacro?0xdf:(0xc0|chan[ch].outVol));
|
||||
chWrite(ch,0x06,chan[ch].dacOut&0x1f);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ int DivPlatformPCMDAC::dispatch(DivCommand c) {
|
|||
chan[0].active=true;
|
||||
chan[0].keyOn=true;
|
||||
chan[0].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[0].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[0].std.vol.will) {
|
||||
chan[0].envVol=64;
|
||||
}
|
||||
if (chan[0].useWave) {
|
||||
|
|
@ -446,7 +446,7 @@ int DivPlatformPCMDAC::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[0].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[0].macroInit(parent->getIns(chan[0].ins,DIV_INS_AMIGA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[0].macroInit(parent->getIns(chan[0].ins,DIV_INS_AMIGA));
|
||||
}
|
||||
chan[0].inPorta=c.value;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ int DivPlatformPCSpeaker::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_BEEPER));
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -537,9 +537,9 @@ int DivPlatformPCSpeaker::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_BEEPER));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_BEEPER));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ int DivPlatformPET::dispatch(DivCommand c) {
|
|||
chan[0].active=true;
|
||||
chan[0].keyOn=true;
|
||||
chan[0].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[0].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[0].std.vol.will) {
|
||||
chan[0].outVol=chan[0].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -227,9 +227,9 @@ int DivPlatformPET::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[0].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[0].macroInit(parent->getIns(chan[0].ins,DIV_INS_PET));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[0].macroInit(parent->getIns(chan[0].ins,DIV_INS_PET));
|
||||
}
|
||||
if (!chan[0].inPorta && c.value && !parent->song.brokenPortaArp && chan[0].std.arp.will && !NEW_ARP_STRAT) chan[0].baseFreq=NOTE_PERIODIC(chan[0].note);
|
||||
if (!chan[0].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[0].std.arp.will && !NEW_ARP_STRAT) chan[0].baseFreq=NOTE_PERIODIC(chan[0].note);
|
||||
chan[0].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ int DivPlatformPokeMini::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_POKEMINI));
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -241,9 +241,9 @@ int DivPlatformPokeMini::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_POKEMINI));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_POKEMINI));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ void DivPlatformPOKEY::tick(bool sysTick) {
|
|||
|
||||
for (int i=0; i<4; i++) {
|
||||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,parent->song.linearPitch?chan[i].pitch:0,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,true,0,parent->song.linearPitch?chan[i].pitch2:0,chipClock,CHIP_DIVIDER);
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,parent->song.compatFlags.linearPitch?chan[i].pitch:0,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,true,0,parent->song.compatFlags.linearPitch?chan[i].pitch2:0,chipClock,CHIP_DIVIDER);
|
||||
|
||||
if ((i==0 && !(audctl&64)) || (i==2 && !(audctl&32)) || i==1 || i==3) {
|
||||
chan[i].freq/=7;
|
||||
|
|
@ -223,7 +223,7 @@ void DivPlatformPOKEY::tick(bool sysTick) {
|
|||
}
|
||||
|
||||
// non-linear pitch
|
||||
if (!parent->song.linearPitch) {
|
||||
if (!parent->song.compatFlags.linearPitch) {
|
||||
chan[i].freq-=chan[i].pitch;
|
||||
}
|
||||
|
||||
|
|
@ -297,7 +297,7 @@ int DivPlatformPOKEY::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
chan[c.chan].ctlChanged=true;
|
||||
}
|
||||
|
|
@ -383,9 +383,9 @@ int DivPlatformPOKEY::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_POKEY));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_POKEY));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ int DivPlatformPong::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_BEEPER));
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -168,9 +168,9 @@ int DivPlatformPong::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_BEEPER));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_BEEPER));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ int DivPlatformPowerNoise::dispatch(DivCommand c) {
|
|||
}
|
||||
chan[c.chan].active=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
chan[c.chan].keyOn=true;
|
||||
|
|
@ -372,9 +372,9 @@ int DivPlatformPowerNoise::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA: {
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_POWERNOISE));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_POWERNOISE));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||
chan[c.chan].baseFreq=NOTE_PERIODIC(c.value);
|
||||
}
|
||||
chan[c.chan].inPorta=c.value;
|
||||
|
|
|
|||
|
|
@ -182,9 +182,9 @@ int DivPlatformPV1000::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_PV1000));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_PV1000));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ int DivPlatformQSound::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].keyOff=false;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
if (chan[c.chan].isNewQSound) {
|
||||
chan[c.chan].resVol=(chan[c.chan].outVol*16383)/255;
|
||||
|
|
@ -594,9 +594,9 @@ int DivPlatformQSound::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=QS_NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=QS_NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_POS:
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ int DivPlatformRF5C68::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -284,9 +284,9 @@ int DivPlatformRF5C68::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_POS:
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ int DivPlatformSAA1099::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (isMuted[c.chan]) {
|
||||
|
|
@ -261,13 +261,13 @@ int DivPlatformSAA1099::dispatch(DivCommand c) {
|
|||
int destFreq=NOTE_PERIODIC(c.value2);
|
||||
bool return2=false;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
chan[c.chan].baseFreq+=c.value*((parent->song.linearPitch)?1:(8-chan[c.chan].freqH));
|
||||
chan[c.chan].baseFreq+=c.value*((parent->song.compatFlags.linearPitch)?1:(8-chan[c.chan].freqH));
|
||||
if (chan[c.chan].baseFreq>=destFreq) {
|
||||
chan[c.chan].baseFreq=destFreq;
|
||||
return2=true;
|
||||
}
|
||||
} else {
|
||||
chan[c.chan].baseFreq-=c.value*((parent->song.linearPitch)?1:(8-chan[c.chan].freqH));
|
||||
chan[c.chan].baseFreq-=c.value*((parent->song.compatFlags.linearPitch)?1:(8-chan[c.chan].freqH));
|
||||
if (chan[c.chan].baseFreq<=destFreq) {
|
||||
chan[c.chan].baseFreq=destFreq;
|
||||
return2=true;
|
||||
|
|
@ -318,9 +318,9 @@ int DivPlatformSAA1099::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SAA1099));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SAA1099));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_PRE_NOTE:
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ int DivPlatformSCC::dispatch(DivCommand c) {
|
|||
}
|
||||
chan[c.chan].active=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (!isMuted[c.chan]) {
|
||||
|
|
@ -253,9 +253,9 @@ int DivPlatformSCC::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SCC));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SCC));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ void DivPlatformSCV::tick(bool sysTick) {
|
|||
} else {
|
||||
chan[i].freq=(chan[i].baseFreq+chan[i].pitch+chan[i].pitch2+143);
|
||||
}
|
||||
if (!parent->song.oldArpStrategy) {
|
||||
if (!parent->song.compatFlags.oldArpStrategy) {
|
||||
if (chan[i].fixedArp) {
|
||||
chan[i].freq=(chan[i].baseNoteOverride)+chan[i].pitch+chan[i].pitch2;
|
||||
} else {
|
||||
|
|
@ -186,7 +186,7 @@ int DivPlatformSCV::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOn=true;
|
||||
//chwrite(c.chan,0x04,0x80|chan[c.chan].vol);
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
chan[c.chan].insChanged=false;
|
||||
|
|
@ -267,9 +267,9 @@ int DivPlatformSCV::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_UPD1771C));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_UPD1771C));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||
chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
}
|
||||
chan[c.chan].inPorta=c.value;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void DivPlatformSegaPCM::tick(bool sysTick) {
|
|||
for (int i=0; i<16; i++) {
|
||||
chan[i].std.next();
|
||||
|
||||
if (parent->song.newSegaPCM) {
|
||||
if (parent->song.compatFlags.newSegaPCM) {
|
||||
if (chan[i].std.vol.had) {
|
||||
chan[i].outVol=(chan[i].vol*MIN(chan[i].macroVolMul,chan[i].std.vol.val))/chan[i].macroVolMul;
|
||||
chan[i].chVolL=(chan[i].outVol*chan[i].chPanL)/127;
|
||||
|
|
@ -89,13 +89,13 @@ void DivPlatformSegaPCM::tick(bool sysTick) {
|
|||
chan[i].pcm.freq=-1;
|
||||
}
|
||||
|
||||
if (parent->song.newSegaPCM) if (chan[i].std.panL.had) {
|
||||
if (parent->song.compatFlags.newSegaPCM) if (chan[i].std.panL.had) {
|
||||
chan[i].chPanL=chan[i].std.panL.val&127;
|
||||
chan[i].chVolL=(chan[i].outVol*chan[i].chPanL)/127;
|
||||
rWrite(2+(i<<3),chan[i].chVolL);
|
||||
}
|
||||
|
||||
if (parent->song.newSegaPCM) if (chan[i].std.panR.had) {
|
||||
if (parent->song.compatFlags.newSegaPCM) if (chan[i].std.panR.had) {
|
||||
chan[i].chPanR=chan[i].std.panR.val&127;
|
||||
chan[i].chVolR=(chan[i].outVol*chan[i].chPanR)/127;
|
||||
rWrite(3+(i<<3),chan[i].chVolR);
|
||||
|
|
@ -120,7 +120,7 @@ void DivPlatformSegaPCM::tick(bool sysTick) {
|
|||
|
||||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||
chan[i].freq=chan[i].baseFreq+(chan[i].pitch)-128+(oldSlides?0:chan[i].pitch2);
|
||||
if (!parent->song.oldArpStrategy) {
|
||||
if (!parent->song.compatFlags.oldArpStrategy) {
|
||||
if (chan[i].fixedArp) {
|
||||
chan[i].freq=(chan[i].baseNoteOverride<<7)+chan[i].pitch-128+(chan[i].pitch2<<(oldSlides?1:0));
|
||||
} else {
|
||||
|
|
@ -204,10 +204,10 @@ int DivPlatformSegaPCM::dispatch(DivCommand c) {
|
|||
chan[c.chan].pcm.freq=-1;
|
||||
}
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
|
||||
if (parent->song.newSegaPCM) {
|
||||
if (parent->song.compatFlags.newSegaPCM) {
|
||||
chan[c.chan].chVolL=(chan[c.chan].outVol*chan[c.chan].chPanL)/127;
|
||||
chan[c.chan].chVolR=(chan[c.chan].outVol*chan[c.chan].chPanR)/127;
|
||||
rWrite(2+(c.chan<<3),chan[c.chan].chVolL);
|
||||
|
|
@ -240,7 +240,7 @@ int DivPlatformSegaPCM::dispatch(DivCommand c) {
|
|||
if (!chan[c.chan].std.vol.has) {
|
||||
chan[c.chan].outVol=c.value;
|
||||
}
|
||||
if (parent->song.newSegaPCM) {
|
||||
if (parent->song.compatFlags.newSegaPCM) {
|
||||
chan[c.chan].chVolL=(c.value*chan[c.chan].chPanL)/127;
|
||||
chan[c.chan].chVolR=(c.value*chan[c.chan].chPanR)/127;
|
||||
} else {
|
||||
|
|
@ -262,7 +262,7 @@ int DivPlatformSegaPCM::dispatch(DivCommand c) {
|
|||
chan[c.chan].ins=c.value;
|
||||
break;
|
||||
case DIV_CMD_PANNING: {
|
||||
if (parent->song.newSegaPCM) {
|
||||
if (parent->song.compatFlags.newSegaPCM) {
|
||||
chan[c.chan].chPanL=c.value>>1;
|
||||
chan[c.chan].chPanR=c.value2>>1;
|
||||
chan[c.chan].chVolL=(chan[c.chan].outVol*chan[c.chan].chPanL)/127;
|
||||
|
|
@ -284,7 +284,7 @@ int DivPlatformSegaPCM::dispatch(DivCommand c) {
|
|||
case DIV_CMD_NOTE_PORTA: {
|
||||
int destFreq=((c.value2+chan[c.chan].sampleNoteDelta)<<7);
|
||||
int newFreq;
|
||||
int mul=(oldSlides || !parent->song.linearPitch)?8:1;
|
||||
int mul=(oldSlides || !parent->song.compatFlags.linearPitch)?8:1;
|
||||
bool return2=false;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
newFreq=chan[c.chan].baseFreq+c.value*mul;
|
||||
|
|
@ -334,7 +334,7 @@ int DivPlatformSegaPCM::dispatch(DivCommand c) {
|
|||
return 127;
|
||||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=(chan[c.chan].note<<7);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=(chan[c.chan].note<<7);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_PRE_NOTE:
|
||||
|
|
|
|||
|
|
@ -445,12 +445,12 @@ int DivPlatformSID2::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta || parent->song.preNoteNoEffect) {
|
||||
if (parent->song.compatFlags.resetMacroOnPorta || parent->song.compatFlags.preNoteNoEffect) {
|
||||
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SID2));
|
||||
chan[c.chan].keyOn=true;
|
||||
}
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -845,7 +845,7 @@ int DivPlatformSID3::dispatch(DivCommand c) {
|
|||
}
|
||||
chan[c.chan].active=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
//chan[c.chan].keyOn=true;
|
||||
|
|
@ -997,12 +997,12 @@ int DivPlatformSID3::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta || parent->song.preNoteNoEffect) {
|
||||
if (parent->song.compatFlags.resetMacroOnPorta || parent->song.compatFlags.preNoteNoEffect) {
|
||||
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SID3));
|
||||
chan[c.chan].keyOn=true;
|
||||
}
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_PANNING: {
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ int DivPlatformSM8521::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (chan[c.chan].wave<0) {
|
||||
|
|
@ -267,13 +267,13 @@ int DivPlatformSM8521::dispatch(DivCommand c) {
|
|||
int destFreq=NOTE_PERIODIC(c.value2);
|
||||
bool return2=false;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
chan[c.chan].baseFreq+=c.value*((parent->song.linearPitch)?1:8);
|
||||
chan[c.chan].baseFreq+=c.value*((parent->song.compatFlags.linearPitch)?1:8);
|
||||
if (chan[c.chan].baseFreq>=destFreq) {
|
||||
chan[c.chan].baseFreq=destFreq;
|
||||
return2=true;
|
||||
}
|
||||
} else {
|
||||
chan[c.chan].baseFreq-=c.value*((parent->song.linearPitch)?1:8);
|
||||
chan[c.chan].baseFreq-=c.value*((parent->song.compatFlags.linearPitch)?1:8);
|
||||
if (chan[c.chan].baseFreq<=destFreq) {
|
||||
chan[c.chan].baseFreq=destFreq;
|
||||
return2=true;
|
||||
|
|
@ -293,9 +293,9 @@ int DivPlatformSM8521::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SM8521));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SM8521));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ void DivPlatformSMS::acquireDirect(blip_buffer_t** bb, size_t len) {
|
|||
double DivPlatformSMS::NOTE_SN(int ch, int note) {
|
||||
double CHIP_DIVIDER=toneDivider;
|
||||
if (ch==3) CHIP_DIVIDER=noiseDivider;
|
||||
if (parent->song.linearPitch || !easyNoise) {
|
||||
if (parent->song.compatFlags.linearPitch || !easyNoise) {
|
||||
return NOTE_PERIODIC(note);
|
||||
}
|
||||
int easyStartingPeriod=16;
|
||||
|
|
@ -210,7 +210,7 @@ int DivPlatformSMS::snCalcFreq(int ch) {
|
|||
if (chan[ch].fixedArp) {
|
||||
curFreq=chan[ch].baseNoteOverride<<7;
|
||||
}
|
||||
if (parent->song.linearPitch && easyNoise && curFreq>easyThreshold) {
|
||||
if (parent->song.compatFlags.linearPitch && easyNoise && curFreq>easyThreshold) {
|
||||
int ret=(((easyStartingPeriod<<7))-(curFreq-(easyThreshold)))>>7;
|
||||
if (ret<0) ret=0;
|
||||
return ret;
|
||||
|
|
@ -242,7 +242,7 @@ void DivPlatformSMS::tick(bool sysTick) {
|
|||
}
|
||||
if (i==3) {
|
||||
if (chan[i].std.duty.had) {
|
||||
if (chan[i].std.duty.val!=snNoiseMode || parent->song.snDutyReset) {
|
||||
if (chan[i].std.duty.val!=snNoiseMode || parent->song.compatFlags.snDutyReset) {
|
||||
snNoiseMode=chan[i].std.duty.val;
|
||||
if (chan[i].std.duty.val<2) {
|
||||
chan[3].freqChanged=false;
|
||||
|
|
@ -277,7 +277,7 @@ void DivPlatformSMS::tick(bool sysTick) {
|
|||
if (chan[i].freqChanged) {
|
||||
chan[i].freq=snCalcFreq(i);
|
||||
if (chan[i].freq>1023) chan[i].freq=1023;
|
||||
if (parent->song.snNoLowPeriods) {
|
||||
if (parent->song.compatFlags.snNoLowPeriods) {
|
||||
if (chan[i].freq<8) chan[i].freq=1;
|
||||
} else {
|
||||
if (chan[i].freq<0) chan[i].freq=0;
|
||||
|
|
@ -297,7 +297,7 @@ void DivPlatformSMS::tick(bool sysTick) {
|
|||
chan[3].freq=snCalcFreq(3);
|
||||
//parent->calcFreq(chan[3].baseFreq,chan[3].pitch,chan[3].fixedArp?chan[3].baseNoteOverride:chan[3].arpOff,chan[3].fixedArp,true,0,chan[3].pitch2,chipClock,noiseDivider);
|
||||
if (chan[3].freq>1023) chan[3].freq=1023;
|
||||
if (parent->song.snNoLowPeriods) {
|
||||
if (parent->song.compatFlags.snNoLowPeriods) {
|
||||
if (chan[3].actualNote>0x5d) chan[3].freq=0x01;
|
||||
}
|
||||
if (chan[3].freq<0) chan[3].freq=0;
|
||||
|
|
@ -359,13 +359,13 @@ int DivPlatformSMS::dispatch(DivCommand c) {
|
|||
}
|
||||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOff=false;
|
||||
//if (!parent->song.brokenOutVol2) {
|
||||
//if (!parent->song.compatFlags.brokenOutVol2) {
|
||||
chan[c.chan].writeVol=true;
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
//rWrite(0,0x90|c.chan<<5|(isMuted[c.chan]?15:(15-(chan[c.chan].vol&15))));
|
||||
//}
|
||||
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_STD));
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -451,9 +451,9 @@ int DivPlatformSMS::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_STD));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_STD));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_SN(c.chan,chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_SN(c.chan,chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ int DivPlatformSNES::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
// this is the fix. it needs testing.
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (chan[c.chan].outVol!=chan[c.chan].vol) chan[c.chan].shallWriteVol=true;
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
|
|
@ -482,7 +482,7 @@ int DivPlatformSNES::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SNES));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SNES));
|
||||
}
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ int DivPlatformSoundUnit::dispatch(DivCommand c) {
|
|||
chan[c.chan].hwSeqDelay=0;
|
||||
chWrite(c.chan,0x02,chan[c.chan].vol);
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
chan[c.chan].insChanged=false;
|
||||
|
|
@ -484,13 +484,13 @@ int DivPlatformSoundUnit::dispatch(DivCommand c) {
|
|||
int destFreq=NOTE_SU(c.chan,c.value2+chan[c.chan].sampleNoteDelta);
|
||||
bool return2=false;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
chan[c.chan].baseFreq+=c.value*((parent->song.linearPitch)?1:(1+(chan[c.chan].baseFreq>>9)));
|
||||
chan[c.chan].baseFreq+=c.value*((parent->song.compatFlags.linearPitch)?1:(1+(chan[c.chan].baseFreq>>9)));
|
||||
if (chan[c.chan].baseFreq>=destFreq) {
|
||||
chan[c.chan].baseFreq=destFreq;
|
||||
return2=true;
|
||||
}
|
||||
} else {
|
||||
chan[c.chan].baseFreq-=c.value*((parent->song.linearPitch)?1:(1+(chan[c.chan].baseFreq>>9)));
|
||||
chan[c.chan].baseFreq-=c.value*((parent->song.compatFlags.linearPitch)?1:(1+(chan[c.chan].baseFreq>>9)));
|
||||
if (chan[c.chan].baseFreq<=destFreq) {
|
||||
chan[c.chan].baseFreq=destFreq;
|
||||
return2=true;
|
||||
|
|
@ -519,9 +519,9 @@ int DivPlatformSoundUnit::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SU));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SU));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_SU(c.chan,chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_SU(c.chan,chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_C64_PW_SLIDE:
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ int DivPlatformSupervision::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOn=true;
|
||||
//chwrite(c.chan,0x04,0x80|chan[c.chan].vol);
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
chan[c.chan].insChanged=false;
|
||||
|
|
@ -384,9 +384,9 @@ int DivPlatformSupervision::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SUPERVISION));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SUPERVISION));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ int DivPlatformSwan::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (chan[c.chan].wave<0) {
|
||||
|
|
@ -538,9 +538,9 @@ int DivPlatformSwan::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SWAN));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SWAN));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ void DivPlatformT6W28::writeOutVol(int ch) {
|
|||
double DivPlatformT6W28::NOTE_SN(int ch, int note) {
|
||||
double CHIP_DIVIDER=16;
|
||||
if (ch==3) CHIP_DIVIDER=15;
|
||||
if (parent->song.linearPitch || !easyNoise) {
|
||||
if (parent->song.compatFlags.linearPitch || !easyNoise) {
|
||||
return NOTE_PERIODIC(note);
|
||||
}
|
||||
if (note>107) {
|
||||
|
|
@ -105,7 +105,7 @@ double DivPlatformT6W28::NOTE_SN(int ch, int note) {
|
|||
}
|
||||
|
||||
int DivPlatformT6W28::snCalcFreq(int ch) {
|
||||
if (parent->song.linearPitch && easyNoise && chan[ch].baseFreq+chan[ch].pitch+chan[ch].pitch2>(107<<7)) {
|
||||
if (parent->song.compatFlags.linearPitch && easyNoise && chan[ch].baseFreq+chan[ch].pitch+chan[ch].pitch2>(107<<7)) {
|
||||
int ret=(((13<<7)+0x40)-(chan[ch].baseFreq+chan[ch].pitch+chan[ch].pitch2-(107<<7)))>>7;
|
||||
if (ret<0) ret=0;
|
||||
return ret;
|
||||
|
|
@ -187,7 +187,7 @@ int DivPlatformT6W28::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
writeOutVol(c.chan);
|
||||
}
|
||||
|
|
@ -270,9 +270,9 @@ int DivPlatformT6W28::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_T6W28));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_T6W28));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_SN(c.chan,chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_SN(c.chan,chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ int DivPlatformTED::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
chan[c.chan].insChanged=false;
|
||||
|
|
@ -230,9 +230,9 @@ int DivPlatformTED::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_TED));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_TED));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ int DivPlatformTIA::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOn=true;
|
||||
rWrite(0x15+c.chan,chan[c.chan].shape);
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (chan[c.chan].insChanged) {
|
||||
|
|
@ -395,7 +395,7 @@ int DivPlatformTIA::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_TIA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_TIA));
|
||||
}
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ void DivPlatformTX81Z::tick(bool sysTick) {
|
|||
if (chan[i].std.alg.had) {
|
||||
chan[i].state.alg=chan[i].std.alg.val;
|
||||
immWrite(chanOffs[i]+ADDR_LR_FB_ALG,(chan[i].state.alg&7)|(chan[i].state.fb<<3)|(chan[i].active?0x40:0)|(chan[i].chVolR<<7));
|
||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
if (!parent->song.compatFlags.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
unsigned short baseAddr=chanOffs[i]|opOffs[j];
|
||||
DivInstrumentFM::Operator& op=chan[i].state.op[j];
|
||||
if (isMuted[i] || !op.enable) {
|
||||
|
|
@ -321,7 +321,7 @@ void DivPlatformTX81Z::tick(bool sysTick) {
|
|||
}
|
||||
|
||||
// fixed pitch
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
bool freqChangeOp=false;
|
||||
|
||||
if (op.egt) {
|
||||
|
|
@ -416,7 +416,7 @@ void DivPlatformTX81Z::tick(bool sysTick) {
|
|||
for (int i=0; i<8; i++) {
|
||||
if (chan[i].freqChanged) {
|
||||
chan[i].freq=chan[i].baseFreq+chan[i].pitch-128+chan[i].pitch2;
|
||||
if (!parent->song.oldArpStrategy) {
|
||||
if (!parent->song.compatFlags.oldArpStrategy) {
|
||||
if (chan[i].fixedArp) {
|
||||
chan[i].freq=(chan[i].baseNoteOverride<<7)+chan[i].pitch-128+chan[i].pitch2;
|
||||
} else {
|
||||
|
|
@ -1006,7 +1006,7 @@ int DivPlatformTX81Z::dispatch(DivCommand c) {
|
|||
return 127;
|
||||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_LINEAR(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_LINEAR(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_PRE_NOTE:
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ int DivPlatformVB::dispatch(DivCommand c) {
|
|||
}
|
||||
chWrite(4,0x00,0x80);
|
||||
}
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
writeEnv(c.chan);
|
||||
}
|
||||
|
|
@ -445,9 +445,9 @@ int DivPlatformVB::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_PCE));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_PCE));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ int DivPlatformVERA::dispatch(DivCommand c) {
|
|||
}
|
||||
chan[c.chan].active=true;
|
||||
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_VERA));
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -421,7 +421,7 @@ int DivPlatformVERA::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_VERA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_VERA));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=calcNoteFreq(c.chan,chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
|
|
|
|||
|
|
@ -247,9 +247,9 @@ int DivPlatformVIC20::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_VIC));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_VIC));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ int DivPlatformVRC6::dispatch(DivCommand c) {
|
|||
}
|
||||
chan[c.chan].active=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
//chan[c.chan].keyOn=true;
|
||||
|
|
@ -418,9 +418,9 @@ int DivPlatformVRC6::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_VRC6));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_VRC6));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -614,7 +614,7 @@ int DivPlatformX1_010::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].envChanged=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (chan[c.chan].wave<0) {
|
||||
|
|
@ -729,9 +729,9 @@ int DivPlatformX1_010::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_X1_010));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_X1_010));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NoteX1_010(c.chan,chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NoteX1_010(c.chan,chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_FREQ:
|
||||
|
|
|
|||
|
|
@ -551,7 +551,7 @@ void DivPlatformYM2203::tick(bool sysTick) {
|
|||
if (chan[i].std.alg.had) {
|
||||
chan[i].state.alg=chan[i].std.alg.val;
|
||||
rWrite(chanOffs[i]+ADDR_FB_ALG,(chan[i].state.alg&7)|(chan[i].state.fb<<3));
|
||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
if (!parent->song.compatFlags.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
unsigned short baseAddr=chanOffs[i]|opOffs[j];
|
||||
DivInstrumentFM::Operator& op=chan[i].state.op[j];
|
||||
if (isMuted[i] || !op.enable) {
|
||||
|
|
@ -661,7 +661,7 @@ void DivPlatformYM2203::tick(bool sysTick) {
|
|||
for (int i=0; i<3; i++) {
|
||||
if (i==2 && extMode) continue;
|
||||
if (chan[i].freqChanged) {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,4,chan[i].pitch2,chipClock,CHIP_FREQBASE,11,chan[i].state.block);
|
||||
} else {
|
||||
int fNum=parent->calcFreq(chan[i].baseFreq&0x7ff,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,4,chan[i].pitch2);
|
||||
|
|
@ -797,7 +797,7 @@ int DivPlatformYM2203::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOff=true;
|
||||
chan[c.chan].keyOn=false;
|
||||
chan[c.chan].active=false;
|
||||
if (parent->song.brokenFMOff) chan[c.chan].macroInit(NULL);
|
||||
if (parent->song.compatFlags.brokenFMOff) chan[c.chan].macroInit(NULL);
|
||||
break;
|
||||
case DIV_CMD_NOTE_OFF_ENV:
|
||||
chan[c.chan].keyOff=true;
|
||||
|
|
@ -867,7 +867,7 @@ int DivPlatformYM2203::dispatch(DivCommand c) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
if (c.chan>(psgChanOffs-1) || parent->song.linearPitch) { // PSG
|
||||
if (c.chan>(psgChanOffs-1) || parent->song.compatFlags.linearPitch) { // PSG
|
||||
int destFreq=NOTE_FNUM_BLOCK(c.value2,11,chan[c.chan].state.block);
|
||||
bool return2=false;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
|
|
@ -1156,7 +1156,7 @@ int DivPlatformYM2203::dispatch(DivCommand c) {
|
|||
case DIV_CMD_PRE_PORTA:
|
||||
if (c.chan>(2+isCSM)) {
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_FM));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_FM));
|
||||
}
|
||||
}
|
||||
chan[c.chan].inPorta=c.value;
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ int DivPlatformYM2203Ext::dispatch(DivCommand c) {
|
|||
break;
|
||||
}
|
||||
case DIV_CMD_NOTE_PORTA: {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
int destFreq=NOTE_FREQUENCY(c.value2);
|
||||
bool return2=false;
|
||||
if (destFreq>opChan[ch].baseFreq) {
|
||||
|
|
@ -472,7 +472,7 @@ void DivPlatformYM2203Ext::tick(bool sysTick) {
|
|||
if (opChan[i].std.alg.had) {
|
||||
chan[extChanOffs].state.alg=opChan[i].std.alg.val;
|
||||
rWrite(chanOffs[extChanOffs]+ADDR_FB_ALG,(chan[extChanOffs].state.alg&7)|(chan[extChanOffs].state.fb<<3));
|
||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
if (!parent->song.compatFlags.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[j];
|
||||
DivInstrumentFM::Operator& op=chan[extChanOffs].state.op[j];
|
||||
if (isOpMuted[j] || !op.enable) {
|
||||
|
|
@ -551,7 +551,7 @@ void DivPlatformYM2203Ext::tick(bool sysTick) {
|
|||
unsigned char hardResetMask=0;
|
||||
if (extMode) for (int i=0; i<4; i++) {
|
||||
if (opChan[i].freqChanged) {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
opChan[i].freq=parent->calcFreq(opChan[i].baseFreq,opChan[i].pitch,opChan[i].fixedArp?opChan[i].baseNoteOverride:opChan[i].arpOff,opChan[i].fixedArp,false,4,opChan[i].pitch2,chipClock,CHIP_FREQBASE,11,chan[extChanOffs].state.block);
|
||||
} else {
|
||||
int fNum=parent->calcFreq(opChan[i].baseFreq&0x7ff,opChan[i].pitch,opChan[i].fixedArp?opChan[i].baseNoteOverride:opChan[i].arpOff,opChan[i].fixedArp,false,4,opChan[i].pitch2);
|
||||
|
|
|
|||
|
|
@ -794,7 +794,7 @@ void DivPlatformYM2608::tick(bool sysTick) {
|
|||
if (chan[i].std.alg.had) {
|
||||
chan[i].state.alg=chan[i].std.alg.val;
|
||||
rWrite(chanOffs[i]+ADDR_FB_ALG,(chan[i].state.alg&7)|(chan[i].state.fb<<3));
|
||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
if (!parent->song.compatFlags.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
unsigned short baseAddr=chanOffs[i]|opOffs[j];
|
||||
DivInstrumentFM::Operator& op=chan[i].state.op[j];
|
||||
if (isMuted[i] || !op.enable) {
|
||||
|
|
@ -916,7 +916,7 @@ void DivPlatformYM2608::tick(bool sysTick) {
|
|||
for (int i=0; i<6; i++) {
|
||||
if (i==2 && extMode) continue;
|
||||
if (chan[i].freqChanged) {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,4,chan[i].pitch2,chipClock,CHIP_FREQBASE,11,chan[i].state.block);
|
||||
} else {
|
||||
int fNum=parent->calcFreq(chan[i].baseFreq&0x7ff,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,4,chan[i].pitch2);
|
||||
|
|
@ -1238,7 +1238,7 @@ int DivPlatformYM2608::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOff=true;
|
||||
chan[c.chan].keyOn=false;
|
||||
chan[c.chan].active=false;
|
||||
if (parent->song.brokenFMOff) chan[c.chan].macroInit(NULL);
|
||||
if (parent->song.compatFlags.brokenFMOff) chan[c.chan].macroInit(NULL);
|
||||
break;
|
||||
case DIV_CMD_NOTE_OFF_ENV:
|
||||
chan[c.chan].keyOff=true;
|
||||
|
|
@ -1340,7 +1340,7 @@ int DivPlatformYM2608::dispatch(DivCommand c) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
if (c.chan>(5+isCSM) || parent->song.linearPitch) { // PSG, ADPCM-B
|
||||
if (c.chan>(5+isCSM) || parent->song.compatFlags.linearPitch) { // PSG, ADPCM-B
|
||||
int destFreq=NOTE_OPNB(c.chan,c.value2+chan[c.chan].sampleNoteDelta);
|
||||
bool return2=false;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
|
|
@ -1651,7 +1651,7 @@ int DivPlatformYM2608::dispatch(DivCommand c) {
|
|||
case DIV_CMD_PRE_PORTA:
|
||||
if (c.chan>5) {
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_FM));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_FM));
|
||||
}
|
||||
}
|
||||
chan[c.chan].inPorta=c.value;
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ int DivPlatformYM2608Ext::dispatch(DivCommand c) {
|
|||
} else {
|
||||
opChan[ch].pan=(c.value2>0)|((c.value>0)<<1);
|
||||
}
|
||||
if (parent->song.sharedExtStat) {
|
||||
if (parent->song.compatFlags.sharedExtStat) {
|
||||
for (int i=0; i<4; i++) {
|
||||
if (ch==i) continue;
|
||||
opChan[i].pan=opChan[ch].pan;
|
||||
|
|
@ -166,7 +166,7 @@ int DivPlatformYM2608Ext::dispatch(DivCommand c) {
|
|||
break;
|
||||
}
|
||||
case DIV_CMD_NOTE_PORTA: {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
int destFreq=NOTE_FREQUENCY(c.value2);
|
||||
bool return2=false;
|
||||
if (destFreq>opChan[ch].baseFreq) {
|
||||
|
|
@ -510,7 +510,7 @@ void DivPlatformYM2608Ext::tick(bool sysTick) {
|
|||
if (opChan[i].std.alg.had) {
|
||||
chan[extChanOffs].state.alg=opChan[i].std.alg.val;
|
||||
rWrite(chanOffs[extChanOffs]+ADDR_FB_ALG,(chan[extChanOffs].state.alg&7)|(chan[extChanOffs].state.fb<<3));
|
||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
if (!parent->song.compatFlags.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[j];
|
||||
DivInstrumentFM::Operator& op=chan[extChanOffs].state.op[j];
|
||||
if (isOpMuted[j] || !op.enable) {
|
||||
|
|
@ -541,7 +541,7 @@ void DivPlatformYM2608Ext::tick(bool sysTick) {
|
|||
|
||||
if (opChan[i].std.panL.had) {
|
||||
opChan[i].pan=opChan[i].std.panL.val&3;
|
||||
if (parent->song.sharedExtStat) {
|
||||
if (parent->song.compatFlags.sharedExtStat) {
|
||||
for (int j=0; j<4; j++) {
|
||||
if (i==j) continue;
|
||||
opChan[j].pan=opChan[i].pan;
|
||||
|
|
@ -612,7 +612,7 @@ void DivPlatformYM2608Ext::tick(bool sysTick) {
|
|||
unsigned char hardResetMask=0;
|
||||
if (extMode) for (int i=0; i<4; i++) {
|
||||
if (opChan[i].freqChanged) {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
opChan[i].freq=parent->calcFreq(opChan[i].baseFreq,opChan[i].pitch,opChan[i].fixedArp?opChan[i].baseNoteOverride:opChan[i].arpOff,opChan[i].fixedArp,false,4,opChan[i].pitch2,chipClock,CHIP_FREQBASE,11,chan[extChanOffs].state.block);
|
||||
} else {
|
||||
int fNum=parent->calcFreq(opChan[i].baseFreq&0x7ff,opChan[i].pitch,opChan[i].fixedArp?opChan[i].baseNoteOverride:opChan[i].arpOff,opChan[i].fixedArp,false,4,opChan[i].pitch2);
|
||||
|
|
|
|||
|
|
@ -714,7 +714,7 @@ void DivPlatformYM2610::tick(bool sysTick) {
|
|||
if (chan[i].std.alg.had) {
|
||||
chan[i].state.alg=chan[i].std.alg.val;
|
||||
rWrite(chanOffs[i]+ADDR_FB_ALG,(chan[i].state.alg&7)|(chan[i].state.fb<<3));
|
||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
if (!parent->song.compatFlags.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
unsigned short baseAddr=chanOffs[i]|opOffs[j];
|
||||
DivInstrumentFM::Operator& op=chan[i].state.op[j];
|
||||
if (isMuted[i] || !op.enable) {
|
||||
|
|
@ -836,7 +836,7 @@ void DivPlatformYM2610::tick(bool sysTick) {
|
|||
for (int i=0; i<(psgChanOffs-isCSM); i++) {
|
||||
if (i==1 && extMode) continue;
|
||||
if (chan[i].freqChanged) {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,4,chan[i].pitch2,chipClock,CHIP_FREQBASE,11,chan[i].state.block);
|
||||
} else {
|
||||
int fNum=parent->calcFreq(chan[i].baseFreq&0x7ff,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,4,chan[i].pitch2,chipClock,CHIP_FREQBASE,11);
|
||||
|
|
@ -1178,7 +1178,7 @@ int DivPlatformYM2610::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOff=true;
|
||||
chan[c.chan].keyOn=false;
|
||||
chan[c.chan].active=false;
|
||||
if (parent->song.brokenFMOff) chan[c.chan].macroInit(NULL);
|
||||
if (parent->song.compatFlags.brokenFMOff) chan[c.chan].macroInit(NULL);
|
||||
break;
|
||||
case DIV_CMD_NOTE_OFF_ENV:
|
||||
chan[c.chan].keyOff=true;
|
||||
|
|
@ -1280,7 +1280,7 @@ int DivPlatformYM2610::dispatch(DivCommand c) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
if (c.chan>=psgChanOffs || parent->song.linearPitch) { // PSG, ADPCM-B
|
||||
if (c.chan>=psgChanOffs || parent->song.compatFlags.linearPitch) { // PSG, ADPCM-B
|
||||
int destFreq=NOTE_OPNB(c.chan,c.value2+chan[c.chan].sampleNoteDelta);
|
||||
bool return2=false;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
|
|
@ -1591,7 +1591,7 @@ int DivPlatformYM2610::dispatch(DivCommand c) {
|
|||
case DIV_CMD_PRE_PORTA:
|
||||
if (c.chan>=psgChanOffs) {
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_FM));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_FM));
|
||||
}
|
||||
}
|
||||
chan[c.chan].inPorta=c.value;
|
||||
|
|
|
|||
|
|
@ -783,7 +783,7 @@ void DivPlatformYM2610B::tick(bool sysTick) {
|
|||
if (chan[i].std.alg.had) {
|
||||
chan[i].state.alg=chan[i].std.alg.val;
|
||||
rWrite(chanOffs[i]+ADDR_FB_ALG,(chan[i].state.alg&7)|(chan[i].state.fb<<3));
|
||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
if (!parent->song.compatFlags.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
unsigned short baseAddr=chanOffs[i]|opOffs[j];
|
||||
DivInstrumentFM::Operator& op=chan[i].state.op[j];
|
||||
if (isMuted[i] || !op.enable) {
|
||||
|
|
@ -905,7 +905,7 @@ void DivPlatformYM2610B::tick(bool sysTick) {
|
|||
for (int i=0; i<(psgChanOffs-isCSM); i++) {
|
||||
if (i==2 && extMode) continue;
|
||||
if (chan[i].freqChanged) {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,4,chan[i].pitch2,chipClock,CHIP_FREQBASE,11,chan[i].state.block);
|
||||
} else {
|
||||
int fNum=parent->calcFreq(chan[i].baseFreq&0x7ff,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,4,chan[i].pitch2);
|
||||
|
|
@ -1247,7 +1247,7 @@ int DivPlatformYM2610B::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOff=true;
|
||||
chan[c.chan].keyOn=false;
|
||||
chan[c.chan].active=false;
|
||||
if (parent->song.brokenFMOff) chan[c.chan].macroInit(NULL);
|
||||
if (parent->song.compatFlags.brokenFMOff) chan[c.chan].macroInit(NULL);
|
||||
break;
|
||||
case DIV_CMD_NOTE_OFF_ENV:
|
||||
chan[c.chan].keyOff=true;
|
||||
|
|
@ -1349,7 +1349,7 @@ int DivPlatformYM2610B::dispatch(DivCommand c) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
if (c.chan>=psgChanOffs || parent->song.linearPitch) { // PSG, ADPCM-B
|
||||
if (c.chan>=psgChanOffs || parent->song.compatFlags.linearPitch) { // PSG, ADPCM-B
|
||||
int destFreq=NOTE_OPNB(c.chan,c.value2+chan[c.chan].sampleNoteDelta);
|
||||
bool return2=false;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
|
|
@ -1660,7 +1660,7 @@ int DivPlatformYM2610B::dispatch(DivCommand c) {
|
|||
case DIV_CMD_PRE_PORTA:
|
||||
if (c.chan>=psgChanOffs) {
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_FM));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_FM));
|
||||
}
|
||||
}
|
||||
chan[c.chan].inPorta=c.value;
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ int DivPlatformYM2610BExt::dispatch(DivCommand c) {
|
|||
} else {
|
||||
opChan[ch].pan=(c.value2>0)|((c.value>0)<<1);
|
||||
}
|
||||
if (parent->song.sharedExtStat) {
|
||||
if (parent->song.compatFlags.sharedExtStat) {
|
||||
for (int i=0; i<4; i++) {
|
||||
if (ch==i) continue;
|
||||
opChan[i].pan=opChan[ch].pan;
|
||||
|
|
@ -162,7 +162,7 @@ int DivPlatformYM2610BExt::dispatch(DivCommand c) {
|
|||
break;
|
||||
}
|
||||
case DIV_CMD_NOTE_PORTA: {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
int destFreq=NOTE_FREQUENCY(c.value2);
|
||||
bool return2=false;
|
||||
if (destFreq>opChan[ch].baseFreq) {
|
||||
|
|
@ -503,7 +503,7 @@ void DivPlatformYM2610BExt::tick(bool sysTick) {
|
|||
if (opChan[i].std.alg.had) {
|
||||
chan[extChanOffs].state.alg=opChan[i].std.alg.val;
|
||||
rWrite(chanOffs[extChanOffs]+ADDR_FB_ALG,(chan[extChanOffs].state.alg&7)|(chan[extChanOffs].state.fb<<3));
|
||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
if (!parent->song.compatFlags.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[j];
|
||||
DivInstrumentFM::Operator& op=chan[extChanOffs].state.op[j];
|
||||
if (isOpMuted[j] || !op.enable) {
|
||||
|
|
@ -534,7 +534,7 @@ void DivPlatformYM2610BExt::tick(bool sysTick) {
|
|||
|
||||
if (opChan[i].std.panL.had) {
|
||||
opChan[i].pan=opChan[i].std.panL.val&3;
|
||||
if (parent->song.sharedExtStat) {
|
||||
if (parent->song.compatFlags.sharedExtStat) {
|
||||
for (int j=0; j<4; j++) {
|
||||
if (i==j) continue;
|
||||
opChan[j].pan=opChan[i].pan;
|
||||
|
|
@ -604,7 +604,7 @@ void DivPlatformYM2610BExt::tick(bool sysTick) {
|
|||
unsigned char hardResetMask=0;
|
||||
if (extMode) for (int i=0; i<4; i++) {
|
||||
if (opChan[i].freqChanged) {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
opChan[i].freq=parent->calcFreq(opChan[i].baseFreq,opChan[i].pitch,opChan[i].fixedArp?opChan[i].baseNoteOverride:opChan[i].arpOff,opChan[i].fixedArp,false,4,opChan[i].pitch2,chipClock,CHIP_FREQBASE,11,chan[extChanOffs].state.block);
|
||||
} else {
|
||||
int fNum=parent->calcFreq(opChan[i].baseFreq&0x7ff,opChan[i].pitch,opChan[i].fixedArp?opChan[i].baseNoteOverride:opChan[i].arpOff,opChan[i].fixedArp,false,4,opChan[i].pitch2);
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ int DivPlatformYM2610Ext::dispatch(DivCommand c) {
|
|||
} else {
|
||||
opChan[ch].pan=(c.value2>0)|((c.value>0)<<1);
|
||||
}
|
||||
if (parent->song.sharedExtStat) {
|
||||
if (parent->song.compatFlags.sharedExtStat) {
|
||||
for (int i=0; i<4; i++) {
|
||||
if (ch==i) continue;
|
||||
opChan[i].pan=opChan[ch].pan;
|
||||
|
|
@ -162,7 +162,7 @@ int DivPlatformYM2610Ext::dispatch(DivCommand c) {
|
|||
break;
|
||||
}
|
||||
case DIV_CMD_NOTE_PORTA: {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
int destFreq=NOTE_FREQUENCY(c.value2);
|
||||
bool return2=false;
|
||||
if (destFreq>opChan[ch].baseFreq) {
|
||||
|
|
@ -503,7 +503,7 @@ void DivPlatformYM2610Ext::tick(bool sysTick) {
|
|||
if (opChan[i].std.alg.had) {
|
||||
chan[extChanOffs].state.alg=opChan[i].std.alg.val;
|
||||
rWrite(chanOffs[extChanOffs]+ADDR_FB_ALG,(chan[extChanOffs].state.alg&7)|(chan[extChanOffs].state.fb<<3));
|
||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
if (!parent->song.compatFlags.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[j];
|
||||
DivInstrumentFM::Operator& op=chan[extChanOffs].state.op[j];
|
||||
if (isOpMuted[j] || !op.enable) {
|
||||
|
|
@ -534,7 +534,7 @@ void DivPlatformYM2610Ext::tick(bool sysTick) {
|
|||
|
||||
if (opChan[i].std.panL.had) {
|
||||
opChan[i].pan=opChan[i].std.panL.val&3;
|
||||
if (parent->song.sharedExtStat) {
|
||||
if (parent->song.compatFlags.sharedExtStat) {
|
||||
for (int j=0; j<4; j++) {
|
||||
if (i==j) continue;
|
||||
opChan[j].pan=opChan[i].pan;
|
||||
|
|
@ -604,7 +604,7 @@ void DivPlatformYM2610Ext::tick(bool sysTick) {
|
|||
unsigned char hardResetMask=0;
|
||||
if (extMode) for (int i=0; i<4; i++) {
|
||||
if (opChan[i].freqChanged) {
|
||||
if (parent->song.linearPitch) {
|
||||
if (parent->song.compatFlags.linearPitch) {
|
||||
opChan[i].freq=parent->calcFreq(opChan[i].baseFreq,opChan[i].pitch,opChan[i].fixedArp?opChan[i].baseNoteOverride:opChan[i].arpOff,opChan[i].fixedArp,false,4,opChan[i].pitch2,chipClock,CHIP_FREQBASE,11,chan[extChanOffs].state.block);
|
||||
} else {
|
||||
int fNum=parent->calcFreq(opChan[i].baseFreq&0x7ff,opChan[i].pitch,opChan[i].fixedArp?opChan[i].baseNoteOverride:opChan[i].arpOff,opChan[i].fixedArp,false,4,opChan[i].pitch2);
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ int DivPlatformYMZ280B::dispatch(DivCommand c) {
|
|||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
|
|
@ -287,7 +287,7 @@ int DivPlatformYMZ280B::dispatch(DivCommand c) {
|
|||
case DIV_CMD_NOTE_PORTA: {
|
||||
int destFreq=NOTE_FREQUENCY(c.value2+chan[c.chan].sampleNoteDelta);
|
||||
bool return2=false;
|
||||
int multiplier=(parent->song.linearPitch)?1:256;
|
||||
int multiplier=(parent->song.compatFlags.linearPitch)?1:256;
|
||||
if (destFreq>chan[c.chan].baseFreq) {
|
||||
chan[c.chan].baseFreq+=c.value*multiplier;
|
||||
if (chan[c.chan].baseFreq>=destFreq) {
|
||||
|
|
@ -316,9 +316,9 @@ int DivPlatformYMZ280B::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_AMIGA));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_POS:
|
||||
|
|
|
|||
|
|
@ -212,9 +212,9 @@ int DivPlatformZXBeeper::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_BEEPER));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_BEEPER));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ int DivPlatformZXBeeperQuadTone::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
chan[c.chan].insChanged=false;
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
if (!parent->song.compatFlags.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
writeOutVol(c.chan);
|
||||
}
|
||||
|
|
@ -293,9 +293,9 @@ int DivPlatformZXBeeperQuadTone::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active && c.value2) {
|
||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_POKEMINI));
|
||||
if (parent->song.compatFlags.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_POKEMINI));
|
||||
}
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
if (!chan[c.chan].inPorta && c.value && !parent->song.compatFlags.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note);
|
||||
chan[c.chan].inPorta=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
|
|
|
|||
|
|
@ -664,9 +664,9 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// - 2: DefleMask (same as 1)
|
||||
// in the case of normal, the jump row (changePos) is not reset to 0
|
||||
// this means that you can do 0Dxx 0Byy and it'll work, taking you to row xx of order yy
|
||||
if (changeOrd==-1 || song.jumpTreatment==0) {
|
||||
if (changeOrd==-1 || song.compatFlags.jumpTreatment==0) {
|
||||
changeOrd=effectVal;
|
||||
if (song.jumpTreatment==1 || song.jumpTreatment==2) {
|
||||
if (song.compatFlags.jumpTreatment==1 || song.compatFlags.jumpTreatment==2) {
|
||||
changePos=0;
|
||||
}
|
||||
}
|
||||
|
|
@ -676,23 +676,23 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// if there is a 0Dxx effect on the very last order, it is ignored
|
||||
|
||||
// COMPAT FLAG: simultaneous jump treatment
|
||||
if (song.jumpTreatment==2) {
|
||||
if (song.compatFlags.jumpTreatment==2) {
|
||||
// - 2: DefleMask (jump to next order unless it is the last one and ignoreJumpAtEnd is on)
|
||||
if ((curOrder<(curSubSong->ordersLen-1) || !song.ignoreJumpAtEnd)) {
|
||||
if ((curOrder<(curSubSong->ordersLen-1) || !song.compatFlags.ignoreJumpAtEnd)) {
|
||||
// changeOrd -2 means increase order by 1
|
||||
// it overrides a previous 0Bxx effect
|
||||
changeOrd=-2;
|
||||
changePos=effectVal;
|
||||
}
|
||||
} else if (song.jumpTreatment==1) {
|
||||
} else if (song.compatFlags.jumpTreatment==1) {
|
||||
// - 1: old Furnace (same as 2 but ignored if 0Bxx is present)
|
||||
if (changeOrd<0 && (curOrder<(curSubSong->ordersLen-1) || !song.ignoreJumpAtEnd)) {
|
||||
if (changeOrd<0 && (curOrder<(curSubSong->ordersLen-1) || !song.compatFlags.ignoreJumpAtEnd)) {
|
||||
changeOrd=-2;
|
||||
changePos=effectVal;
|
||||
}
|
||||
} else {
|
||||
// - 0: normal
|
||||
if (curOrder<(curSubSong->ordersLen-1) || !song.ignoreJumpAtEnd) {
|
||||
if (curOrder<(curSubSong->ordersLen-1) || !song.compatFlags.ignoreJumpAtEnd) {
|
||||
// set the target order if not set, allowing you to use 0B and 0D regardless of position
|
||||
if (changeOrd<0) {
|
||||
changeOrd=-2;
|
||||
|
|
@ -710,8 +710,8 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// - delays equal or greater to the speed are ignored
|
||||
// - 2: lax (default)
|
||||
// - no delay is ever ignored unless overridden by another
|
||||
bool comparison=(song.delayBehavior==1)?(effectVal<=nextSpeed):(effectVal<(nextSpeed*(curSubSong->timeBase+1)));
|
||||
if (song.delayBehavior==2) comparison=true;
|
||||
bool comparison=(song.compatFlags.delayBehavior==1)?(effectVal<=nextSpeed):(effectVal<(nextSpeed*(curSubSong->timeBase+1)));
|
||||
if (song.compatFlags.delayBehavior==2) comparison=true;
|
||||
if (comparison) {
|
||||
// set the delay row, order and timer
|
||||
chan[i].rowDelay=effectVal;
|
||||
|
|
@ -762,7 +762,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
|
||||
// COMPAT FLAG: legacy volume slides
|
||||
// - sets volume to max once a vol slide down has finished (thus setting volume to volMax+1)
|
||||
if (song.legacyVolumeSlides && chan[i].volume==chan[i].volMax+1) {
|
||||
if (song.compatFlags.legacyVolumeSlides && chan[i].volume==chan[i].volMax+1) {
|
||||
logV("forcing volume");
|
||||
chan[i].volume=chan[i].volMax;
|
||||
dispatchCmd(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8));
|
||||
|
|
@ -780,7 +780,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// COMPAT FLAG: reset slides on note off (inverted in the GUI)
|
||||
// - a portamento/pitch slide will be halted upon encountering note off
|
||||
// - this will not occur if the stopPortaOnNoteOff flag is on and this is a portamento
|
||||
if (chan[i].inPorta && song.noteOffResetsSlides) {
|
||||
if (chan[i].inPorta && song.compatFlags.noteOffResetsSlides) {
|
||||
// stopOnOff will be false if stopPortaOnNoteOff flag is off
|
||||
if (chan[i].stopOnOff) {
|
||||
chan[i].portaNote=-1;
|
||||
|
|
@ -805,7 +805,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
chan[i].keyOn=false;
|
||||
chan[i].keyOff=true;
|
||||
// same thing here regarding reset slide behavior
|
||||
if (chan[i].inPorta && song.noteOffResetsSlides) {
|
||||
if (chan[i].inPorta && song.compatFlags.noteOffResetsSlides) {
|
||||
if (chan[i].stopOnOff) {
|
||||
chan[i].portaNote=-1;
|
||||
chan[i].portaSpeed=-1;
|
||||
|
|
@ -843,7 +843,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
chan[i].doNote=true;
|
||||
// COMPAT FLAG: compatible arpeggio
|
||||
// - once a new note plays, arp will not be applied for this tick
|
||||
if (chan[i].arp!=0 && song.compatibleArpeggio) {
|
||||
if (chan[i].arp!=0 && song.compatFlags.compatibleArpeggio) {
|
||||
chan[i].arpYield=true;
|
||||
}
|
||||
}
|
||||
|
|
@ -872,7 +872,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// COMPAT FLAG: legacy ALWAYS_SET_VOLUME behavior (oldAlwaysSetVolume)
|
||||
// - prior to its addition, volume changes wouldn't be effective depending on the system if the volume is the same as the current one
|
||||
// - afterwards, volume change is made regardless in order to set the bottom byte of volume ("subvolume")
|
||||
if (!song.oldAlwaysSetVolume || disCont[song.dispatchOfChan[i]].dispatch->getLegacyAlwaysSetVolume() || (MIN(chan[i].volMax,chan[i].volume)>>8)!=pat->newData[whatRow][DIV_PAT_VOL]) {
|
||||
if (!song.compatFlags.oldAlwaysSetVolume || disCont[song.dispatchOfChan[i]].dispatch->getLegacyAlwaysSetVolume() || (MIN(chan[i].volMax,chan[i].volume)>>8)!=pat->newData[whatRow][DIV_PAT_VOL]) {
|
||||
// here we let dispatchCmd() know we can do MIDI aftertouch if there isn't a note
|
||||
if (pat->newData[whatRow][DIV_PAT_NOTE]==-1) {
|
||||
chan[i].midiAftertouch=true;
|
||||
|
|
@ -982,7 +982,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// - 02xx still works
|
||||
// - a previous portamento (03xx) will prevent this slide from occurring
|
||||
// - E1xy/E2xy also will if *another* flag is set
|
||||
if (song.ignoreDuplicateSlides && (lastSlide==0x01 || lastSlide==0x1337)) break;
|
||||
if (song.compatFlags.ignoreDuplicateSlides && (lastSlide==0x01 || lastSlide==0x1337)) break;
|
||||
lastSlide=0x01;
|
||||
if (effectVal==0) {
|
||||
chan[i].portaNote=-1;
|
||||
|
|
@ -994,12 +994,12 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// - this prompts dispatch to stop processing arp macros during a slide
|
||||
// - this only happens if pitch linearity is set to None
|
||||
// - if we don't let dispatch know, the slide will never occur as arp takes over
|
||||
if (!song.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
if (!song.compatFlags.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
} else {
|
||||
// COMPAT FLAG: limit slide range
|
||||
// - this confines pitch slides from dispatch->getPortaFloor to C-8 (I think)
|
||||
// - yep, the lowest portamento note depends on the system...
|
||||
chan[i].portaNote=song.limitSlides?0x60:255;
|
||||
chan[i].portaNote=song.compatFlags.limitSlides?0x60:255;
|
||||
chan[i].portaSpeed=effectVal;
|
||||
dispatchCmd(DivCommand(DIV_CMD_HINT_PORTA,i,CLAMP(chan[i].portaNote,-128,127),MAX(chan[i].portaSpeed,0)));
|
||||
// most of these are used for compat flag handling
|
||||
|
|
@ -1013,7 +1013,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// - this prompts dispatch to stop processing arp macros during a slide
|
||||
// - this only happens if pitch linearity is set to None
|
||||
// - if we don't let dispatch know, the slide will never occur as arp takes over
|
||||
if (!song.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,0));
|
||||
if (!song.compatFlags.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,0));
|
||||
}
|
||||
break;
|
||||
case 0x02: // pitch slide down
|
||||
|
|
@ -1022,7 +1022,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// - 01xx still works
|
||||
// - a previous portamento (03xx) will prevent this slide from occurring
|
||||
// - E1xy/E2xy also will if *another* flag is set
|
||||
if (song.ignoreDuplicateSlides && (lastSlide==0x02 || lastSlide==0x1337)) break;
|
||||
if (song.compatFlags.ignoreDuplicateSlides && (lastSlide==0x02 || lastSlide==0x1337)) break;
|
||||
lastSlide=0x02;
|
||||
if (effectVal==0) {
|
||||
chan[i].portaNote=-1;
|
||||
|
|
@ -1030,12 +1030,12 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
dispatchCmd(DivCommand(DIV_CMD_HINT_PORTA,i,CLAMP(chan[i].portaNote,-128,127),MAX(chan[i].portaSpeed,0)));
|
||||
chan[i].inPorta=false;
|
||||
// COMPAT FLAG: arpeggio inhibits non-porta slides
|
||||
if (!song.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
if (!song.compatFlags.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
} else {
|
||||
// COMPAT FLAG: limit slide range
|
||||
// - this confines pitch slides from dispatch->getPortaFloor to C-8 (I think)
|
||||
// - yep, the lowest portamento note depends on the system...
|
||||
chan[i].portaNote=(song.limitSlides && song.dispatchChanOfChan[i]>=0)?disCont[song.dispatchOfChan[i]].dispatch->getPortaFloor(song.dispatchChanOfChan[i]):-60;
|
||||
chan[i].portaNote=(song.compatFlags.limitSlides && song.dispatchChanOfChan[i]>=0)?disCont[song.dispatchOfChan[i]].dispatch->getPortaFloor(song.dispatchChanOfChan[i]):-60;
|
||||
chan[i].portaSpeed=effectVal;
|
||||
dispatchCmd(DivCommand(DIV_CMD_HINT_PORTA,i,CLAMP(chan[i].portaNote,-128,127),MAX(chan[i].portaSpeed,0)));
|
||||
chan[i].portaStop=true;
|
||||
|
|
@ -1044,7 +1044,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
chan[i].wasShorthandPorta=false;
|
||||
chan[i].inPorta=false;
|
||||
// COMPAT FLAG: arpeggio inhibits non-porta slides
|
||||
if (!song.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,0));
|
||||
if (!song.compatFlags.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,0));
|
||||
}
|
||||
break;
|
||||
case 0x03: // portamento
|
||||
|
|
@ -1064,7 +1064,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// COMPAT FLAG: buggy portamento after sliding
|
||||
// - you might want to slide up or down and then 03xx to return to the original note
|
||||
// - if a porta to the same note is attempted after slide, for some reason it does not occur
|
||||
if (chan[i].note==chan[i].oldNote && !chan[i].inPorta && song.buggyPortaAfterSlide) {
|
||||
if (chan[i].note==chan[i].oldNote && !chan[i].inPorta && song.compatFlags.buggyPortaAfterSlide) {
|
||||
chan[i].portaNote=chan[i].note;
|
||||
chan[i].portaSpeed=-1;
|
||||
} else {
|
||||
|
|
@ -1084,7 +1084,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// COMPAT FLAG: stop portamento on note off
|
||||
// - if a portamento is called and then a note off occurs, stop portamento before the next note
|
||||
// - ...unless noteOffResetsSlides is disabled
|
||||
chan[i].stopOnOff=song.stopPortaOnNoteOff; // what?!
|
||||
chan[i].stopOnOff=song.compatFlags.stopPortaOnNoteOff; // what?!
|
||||
chan[i].scheduledSlideReset=false;
|
||||
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,1));
|
||||
// this is used to inhibit any other slide commands if the respective compat flag is enabled
|
||||
|
|
@ -1144,7 +1144,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
calledPorta=true;
|
||||
// COMPAT FLAG: buggy portamento after sliding
|
||||
// yes, this also affects 06xy.
|
||||
if (chan[i].note==chan[i].oldNote && !chan[i].inPorta && song.buggyPortaAfterSlide) {
|
||||
if (chan[i].note==chan[i].oldNote && !chan[i].inPorta && song.compatFlags.buggyPortaAfterSlide) {
|
||||
chan[i].portaNote=chan[i].note;
|
||||
chan[i].portaSpeed=-1;
|
||||
} else {
|
||||
|
|
@ -1157,7 +1157,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// this is the same as 03xx.
|
||||
chan[i].portaStop=true;
|
||||
if (chan[i].keyOn) chan[i].doNote=false;
|
||||
chan[i].stopOnOff=song.stopPortaOnNoteOff; // what?!
|
||||
chan[i].stopOnOff=song.compatFlags.stopPortaOnNoteOff; // what?!
|
||||
chan[i].scheduledSlideReset=false;
|
||||
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,1));
|
||||
lastSlide=0x1337; // i hate this so much
|
||||
|
|
@ -1224,7 +1224,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
chan[i].arp=effectVal;
|
||||
// COMPAT FLAG: reset note to base on arp stop (inverted in the GUI)
|
||||
// - a 0000 effect resets arpeggio position
|
||||
if (chan[i].arp==0 && song.arp0Reset) {
|
||||
if (chan[i].arp==0 && song.compatFlags.arp0Reset) {
|
||||
chan[i].resetArp=true;
|
||||
}
|
||||
dispatchCmd(DivCommand(DIV_CMD_HINT_ARPEGGIO,i,chan[i].arp));
|
||||
|
|
@ -1246,7 +1246,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// COMPAT FLAG: old sample offset effect
|
||||
// - before 0.6.3 the sample offset effect was 9xxx, where `xxx` is multiplied by 256
|
||||
// - the effect was then changed to 90xx/91xx/92xx, allowing you to set the low, mid and high bytes of the offset respectively
|
||||
if (song.oldSampleOffset) {
|
||||
if (song.compatFlags.oldSampleOffset) {
|
||||
// send sample position now
|
||||
dispatchCmd(DivCommand(DIV_CMD_SAMPLE_POS,i,(((effect&0x0f)<<8)|effectVal)*256));
|
||||
} else {
|
||||
|
|
@ -1279,7 +1279,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// - ignore cut if equal or greater than speed
|
||||
// - 2: lax (default)
|
||||
// - no cut is ever ignored unless overridden by another
|
||||
if (effectVal>0 && (song.delayBehavior==2 || effectVal<nextSpeed)) {
|
||||
if (effectVal>0 && (song.compatFlags.delayBehavior==2 || effectVal<nextSpeed)) {
|
||||
// the cut timer is ticked after nextRow(), so we set it one tick higher.
|
||||
chan[i].volCut=effectVal+1;
|
||||
chan[i].cutType=0;
|
||||
|
|
@ -1320,7 +1320,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// these are for compatibility stuff
|
||||
chan[i].portaStop=true;
|
||||
// COMPAT FLAG: stop portamento on note off
|
||||
chan[i].stopOnOff=song.stopPortaOnNoteOff; // what?!
|
||||
chan[i].stopOnOff=song.compatFlags.stopPortaOnNoteOff; // what?!
|
||||
chan[i].scheduledSlideReset=false;
|
||||
// only enter portamento if the speed is set
|
||||
if ((effectVal&15)!=0) {
|
||||
|
|
@ -1331,14 +1331,14 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// COMPAT FLAG: broken shortcut slides
|
||||
// - oddly enough, shortcut slides are not communicated to the dispatch
|
||||
// - this was fixed in 0.5.7
|
||||
if (!song.brokenShortcutSlides) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,0));
|
||||
if (!song.compatFlags.brokenShortcutSlides) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,0));
|
||||
// COMPAT FLAG: E1xy/E2xy also take priority over slides
|
||||
// - another Defle hack. it places shortcut slides above pitch slides.
|
||||
if (song.e1e2AlsoTakePriority) lastSlide=0x1337; // ...
|
||||
if (song.compatFlags.e1e2AlsoTakePriority) lastSlide=0x1337; // ...
|
||||
} else {
|
||||
chan[i].inPorta=false;
|
||||
// COMPAT FLAG: broken shortcut slides
|
||||
if (!song.brokenShortcutSlides) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
if (!song.compatFlags.brokenShortcutSlides) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
}
|
||||
break;
|
||||
case 0xe2: // portamento down
|
||||
|
|
@ -1348,7 +1348,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
dispatchCmd(DivCommand(DIV_CMD_HINT_PORTA,i,CLAMP(chan[i].portaNote,-128,127),MAX(chan[i].portaSpeed,0)));
|
||||
chan[i].portaStop=true;
|
||||
// COMPAT FLAG: stop portamento on note off
|
||||
chan[i].stopOnOff=song.stopPortaOnNoteOff; // what?!
|
||||
chan[i].stopOnOff=song.compatFlags.stopPortaOnNoteOff; // what?!
|
||||
chan[i].scheduledSlideReset=false;
|
||||
if ((effectVal&15)!=0) {
|
||||
chan[i].inPorta=true;
|
||||
|
|
@ -1356,13 +1356,13 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
chan[i].shorthandPorta=true;
|
||||
chan[i].wasShorthandPorta=true;
|
||||
// COMPAT FLAG: broken shortcut slides
|
||||
if (!song.brokenShortcutSlides) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,0));
|
||||
if (!song.compatFlags.brokenShortcutSlides) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,0));
|
||||
// COMPAT FLAG: E1xy/E2xy also take priority over slides
|
||||
if (song.e1e2AlsoTakePriority) lastSlide=0x1337; // ...
|
||||
if (song.compatFlags.e1e2AlsoTakePriority) lastSlide=0x1337; // ...
|
||||
} else {
|
||||
chan[i].inPorta=false;
|
||||
// COMPAT FLAG: broken shortcut slides
|
||||
if (!song.brokenShortcutSlides) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
if (!song.compatFlags.brokenShortcutSlides) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
}
|
||||
break;
|
||||
case 0xe3: // vibrato shape
|
||||
|
|
@ -1404,7 +1404,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// - 2: lax (default)
|
||||
// - no cut is ever ignored unless overridden by another
|
||||
// "Bruh"
|
||||
if (effectVal>0 && (song.delayBehavior==2 || effectVal<nextSpeed)) {
|
||||
if (effectVal>0 && (song.compatFlags.delayBehavior==2 || effectVal<nextSpeed)) {
|
||||
// the cut timer is ticked after nextRow(), so we set it one tick higher.
|
||||
chan[i].cut=effectVal+1;
|
||||
chan[i].cutType=2;
|
||||
|
|
@ -1448,7 +1448,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// - ignore cut if equal or greater than speed
|
||||
// - 2: lax (default)
|
||||
// - no cut is ever ignored unless overridden by another
|
||||
if (effectVal>0 && (song.delayBehavior==2 || effectVal<nextSpeed)) {
|
||||
if (effectVal>0 && (song.compatFlags.delayBehavior==2 || effectVal<nextSpeed)) {
|
||||
// the cut timer is ticked after nextRow(), so we set it one tick higher.
|
||||
chan[i].cut=effectVal+1;
|
||||
chan[i].cutType=0;
|
||||
|
|
@ -1539,7 +1539,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// - ignore cut if equal or greater than speed
|
||||
// - 2: lax (default)
|
||||
// - no cut is ever ignored unless overridden by another
|
||||
if (song.delayBehavior==2 || effectVal<nextSpeed) {
|
||||
if (song.compatFlags.delayBehavior==2 || effectVal<nextSpeed) {
|
||||
// the cut timer is ticked after nextRow(), so we set it one tick higher.
|
||||
chan[i].cut=effectVal+1;
|
||||
chan[i].cutType=1;
|
||||
|
|
@ -1573,7 +1573,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// COMPAT FLAG: instrument changes triggee on portamento (inverted in the GUI)
|
||||
// - before 0.6pre1 it was not possible to change instrument during portamento
|
||||
// - now it is. this sends a "null" note to allow such change
|
||||
if (insChanged && (chan[i].inPorta || calledPorta) && song.newInsTriggersInPorta) {
|
||||
if (insChanged && (chan[i].inPorta || calledPorta) && song.compatFlags.newInsTriggersInPorta) {
|
||||
dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,i,DIV_NOTE_NULL));
|
||||
}
|
||||
|
||||
|
|
@ -1581,7 +1581,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
if (chan[i].doNote) {
|
||||
// COMPAT FLAG: continuous vibrato
|
||||
// - when enabled, the vibrato position is not reset on each note
|
||||
if (!song.continuousVibrato) {
|
||||
if (!song.compatFlags.continuousVibrato) {
|
||||
chan[i].vibratoPos=0;
|
||||
}
|
||||
// send pitch now (why? didn't we do that already?)
|
||||
|
|
@ -1590,7 +1590,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// COMPAT FLAG: broken portamento during legato
|
||||
// - portamento would not occur if legato is on
|
||||
// - this was fixed in 0.6pre4
|
||||
if (chan[i].legato && (!chan[i].inPorta || song.brokenPortaLegato)) {
|
||||
if (chan[i].legato && (!chan[i].inPorta || song.compatFlags.brokenPortaLegato)) {
|
||||
dispatchCmd(DivCommand(DIV_CMD_LEGATO,i,chan[i].note));
|
||||
dispatchCmd(DivCommand(DIV_CMD_HINT_LEGATO,i,chan[i].note));
|
||||
} else {
|
||||
|
|
@ -1599,13 +1599,13 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
if (chan[i].inPorta && chan[i].keyOn && !chan[i].shorthandPorta) {
|
||||
// COMPAT FLAG: E1xy/E2xy stop on same note
|
||||
// - if there was a shortcut slide, stop it
|
||||
if (song.e1e2StopOnSameNote && chan[i].wasShorthandPorta) {
|
||||
if (song.compatFlags.e1e2StopOnSameNote && chan[i].wasShorthandPorta) {
|
||||
chan[i].portaSpeed=-1;
|
||||
dispatchCmd(DivCommand(DIV_CMD_HINT_PORTA,i,CLAMP(chan[i].portaNote,-128,127),MAX(chan[i].portaSpeed,0)));
|
||||
// COMPAT FLAG: broken shortcut slides
|
||||
// - oddly enough, shortcut slides are not communicated to the dispatch
|
||||
// - this was fixed in 0.5.7
|
||||
if (!song.brokenShortcutSlides) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
if (!song.compatFlags.brokenShortcutSlides) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
chan[i].wasShorthandPorta=false;
|
||||
chan[i].inPorta=false;
|
||||
} else {
|
||||
|
|
@ -1620,7 +1620,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
chan[i].releasing=false;
|
||||
// COMPAT FLAG: reset arp position on new note
|
||||
// - this does exactly what it says
|
||||
if (song.resetArpPhaseOnNewNote) {
|
||||
if (song.compatFlags.resetArpPhaseOnNewNote) {
|
||||
chan[i].arpStage=-1;
|
||||
}
|
||||
// these are used by VGM/ROM export to determine the duration of loop trail.
|
||||
|
|
@ -1677,10 +1677,10 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
case 0xf2: // single pitch slide down
|
||||
if (effect==0xf1) {
|
||||
// COMPAT FLAG: limit slide range
|
||||
chan[i].portaNote=song.limitSlides?0x60:255;
|
||||
chan[i].portaNote=song.compatFlags.limitSlides?0x60:255;
|
||||
} else {
|
||||
// COMPAT FLAG: limit slide range
|
||||
chan[i].portaNote=(song.limitSlides && song.dispatchChanOfChan[i]>=0)?disCont[song.dispatchOfChan[i]].dispatch->getPortaFloor(song.dispatchChanOfChan[i]):-60;
|
||||
chan[i].portaNote=(song.compatFlags.limitSlides && song.dispatchChanOfChan[i]>=0)?disCont[song.dispatchOfChan[i]].dispatch->getPortaFloor(song.dispatchChanOfChan[i]):-60;
|
||||
}
|
||||
chan[i].portaSpeed=effectVal;
|
||||
chan[i].portaStop=true;
|
||||
|
|
@ -1688,13 +1688,13 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
chan[i].scheduledSlideReset=false;
|
||||
chan[i].inPorta=false;
|
||||
// COMPAT FLAG: arpeggio inhibits non-porta slides
|
||||
if (!song.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,0));
|
||||
dispatchCmd(DivCommand(DIV_CMD_NOTE_PORTA,i,chan[i].portaSpeed*(song.linearPitch?song.pitchSlideSpeed:1),chan[i].portaNote));
|
||||
if (!song.compatFlags.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,0));
|
||||
dispatchCmd(DivCommand(DIV_CMD_NOTE_PORTA,i,chan[i].portaSpeed*(song.compatFlags.linearPitch?song.compatFlags.pitchSlideSpeed:1),chan[i].portaNote));
|
||||
chan[i].portaNote=-1;
|
||||
chan[i].portaSpeed=-1;
|
||||
chan[i].inPorta=false;
|
||||
// COMPAT FLAG: arpeggio inhibits non-porta slides
|
||||
if (!song.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
if (!song.compatFlags.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1797,7 +1797,7 @@ void DivEngine::nextRow() {
|
|||
for (int i=0; i<song.chans; i++) {
|
||||
// COMPAT FLAG: cut/delay effect policy (delayBehavior)
|
||||
// - if not lax, reset the row delay timer so it never happens
|
||||
if (song.delayBehavior!=2) {
|
||||
if (song.compatFlags.delayBehavior!=2) {
|
||||
chan[i].rowDelay=0;
|
||||
}
|
||||
processRow(i,false);
|
||||
|
|
@ -1862,7 +1862,7 @@ void DivEngine::nextRow() {
|
|||
// - DefleMask uses a mandatory two-speed system
|
||||
// - if the pattern length is odd, the speed to use is determined correctly...
|
||||
// - ...unless the order count is also odd! in that case the first row of order 0 will always use speed 1, even if the song looped and we should be using speed 2
|
||||
if (song.brokenSpeedSel) {
|
||||
if (song.compatFlags.brokenSpeedSel) {
|
||||
unsigned char speed2=(speeds.len>=2)?speeds.val[1]:speeds.val[0];
|
||||
unsigned char speed1=speeds.val[0];
|
||||
|
||||
|
|
@ -1913,7 +1913,7 @@ void DivEngine::nextRow() {
|
|||
// COMPAT FLAG: pre-note does not take effect into consideration
|
||||
// - a bug which does not cancel pre-note before a portamento or during legato
|
||||
// - fixed in 0.6pre9
|
||||
if (!song.preNoteNoEffect) {
|
||||
if (!song.compatFlags.preNoteNoEffect) {
|
||||
// handle portamento
|
||||
if (pat->newData[curRow][DIV_PAT_FX(j)]==0x03 && pat->newData[curRow][DIV_PAT_FXVAL(j)]!=0 && pat->newData[curRow][DIV_PAT_FXVAL(j)]!=-1) {
|
||||
doPreparePreNote=false;
|
||||
|
|
@ -1947,7 +1947,7 @@ void DivEngine::nextRow() {
|
|||
|
||||
// COMPAT FLAG: auto-insert one tick gap between notes
|
||||
// - simulates behavior of certain Amiga/C64 sound drivers where a one-tick cut occurred before another note
|
||||
if (song.oneTickCut) {
|
||||
if (song.compatFlags.oneTickCut) {
|
||||
bool doPrepareCut=true;
|
||||
int addition=0;
|
||||
|
||||
|
|
@ -2158,7 +2158,7 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
// - 0: reset channels. call playSub() to seek back to the loop position
|
||||
// - 1: soft-reset channels. same as 0 for now
|
||||
// - 2: don't reset
|
||||
if (song.loopModality!=2) {
|
||||
if (song.compatFlags.loopModality!=2) {
|
||||
playSub(true);
|
||||
}
|
||||
}
|
||||
|
|
@ -2205,7 +2205,7 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
// volume slides and tremolo
|
||||
// COMPAT FLAG: don't slide on the first tick of a row
|
||||
// - Amiga/PC tracker behavior where slides and vibrato do not take course during the first tick of a row
|
||||
if (!song.noSlidesOnFirstTick || !firstTick) {
|
||||
if (!song.compatFlags.noSlidesOnFirstTick || !firstTick) {
|
||||
// volume slides
|
||||
if (chan[i].volSpeed!=0) {
|
||||
// the call to GET_VOLUME is part of a compatibility process
|
||||
|
|
@ -2255,7 +2255,7 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
// COMPAT FLAG: legacy volume slides
|
||||
// - sets volume to max once a vol slide down has finished (thus setting volume to volMax+1)
|
||||
// - there is more to this, such as the first step of volume macro resulting in unpredictable behavior, but I don't feel like implementing THAT...
|
||||
if (song.legacyVolumeSlides) {
|
||||
if (song.compatFlags.legacyVolumeSlides) {
|
||||
chan[i].volume=chan[i].volMax+1;
|
||||
} else {
|
||||
chan[i].volume=0;
|
||||
|
|
@ -2418,7 +2418,7 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
// portamento and pitch slides
|
||||
// COMPAT FLAG: don't slide on the first tick of a row
|
||||
// - Amiga/PC tracker behavior where slides and vibrato do not take course during the first tick of a row
|
||||
if (!song.noSlidesOnFirstTick || !firstTick) {
|
||||
if (!song.compatFlags.noSlidesOnFirstTick || !firstTick) {
|
||||
// portamento only runs if the channel has been used and the porta speed is higher than 0
|
||||
if ((chan[i].keyOn || chan[i].keyOff) && chan[i].portaSpeed>0) {
|
||||
// send a portamento update command to the dispatch.
|
||||
|
|
@ -2428,7 +2428,7 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
// - 1: full (pitch slides linear... we multiply the portamento speed by a user-defined multiplier)
|
||||
// COMPAT FLAG: reset pitch slide/portamento upon reaching target (inverted in the GUI)
|
||||
// - when disabled, portamento remains active after it has finished
|
||||
if (dispatchCmd(DivCommand(DIV_CMD_NOTE_PORTA,i,chan[i].portaSpeed*(song.linearPitch?song.pitchSlideSpeed:1),chan[i].portaNote))==2 && chan[i].portaStop && song.targetResetsSlides) {
|
||||
if (dispatchCmd(DivCommand(DIV_CMD_NOTE_PORTA,i,chan[i].portaSpeed*(song.compatFlags.linearPitch?song.compatFlags.pitchSlideSpeed:1),chan[i].portaNote))==2 && chan[i].portaStop && song.compatFlags.targetResetsSlides) {
|
||||
// if we are here, it means we reached the target and shall stop
|
||||
chan[i].portaSpeed=0;
|
||||
dispatchCmd(DivCommand(DIV_CMD_HINT_PORTA,i,CLAMP(chan[i].portaNote,-128,127),MAX(chan[i].portaSpeed,0)));
|
||||
|
|
@ -2454,7 +2454,7 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
// COMPAT FLAG: reset slides on note off (inverted in the GUI)
|
||||
// - a portamento/pitch slide will be halted upon encountering note off
|
||||
// - this will not occur if the stopPortaOnNoteOff flag is on and this is a portamento
|
||||
if (chan[i].inPorta && song.noteOffResetsSlides) {
|
||||
if (chan[i].inPorta && song.compatFlags.noteOffResetsSlides) {
|
||||
chan[i].keyOff=true;
|
||||
chan[i].keyOn=false;
|
||||
// stopOnOff will be false if stopPortaOnNoteOff flag is off
|
||||
|
|
@ -2503,7 +2503,7 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
}
|
||||
// COMPAT FLAG: reset arp position on row change
|
||||
// - simulates Amiga/PC tracker behavior where the next row resets arp pos
|
||||
if (song.rowResetsArpPos && firstTick) {
|
||||
if (song.compatFlags.rowResetsArpPos && firstTick) {
|
||||
chan[i].arpStage=-1;
|
||||
}
|
||||
// arpeggio (actually)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
#include <inttypes.h>
|
||||
#include <chrono>
|
||||
|
||||
static DivCompatFlags defaultFlags;
|
||||
|
||||
TimeMicros DivSongTimestamps::getTimes(int order, int row) {
|
||||
if (order<0 || order>=DIV_MAX_PATTERNS) return TimeMicros(-1,0);
|
||||
if (row<0 || row>=DIV_MAX_ROWS) return TimeMicros(-1,0);
|
||||
|
|
@ -448,6 +450,66 @@ void DivSubSong::calcTimestamps(int chans, std::vector<DivGroovePattern>& groove
|
|||
logV("song length: %s; %" PRIu64 " ticks",ts.totalTime.toString(6,TA_TIME_FORMAT_AUTO),ts.totalTicks);
|
||||
}
|
||||
|
||||
void DivSubSong::putData(SafeWriter* w, int chans) {
|
||||
size_t blockStartSeek, blockEndSeek;
|
||||
w->write("SNG2",4);
|
||||
blockStartSeek=w->tell();
|
||||
w->writeI(0);
|
||||
|
||||
w->writeF(hz);
|
||||
w->writeC(arpLen);
|
||||
w->writeC(timeBase);
|
||||
w->writeS(patLen);
|
||||
w->writeS(ordersLen);
|
||||
w->writeC(hilightA);
|
||||
w->writeC(hilightB);
|
||||
w->writeS(virtualTempoN);
|
||||
w->writeS(virtualTempoD);
|
||||
|
||||
// speeds
|
||||
w->writeS(speeds.len);
|
||||
for (int i=0; i<16; i++) {
|
||||
w->writeS(speeds.val[i]);
|
||||
}
|
||||
|
||||
w->writeString(name,false);
|
||||
w->writeString(notes,false);
|
||||
|
||||
for (int i=0; i<chans; i++) {
|
||||
for (int j=0; j<ordersLen; j++) {
|
||||
w->writeC(orders.ord[i][j]);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<chans; i++) {
|
||||
w->writeC(pat[i].effectCols);
|
||||
}
|
||||
|
||||
for (int i=0; i<chans; i++) {
|
||||
w->writeC(
|
||||
(chanShow[i]?1:0)|
|
||||
(chanShowChanOsc[i]?2:0)
|
||||
);
|
||||
}
|
||||
|
||||
for (int i=0; i<chans; i++) {
|
||||
w->writeC(chanCollapse[i]);
|
||||
}
|
||||
|
||||
for (int i=0; i<chans; i++) {
|
||||
w->writeString(chanName[i],false);
|
||||
}
|
||||
|
||||
for (int i=0; i<chans; i++) {
|
||||
w->writeString(chanShortName[i],false);
|
||||
}
|
||||
|
||||
blockEndSeek=w->tell();
|
||||
w->seek(blockStartSeek,SEEK_SET);
|
||||
w->writeI(blockEndSeek-blockStartSeek-4);
|
||||
w->seek(0,SEEK_END);
|
||||
}
|
||||
|
||||
void DivSubSong::clearData() {
|
||||
for (int i=0; i<DIV_MAX_CHANS; i++) {
|
||||
pat[i].wipePatterns();
|
||||
|
|
@ -584,7 +646,7 @@ void DivSong::findSubSongs() {
|
|||
// find possible subsongs
|
||||
logD("finding subsongs...");
|
||||
while (++curStart<i->ordersLen) {
|
||||
i->calcTimestamps(chans,grooves,jumpTreatment,ignoreJumpAtEnd,brokenSpeedSel,delayBehavior,curStart);
|
||||
i->calcTimestamps(chans,grooves,compatFlags.jumpTreatment,compatFlags.ignoreJumpAtEnd,compatFlags.brokenSpeedSel,compatFlags.delayBehavior,curStart);
|
||||
if (!i->ts.isLoopable) break;
|
||||
|
||||
// make sure we don't pick the same range twice
|
||||
|
|
@ -809,3 +871,167 @@ void DivSong::unload() {
|
|||
}
|
||||
subsong.clear();
|
||||
}
|
||||
|
||||
void DivGroovePattern::putData(SafeWriter* w) {
|
||||
size_t blockStartSeek, blockEndSeek;
|
||||
w->write("GROV",4);
|
||||
blockStartSeek=w->tell();
|
||||
w->writeI(0);
|
||||
|
||||
w->writeS(len);
|
||||
for (int i=0; i<16; i++) {
|
||||
w->writeS(val[i]);
|
||||
}
|
||||
|
||||
blockEndSeek=w->tell();
|
||||
w->seek(blockStartSeek,SEEK_SET);
|
||||
w->writeI(blockEndSeek-blockStartSeek-4);
|
||||
w->seek(0,SEEK_END);
|
||||
}
|
||||
|
||||
void DivCompatFlags::setDefaults() {
|
||||
limitSlides=false;
|
||||
linearPitch=1;
|
||||
pitchSlideSpeed=4;
|
||||
loopModality=2;
|
||||
delayBehavior=2;
|
||||
jumpTreatment=0;
|
||||
properNoiseLayout=true;
|
||||
waveDutyIsVol=false;
|
||||
resetMacroOnPorta=false;
|
||||
legacyVolumeSlides=false;
|
||||
compatibleArpeggio=false;
|
||||
noteOffResetsSlides=true;
|
||||
targetResetsSlides=true;
|
||||
arpNonPorta=false;
|
||||
algMacroBehavior=false;
|
||||
brokenShortcutSlides=false;
|
||||
ignoreDuplicateSlides=false;
|
||||
stopPortaOnNoteOff=false;
|
||||
continuousVibrato=false;
|
||||
brokenDACMode=false;
|
||||
oneTickCut=false;
|
||||
newInsTriggersInPorta=true;
|
||||
arp0Reset=true;
|
||||
brokenSpeedSel=false;
|
||||
noSlidesOnFirstTick=false;
|
||||
rowResetsArpPos=false;
|
||||
ignoreJumpAtEnd=false;
|
||||
buggyPortaAfterSlide=false;
|
||||
gbInsAffectsEnvelope=true;
|
||||
sharedExtStat=true;
|
||||
ignoreDACModeOutsideIntendedChannel=false;
|
||||
e1e2AlsoTakePriority=false;
|
||||
newSegaPCM=true;
|
||||
fbPortaPause=false;
|
||||
snDutyReset=false;
|
||||
pitchMacroIsLinear=true;
|
||||
oldOctaveBoundary=false;
|
||||
noOPN2Vol=false;
|
||||
newVolumeScaling=true;
|
||||
volMacroLinger=true;
|
||||
brokenOutVol=false;
|
||||
brokenOutVol2=false;
|
||||
e1e2StopOnSameNote=false;
|
||||
brokenPortaArp=false;
|
||||
snNoLowPeriods=false;
|
||||
disableSampleMacro=false;
|
||||
oldArpStrategy=false;
|
||||
brokenPortaLegato=false;
|
||||
brokenFMOff=false;
|
||||
preNoteNoEffect=false;
|
||||
oldDPCM=false;
|
||||
resetArpPhaseOnNewNote=false;
|
||||
ceilVolumeScaling=false;
|
||||
oldAlwaysSetVolume=false;
|
||||
oldSampleOffset=false;
|
||||
oldCenterRate=true;
|
||||
}
|
||||
|
||||
bool DivCompatFlags::areDefaults() {
|
||||
return (*this==defaultFlags);
|
||||
}
|
||||
|
||||
#define CHECK_AND_STORE_BOOL(_x) \
|
||||
if (_x!=defaultFlags._x) { \
|
||||
c.set(#_x,_x); \
|
||||
}
|
||||
|
||||
#define CHECK_AND_STORE_UNSIGNED_CHAR(_x) \
|
||||
if (_x!=defaultFlags._x) { \
|
||||
c.set(#_x,(int)_x); \
|
||||
}
|
||||
|
||||
void DivCompatFlags::putData(SafeWriter* w) {
|
||||
DivConfig c;
|
||||
size_t blockStartSeek, blockEndSeek;
|
||||
|
||||
CHECK_AND_STORE_BOOL(limitSlides);
|
||||
CHECK_AND_STORE_UNSIGNED_CHAR(linearPitch);
|
||||
CHECK_AND_STORE_UNSIGNED_CHAR(pitchSlideSpeed);
|
||||
CHECK_AND_STORE_UNSIGNED_CHAR(loopModality);
|
||||
CHECK_AND_STORE_UNSIGNED_CHAR(delayBehavior);
|
||||
CHECK_AND_STORE_UNSIGNED_CHAR(jumpTreatment);
|
||||
CHECK_AND_STORE_BOOL(properNoiseLayout);
|
||||
CHECK_AND_STORE_BOOL(waveDutyIsVol);
|
||||
CHECK_AND_STORE_BOOL(resetMacroOnPorta);
|
||||
CHECK_AND_STORE_BOOL(legacyVolumeSlides);
|
||||
CHECK_AND_STORE_BOOL(compatibleArpeggio);
|
||||
CHECK_AND_STORE_BOOL(noteOffResetsSlides);
|
||||
CHECK_AND_STORE_BOOL(targetResetsSlides);
|
||||
CHECK_AND_STORE_BOOL(arpNonPorta);
|
||||
CHECK_AND_STORE_BOOL(algMacroBehavior);
|
||||
CHECK_AND_STORE_BOOL(brokenShortcutSlides);
|
||||
CHECK_AND_STORE_BOOL(ignoreDuplicateSlides);
|
||||
CHECK_AND_STORE_BOOL(stopPortaOnNoteOff);
|
||||
CHECK_AND_STORE_BOOL(continuousVibrato);
|
||||
CHECK_AND_STORE_BOOL(brokenDACMode);
|
||||
CHECK_AND_STORE_BOOL(oneTickCut);
|
||||
CHECK_AND_STORE_BOOL(newInsTriggersInPorta);
|
||||
CHECK_AND_STORE_BOOL(arp0Reset);
|
||||
CHECK_AND_STORE_BOOL(brokenSpeedSel);
|
||||
CHECK_AND_STORE_BOOL(noSlidesOnFirstTick);
|
||||
CHECK_AND_STORE_BOOL(rowResetsArpPos);
|
||||
CHECK_AND_STORE_BOOL(ignoreJumpAtEnd);
|
||||
CHECK_AND_STORE_BOOL(buggyPortaAfterSlide);
|
||||
CHECK_AND_STORE_BOOL(gbInsAffectsEnvelope);
|
||||
CHECK_AND_STORE_BOOL(sharedExtStat);
|
||||
CHECK_AND_STORE_BOOL(ignoreDACModeOutsideIntendedChannel);
|
||||
CHECK_AND_STORE_BOOL(e1e2AlsoTakePriority);
|
||||
CHECK_AND_STORE_BOOL(newSegaPCM);
|
||||
CHECK_AND_STORE_BOOL(fbPortaPause);
|
||||
CHECK_AND_STORE_BOOL(snDutyReset);
|
||||
CHECK_AND_STORE_BOOL(pitchMacroIsLinear);
|
||||
CHECK_AND_STORE_BOOL(oldOctaveBoundary);
|
||||
CHECK_AND_STORE_BOOL(noOPN2Vol);
|
||||
CHECK_AND_STORE_BOOL(newVolumeScaling);
|
||||
CHECK_AND_STORE_BOOL(volMacroLinger);
|
||||
CHECK_AND_STORE_BOOL(brokenOutVol);
|
||||
CHECK_AND_STORE_BOOL(brokenOutVol2);
|
||||
CHECK_AND_STORE_BOOL(e1e2StopOnSameNote);
|
||||
CHECK_AND_STORE_BOOL(brokenPortaArp);
|
||||
CHECK_AND_STORE_BOOL(snNoLowPeriods);
|
||||
CHECK_AND_STORE_BOOL(disableSampleMacro);
|
||||
CHECK_AND_STORE_BOOL(oldArpStrategy);
|
||||
CHECK_AND_STORE_BOOL(brokenPortaLegato);
|
||||
CHECK_AND_STORE_BOOL(brokenFMOff);
|
||||
CHECK_AND_STORE_BOOL(preNoteNoEffect);
|
||||
CHECK_AND_STORE_BOOL(oldDPCM);
|
||||
CHECK_AND_STORE_BOOL(resetArpPhaseOnNewNote);
|
||||
CHECK_AND_STORE_BOOL(ceilVolumeScaling);
|
||||
CHECK_AND_STORE_BOOL(oldAlwaysSetVolume);
|
||||
CHECK_AND_STORE_BOOL(oldSampleOffset);
|
||||
CHECK_AND_STORE_BOOL(oldCenterRate);
|
||||
|
||||
String data=c.toString();
|
||||
w->write("CFLG",4);
|
||||
blockStartSeek=w->tell();
|
||||
w->writeI(0);
|
||||
|
||||
w->writeString(data,false);
|
||||
|
||||
blockEndSeek=w->tell();
|
||||
w->seek(blockStartSeek,SEEK_SET);
|
||||
w->writeI(blockEndSeek-blockStartSeek-4);
|
||||
w->seek(0,SEEK_END);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ enum DivEffectType: unsigned short {
|
|||
struct DivGroovePattern {
|
||||
unsigned char val[16];
|
||||
unsigned char len;
|
||||
void putData(SafeWriter* w);
|
||||
DivGroovePattern():
|
||||
len(1) {
|
||||
memset(val,6,16);
|
||||
|
|
@ -229,6 +230,11 @@ struct DivSubSong {
|
|||
*/
|
||||
void calcTimestamps(int chans, std::vector<DivGroovePattern>& grooves, int jumpTreatment, int ignoreJumpAtEnd, int brokenSpeedSel, int delayBehavior, int firstPat=0);
|
||||
|
||||
/**
|
||||
* write sub-song block to a SafeWriter.
|
||||
*/
|
||||
void putData(SafeWriter* w, int chans);
|
||||
|
||||
void clearData();
|
||||
void removeUnusedPatterns();
|
||||
void optimizePatterns();
|
||||
|
|
@ -269,42 +275,7 @@ struct DivEffectStorage {
|
|||
storageLen(0) {}
|
||||
};
|
||||
|
||||
struct DivSong {
|
||||
unsigned short version;
|
||||
bool isDMF;
|
||||
|
||||
// system
|
||||
int chans;
|
||||
DivSystem system[DIV_MAX_CHIPS];
|
||||
unsigned short systemChans[DIV_MAX_CHIPS];
|
||||
unsigned char systemLen;
|
||||
float systemVol[DIV_MAX_CHIPS];
|
||||
float systemPan[DIV_MAX_CHIPS];
|
||||
float systemPanFR[DIV_MAX_CHIPS];
|
||||
DivConfig systemFlags[DIV_MAX_CHIPS];
|
||||
|
||||
// song information
|
||||
String name, author, systemName;
|
||||
|
||||
// legacy song information
|
||||
// those will be stored in .fur and mapped to VGM as:
|
||||
// category -> game name
|
||||
// writer -> ripper
|
||||
// createdDate -> year
|
||||
String carrier, composer, vendor, category, writer, arranger, copyright, manGroup, manInfo, createdDate, revisionDate;
|
||||
|
||||
// more VGM specific stuff
|
||||
String nameJ, authorJ, categoryJ, systemNameJ;
|
||||
|
||||
// other things
|
||||
String notes;
|
||||
|
||||
// module details
|
||||
int insLen, waveLen, sampleLen;
|
||||
float masterVol;
|
||||
float tuning;
|
||||
|
||||
// compatibility flags
|
||||
struct DivCompatFlags {
|
||||
bool limitSlides;
|
||||
// linear pitch
|
||||
unsigned char linearPitch;
|
||||
|
|
@ -364,9 +335,7 @@ struct DivSong {
|
|||
bool brokenPortaArp;
|
||||
bool snNoLowPeriods;
|
||||
bool disableSampleMacro;
|
||||
bool autoSystem;
|
||||
bool oldArpStrategy;
|
||||
bool patchbayAuto;
|
||||
bool brokenPortaLegato;
|
||||
bool brokenFMOff;
|
||||
bool preNoteNoEffect;
|
||||
|
|
@ -375,9 +344,67 @@ struct DivSong {
|
|||
bool ceilVolumeScaling;
|
||||
bool oldAlwaysSetVolume;
|
||||
bool oldSampleOffset;
|
||||
// TODO: this flag is not saved to the file yet.
|
||||
// new flags as of dev240
|
||||
bool oldCenterRate;
|
||||
|
||||
void setDefaults();
|
||||
bool areDefaults();
|
||||
void putData(SafeWriter* w);
|
||||
|
||||
bool operator==(const DivCompatFlags& other) {
|
||||
return (memcmp(this,&other,sizeof(DivCompatFlags))==0);
|
||||
}
|
||||
bool operator!=(const DivCompatFlags& other) {
|
||||
return (memcmp(this,&other,sizeof(DivCompatFlags))!=0);
|
||||
}
|
||||
|
||||
DivCompatFlags() {
|
||||
memset(this,0,sizeof(DivCompatFlags));
|
||||
setDefaults();
|
||||
}
|
||||
};
|
||||
|
||||
struct DivSong {
|
||||
unsigned short version;
|
||||
bool isDMF;
|
||||
|
||||
// system
|
||||
int chans;
|
||||
DivSystem system[DIV_MAX_CHIPS];
|
||||
unsigned short systemChans[DIV_MAX_CHIPS];
|
||||
unsigned char systemLen;
|
||||
float systemVol[DIV_MAX_CHIPS];
|
||||
float systemPan[DIV_MAX_CHIPS];
|
||||
float systemPanFR[DIV_MAX_CHIPS];
|
||||
DivConfig systemFlags[DIV_MAX_CHIPS];
|
||||
|
||||
// song information
|
||||
String name, author, systemName;
|
||||
|
||||
// legacy song information
|
||||
// those will be stored in .fur and mapped to VGM as:
|
||||
// category -> game name
|
||||
// writer -> ripper
|
||||
// createdDate -> year
|
||||
String carrier, composer, vendor, category, writer, arranger, copyright, manGroup, manInfo, createdDate, revisionDate;
|
||||
|
||||
// more VGM specific stuff
|
||||
String nameJ, authorJ, categoryJ, systemNameJ;
|
||||
|
||||
// other things
|
||||
String notes;
|
||||
|
||||
// module details
|
||||
int insLen, waveLen, sampleLen;
|
||||
float masterVol;
|
||||
float tuning;
|
||||
|
||||
bool autoSystem;
|
||||
bool patchbayAuto;
|
||||
|
||||
// compatibility flags
|
||||
DivCompatFlags compatFlags;
|
||||
|
||||
std::vector<DivInstrument*> ins;
|
||||
std::vector<DivWavetable*> wave;
|
||||
std::vector<DivSample*> sample;
|
||||
|
|
@ -481,64 +508,8 @@ struct DivSong {
|
|||
sampleLen(0),
|
||||
masterVol(1.0f),
|
||||
tuning(440.0f),
|
||||
limitSlides(false),
|
||||
linearPitch(1),
|
||||
pitchSlideSpeed(4),
|
||||
loopModality(2),
|
||||
delayBehavior(2),
|
||||
jumpTreatment(0),
|
||||
properNoiseLayout(true),
|
||||
waveDutyIsVol(false),
|
||||
resetMacroOnPorta(false),
|
||||
legacyVolumeSlides(false),
|
||||
compatibleArpeggio(false),
|
||||
noteOffResetsSlides(true),
|
||||
targetResetsSlides(true),
|
||||
arpNonPorta(false),
|
||||
algMacroBehavior(false),
|
||||
brokenShortcutSlides(false),
|
||||
ignoreDuplicateSlides(false),
|
||||
stopPortaOnNoteOff(false),
|
||||
continuousVibrato(false),
|
||||
brokenDACMode(false),
|
||||
oneTickCut(false),
|
||||
newInsTriggersInPorta(true),
|
||||
arp0Reset(true),
|
||||
brokenSpeedSel(false),
|
||||
noSlidesOnFirstTick(false),
|
||||
rowResetsArpPos(false),
|
||||
ignoreJumpAtEnd(false),
|
||||
buggyPortaAfterSlide(false),
|
||||
gbInsAffectsEnvelope(true),
|
||||
sharedExtStat(true),
|
||||
ignoreDACModeOutsideIntendedChannel(false),
|
||||
e1e2AlsoTakePriority(false),
|
||||
newSegaPCM(true),
|
||||
fbPortaPause(false),
|
||||
snDutyReset(false),
|
||||
pitchMacroIsLinear(true),
|
||||
oldOctaveBoundary(false),
|
||||
noOPN2Vol(false),
|
||||
newVolumeScaling(true),
|
||||
volMacroLinger(true),
|
||||
brokenOutVol(false),
|
||||
brokenOutVol2(false),
|
||||
e1e2StopOnSameNote(false),
|
||||
brokenPortaArp(false),
|
||||
snNoLowPeriods(false),
|
||||
disableSampleMacro(false),
|
||||
autoSystem(true),
|
||||
oldArpStrategy(false),
|
||||
patchbayAuto(true),
|
||||
brokenPortaLegato(false),
|
||||
brokenFMOff(false),
|
||||
preNoteNoEffect(false),
|
||||
oldDPCM(false),
|
||||
resetArpPhaseOnNewNote(false),
|
||||
ceilVolumeScaling(false),
|
||||
oldAlwaysSetVolume(false),
|
||||
oldSampleOffset(false),
|
||||
oldCenterRate(true) {
|
||||
patchbayAuto(true) {
|
||||
memset(dispatchFirstChan,0,DIV_MAX_CHANS*sizeof(int));
|
||||
memset(dispatchChanOfChan,0,DIV_MAX_CHANS*sizeof(int));
|
||||
memset(dispatchOfChan,0,DIV_MAX_CHANS*sizeof(int));
|
||||
|
|
|
|||
|
|
@ -2736,7 +2736,7 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p
|
|||
countDown--;
|
||||
break;
|
||||
}
|
||||
if (song.loopModality!=2) countDown=0;
|
||||
if (song.compatFlags.loopModality!=2) countDown=0;
|
||||
|
||||
if (countDown>0 && !beenOneLoopAlready) {
|
||||
loopTickSong++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue