diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index e1d04dba1..1e44fca48 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -939,6 +939,9 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) { } else { ins->std.dutyMacro[j]=reader.readI(); } + if ((ds.system[0]==DIV_SYSTEM_C64_8580 || ds.system[0]==DIV_SYSTEM_C64_6581) && ins->std.dutyMacro[j]>24) { + ins->std.dutyMacro[j]=24; + } } if (ins->std.dutyMacroLen>0) { ins->std.dutyMacroLoop=reader.readC(); diff --git a/src/engine/playback.cpp b/src/engine/playback.cpp index 10af75995..7fb3ea41c 100644 --- a/src/engine/playback.cpp +++ b/src/engine/playback.cpp @@ -868,7 +868,6 @@ bool DivEngine::nextTick(bool noAccum) { dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15))); break; } - } if ((chan[i].keyOn || chan[i].keyOff) && chan[i].portaSpeed>0) { if (dispatchCmd(DivCommand(DIV_CMD_NOTE_PORTA,i,chan[i].portaSpeed,chan[i].portaNote))==2 && chan[i].portaStop) { @@ -882,7 +881,7 @@ bool DivEngine::nextTick(bool noAccum) { if (chan[i].cut>0) { if (--chan[i].cut<1) { chan[i].oldNote=chan[i].note; - chan[i].note=-1; + //chan[i].note=-1; if (chan[i].inPorta) { chan[i].keyOff=true; chan[i].keyOn=false;