From 72c548394f02145731e50c71a1124b15374dd548 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 31 Jan 2022 17:45:02 -0500 Subject: [PATCH] now add noise and/or mask macro for real upcoming is auto-PWM --- src/engine/platform/ay8930.cpp | 8 ++++++++ src/gui/gui.cpp | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/src/engine/platform/ay8930.cpp b/src/engine/platform/ay8930.cpp index 9f95dfbfa..e3f39988f 100644 --- a/src/engine/platform/ay8930.cpp +++ b/src/engine/platform/ay8930.cpp @@ -114,6 +114,14 @@ void DivPlatformAY8930::tick() { chan[i].freqChanged=true; if (!chan[i].std.willEx3) chan[i].autoEnvNum=1; } + if (chan[i].std.hadFb) { + ayNoiseAnd=chan[i].std.fb; + immWrite(0x19,ayNoiseAnd); + } + if (chan[i].std.hadFms) { + ayNoiseOr=chan[i].std.fms; + immWrite(0x1a,ayNoiseOr); + } if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) { chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,true); if (chan[i].freq>4095) chan[i].freq=4095; diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index cada183f7..8c3eb6d1a 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -1523,6 +1523,11 @@ void FurnaceGUI::drawInsEdit() { NORMAL_MACRO(ins->std.ex3Macro,ins->std.ex3MacroLen,ins->std.ex3MacroLoop,0,15,"ex3","AutoEnv Num",96,ins->std.ex3MacroOpen,false,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[6],0,15); NORMAL_MACRO(ins->std.algMacro,ins->std.algMacroLen,ins->std.algMacroLoop,0,15,"alg","AutoEnv Den",96,ins->std.algMacroOpen,false,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[7],0,15); } + if (ins->type==DIV_INS_AY8930) { + // oh my i am running out of macros + NORMAL_MACRO(ins->std.fbMacro,ins->std.fbMacroLen,ins->std.fbMacroLoop,0,8,"fb","Noise AND Mask",96,ins->std.fbMacroOpen,true,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[8],0,8); + NORMAL_MACRO(ins->std.fmsMacro,ins->std.fmsMacroLen,ins->std.fmsMacroLoop,0,8,"fms","Noise OR Mask",96,ins->std.fmsMacroOpen,true,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[9],0,8); + } MACRO_END; } else { // classic view