From 42a082b2a7fd639e9033ee6c8ef7f7ae5397e4c5 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 25 May 2022 00:28:47 -0500 Subject: [PATCH] Lynx: add phase reset macro --- src/engine/platform/lynx.cpp | 7 +++++++ src/gui/insEdit.cpp | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/engine/platform/lynx.cpp b/src/engine/platform/lynx.cpp index 8624c049..8c835fcc 100644 --- a/src/engine/platform/lynx.cpp +++ b/src/engine/platform/lynx.cpp @@ -195,6 +195,13 @@ void DivPlatformLynx::tick(bool sysTick) { chan[i].freqChanged=true; } + if (chan[i].std.phaseReset.had) { + if (chan[i].std.phaseReset.val==1) { + WRITE_LFSR(i, 0); + WRITE_OTHER(i, 0); + } + } + if (chan[i].freqChanged) { if (chan[i].lfsr >= 0) { WRITE_LFSR(i, (chan[i].lfsr&0xff)); diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index 3133b7c6..545c1149 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -3137,7 +3137,8 @@ void FurnaceGUI::drawInsEdit() { ins->type==DIV_INS_AY8930 || ins->type==DIV_INS_SWAN || ins->type==DIV_INS_MULTIPCM || - ins->type==DIV_INS_SU) { + ins->type==DIV_INS_SU || + ins->type==DIV_INS_MIKEY) { macroList.push_back(FurnaceGUIMacroDesc("Phase Reset",&ins->std.phaseResetMacro,0,1,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true)); } if (ex1Max>0) {