From c4163699b6e29d7f6817a4b152df07c91b8e280b Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 27 Jan 2022 15:42:31 -0500 Subject: [PATCH] Arcade: add noise freq macro issue #16 --- src/engine/platform/arcade.cpp | 8 ++++++++ src/gui/gui.cpp | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/engine/platform/arcade.cpp b/src/engine/platform/arcade.cpp index 2f0c9480..43e3090a 100644 --- a/src/engine/platform/arcade.cpp +++ b/src/engine/platform/arcade.cpp @@ -215,6 +215,14 @@ void DivPlatformArcade::tick() { } } + if (chan[i].std.hadDuty) { + if (chan[i].std.duty>0) { + rWrite(0x0f,0x80|(0x20-chan[i].std.duty)); + } else { + rWrite(0x0f,0); + } + } + if (chan[i].std.hadAlg) { chan[i].state.alg=chan[i].std.alg; if (isMuted[i]) { diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 1c3b64c5..ea29729e 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -1363,13 +1363,16 @@ void FurnaceGUI::drawInsEdit() { dutyMax=24; } } - if (ins->type==DIV_INS_AY || ins->type==DIV_INS_AY8930) { + if (ins->type==DIV_INS_FM) { + dutyMax=32; + } + if (ins->type==DIV_INS_AY || ins->type==DIV_INS_AY8930 || ins->type==DIV_INS_FM) { dutyLabel="Noise Freq"; } if (ins->type==DIV_INS_AY8930) { dutyMax=255; } - if (ins->type==DIV_INS_TIA || ins->type==DIV_INS_PCE || ins->type==DIV_INS_FM) { + if (ins->type==DIV_INS_TIA || ins->type==DIV_INS_PCE) { dutyMax=0; } bool dutyIsRel=(ins->type==DIV_INS_C64 && !ins->c64.dutyIsAbs);