OPN/2/A/B: fix ExtCh muting on 18xx

This commit is contained in:
tildearrow 2023-08-11 16:35:18 -05:00
parent 6324a2a952
commit fe8f94b2b2
5 changed files with 64 additions and 44 deletions

View file

@ -440,6 +440,9 @@ void DivPlatformGenesisExt::muteChannel(int ch, bool mute) {
}
isOpMuted[ch-2]=mute;
DivPlatformGenesis::muteChannel(extChanOffs,IS_EXTCH_MUTED);
if (extMode) {
int ordch=orderedOps[ch-2];
unsigned short baseAddr=chanOffs[2]|opOffs[ordch];
DivInstrumentFM::Operator op=chan[2].state.op[ordch];
@ -450,6 +453,7 @@ void DivPlatformGenesisExt::muteChannel(int ch, bool mute) {
}
rWrite(chanOffs[2]+0xb4,(IS_EXTCH_MUTED?0:(opChan[ch-2].pan<<6))|(chan[2].state.fms&7)|((chan[2].state.ams&3)<<4));
}
}
static int opChanOffsL[4]={

View file

@ -603,6 +603,9 @@ void DivPlatformYM2203Ext::muteChannel(int ch, bool mute) {
}
isOpMuted[ch-2]=mute;
DivPlatformYM2203::muteChannel(extChanOffs,IS_EXTCH_MUTED);
if (extMode) {
int ordch=orderedOps[ch-2];
unsigned short baseAddr=chanOffs[2]|opOffs[ordch];
DivInstrumentFM::Operator op=chan[2].state.op[ordch];
@ -611,6 +614,7 @@ void DivPlatformYM2203Ext::muteChannel(int ch, bool mute) {
} else {
rWrite(baseAddr+0x40,127-VOL_SCALE_LOG_BROKEN(127-op.tl,opChan[ch-2].outVol&0x7f,127));
}
}
}
void DivPlatformYM2203Ext::forceIns() {

View file

@ -638,6 +638,9 @@ void DivPlatformYM2608Ext::muteChannel(int ch, bool mute) {
}
isOpMuted[ch-2]=mute;
DivPlatformYM2608::muteChannel(extChanOffs,IS_EXTCH_MUTED);
if (extMode) {
int ordch=orderedOps[ch-2];
unsigned short baseAddr=chanOffs[2]|opOffs[ordch];
DivInstrumentFM::Operator op=chan[2].state.op[ordch];
@ -648,6 +651,7 @@ void DivPlatformYM2608Ext::muteChannel(int ch, bool mute) {
}
rWrite(chanOffs[2]+0xb4,(IS_EXTCH_MUTED?0:(opChan[ch-2].pan<<6))|(chan[2].state.fms&7)|((chan[2].state.ams&3)<<4));
}
}
void DivPlatformYM2608Ext::forceIns() {

View file

@ -633,6 +633,9 @@ void DivPlatformYM2610BExt::muteChannel(int ch, bool mute) {
}
isOpMuted[ch-extChanOffs]=mute;
DivPlatformYM2610B::muteChannel(extChanOffs,IS_EXTCH_MUTED);
if (extMode) {
int ordch=orderedOps[ch-extChanOffs];
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[ordch];
DivInstrumentFM::Operator op=chan[extChanOffs].state.op[ordch];
@ -643,6 +646,7 @@ void DivPlatformYM2610BExt::muteChannel(int ch, bool mute) {
}
rWrite(chanOffs[extChanOffs]+0xb4,(IS_EXTCH_MUTED?0:(opChan[ch-extChanOffs].pan<<6))|(chan[extChanOffs].state.fms&7)|((chan[extChanOffs].state.ams&3)<<4));
}
}
void DivPlatformYM2610BExt::forceIns() {

View file

@ -633,6 +633,9 @@ void DivPlatformYM2610Ext::muteChannel(int ch, bool mute) {
}
isOpMuted[ch-extChanOffs]=mute;
DivPlatformYM2610::muteChannel(extChanOffs,IS_EXTCH_MUTED);
if (extMode) {
int ordch=orderedOps[ch-extChanOffs];
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[ordch];
DivInstrumentFM::Operator op=chan[extChanOffs].state.op[ordch];
@ -643,6 +646,7 @@ void DivPlatformYM2610Ext::muteChannel(int ch, bool mute) {
}
rWrite(chanOffs[extChanOffs]+0xb4,(IS_EXTCH_MUTED?0:(opChan[ch-extChanOffs].pan<<6))|(chan[extChanOffs].state.fms&7)|((chan[extChanOffs].state.ams&3)<<4));
}
}
void DivPlatformYM2610Ext::forceIns() {