From 67ec9981962795e4cb18cefbb47970fcea9095d8 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 19 Feb 2022 17:35:52 -0500 Subject: [PATCH] LFO LFO LFO LFO LFO LFO LFO LFO LFO LFO LFO LFO --- src/engine/platform/pce.cpp | 2 +- src/engine/platform/sound/pce_psg.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/engine/platform/pce.cpp b/src/engine/platform/pce.cpp index 87f1af1f..01efd713 100644 --- a/src/engine/platform/pce.cpp +++ b/src/engine/platform/pce.cpp @@ -519,7 +519,7 @@ int DivPlatformPCE::init(DivEngine* p, int channels, int sugRate, unsigned int f isMuted[i]=false; } setFlags(flags); - pce=new PCE_PSG(tempL,tempR,PCE_PSG::REVISION_HUC6280); + pce=new PCE_PSG(tempL,tempR,PCE_PSG::REVISION_HUC6280A); reset(); return 6; } diff --git a/src/engine/platform/sound/pce_psg.cpp b/src/engine/platform/sound/pce_psg.cpp index f9c1ee09..ed71e0fd 100644 --- a/src/engine/platform/sound/pce_psg.cpp +++ b/src/engine/platform/sound/pce_psg.cpp @@ -157,6 +157,12 @@ void PCE_PSG::RecalcUOFunc(int chnum) //printf("UO Update: %d, %02x\n", chnum, ch->control); + // what is this? + if (lfoctrl&3 && chnum==1) { + ch->UpdateOutput = &PCE_PSG::UpdateOutput_Off; + return; + } + if((revision != REVISION_HUC6280 && !(ch->control & 0xC0)) || (revision == REVISION_HUC6280 && !(ch->control & 0x80))) ch->UpdateOutput = &PCE_PSG::UpdateOutput_Off; else if(ch->noisectrl & ch->control & 0x80)