dev121 - NES/SN: Defle compat fixes FOR REAL

THIS IS MOST LIKELY THE LAST DEFLE COMPAT FLAG I ADD

...besides future "no arp+porta in linear pitch" compat flag
This commit is contained in:
tildearrow 2022-10-08 00:53:01 -05:00
parent ea7f8e1154
commit 75d75f68e6
6 changed files with 26 additions and 5 deletions

View file

@ -174,7 +174,8 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
ds.noOPN2Vol=true;
ds.newVolumeScaling=false;
ds.volMacroLinger=false;
ds.brokenOutVol=true; // ???
ds.brokenOutVol=true;
ds.brokenOutVol2=true;
ds.e1e2StopOnSameNote=true;
ds.brokenPortaArp=false;
ds.snNoLowPeriods=true;
@ -1689,6 +1690,9 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
if (ds.version<117) {
ds.disableSampleMacro=true;
}
if (ds.version<121) {
ds.brokenOutVol2=false;
}
ds.isDMF=false;
reader.readS(); // reserved
@ -2126,7 +2130,12 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
} else {
reader.readC();
}
for (int i=0; i<2; i++) {
if (ds.version>=121) {
ds.brokenOutVol2=reader.readC();
} else {
reader.readC();
}
for (int i=0; i<1; i++) {
reader.readC();
}
}
@ -4464,7 +4473,8 @@ SafeWriter* DivEngine::saveFur(bool notPrimary) {
w->writeC(song.jumpTreatment);
w->writeC(song.autoSystem);
w->writeC(song.disableSampleMacro);
for (int i=0; i<2; i++) {
w->writeC(song.brokenOutVol2);
for (int i=0; i<1; i++) {
w->writeC(0);
}

View file

@ -415,6 +415,8 @@ int DivPlatformNES::dispatch(DivCommand c) {
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 (!parent->song.brokenOutVol2) {
if (c.chan==2) {
rWrite(0x4000+c.chan*4,0xff);
} else {

View file

@ -249,7 +249,7 @@ int DivPlatformSMS::dispatch(DivCommand c) {
chan[c.chan].actualNote=c.value;
}
chan[c.chan].active=true;
if (!parent->song.brokenOutVol) {
if (!parent->song.brokenOutVol2) {
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));

View file

@ -314,6 +314,7 @@ struct DivSong {
bool newVolumeScaling;
bool volMacroLinger;
bool brokenOutVol;
bool brokenOutVol2;
bool e1e2StopOnSameNote;
bool brokenPortaArp;
bool snNoLowPeriods;
@ -420,6 +421,7 @@ struct DivSong {
newVolumeScaling(true),
volMacroLinger(true),
brokenOutVol(false),
brokenOutVol2(false),
e1e2StopOnSameNote(false),
brokenPortaArp(false),
snNoLowPeriods(false),