From 410a509d7345e1cb20de188a2853d6aa23340f9a Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 27 Apr 2022 18:03:24 -0500 Subject: [PATCH] SoundUnit: max cutoff 16383 --- src/engine/platform/su.cpp | 2 +- src/gui/insEdit.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/platform/su.cpp b/src/engine/platform/su.cpp index f98b19947..7acab3570 100644 --- a/src/engine/platform/su.cpp +++ b/src/engine/platform/su.cpp @@ -88,7 +88,7 @@ void DivPlatformSoundUnit::tick(bool sysTick) { chan[i].freqChanged=true; } if (chan[i].std.ex1.had) { - chan[i].cutoff=chan[i].std.ex1.val; + chan[i].cutoff=chan[i].std.ex1.val&16383; chWrite(i,0x06,chan[i].cutoff&0xff); chWrite(i,0x07,chan[i].cutoff>>8); } diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index 13629816e..7039f164c 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -2837,7 +2837,7 @@ void FurnaceGUI::drawInsEdit() { ex2Max=4095; } if (ins->type==DIV_INS_SU) { - ex1Max=65535; + ex1Max=16383; ex2Max=255; } if (ins->type==DIV_INS_SAA1099) ex1Max=8;