From 2119675b100a63be7b942070f369120a1774402b Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 30 May 2022 21:21:42 -0500 Subject: [PATCH] OPN: fix 11xx not working on ExtCh issue #503 --- src/engine/platform/genesisext.cpp | 5 +++++ src/engine/platform/ym2203ext.cpp | 5 +++++ src/engine/platform/ym2608ext.cpp | 5 +++++ src/engine/platform/ym2610bext.cpp | 5 +++++ src/engine/platform/ym2610ext.cpp | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/src/engine/platform/genesisext.cpp b/src/engine/platform/genesisext.cpp index 4d4935b5f..cc4abc88b 100644 --- a/src/engine/platform/genesisext.cpp +++ b/src/engine/platform/genesisext.cpp @@ -179,6 +179,11 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) { rWrite(0x22,lfoValue); break; } + case DIV_CMD_FM_FB: { + chan[2].state.fb=c.value&7; + rWrite(chanOffs[2]+ADDR_FB_ALG,(chan[2].state.alg&7)|(chan[2].state.fb<<3)); + break; + } case DIV_CMD_FM_MULT: { // TODO unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[c.value]]; DivInstrumentFM::Operator& op=chan[2].state.op[orderedOps[c.value]]; diff --git a/src/engine/platform/ym2203ext.cpp b/src/engine/platform/ym2203ext.cpp index 929687fe4..95937207d 100644 --- a/src/engine/platform/ym2203ext.cpp +++ b/src/engine/platform/ym2203ext.cpp @@ -155,6 +155,11 @@ int DivPlatformYM2203Ext::dispatch(DivCommand c) { rWrite(0x22,(c.value&7)|((c.value>>4)<<3)); break; } + case DIV_CMD_FM_FB: { + chan[2].state.fb=c.value&7; + rWrite(chanOffs[2]+ADDR_FB_ALG,(chan[2].state.alg&7)|(chan[2].state.fb<<3)); + break; + } case DIV_CMD_FM_MULT: { // TODO unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[c.value]]; DivInstrument* ins=parent->getIns(opChan[ch].ins,DIV_INS_FM); diff --git a/src/engine/platform/ym2608ext.cpp b/src/engine/platform/ym2608ext.cpp index 285e350de..441640b45 100644 --- a/src/engine/platform/ym2608ext.cpp +++ b/src/engine/platform/ym2608ext.cpp @@ -155,6 +155,11 @@ int DivPlatformYM2608Ext::dispatch(DivCommand c) { rWrite(0x22,(c.value&7)|((c.value>>4)<<3)); break; } + case DIV_CMD_FM_FB: { + chan[2].state.fb=c.value&7; + rWrite(chanOffs[2]+ADDR_FB_ALG,(chan[2].state.alg&7)|(chan[2].state.fb<<3)); + break; + } case DIV_CMD_FM_MULT: { // TODO unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[c.value]]; DivInstrument* ins=parent->getIns(opChan[ch].ins,DIV_INS_FM); diff --git a/src/engine/platform/ym2610bext.cpp b/src/engine/platform/ym2610bext.cpp index 20b56c018..cd7e494b9 100644 --- a/src/engine/platform/ym2610bext.cpp +++ b/src/engine/platform/ym2610bext.cpp @@ -155,6 +155,11 @@ int DivPlatformYM2610BExt::dispatch(DivCommand c) { rWrite(0x22,(c.value&7)|((c.value>>4)<<3)); break; } + case DIV_CMD_FM_FB: { + chan[2].state.fb=c.value&7; + rWrite(chanOffs[2]+ADDR_FB_ALG,(chan[2].state.alg&7)|(chan[2].state.fb<<3)); + break; + } case DIV_CMD_FM_MULT: { // TODO unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[c.value]]; DivInstrument* ins=parent->getIns(opChan[ch].ins,DIV_INS_FM); diff --git a/src/engine/platform/ym2610ext.cpp b/src/engine/platform/ym2610ext.cpp index a3d5df21d..bf6df44e7 100644 --- a/src/engine/platform/ym2610ext.cpp +++ b/src/engine/platform/ym2610ext.cpp @@ -155,6 +155,11 @@ int DivPlatformYM2610Ext::dispatch(DivCommand c) { rWrite(0x22,(c.value&7)|((c.value>>4)<<3)); break; } + case DIV_CMD_FM_FB: { + chan[1].state.fb=c.value&7; + rWrite(chanOffs[1]+ADDR_FB_ALG,(chan[1].state.alg&7)|(chan[1].state.fb<<3)); + break; + } case DIV_CMD_FM_MULT: { // TODO unsigned short baseAddr=chanOffs[1]|opOffs[orderedOps[c.value]]; DivInstrument* ins=parent->getIns(opChan[ch].ins,DIV_INS_FM);