OPN/2/A/B: fix ExtCh muting on 18xx
This commit is contained in:
parent
6324a2a952
commit
fe8f94b2b2
|
@ -439,17 +439,21 @@ void DivPlatformGenesisExt::muteChannel(int ch, bool mute) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
isOpMuted[ch-2]=mute;
|
isOpMuted[ch-2]=mute;
|
||||||
|
|
||||||
int ordch=orderedOps[ch-2];
|
|
||||||
unsigned short baseAddr=chanOffs[2]|opOffs[ordch];
|
|
||||||
DivInstrumentFM::Operator op=chan[2].state.op[ordch];
|
|
||||||
if (isOpMuted[ch-2] || !op.enable) {
|
|
||||||
rWrite(baseAddr+0x40,127);
|
|
||||||
} else {
|
|
||||||
rWrite(baseAddr+0x40,127-VOL_SCALE_LOG_BROKEN(127-op.tl,opChan[ch-2].outVol&0x7f,127));
|
|
||||||
}
|
|
||||||
|
|
||||||
rWrite(chanOffs[2]+0xb4,(IS_EXTCH_MUTED?0:(opChan[ch-2].pan<<6))|(chan[2].state.fms&7)|((chan[2].state.ams&3)<<4));
|
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];
|
||||||
|
if (isOpMuted[ch-2] || !op.enable) {
|
||||||
|
rWrite(baseAddr+0x40,127);
|
||||||
|
} else {
|
||||||
|
rWrite(baseAddr+0x40,127-VOL_SCALE_LOG_BROKEN(127-op.tl,opChan[ch-2].outVol&0x7f,127));
|
||||||
|
}
|
||||||
|
|
||||||
|
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]={
|
static int opChanOffsL[4]={
|
||||||
|
|
|
@ -603,13 +603,17 @@ void DivPlatformYM2203Ext::muteChannel(int ch, bool mute) {
|
||||||
}
|
}
|
||||||
isOpMuted[ch-2]=mute;
|
isOpMuted[ch-2]=mute;
|
||||||
|
|
||||||
int ordch=orderedOps[ch-2];
|
DivPlatformYM2203::muteChannel(extChanOffs,IS_EXTCH_MUTED);
|
||||||
unsigned short baseAddr=chanOffs[2]|opOffs[ordch];
|
|
||||||
DivInstrumentFM::Operator op=chan[2].state.op[ordch];
|
if (extMode) {
|
||||||
if (isOpMuted[ch-2] || !op.enable) {
|
int ordch=orderedOps[ch-2];
|
||||||
rWrite(baseAddr+0x40,127);
|
unsigned short baseAddr=chanOffs[2]|opOffs[ordch];
|
||||||
} else {
|
DivInstrumentFM::Operator op=chan[2].state.op[ordch];
|
||||||
rWrite(baseAddr+0x40,127-VOL_SCALE_LOG_BROKEN(127-op.tl,opChan[ch-2].outVol&0x7f,127));
|
if (isOpMuted[ch-2] || !op.enable) {
|
||||||
|
rWrite(baseAddr+0x40,127);
|
||||||
|
} else {
|
||||||
|
rWrite(baseAddr+0x40,127-VOL_SCALE_LOG_BROKEN(127-op.tl,opChan[ch-2].outVol&0x7f,127));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -638,16 +638,20 @@ void DivPlatformYM2608Ext::muteChannel(int ch, bool mute) {
|
||||||
}
|
}
|
||||||
isOpMuted[ch-2]=mute;
|
isOpMuted[ch-2]=mute;
|
||||||
|
|
||||||
int ordch=orderedOps[ch-2];
|
DivPlatformYM2608::muteChannel(extChanOffs,IS_EXTCH_MUTED);
|
||||||
unsigned short baseAddr=chanOffs[2]|opOffs[ordch];
|
|
||||||
DivInstrumentFM::Operator op=chan[2].state.op[ordch];
|
if (extMode) {
|
||||||
if (isOpMuted[ch-2] || !op.enable) {
|
int ordch=orderedOps[ch-2];
|
||||||
rWrite(baseAddr+0x40,127);
|
unsigned short baseAddr=chanOffs[2]|opOffs[ordch];
|
||||||
} else {
|
DivInstrumentFM::Operator op=chan[2].state.op[ordch];
|
||||||
rWrite(baseAddr+0x40,127-VOL_SCALE_LOG_BROKEN(127-op.tl,opChan[ch-2].outVol&0x7f,127));
|
if (isOpMuted[ch-2] || !op.enable) {
|
||||||
}
|
rWrite(baseAddr+0x40,127);
|
||||||
|
} else {
|
||||||
|
rWrite(baseAddr+0x40,127-VOL_SCALE_LOG_BROKEN(127-op.tl,opChan[ch-2].outVol&0x7f,127));
|
||||||
|
}
|
||||||
|
|
||||||
rWrite(chanOffs[2]+0xb4,(IS_EXTCH_MUTED?0:(opChan[ch-2].pan<<6))|(chan[2].state.fms&7)|((chan[2].state.ams&3)<<4));
|
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() {
|
void DivPlatformYM2608Ext::forceIns() {
|
||||||
|
|
|
@ -633,16 +633,20 @@ void DivPlatformYM2610BExt::muteChannel(int ch, bool mute) {
|
||||||
}
|
}
|
||||||
isOpMuted[ch-extChanOffs]=mute;
|
isOpMuted[ch-extChanOffs]=mute;
|
||||||
|
|
||||||
int ordch=orderedOps[ch-extChanOffs];
|
DivPlatformYM2610B::muteChannel(extChanOffs,IS_EXTCH_MUTED);
|
||||||
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[ordch];
|
|
||||||
DivInstrumentFM::Operator op=chan[extChanOffs].state.op[ordch];
|
if (extMode) {
|
||||||
if (isOpMuted[ch-extChanOffs] || !op.enable) {
|
int ordch=orderedOps[ch-extChanOffs];
|
||||||
rWrite(baseAddr+0x40,127);
|
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[ordch];
|
||||||
} else {
|
DivInstrumentFM::Operator op=chan[extChanOffs].state.op[ordch];
|
||||||
rWrite(baseAddr+0x40,127-VOL_SCALE_LOG_BROKEN(127-op.tl,opChan[ch-extChanOffs].outVol&0x7f,127));
|
if (isOpMuted[ch-extChanOffs] || !op.enable) {
|
||||||
}
|
rWrite(baseAddr+0x40,127);
|
||||||
|
} else {
|
||||||
|
rWrite(baseAddr+0x40,127-VOL_SCALE_LOG_BROKEN(127-op.tl,opChan[ch-extChanOffs].outVol&0x7f,127));
|
||||||
|
}
|
||||||
|
|
||||||
rWrite(chanOffs[extChanOffs]+0xb4,(IS_EXTCH_MUTED?0:(opChan[ch-extChanOffs].pan<<6))|(chan[extChanOffs].state.fms&7)|((chan[extChanOffs].state.ams&3)<<4));
|
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() {
|
void DivPlatformYM2610BExt::forceIns() {
|
||||||
|
|
|
@ -633,16 +633,20 @@ void DivPlatformYM2610Ext::muteChannel(int ch, bool mute) {
|
||||||
}
|
}
|
||||||
isOpMuted[ch-extChanOffs]=mute;
|
isOpMuted[ch-extChanOffs]=mute;
|
||||||
|
|
||||||
int ordch=orderedOps[ch-extChanOffs];
|
DivPlatformYM2610::muteChannel(extChanOffs,IS_EXTCH_MUTED);
|
||||||
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[ordch];
|
|
||||||
DivInstrumentFM::Operator op=chan[extChanOffs].state.op[ordch];
|
if (extMode) {
|
||||||
if (isOpMuted[ch-extChanOffs] || !op.enable) {
|
int ordch=orderedOps[ch-extChanOffs];
|
||||||
rWrite(baseAddr+0x40,127);
|
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[ordch];
|
||||||
} else {
|
DivInstrumentFM::Operator op=chan[extChanOffs].state.op[ordch];
|
||||||
rWrite(baseAddr+0x40,127-VOL_SCALE_LOG_BROKEN(127-op.tl,opChan[ch-extChanOffs].outVol&0x7f,127));
|
if (isOpMuted[ch-extChanOffs] || !op.enable) {
|
||||||
}
|
rWrite(baseAddr+0x40,127);
|
||||||
|
} else {
|
||||||
|
rWrite(baseAddr+0x40,127-VOL_SCALE_LOG_BROKEN(127-op.tl,opChan[ch-extChanOffs].outVol&0x7f,127));
|
||||||
|
}
|
||||||
|
|
||||||
rWrite(chanOffs[extChanOffs]+0xb4,(IS_EXTCH_MUTED?0:(opChan[ch-extChanOffs].pan<<6))|(chan[extChanOffs].state.fms&7)|((chan[extChanOffs].state.ams&3)<<4));
|
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() {
|
void DivPlatformYM2610Ext::forceIns() {
|
||||||
|
|
Loading…
Reference in a new issue