diff --git a/src/engine/platform/su.cpp b/src/engine/platform/su.cpp index 48d0ba9a1..c2cd6b25e 100644 --- a/src/engine/platform/su.cpp +++ b/src/engine/platform/su.cpp @@ -187,6 +187,13 @@ void DivPlatformSoundUnit::tick(bool sysTick) { chan[i].control=chan[i].std.ex3.val&15; writeControl(i); } + if (chan[i].std.ex4.had) { + chan[i].syncTimer=chan[i].std.ex4.val&65535; + chan[i].timerSync=(chan[i].syncTimer>0); + chWrite(i,0x1e,chan[i].syncTimer&0xff); + chWrite(i,0x1f,chan[i].syncTimer>>8); + writeControlUpper(i); + } if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) { //DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_SU); chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,false,2,chan[i].pitch2,chipClock,CHIP_FREQBASE); diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index 25ee330b6..f0d6d3da3 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -3678,6 +3678,7 @@ void FurnaceGUI::drawInsEdit() { } if (ins->type==DIV_INS_SU) { macroList.push_back(FurnaceGUIMacroDesc("Control",&ins->std.ex3Macro,0,4,64,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true,suControlBits)); + macroList.push_back(FurnaceGUIMacroDesc("Phase Reset Timer",&ins->std.ex4Macro,0,65535,160,uiColors[GUI_COLOR_MACRO_OTHER])); // again reuse code from resonance macro but use ex4 instead } drawMacros(macroList);