From bffb51756f050a4653eba2398d3f5a746cd552aa Mon Sep 17 00:00:00 2001 From: Natt Akuma Date: Tue, 27 Feb 2024 11:31:48 +0700 Subject: [PATCH] Lynx: Add Load LFSR macro PowerNoise had it --- src/engine/platform/lynx.cpp | 5 +++++ src/gui/insEdit.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/engine/platform/lynx.cpp b/src/engine/platform/lynx.cpp index a2e9795a6..1ea439beb 100644 --- a/src/engine/platform/lynx.cpp +++ b/src/engine/platform/lynx.cpp @@ -200,6 +200,11 @@ void DivPlatformLynx::tick(bool sysTick) { chan[i].freqChanged=true; } + if (chan[i].std.ex1.had) { + WRITE_LFSR(i, chan[i].std.ex1.val&0xff); + WRITE_OTHER(i, (chan[i].std.ex1.val&0xf00)>>4); + } + if (chan[i].std.phaseReset.had) { if (chan[i].std.phaseReset.val==1) { if (chan[i].pcm && chan[i].sample>=0 && chan[i].samplesong.sampleLen) { diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index 519881424..e17119d8c 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -7028,6 +7028,9 @@ void FurnaceGUI::drawInsEdit() { if (ins->type==DIV_INS_DAVE) { ex1Max=4; } + if (ins->type==DIV_INS_MIKEY) { + ex1Max=12; + } int panMin=0; int panMax=0; @@ -7234,6 +7237,8 @@ void FurnaceGUI::drawInsEdit() { macroList.push_back(FurnaceGUIMacroDesc("Group Attack",&ins->std.ex1Macro,0,ex1Max,96,uiColors[GUI_COLOR_MACRO_OTHER])); } else if (ins->type==DIV_INS_DAVE) { macroList.push_back(FurnaceGUIMacroDesc("Control",&ins->std.ex1Macro,0,ex1Max,64,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true,daveControlBits)); + } else if (ins->type==DIV_INS_MIKEY) { + macroList.push_back(FurnaceGUIMacroDesc("Load LFSR",&ins->std.ex1Macro,0,12,160,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true)); } else { macroList.push_back(FurnaceGUIMacroDesc("Duty",&ins->std.ex1Macro,0,ex1Max,160,uiColors[GUI_COLOR_MACRO_OTHER])); }