mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-02 02:52:40 +00:00
Remove compatibility flag
This commit is contained in:
parent
607b541307
commit
d64614e7fe
5 changed files with 4 additions and 51 deletions
|
@ -104,7 +104,7 @@ struct DivChannelState {
|
||||||
int delayOrder, delayRow, retrigSpeed, retrigTick;
|
int delayOrder, delayRow, retrigSpeed, retrigTick;
|
||||||
int vibratoDepth, vibratoRate, vibratoPos, vibratoPosGiant, vibratoDir, vibratoFine;
|
int vibratoDepth, vibratoRate, vibratoPos, vibratoPosGiant, vibratoDir, vibratoFine;
|
||||||
int tremoloDepth, tremoloRate, tremoloPos;
|
int tremoloDepth, tremoloRate, tremoloPos;
|
||||||
unsigned char arp, arpStage, arpTicks, panL, panR, panRL, panRR, lastVibrato, lastPorta, cutType, lastArp, lastVibrato2, lastPorta2;
|
unsigned char arp, arpStage, arpTicks, panL, panR, panRL, panRR, lastVibrato, lastPorta, cutType;
|
||||||
bool doNote, legato, portaStop, keyOn, keyOff, nowYouCanStop, stopOnOff, releasing;
|
bool doNote, legato, portaStop, keyOn, keyOff, nowYouCanStop, stopOnOff, releasing;
|
||||||
bool arpYield, delayLocked, inPorta, scheduledSlideReset, shorthandPorta, wasShorthandPorta, noteOnInhibit, resetArp;
|
bool arpYield, delayLocked, inPorta, scheduledSlideReset, shorthandPorta, wasShorthandPorta, noteOnInhibit, resetArp;
|
||||||
bool wentThroughNote, goneThroughNote;
|
bool wentThroughNote, goneThroughNote;
|
||||||
|
@ -150,9 +150,6 @@ struct DivChannelState {
|
||||||
lastVibrato(0),
|
lastVibrato(0),
|
||||||
lastPorta(0),
|
lastPorta(0),
|
||||||
cutType(0),
|
cutType(0),
|
||||||
lastArp(0),
|
|
||||||
lastVibrato2(0),
|
|
||||||
lastPorta2(0),
|
|
||||||
doNote(false),
|
doNote(false),
|
||||||
legato(false),
|
legato(false),
|
||||||
portaStop(false),
|
portaStop(false),
|
||||||
|
|
|
@ -337,9 +337,9 @@ void TFMparsePattern(struct TFMparsePatternInfo info) {
|
||||||
case 8:
|
case 8:
|
||||||
// pan
|
// pan
|
||||||
pat->data[k][4]=0x80;
|
pat->data[k][4]=0x80;
|
||||||
if (effectVal[k]==1) {
|
if ((effectVal[k]&0xF)==1) {
|
||||||
pat->data[k][5]=0;
|
pat->data[k][5]=0;
|
||||||
} else if (effectVal[k]==2) {
|
} else if ((effectVal[k]&0xF)==2) {
|
||||||
pat->data[k][5]=0xFF;
|
pat->data[k][5]=0xFF;
|
||||||
} else {
|
} else {
|
||||||
pat->data[k][5]=0x80;
|
pat->data[k][5]=0x80;
|
||||||
|
@ -370,9 +370,6 @@ bool DivEngine::loadTFMv1(unsigned char* file, size_t len) {
|
||||||
ds.systemName="Sega Genesis/Mega Drive or TurboSound FM";
|
ds.systemName="Sega Genesis/Mega Drive or TurboSound FM";
|
||||||
ds.subsong[0]->hz=50;
|
ds.subsong[0]->hz=50;
|
||||||
ds.systemLen=1;
|
ds.systemLen=1;
|
||||||
ds.resetEffectsOnRowChange=true;
|
|
||||||
addWarning("this song relies on a compatibility flag to make the sound more accurate," \
|
|
||||||
" it will not be preserved when you save it");
|
|
||||||
|
|
||||||
ds.system[0]=DIV_SYSTEM_YM2612;
|
ds.system[0]=DIV_SYSTEM_YM2612;
|
||||||
|
|
||||||
|
@ -558,9 +555,6 @@ bool DivEngine::loadTFMv2(unsigned char* file, size_t len) {
|
||||||
ds.systemName="Sega Genesis/Mega Drive or TurboSound FM";
|
ds.systemName="Sega Genesis/Mega Drive or TurboSound FM";
|
||||||
ds.subsong[0]->hz=50;
|
ds.subsong[0]->hz=50;
|
||||||
ds.systemLen=1;
|
ds.systemLen=1;
|
||||||
ds.resetEffectsOnRowChange=true;
|
|
||||||
addWarning("this song relies on a compatibility flag to make the sound more accurate," \
|
|
||||||
" it will not be preserved when you save it");
|
|
||||||
|
|
||||||
ds.system[0]=DIV_SYSTEM_YM2612;
|
ds.system[0]=DIV_SYSTEM_YM2612;
|
||||||
unsigned char magic[8]={0};
|
unsigned char magic[8]={0};
|
||||||
|
|
|
@ -653,14 +653,6 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
bool surroundPanChanged=false;
|
bool surroundPanChanged=false;
|
||||||
|
|
||||||
// effects
|
// effects
|
||||||
if (song.resetEffectsOnRowChange) {
|
|
||||||
chan[i].portaSpeed=-1;
|
|
||||||
chan[i].portaNote=-1;
|
|
||||||
dispatchCmd(DivCommand(DIV_CMD_HINT_PORTA,i,CLAMP(chan[i].portaNote,-128,127),MAX(chan[i].portaSpeed,0)));
|
|
||||||
chan[i].inPorta=false;
|
|
||||||
if (!song.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int j=0; j<curPat[i].effectCols; j++) {
|
for (int j=0; j<curPat[i].effectCols; j++) {
|
||||||
short effect=pat->data[whatRow][4+(j<<1)];
|
short effect=pat->data[whatRow][4+(j<<1)];
|
||||||
short effectVal=pat->data[whatRow][5+(j<<1)];
|
short effectVal=pat->data[whatRow][5+(j<<1)];
|
||||||
|
@ -705,7 +697,6 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
break;
|
break;
|
||||||
case 0x01: // ramp up
|
case 0x01: // ramp up
|
||||||
if (song.ignoreDuplicateSlides && (lastSlide==0x01 || lastSlide==0x1337)) break;
|
if (song.ignoreDuplicateSlides && (lastSlide==0x01 || lastSlide==0x1337)) break;
|
||||||
chan[i].lastPorta2=effectVal;
|
|
||||||
lastSlide=0x01;
|
lastSlide=0x01;
|
||||||
if (effectVal==0) {
|
if (effectVal==0) {
|
||||||
chan[i].portaNote=-1;
|
chan[i].portaNote=-1;
|
||||||
|
@ -728,7 +719,6 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
break;
|
break;
|
||||||
case 0x02: // ramp down
|
case 0x02: // ramp down
|
||||||
if (song.ignoreDuplicateSlides && (lastSlide==0x02 || lastSlide==0x1337)) break;
|
if (song.ignoreDuplicateSlides && (lastSlide==0x02 || lastSlide==0x1337)) break;
|
||||||
chan[i].lastPorta2=effectVal;
|
|
||||||
lastSlide=0x02;
|
lastSlide=0x02;
|
||||||
if (effectVal==0) {
|
if (effectVal==0) {
|
||||||
chan[i].portaNote=-1;
|
chan[i].portaNote=-1;
|
||||||
|
@ -750,7 +740,6 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x03: // portamento
|
case 0x03: // portamento
|
||||||
chan[i].lastPorta2=effectVal;
|
|
||||||
if (effectVal==0) {
|
if (effectVal==0) {
|
||||||
chan[i].portaNote=-1;
|
chan[i].portaNote=-1;
|
||||||
chan[i].portaSpeed=-1;
|
chan[i].portaSpeed=-1;
|
||||||
|
@ -779,7 +768,6 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x04: // vibrato
|
case 0x04: // vibrato
|
||||||
chan[i].lastVibrato2=effectVal;
|
|
||||||
if (effectVal) chan[i].lastVibrato=effectVal;
|
if (effectVal) chan[i].lastVibrato=effectVal;
|
||||||
chan[i].vibratoDepth=effectVal&15;
|
chan[i].vibratoDepth=effectVal&15;
|
||||||
chan[i].vibratoRate=effectVal>>4;
|
chan[i].vibratoRate=effectVal>>4;
|
||||||
|
@ -787,7 +775,6 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15)));
|
dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15)));
|
||||||
break;
|
break;
|
||||||
case 0x05: // vol slide + vibrato
|
case 0x05: // vol slide + vibrato
|
||||||
chan[i].lastVibrato2=effectVal;
|
|
||||||
if (effectVal==0) {
|
if (effectVal==0) {
|
||||||
chan[i].vibratoDepth=0;
|
chan[i].vibratoDepth=0;
|
||||||
chan[i].vibratoRate=0;
|
chan[i].vibratoRate=0;
|
||||||
|
@ -814,7 +801,6 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
dispatchCmd(DivCommand(DIV_CMD_HINT_VOL_SLIDE,i,chan[i].volSpeed));
|
dispatchCmd(DivCommand(DIV_CMD_HINT_VOL_SLIDE,i,chan[i].volSpeed));
|
||||||
break;
|
break;
|
||||||
case 0x06: // vol slide + porta
|
case 0x06: // vol slide + porta
|
||||||
chan[i].lastPorta2=effectVal;
|
|
||||||
if (effectVal==0 || chan[i].lastPorta==0) {
|
if (effectVal==0 || chan[i].lastPorta==0) {
|
||||||
chan[i].portaNote=-1;
|
chan[i].portaNote=-1;
|
||||||
chan[i].portaSpeed=-1;
|
chan[i].portaSpeed=-1;
|
||||||
|
@ -885,7 +871,6 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
dispatchCmd(DivCommand(DIV_CMD_HINT_VOL_SLIDE,i,chan[i].volSpeed));
|
dispatchCmd(DivCommand(DIV_CMD_HINT_VOL_SLIDE,i,chan[i].volSpeed));
|
||||||
break;
|
break;
|
||||||
case 0x00: // arpeggio
|
case 0x00: // arpeggio
|
||||||
chan[i].lastArp=effectVal;
|
|
||||||
chan[i].arp=effectVal;
|
chan[i].arp=effectVal;
|
||||||
if (chan[i].arp==0 && song.arp0Reset) {
|
if (chan[i].arp==0 && song.arp0Reset) {
|
||||||
chan[i].resetArp=true;
|
chan[i].resetArp=true;
|
||||||
|
@ -1139,23 +1124,6 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[i].doNote) {
|
if (chan[i].doNote) {
|
||||||
if (song.resetEffectsOnRowChange) {
|
|
||||||
if (chan[i].lastArp) {
|
|
||||||
chan[i].lastArp=0;
|
|
||||||
} else {
|
|
||||||
chan[i].arp=0;
|
|
||||||
dispatchCmd(DivCommand(DIV_CMD_HINT_ARPEGGIO,i,chan[i].arp));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (chan[i].lastVibrato2) {
|
|
||||||
chan[i].lastVibrato2=0;
|
|
||||||
} else {
|
|
||||||
chan[i].vibratoDepth=0;
|
|
||||||
chan[i].vibratoRate=0;
|
|
||||||
dispatchCmd(DivCommand(DIV_CMD_HINT_VIBRATO,i,chan[i].vibratoDepth,chan[i].vibratoRate));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!song.continuousVibrato) {
|
if (!song.continuousVibrato) {
|
||||||
chan[i].vibratoPos=0;
|
chan[i].vibratoPos=0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -331,7 +331,6 @@ struct DivSong {
|
||||||
bool resetArpPhaseOnNewNote;
|
bool resetArpPhaseOnNewNote;
|
||||||
bool ceilVolumeScaling;
|
bool ceilVolumeScaling;
|
||||||
bool oldAlwaysSetVolume;
|
bool oldAlwaysSetVolume;
|
||||||
bool resetEffectsOnRowChange;
|
|
||||||
|
|
||||||
std::vector<DivInstrument*> ins;
|
std::vector<DivInstrument*> ins;
|
||||||
std::vector<DivWavetable*> wave;
|
std::vector<DivWavetable*> wave;
|
||||||
|
@ -455,8 +454,7 @@ struct DivSong {
|
||||||
oldDPCM(false),
|
oldDPCM(false),
|
||||||
resetArpPhaseOnNewNote(false),
|
resetArpPhaseOnNewNote(false),
|
||||||
ceilVolumeScaling(false),
|
ceilVolumeScaling(false),
|
||||||
oldAlwaysSetVolume(false),
|
oldAlwaysSetVolume(false) {
|
||||||
resetEffectsOnRowChange(false) {
|
|
||||||
for (int i=0; i<DIV_MAX_CHIPS; i++) {
|
for (int i=0; i<DIV_MAX_CHIPS; i++) {
|
||||||
system[i]=DIV_SYSTEM_NULL;
|
system[i]=DIV_SYSTEM_NULL;
|
||||||
systemVol[i]=1.0;
|
systemVol[i]=1.0;
|
||||||
|
|
|
@ -344,10 +344,6 @@ void FurnaceGUI::drawCompatFlags() {
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("when enabled, volume macros round up when applied\nthis prevents volume scaling from causing vol=0, which is silent on some chips\n\nineffective on logarithmic channels");
|
ImGui::SetTooltip("when enabled, volume macros round up when applied\nthis prevents volume scaling from causing vol=0, which is silent on some chips\n\nineffective on logarithmic channels");
|
||||||
}
|
}
|
||||||
ImGui::Checkbox("Reset effects on row change",&e->song.resetEffectsOnRowChange);
|
|
||||||
if (ImGui::IsItemHovered()) {
|
|
||||||
ImGui::SetTooltip("when enabled, effects in a row will be canceled after the row changes");
|
|
||||||
}
|
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
}
|
}
|
||||||
ImGui::EndTabBar();
|
ImGui::EndTabBar();
|
||||||
|
|
Loading…
Reference in a new issue