dev191 - kind of remove DIV_ALWAYS_SET_VOLUME

it's useless crap I put during the Defle compat days
it serves nearly no purpose nowadays

also why is it a command?
This commit is contained in:
tildearrow 2024-01-16 23:54:32 -05:00
parent 95aff38cb2
commit f8187b9a5f
87 changed files with 105 additions and 207 deletions

View file

@ -364,7 +364,8 @@ size | description
1 | disable new NES DPCM features (>=183) 1 | disable new NES DPCM features (>=183)
1 | reset arp effect phase on new note (>=184) 1 | reset arp effect phase on new note (>=184)
1 | linear volume scaling rounds up (>=188) 1 | linear volume scaling rounds up (>=188)
2 | reserved 1 | legacy "always set volume" behavior (>=191)
1 | reserved
--- | **speed pattern of first song** (>=139) --- | **speed pattern of first song** (>=139)
1 | length of speed pattern (fail if this is lower than 0 or higher than 16) 1 | length of speed pattern (fail if this is lower than 0 or higher than 16)
16 | speed pattern (this overrides speed 1 and speed 2 settings) 16 | speed pattern (this overrides speed 1 and speed 2 settings)

View file

@ -312,8 +312,6 @@ SafeWriter* DivEngine::saveCommand(bool binary) {
for (DivCommand& i: cmdStream) { for (DivCommand& i: cmdStream) {
switch (i.cmd) { switch (i.cmd) {
// strip away hinted/useless commands // strip away hinted/useless commands
case DIV_ALWAYS_SET_VOLUME:
break;
case DIV_CMD_GET_VOLUME: case DIV_CMD_GET_VOLUME:
break; break;
case DIV_CMD_VOLUME: case DIV_CMD_VOLUME:

View file

@ -248,8 +248,6 @@ enum DivDispatchCmds {
DIV_CMD_ESFM_MODIN, // (op, value) DIV_CMD_ESFM_MODIN, // (op, value)
DIV_CMD_ESFM_ENV_DELAY, // (op, value) DIV_CMD_ESFM_ENV_DELAY, // (op, value)
DIV_ALWAYS_SET_VOLUME, // () -> alwaysSetVol
DIV_CMD_MAX DIV_CMD_MAX
}; };
@ -611,6 +609,13 @@ class DivDispatch {
*/ */
virtual int getPortaFloor(int ch); virtual int getPortaFloor(int ch);
/**
* check whether to always set volume on volume change (even when same volume).
* only for compatibility purposes!
* @return truth.
*/
virtual bool getLegacyAlwaysSetVolume();
/** /**
* get the required amplification level of this dispatch's output. * get the required amplification level of this dispatch's output.
* @return the amplification level. * @return the amplification level.

View file

@ -54,8 +54,8 @@ class DivWorkPool;
#define DIV_UNSTABLE #define DIV_UNSTABLE
#define DIV_VERSION "dev190" #define DIV_VERSION "dev191"
#define DIV_ENGINE_VERSION 190 #define DIV_ENGINE_VERSION 191
// for imports // for imports
#define DIV_VERSION_MOD 0xff01 #define DIV_VERSION_MOD 0xff01
#define DIV_VERSION_FC 0xff02 #define DIV_VERSION_FC 0xff02

View file

@ -187,6 +187,7 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
ds.oldDPCM=true; ds.oldDPCM=true;
ds.delayBehavior=0; ds.delayBehavior=0;
ds.jumpTreatment=2; ds.jumpTreatment=2;
ds.oldAlwaysSetVolume=true;
// 1.1 compat flags // 1.1 compat flags
if (ds.version>24) { if (ds.version>24) {
@ -1876,6 +1877,9 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
if (ds.version<188) { if (ds.version<188) {
ds.ceilVolumeScaling=false; ds.ceilVolumeScaling=false;
} }
if (ds.version<191) {
ds.oldAlwaysSetVolume=true;
}
ds.isDMF=false; ds.isDMF=false;
reader.readS(); // reserved reader.readS(); // reserved
@ -2424,7 +2428,12 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
} else { } else {
reader.readC(); reader.readC();
} }
for (int i=0; i<2; i++) { if (ds.version>=191) {
ds.oldAlwaysSetVolume=reader.readC();
} else {
reader.readC();
}
for (int i=0; i<1; i++) {
reader.readC(); reader.readC();
} }
} }
@ -5522,7 +5531,8 @@ SafeWriter* DivEngine::saveFur(bool notPrimary, bool newPatternFormat) {
w->writeC(song.oldDPCM); w->writeC(song.oldDPCM);
w->writeC(song.resetArpPhaseOnNewNote); w->writeC(song.resetArpPhaseOnNewNote);
w->writeC(song.ceilVolumeScaling); w->writeC(song.ceilVolumeScaling);
for (int i=0; i<2; i++) { w->writeC(song.oldAlwaysSetVolume);
for (int i=0; i<1; i++) {
w->writeC(0); w->writeC(0);
} }

View file

@ -111,6 +111,10 @@ int DivDispatch::getPortaFloor(int ch) {
return 0x00; return 0x00;
} }
bool DivDispatch::getLegacyAlwaysSetVolume() {
return true;
}
float DivDispatch::getPostAmp() { float DivDispatch::getPostAmp() {
return 1.0f; return 1.0f;
} }

View file

@ -721,9 +721,6 @@ int DivPlatformAmiga::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -783,9 +783,6 @@ int DivPlatformArcade::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
return 127; return 127;
break; break;

View file

@ -651,9 +651,6 @@ int DivPlatformAY8910::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
return 15; return 15;
break; break;
@ -779,6 +776,10 @@ bool DivPlatformAY8910::keyOffAffectsArp(int ch) {
return true; return true;
} }
bool DivPlatformAY8910::getLegacyAlwaysSetVolume() {
return false;
}
void DivPlatformAY8910::notifyInsDeletion(void* ins) { void DivPlatformAY8910::notifyInsDeletion(void* ins) {
for (int i=0; i<3; i++) { for (int i=0; i<3; i++) {
chan[i].std.notifyInsDeletion((DivInstrument*)ins); chan[i].std.notifyInsDeletion((DivInstrument*)ins);

View file

@ -144,6 +144,7 @@ class DivPlatformAY8910: public DivDispatch {
bool keyOffAffectsArp(int ch); bool keyOffAffectsArp(int ch);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
DivSamplePos getSamplePos(int ch); DivSamplePos getSamplePos(int ch);
bool getLegacyAlwaysSetVolume();
bool getDCOffRequired(); bool getDCOffRequired();
void notifyInsDeletion(void* ins); void notifyInsDeletion(void* ins);
void poke(unsigned int addr, unsigned short val); void poke(unsigned int addr, unsigned short val);

View file

@ -653,9 +653,6 @@ int DivPlatformAY8930::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
return 31; return 31;
break; break;
@ -778,6 +775,10 @@ bool DivPlatformAY8930::keyOffAffectsArp(int ch) {
return true; return true;
} }
bool DivPlatformAY8930::getLegacyAlwaysSetVolume() {
return false;
}
void DivPlatformAY8930::notifyInsDeletion(void* ins) { void DivPlatformAY8930::notifyInsDeletion(void* ins) {
for (int i=0; i<3; i++) { for (int i=0; i<3; i++) {
chan[i].std.notifyInsDeletion((DivInstrument*)ins); chan[i].std.notifyInsDeletion((DivInstrument*)ins);

View file

@ -144,6 +144,7 @@ class DivPlatformAY8930: public DivDispatch {
bool keyOffAffectsArp(int ch); bool keyOffAffectsArp(int ch);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
DivSamplePos getSamplePos(int ch); DivSamplePos getSamplePos(int ch);
bool getLegacyAlwaysSetVolume();
void notifyInsDeletion(void* ins); void notifyInsDeletion(void* ins);
void poke(unsigned int addr, unsigned short val); void poke(unsigned int addr, unsigned short val);
void poke(std::vector<DivRegWrite>& wlist); void poke(std::vector<DivRegWrite>& wlist);

View file

@ -246,9 +246,6 @@ int DivPlatformBubSysWSG::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -441,9 +441,6 @@ int DivPlatformC140::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -536,9 +536,6 @@ int DivPlatformC64::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -1022,9 +1022,6 @@ int DivPlatformES5506::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -920,9 +920,6 @@ int DivPlatformESFM::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
return 63; return 63;
break; break;
@ -1015,6 +1012,10 @@ bool DivPlatformESFM::keyOffAffectsPorta(int ch) {
return false; return false;
} }
bool DivPlatformESFM::getLegacyAlwaysSetVolume() {
return false;
}
void DivPlatformESFM::notifyInsChange(int ins) { void DivPlatformESFM::notifyInsChange(int ins) {
for (int i=0; i<18; i++) { for (int i=0; i<18; i++) {
if (chan[i].ins==ins) { if (chan[i].ins==ins) {

View file

@ -193,6 +193,7 @@ class DivPlatformESFM: public DivDispatch {
void muteChannel(int ch, bool mute); void muteChannel(int ch, bool mute);
bool keyOffAffectsArp(int ch); bool keyOffAffectsArp(int ch);
bool keyOffAffectsPorta(int ch); bool keyOffAffectsPorta(int ch);
bool getLegacyAlwaysSetVolume();
void toggleRegisterDump(bool enable); void toggleRegisterDump(bool enable);
void notifyInsChange(int ins); void notifyInsChange(int ins);
void notifyInsDeletion(void* ins); void notifyInsDeletion(void* ins);

View file

@ -387,9 +387,6 @@ int DivPlatformFDS::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -136,6 +136,10 @@ class DivPlatformFMBase: public DivDispatch {
return CLAMP(round(128.0-(56.0-log2(vel*127.0)*8.0)),0,127); return CLAMP(round(128.0-(56.0-log2(vel*127.0)*8.0)),0,127);
} }
bool getLegacyAlwaysSetVolume() {
return true;
}
friend void putDispatchChan(void*,int,int); friend void putDispatchChan(void*,int,int);
DivPlatformFMBase(): DivPlatformFMBase():

View file

@ -311,9 +311,6 @@ int DivPlatformGA20::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -553,9 +553,6 @@ int DivPlatformGB::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -1183,9 +1183,6 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
return 127; return 127;
break; break;

View file

@ -418,9 +418,6 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
opChan[ch].std.mask(c.value,false); opChan[ch].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
break; break;
default: default:

View file

@ -395,9 +395,6 @@ int DivPlatformK007232::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -345,9 +345,6 @@ int DivPlatformK053260::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -353,9 +353,6 @@ int DivPlatformLynx::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
default: default:
break; break;
} }
@ -438,6 +435,10 @@ bool DivPlatformLynx::keyOffAffectsPorta(int ch) {
return true; return true;
} }
bool DivPlatformLynx::getLegacyAlwaysSetVolume() {
return false;
}
//int DivPlatformLynx::getPortaFloor(int ch) { //int DivPlatformLynx::getPortaFloor(int ch) {
// return 12; // return 12;
//} //}

View file

@ -84,6 +84,7 @@ class DivPlatformLynx: public DivDispatch {
int getOutputCount(); int getOutputCount();
bool keyOffAffectsArp(int ch); bool keyOffAffectsArp(int ch);
bool keyOffAffectsPorta(int ch); bool keyOffAffectsPorta(int ch);
bool getLegacyAlwaysSetVolume();
//int getPortaFloor(int ch); //int getPortaFloor(int ch);
void notifyInsDeletion(void* ins); void notifyInsDeletion(void* ins);
void poke(unsigned int addr, unsigned short val); void poke(unsigned int addr, unsigned short val);

View file

@ -327,9 +327,6 @@ int DivPlatformMMC5::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -297,9 +297,6 @@ int DivPlatformMSM5232::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -268,9 +268,6 @@ int DivPlatformMSM6258::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
return 8; return 8;
break; break;
@ -371,6 +368,10 @@ bool DivPlatformMSM6258::keyOffAffectsArp(int ch) {
return false; return false;
} }
bool DivPlatformMSM6258::getLegacyAlwaysSetVolume() {
return false;
}
void DivPlatformMSM6258::notifyInsChange(int ins) { void DivPlatformMSM6258::notifyInsChange(int ins) {
for (int i=0; i<1; i++) { for (int i=0; i<1; i++) {
if (chan[i].ins==ins) { if (chan[i].ins==ins) {

View file

@ -75,6 +75,7 @@ class DivPlatformMSM6258: public DivDispatch {
void muteChannel(int ch, bool mute); void muteChannel(int ch, bool mute);
int getOutputCount(); int getOutputCount();
bool keyOffAffectsArp(int ch); bool keyOffAffectsArp(int ch);
bool getLegacyAlwaysSetVolume();
void notifyInsChange(int ins); void notifyInsChange(int ins);
void notifyInsDeletion(void* ins); void notifyInsDeletion(void* ins);
void poke(unsigned int addr, unsigned short val); void poke(unsigned int addr, unsigned short val);

View file

@ -226,9 +226,6 @@ int DivPlatformMSM6295::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
return 8; return 8;
break; break;
@ -312,6 +309,10 @@ bool DivPlatformMSM6295::keyOffAffectsArp(int ch) {
return false; return false;
} }
bool DivPlatformMSM6295::getLegacyAlwaysSetVolume() {
return false;
}
float DivPlatformMSM6295::getPostAmp() { float DivPlatformMSM6295::getPostAmp() {
return 3.0f; return 3.0f;
} }

View file

@ -77,6 +77,7 @@ class DivPlatformMSM6295: public DivDispatch, public vgsound_emu_mem_intf {
virtual void tick(bool sysTick=true) override; virtual void tick(bool sysTick=true) override;
virtual void muteChannel(int ch, bool mute) override; virtual void muteChannel(int ch, bool mute) override;
virtual bool keyOffAffectsArp(int ch) override; virtual bool keyOffAffectsArp(int ch) override;
virtual bool getLegacyAlwaysSetVolume() override;
virtual float getPostAmp() override; virtual float getPostAmp() override;
virtual void notifyInsChange(int ins) override; virtual void notifyInsChange(int ins) override;
virtual void notifyInsDeletion(void* ins) override; virtual void notifyInsDeletion(void* ins) override;

View file

@ -452,9 +452,6 @@ int DivPlatformN163::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -445,9 +445,6 @@ int DivPlatformNamcoWSG::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -659,9 +659,6 @@ int DivPlatformNES::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -1343,7 +1343,7 @@ void DivPlatformOPL::commitState(int ch, DivInstrument* ins) {
int DivPlatformOPL::dispatch(DivCommand c) { int DivPlatformOPL::dispatch(DivCommand c) {
if (c.chan>=totalChans && c.chan!=adpcmChan) return 0; if (c.chan>=totalChans && c.chan!=adpcmChan) return 0;
// ineffective in 4-op mode // ineffective in 4-op mode
if (oplType==3 && c.chan!=adpcmChan && c.chan<14 && (c.chan&1) && c.cmd!=DIV_CMD_GET_VOLMAX && c.cmd!=DIV_ALWAYS_SET_VOLUME) { if (oplType==3 && c.chan!=adpcmChan && c.chan<14 && (c.chan&1) && c.cmd!=DIV_CMD_GET_VOLMAX) {
if (chan[c.chan-1].fourOp) return 0; if (chan[c.chan-1].fourOp) return 0;
} }
switch (c.cmd) { switch (c.cmd) {
@ -1970,9 +1970,6 @@ int DivPlatformOPL::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
if (c.chan==adpcmChan) return 255; if (c.chan==adpcmChan) return 255;
if (pretendYMU) return 127; if (pretendYMU) return 127;
@ -2279,6 +2276,10 @@ bool DivPlatformOPL::keyOffAffectsPorta(int ch) {
return false; return false;
} }
bool DivPlatformOPL::getLegacyAlwaysSetVolume() {
return false;
}
void DivPlatformOPL::notifyInsChange(int ins) { void DivPlatformOPL::notifyInsChange(int ins) {
for (int i=0; i<totalChans; i++) { for (int i=0; i<totalChans; i++) {
if (chan[i].ins==ins) { if (chan[i].ins==ins) {

View file

@ -162,6 +162,7 @@ class DivPlatformOPL: public DivDispatch {
void setOPLType(int type, bool drums); void setOPLType(int type, bool drums);
bool keyOffAffectsArp(int ch); bool keyOffAffectsArp(int ch);
bool keyOffAffectsPorta(int ch); bool keyOffAffectsPorta(int ch);
bool getLegacyAlwaysSetVolume();
void toggleRegisterDump(bool enable); void toggleRegisterDump(bool enable);
void setFlags(const DivConfig& flags); void setFlags(const DivConfig& flags);
void notifyInsChange(int ins); void notifyInsChange(int ins);

View file

@ -853,9 +853,6 @@ int DivPlatformOPLL::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
return 15; return 15;
break; break;
@ -1043,6 +1040,10 @@ bool DivPlatformOPLL::keyOffAffectsPorta(int ch) {
return false; return false;
} }
bool DivPlatformOPLL::getLegacyAlwaysSetVolume() {
return false;
}
void DivPlatformOPLL::notifyInsChange(int ins) { void DivPlatformOPLL::notifyInsChange(int ins) {
for (int i=0; i<11; i++) { for (int i=0; i<11; i++) {
if (chan[i].ins==ins) { if (chan[i].ins==ins) {

View file

@ -105,6 +105,7 @@ class DivPlatformOPLL: public DivDispatch {
void setYMFM(bool use); void setYMFM(bool use);
bool keyOffAffectsArp(int ch); bool keyOffAffectsArp(int ch);
bool keyOffAffectsPorta(int ch); bool keyOffAffectsPorta(int ch);
bool getLegacyAlwaysSetVolume();
float getPostAmp(); float getPostAmp();
void toggleRegisterDump(bool enable); void toggleRegisterDump(bool enable);
void setVRC7(bool vrc); void setVRC7(bool vrc);

View file

@ -474,9 +474,6 @@ int DivPlatformPCE::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -452,9 +452,6 @@ int DivPlatformPCMDAC::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -476,9 +476,6 @@ int DivPlatformPCSpeaker::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -239,9 +239,6 @@ int DivPlatformPET::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -253,9 +253,6 @@ int DivPlatformPokeMini::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -374,9 +374,6 @@ int DivPlatformPOKEY::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -180,9 +180,6 @@ int DivPlatformPong::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -188,9 +188,6 @@ int DivPlatformPV1000::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -587,9 +587,6 @@ int DivPlatformQSound::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -291,9 +291,6 @@ int DivPlatformRF5C68::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -316,9 +316,6 @@ int DivPlatformSAA1099::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
return 15; return 15;
break; break;
@ -435,6 +432,10 @@ bool DivPlatformSAA1099::keyOffAffectsArp(int ch) {
return true; return true;
} }
bool DivPlatformSAA1099::getLegacyAlwaysSetVolume() {
return false;
}
void DivPlatformSAA1099::notifyInsDeletion(void* ins) { void DivPlatformSAA1099::notifyInsDeletion(void* ins) {
for (int i=0; i<6; i++) { for (int i=0; i<6; i++) {
chan[i].std.notifyInsDeletion((DivInstrument*)ins); chan[i].std.notifyInsDeletion((DivInstrument*)ins);

View file

@ -91,6 +91,7 @@ class DivPlatformSAA1099: public DivDispatch {
int getOutputCount(); int getOutputCount();
int getPortaFloor(int ch); int getPortaFloor(int ch);
bool keyOffAffectsArp(int ch); bool keyOffAffectsArp(int ch);
bool getLegacyAlwaysSetVolume();
void notifyInsDeletion(void* ins); void notifyInsDeletion(void* ins);
void poke(unsigned int addr, unsigned short val); void poke(unsigned int addr, unsigned short val);
void poke(std::vector<DivRegWrite>& wlist); void poke(std::vector<DivRegWrite>& wlist);

View file

@ -261,9 +261,6 @@ int DivPlatformSCC::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -339,9 +339,6 @@ int DivPlatformSegaPCM::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
return 127; return 127;
break; break;
@ -372,6 +369,10 @@ void DivPlatformSegaPCM::forceIns() {
} }
} }
bool DivPlatformSegaPCM::getLegacyAlwaysSetVolume() {
return false;
}
void DivPlatformSegaPCM::notifyInsChange(int ins) { void DivPlatformSegaPCM::notifyInsChange(int ins) {
for (int i=0; i<16; i++) { for (int i=0; i<16; i++) {
if (chan[i].ins==ins) { if (chan[i].ins==ins) {

View file

@ -103,6 +103,7 @@ class DivPlatformSegaPCM: public DivDispatch {
void renderSamples(int chipID); void renderSamples(int chipID);
void setFlags(const DivConfig& flags); void setFlags(const DivConfig& flags);
int getOutputCount(); int getOutputCount();
bool getLegacyAlwaysSetVolume();
void poke(unsigned int addr, unsigned short val); void poke(unsigned int addr, unsigned short val);
void poke(std::vector<DivRegWrite>& wlist); void poke(std::vector<DivRegWrite>& wlist);
const void* getSampleMem(int index=0); const void* getSampleMem(int index=0);

View file

@ -277,9 +277,6 @@ int DivPlatformSM8521::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -420,9 +420,6 @@ int DivPlatformSMS::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
default: default:
break; break;
} }
@ -509,6 +506,10 @@ bool DivPlatformSMS::keyOffAffectsPorta(int ch) {
return true; return true;
} }
bool DivPlatformSMS::getLegacyAlwaysSetVolume() {
return false;
}
int DivPlatformSMS::getPortaFloor(int ch) { int DivPlatformSMS::getPortaFloor(int ch) {
return 12; return 12;
} }

View file

@ -89,6 +89,7 @@ class DivPlatformSMS: public DivDispatch {
int getOutputCount(); int getOutputCount();
bool keyOffAffectsArp(int ch); bool keyOffAffectsArp(int ch);
bool keyOffAffectsPorta(int ch); bool keyOffAffectsPorta(int ch);
bool getLegacyAlwaysSetVolume();
float getPostAmp(); float getPostAmp();
int getPortaFloor(int ch); int getPortaFloor(int ch);
void setFlags(const DivConfig& flags); void setFlags(const DivConfig& flags);

View file

@ -502,9 +502,6 @@ int DivPlatformSoundUnit::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -446,9 +446,6 @@ int DivPlatformSwan::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -271,9 +271,6 @@ int DivPlatformT6W28::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -236,9 +236,6 @@ int DivPlatformTED::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -258,9 +258,6 @@ int DivPlatformTIA::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
return 15; return 15;
break; break;
@ -340,6 +337,10 @@ bool DivPlatformTIA::keyOffAffectsArp(int ch) {
return true; return true;
} }
bool DivPlatformTIA::getLegacyAlwaysSetVolume() {
return false;
}
void DivPlatformTIA::notifyInsDeletion(void* ins) { void DivPlatformTIA::notifyInsDeletion(void* ins) {
for (int i=0; i<2; i++) { for (int i=0; i<2; i++) {
chan[i].std.notifyInsDeletion((DivInstrument*)ins); chan[i].std.notifyInsDeletion((DivInstrument*)ins);

View file

@ -59,6 +59,7 @@ class DivPlatformTIA: public DivDispatch {
float getPostAmp(); float getPostAmp();
int getOutputCount(); int getOutputCount();
bool keyOffAffectsArp(int ch); bool keyOffAffectsArp(int ch);
bool getLegacyAlwaysSetVolume();
void notifyInsDeletion(void* ins); void notifyInsDeletion(void* ins);
void poke(unsigned int addr, unsigned short val); void poke(unsigned int addr, unsigned short val);
void poke(std::vector<DivRegWrite>& wlist); void poke(std::vector<DivRegWrite>& wlist);

View file

@ -880,9 +880,6 @@ int DivPlatformTX81Z::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
return 127; return 127;
break; break;

View file

@ -395,9 +395,6 @@ int DivPlatformVB::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -437,9 +437,6 @@ int DivPlatformVERA::dispatch(DivCommand c) {
case DIV_CMD_EXTERNAL: case DIV_CMD_EXTERNAL:
rWriteZSMSync(c.value); rWriteZSMSync(c.value);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
default: default:
break; break;
} }
@ -470,6 +467,10 @@ int DivPlatformVERA::getRegisterPoolSize() {
return 67; return 67;
} }
bool DivPlatformVERA::getLegacyAlwaysSetVolume() {
return false;
}
void DivPlatformVERA::muteChannel(int ch, bool mute) { void DivPlatformVERA::muteChannel(int ch, bool mute) {
isMuted[ch]=mute; isMuted[ch]=mute;
if (ch<16) { if (ch<16) {

View file

@ -73,6 +73,7 @@ class DivPlatformVERA: public DivDispatch {
void tick(bool sysTick=true); void tick(bool sysTick=true);
void muteChannel(int ch, bool mute); void muteChannel(int ch, bool mute);
void setFlags(const DivConfig& flags); void setFlags(const DivConfig& flags);
bool getLegacyAlwaysSetVolume();
void notifyInsDeletion(void* ins); void notifyInsDeletion(void* ins);
float getPostAmp(); float getPostAmp();
int getOutputCount(); int getOutputCount();

View file

@ -252,9 +252,6 @@ int DivPlatformVIC20::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -412,9 +412,6 @@ int DivPlatformVRC6::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -832,9 +832,6 @@ int DivPlatformX1_010::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -861,9 +861,6 @@ int DivPlatformYM2203::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
if (c.chan>2) return 15; if (c.chan>2) return 15;
return 127; return 127;

View file

@ -375,9 +375,6 @@ int DivPlatformYM2203Ext::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
opChan[ch].std.mask(c.value,false); opChan[ch].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
break; break;
default: default:

View file

@ -1352,9 +1352,6 @@ int DivPlatformYM2608::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
if (c.chan>14) return 255; if (c.chan>14) return 255;
if (c.chan>8) return 31; if (c.chan>8) return 31;

View file

@ -399,9 +399,6 @@ int DivPlatformYM2608Ext::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
opChan[ch].std.mask(c.value,false); opChan[ch].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
break; break;
default: default:

View file

@ -1324,9 +1324,6 @@ int DivPlatformYM2610::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
if (c.chan>=adpcmBChanOffs) return 255; if (c.chan>=adpcmBChanOffs) return 255;
if (c.chan>=adpcmAChanOffs) return 31; if (c.chan>=adpcmAChanOffs) return 31;

View file

@ -1391,9 +1391,6 @@ int DivPlatformYM2610B::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_GET_VOLMAX: case DIV_CMD_GET_VOLMAX:
if (c.chan>=adpcmBChanOffs) return 255; if (c.chan>=adpcmBChanOffs) return 255;
if (c.chan>=adpcmAChanOffs) return 31; if (c.chan>=adpcmAChanOffs) return 31;

View file

@ -395,9 +395,6 @@ int DivPlatformYM2610BExt::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
opChan[ch].std.mask(c.value,false); opChan[ch].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
break; break;
default: default:

View file

@ -395,9 +395,6 @@ int DivPlatformYM2610Ext::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
opChan[ch].std.mask(c.value,false); opChan[ch].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 0;
break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
break; break;
default: default:

View file

@ -321,9 +321,6 @@ int DivPlatformYMZ280B::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -218,9 +218,6 @@ int DivPlatformZXBeeper::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -288,9 +288,6 @@ int DivPlatformZXBeeperQuadTone::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON: case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false); chan[c.chan].std.mask(c.value,false);
break; break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
break;
default: default:
break; break;
} }

View file

@ -246,9 +246,6 @@ const char* cmdName[]={
"ESFM_OUTLVL", "ESFM_OUTLVL",
"ESFM_MODIN", "ESFM_MODIN",
"ESFM_ENV_DELAY", "ESFM_ENV_DELAY",
"ALWAYS_SET_VOLUME",
}; };
static_assert((sizeof(cmdName)/sizeof(void*))==DIV_CMD_MAX,"update cmdName!"); static_assert((sizeof(cmdName)/sizeof(void*))==DIV_CMD_MAX,"update cmdName!");
@ -273,8 +270,6 @@ int DivEngine::dispatchCmd(DivCommand c) {
if (!skipping) { if (!skipping) {
switch (c.cmd) { switch (c.cmd) {
// strip away hinted/useless commands // strip away hinted/useless commands
case DIV_ALWAYS_SET_VOLUME:
break;
case DIV_CMD_GET_VOLUME: case DIV_CMD_GET_VOLUME:
break; break;
case DIV_CMD_VOLUME: case DIV_CMD_VOLUME:
@ -621,7 +616,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
// volume // volume
if (pat->data[whatRow][3]!=-1) { if (pat->data[whatRow][3]!=-1) {
if (dispatchCmd(DivCommand(DIV_ALWAYS_SET_VOLUME,i)) || (MIN(chan[i].volMax,chan[i].volume)>>8)!=pat->data[whatRow][3]) { if (!song.oldAlwaysSetVolume || disCont[dispatchOfChan[i]].dispatch->getLegacyAlwaysSetVolume() || (MIN(chan[i].volMax,chan[i].volume)>>8)!=pat->data[whatRow][3]) {
if (pat->data[whatRow][0]==0 && pat->data[whatRow][1]==0) { if (pat->data[whatRow][0]==0 && pat->data[whatRow][1]==0) {
chan[i].midiAftertouch=true; chan[i].midiAftertouch=true;
} }

View file

@ -383,6 +383,7 @@ struct DivSong {
bool oldDPCM; bool oldDPCM;
bool resetArpPhaseOnNewNote; bool resetArpPhaseOnNewNote;
bool ceilVolumeScaling; bool ceilVolumeScaling;
bool oldAlwaysSetVolume;
std::vector<DivInstrument*> ins; std::vector<DivInstrument*> ins;
std::vector<DivWavetable*> wave; std::vector<DivWavetable*> wave;
@ -505,7 +506,8 @@ struct DivSong {
preNoteNoEffect(false), preNoteNoEffect(false),
oldDPCM(false), oldDPCM(false),
resetArpPhaseOnNewNote(false), resetArpPhaseOnNewNote(false),
ceilVolumeScaling(false) { ceilVolumeScaling(false),
oldAlwaysSetVolume(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;

View file

@ -192,6 +192,10 @@ void FurnaceGUI::drawCompatFlags() {
if (ImGui::IsItemHovered()) { if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("behavior changed in 0.6.1"); ImGui::SetTooltip("behavior changed in 0.6.1");
} }
ImGui::Checkbox("Legacy technical ALWAYS_SET_VOLUME behavior",&e->song.oldAlwaysSetVolume);
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("behavior changed in 0.6.1\nthis flag will be removed if I find out that none of the songs break after disabling it.");
}
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem(".mod import")) { if (ImGui::BeginTabItem(".mod import")) {

View file

@ -1463,7 +1463,6 @@ void FurnaceGUI::drawPattern() {
if (i.cmd==DIV_CMD_PRE_NOTE) continue; if (i.cmd==DIV_CMD_PRE_NOTE) continue;
if (i.cmd==DIV_CMD_SAMPLE_BANK) continue; if (i.cmd==DIV_CMD_SAMPLE_BANK) continue;
if (i.cmd==DIV_CMD_GET_VOLUME) continue; if (i.cmd==DIV_CMD_GET_VOLUME) continue;
if (i.cmd==DIV_ALWAYS_SET_VOLUME) continue;
if (i.cmd==DIV_CMD_HINT_VOLUME || if (i.cmd==DIV_CMD_HINT_VOLUME ||
i.cmd==DIV_CMD_HINT_PORTA || i.cmd==DIV_CMD_HINT_PORTA ||
i.cmd==DIV_CMD_HINT_LEGATO || i.cmd==DIV_CMD_HINT_LEGATO ||