From 796f9b0cf591555e861d1823e773bcdcc3acd32f Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 4 Dec 2021 02:28:15 -0500 Subject: [PATCH] one more fix! --- src/engine/platform/nes.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/platform/nes.cpp b/src/engine/platform/nes.cpp index 998626ebc..504a6f98b 100644 --- a/src/engine/platform/nes.cpp +++ b/src/engine/platform/nes.cpp @@ -78,7 +78,7 @@ void DivPlatformNES::tick() { if (chan[i].std.hadArp) { if (i==3) { // noise if (chan[i].std.arpMode) { - chan[i].baseFreq=chan[i].std.arp+24; + chan[i].baseFreq=chan[i].std.arp; } else { chan[i].baseFreq=chan[i].note+chan[i].std.arp-12; } @@ -102,6 +102,7 @@ void DivPlatformNES::tick() { } if (chan[i].std.hadDuty) { chan[i].duty=chan[i].std.duty; + if (i==3 && chan[i].duty>1) chan[i].duty=1; DivInstrument* ins=parent->getIns(chan[i].ins); if (i!=2) { apu_wr_reg(0x4000+i*4,0x30|chan[i].outVol|((chan[i].duty&3)<<6));