From e1140c5015eb798f6846afeb624a1098403845f2 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 21 Aug 2023 19:27:19 -0500 Subject: [PATCH] GUI: OPM preview --- src/gui/fmPreview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/fmPreview.cpp b/src/gui/fmPreview.cpp index f73e48fb4..503e8de4d 100644 --- a/src/gui/fmPreview.cpp +++ b/src/gui/fmPreview.cpp @@ -94,10 +94,12 @@ void FurnaceGUI::renderFMPreviewOPN(const DivInstrumentFM& params, int pos) { OPM_Write((opm_t*)fmPreviewOPM,0,(addr)); \ do { \ OPM_Clock((opm_t*)fmPreviewOPM,out,NULL,NULL,NULL); \ + OPM_Clock((opm_t*)fmPreviewOPM,out,NULL,NULL,NULL); \ } while (((opm_t*)fmPreviewOPM)->write_busy); \ OPM_Write((opm_t*)fmPreviewOPM,1,(val)); \ do { \ OPM_Clock((opm_t*)fmPreviewOPM,out,NULL,NULL,NULL); \ + OPM_Clock((opm_t*)fmPreviewOPM,out,NULL,NULL,NULL); \ } while (((opm_t*)fmPreviewOPM)->write_busy); void FurnaceGUI::renderFMPreviewOPM(const DivInstrumentFM& params, int pos) { @@ -131,8 +133,8 @@ void FurnaceGUI::renderFMPreviewOPM(const DivInstrumentFM& params, int pos) { } OPM_WRITE(0x20,(params.alg&7)|((params.fb&7)<<3)|0xc0); OPM_WRITE(0x38,((params.fms&7)<<4)|(params.ams&3)); - OPM_WRITE(0x28,mult0?0x20:0x10); // frequency - OPM_WRITE(0x30,0); + OPM_WRITE(0x28,mult0?0x39:0x29); // frequency + OPM_WRITE(0x30,0xe6); OPM_WRITE(0x08,0x78); // key on }