From 1688fc012e2fdd3180ea70c8fefe45902895603a Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 30 Apr 2024 01:38:33 -0500 Subject: [PATCH] and here I fix your OPLL --- src/engine/platform/opll.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/engine/platform/opll.cpp b/src/engine/platform/opll.cpp index 0fd3b6d3d..633429cab 100644 --- a/src/engine/platform/opll.cpp +++ b/src/engine/platform/opll.cpp @@ -93,6 +93,10 @@ void DivPlatformOPLL::acquire_nuked(short** buf, size_t len) { void DivPlatformOPLL::acquire_ymfm(short** buf, size_t len) { } +static const unsigned char freakingDrumMap[5]={ + 9, 11, 12, 13, 10 +}; + void DivPlatformOPLL::acquire_emu(short** buf, size_t len) { thread_local int os; @@ -111,7 +115,7 @@ void DivPlatformOPLL::acquire_emu(short** buf, size_t len) { for (int i=0; i<11; i++) { if (i>=6 && properDrums) { - oscBuf[i]->data[oscBuf[i]->needle++]=(-fm_emu->ch_out[i+3])<<3; + oscBuf[i]->data[oscBuf[i]->needle++]=(-fm_emu->ch_out[freakingDrumMap[i-6]])<<3; } else { oscBuf[i]->data[oscBuf[i]->needle++]=(-fm_emu->ch_out[i])<<3; } @@ -1004,7 +1008,7 @@ DivMacroInt* DivPlatformOPLL::getChanMacroInt(int ch) { } DivDispatchOscBuffer* DivPlatformOPLL::getOscBuffer(int ch) { - if (ch>=9) return NULL; + if (ch>=9 && selCore==0) return NULL; return oscBuf[ch]; }