implement brokenOutVol compat flag

#341
This commit is contained in:
tildearrow 2022-05-31 19:03:26 -05:00
parent b8a0084587
commit 1be93d9bbb
11 changed files with 32 additions and 2 deletions

View file

@ -3,9 +3,9 @@
- additional YM2612 features - additional YM2612 features
- CSM - CSM
- MSM6258 pitch and clock select - MSM6258 pitch and clock select
- the last three compat flags - the last compat flags
- newSegaPCM
- newVolumeScaling - newVolumeScaling
- brokenOutVol
- collapse/expand pattern and song - collapse/expand pattern and song
- Game Boy envelope macro/sequence - Game Boy envelope macro/sequence
- rewrite the system name detection function anyway - rewrite the system name detection function anyway

View file

@ -271,6 +271,9 @@ int DivPlatformAmiga::dispatch(DivCommand c) {
chan[c.chan].active=true; chan[c.chan].active=true;
chan[c.chan].keyOn=true; chan[c.chan].keyOn=true;
chan[c.chan].macroInit(ins); chan[c.chan].macroInit(ins);
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
chan[c.chan].outVol=chan[c.chan].vol;
}
if (chan[c.chan].useWave) { if (chan[c.chan].useWave) {
chan[c.chan].ws.init(ins,chan[c.chan].audLen<<1,255,chan[c.chan].insChanged); chan[c.chan].ws.init(ins,chan[c.chan].audLen<<1,255,chan[c.chan].insChanged);
} }

View file

@ -315,6 +315,9 @@ int DivPlatformAY8910::dispatch(DivCommand c) {
chan[c.chan].active=true; chan[c.chan].active=true;
chan[c.chan].keyOn=true; chan[c.chan].keyOn=true;
chan[c.chan].macroInit(ins); chan[c.chan].macroInit(ins);
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
chan[c.chan].outVol=chan[c.chan].vol;
}
if (isMuted[c.chan]) { if (isMuted[c.chan]) {
rWrite(0x08+c.chan,0); rWrite(0x08+c.chan,0);
} else if (intellivision && (chan[c.chan].psgMode&4)) { } else if (intellivision && (chan[c.chan].psgMode&4)) {

View file

@ -346,6 +346,9 @@ int DivPlatformAY8930::dispatch(DivCommand c) {
chan[c.chan].active=true; chan[c.chan].active=true;
chan[c.chan].keyOn=true; chan[c.chan].keyOn=true;
chan[c.chan].macroInit(ins); chan[c.chan].macroInit(ins);
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
chan[c.chan].outVol=chan[c.chan].vol;
}
if (isMuted[c.chan]) { if (isMuted[c.chan]) {
rWrite(0x08+c.chan,0); rWrite(0x08+c.chan,0);
} else { } else {

View file

@ -169,6 +169,9 @@ int DivPlatformBubSysWSG::dispatch(DivCommand c) {
chan[c.chan].keyOn=true; chan[c.chan].keyOn=true;
rWrite(2+c.chan,(chan[c.chan].wave<<5)|chan[c.chan].vol); rWrite(2+c.chan,(chan[c.chan].wave<<5)|chan[c.chan].vol);
chan[c.chan].macroInit(ins); chan[c.chan].macroInit(ins);
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
chan[c.chan].outVol=chan[c.chan].vol;
}
if (chan[c.chan].wave<0) { if (chan[c.chan].wave<0) {
chan[c.chan].wave=0; chan[c.chan].wave=0;
chan[c.chan].ws.changeWave1(chan[c.chan].wave); chan[c.chan].ws.changeWave1(chan[c.chan].wave);

View file

@ -285,6 +285,9 @@ int DivPlatformFDS::dispatch(DivCommand c) {
chan[c.chan].active=true; chan[c.chan].active=true;
chan[c.chan].keyOn=true; chan[c.chan].keyOn=true;
chan[c.chan].macroInit(ins); chan[c.chan].macroInit(ins);
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
chan[c.chan].outVol=chan[c.chan].vol;
}
if (chan[c.chan].wave<0) { if (chan[c.chan].wave<0) {
chan[c.chan].wave=0; chan[c.chan].wave=0;
ws.changeWave1(chan[c.chan].wave); ws.changeWave1(chan[c.chan].wave);

View file

@ -297,6 +297,9 @@ int DivPlatformLynx::dispatch(DivCommand c) {
chan[c.chan].active=true; chan[c.chan].active=true;
WRITE_VOLUME(c.chan,(isMuted[c.chan]?0:(chan[c.chan].vol&127))); WRITE_VOLUME(c.chan,(isMuted[c.chan]?0:(chan[c.chan].vol&127)));
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_MIKEY)); chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_MIKEY));
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
chan[c.chan].outVol=chan[c.chan].vol;
}
break; break;
} }
case DIV_CMD_NOTE_OFF: case DIV_CMD_NOTE_OFF:

View file

@ -241,6 +241,9 @@ int DivPlatformMMC5::dispatch(DivCommand c) {
chan[c.chan].active=true; chan[c.chan].active=true;
chan[c.chan].keyOn=true; chan[c.chan].keyOn=true;
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_STD)); chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_STD));
if (!parent->song.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)); rWrite(0x5000+c.chan*4,0x30|chan[c.chan].vol|((chan[c.chan].duty&3)<<6));
break; break;
case DIV_CMD_NOTE_OFF: case DIV_CMD_NOTE_OFF:

View file

@ -349,6 +349,9 @@ int DivPlatformNamcoWSG::dispatch(DivCommand c) {
chan[c.chan].active=true; chan[c.chan].active=true;
chan[c.chan].keyOn=true; chan[c.chan].keyOn=true;
chan[c.chan].macroInit(ins); chan[c.chan].macroInit(ins);
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
chan[c.chan].outVol=chan[c.chan].vol;
}
if (chan[c.chan].wave<0) { if (chan[c.chan].wave<0) {
chan[c.chan].wave=0; chan[c.chan].wave=0;
chan[c.chan].ws.changeWave1(chan[c.chan].wave); chan[c.chan].ws.changeWave1(chan[c.chan].wave);

View file

@ -446,6 +446,9 @@ int DivPlatformNES::dispatch(DivCommand c) {
chan[c.chan].active=true; chan[c.chan].active=true;
chan[c.chan].keyOn=true; chan[c.chan].keyOn=true;
chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_STD)); chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_STD));
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
chan[c.chan].outVol=chan[c.chan].vol;
}
if (c.chan==2) { if (c.chan==2) {
rWrite(0x4000+c.chan*4,0xff); rWrite(0x4000+c.chan*4,0xff);
} else { } else {

View file

@ -328,6 +328,9 @@ int DivPlatformPCE::dispatch(DivCommand c) {
chan[c.chan].keyOn=true; chan[c.chan].keyOn=true;
chWrite(c.chan,0x04,0x80|chan[c.chan].vol); chWrite(c.chan,0x04,0x80|chan[c.chan].vol);
chan[c.chan].macroInit(ins); chan[c.chan].macroInit(ins);
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
chan[c.chan].outVol=chan[c.chan].vol;
}
if (chan[c.chan].wave<0) { if (chan[c.chan].wave<0) {
chan[c.chan].wave=0; chan[c.chan].wave=0;
chan[c.chan].ws.changeWave1(chan[c.chan].wave); chan[c.chan].ws.changeWave1(chan[c.chan].wave);