OPN/2/A/B: fix ExtCh instrument

issue #1053
This commit is contained in:
tildearrow 2023-08-11 16:14:06 -05:00
parent a917c2f532
commit 6324a2a952
10 changed files with 45 additions and 0 deletions

View file

@ -972,6 +972,7 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
}
case DIV_CMD_FM_EXTCH: {
if (extSys) {
if (extMode==(bool)c.value) break;
extMode=c.value;
immWrite(0x27,extMode?0x40:0);
}

View file

@ -144,6 +144,7 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
opChan[ch].insChanged=true;
}
opChan[ch].ins=c.value;
chan[extChanOffs].ins=opChan[ch].ins;
break;
case DIV_CMD_PANNING: {
if (c.value==0 && c.value2==0) {
@ -219,8 +220,15 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
break;
}
case DIV_CMD_FM_EXTCH: {
if (extMode==(bool)c.value) break;
extMode=c.value;
immWrite(0x27,extMode?0x40:0);
if (!extMode) {
for (int i=0; i<4; i++) {
opChan[i].insChanged=true;
}
chan[extChanOffs].insChanged=true;
}
break;
}
case DIV_CMD_FM_LFO: {

View file

@ -670,6 +670,7 @@ int DivPlatformYM2203::dispatch(DivCommand c) {
}
case DIV_CMD_FM_EXTCH: {
if (extSys) {
if (extMode==(bool)c.value) break;
extMode=c.value;
immWrite(0x27,extMode?0x40:0);
}

View file

@ -138,6 +138,7 @@ int DivPlatformYM2203Ext::dispatch(DivCommand c) {
opChan[ch].insChanged=true;
}
opChan[ch].ins=c.value;
chan[extChanOffs].ins=opChan[ch].ins;
break;
case DIV_CMD_PITCH: {
opChan[ch].pitch=c.value;
@ -182,8 +183,15 @@ int DivPlatformYM2203Ext::dispatch(DivCommand c) {
break;
}
case DIV_CMD_FM_EXTCH: {
if (extMode==(bool)c.value) break;
extMode=c.value;
immWrite(0x27,extMode?0x40:0);
if (!extMode) {
for (int i=0; i<4; i++) {
opChan[i].insChanged=true;
}
chan[extChanOffs].insChanged=true;
}
break;
}
case DIV_CMD_FM_FB: {

View file

@ -1153,6 +1153,7 @@ int DivPlatformYM2608::dispatch(DivCommand c) {
}
case DIV_CMD_FM_EXTCH: {
if (extSys) {
if (extMode==(bool)c.value) break;
extMode=c.value;
immWrite(0x27,extMode?0x40:0);
}

View file

@ -141,6 +141,7 @@ int DivPlatformYM2608Ext::dispatch(DivCommand c) {
opChan[ch].insChanged=true;
}
opChan[ch].ins=c.value;
chan[extChanOffs].ins=opChan[ch].ins;
break;
case DIV_CMD_PANNING: {
if (c.value==0 && c.value2==0) {
@ -200,8 +201,15 @@ int DivPlatformYM2608Ext::dispatch(DivCommand c) {
break;
}
case DIV_CMD_FM_EXTCH: {
if (extMode==(bool)c.value) break;
extMode=c.value;
immWrite(0x27,extMode?0x40:0);
if (!extMode) {
for (int i=0; i<4; i++) {
opChan[i].insChanged=true;
}
chan[extChanOffs].insChanged=true;
}
break;
}
case DIV_CMD_FM_LFO: {

View file

@ -1125,6 +1125,7 @@ int DivPlatformYM2610::dispatch(DivCommand c) {
}
case DIV_CMD_FM_EXTCH: {
if (extSys) {
if (extMode==(bool)c.value) break;
extMode=c.value;
immWrite(0x27,extMode?0x40:0);
}

View file

@ -1192,6 +1192,7 @@ int DivPlatformYM2610B::dispatch(DivCommand c) {
}
case DIV_CMD_FM_EXTCH: {
if (extSys) {
if (extMode==(bool)c.value) break;
extMode=c.value;
immWrite(0x27,extMode?0x40:0);
}

View file

@ -137,6 +137,7 @@ int DivPlatformYM2610BExt::dispatch(DivCommand c) {
opChan[ch].insChanged=true;
}
opChan[ch].ins=c.value;
chan[extChanOffs].ins=opChan[ch].ins;
break;
case DIV_CMD_PANNING: {
if (c.value==0 && c.value2==0) {
@ -196,8 +197,15 @@ int DivPlatformYM2610BExt::dispatch(DivCommand c) {
break;
}
case DIV_CMD_FM_EXTCH: {
if (extMode==(bool)c.value) break;
extMode=c.value;
immWrite(0x27,extMode?0x40:0);
if (!extMode) {
for (int i=0; i<4; i++) {
opChan[i].insChanged=true;
}
chan[extChanOffs].insChanged=true;
}
break;
}
case DIV_CMD_FM_LFO: {

View file

@ -137,6 +137,7 @@ int DivPlatformYM2610Ext::dispatch(DivCommand c) {
opChan[ch].insChanged=true;
}
opChan[ch].ins=c.value;
chan[extChanOffs].ins=opChan[ch].ins;
break;
case DIV_CMD_PANNING: {
if (c.value==0 && c.value2==0) {
@ -196,8 +197,15 @@ int DivPlatformYM2610Ext::dispatch(DivCommand c) {
break;
}
case DIV_CMD_FM_EXTCH: {
if (extMode==(bool)c.value) break;
extMode=c.value;
immWrite(0x27,extMode?0x40:0);
if (!extMode) {
for (int i=0; i<4; i++) {
opChan[i].insChanged=true;
}
chan[extChanOffs].insChanged=true;
}
break;
}
case DIV_CMD_FM_LFO: {