port ExtCh op macro code to OPN family, part 2

This commit is contained in:
tildearrow 2022-12-21 18:02:00 -05:00
parent 2a65f24b3f
commit 0eb2449c57
3 changed files with 2 additions and 4 deletions

View File

@ -83,6 +83,8 @@
return 2; \
}
#define IS_EXTCH_MUTED (isOpMuted[0] && isOpMuted[1] && isOpMuted[2] && isOpMuted[3])
class DivPlatformOPN: public DivPlatformFMBase {
protected:
const unsigned short ADDR_MULT_DT=0x30;

View File

@ -25,7 +25,6 @@
#define CHIP_DIVIDER fmDivBase
#define IS_REALLY_MUTED(x) (isMuted[x] && (x<5 || !softPCM || (isMuted[5] && isMuted[6])))
#define IS_EXTCH_MUTED (isOpMuted[0] && isOpMuted[1] && isOpMuted[2] && isOpMuted[3])
int DivPlatformGenesisExt::dispatch(DivCommand c) {
if (c.chan<2) {

View File

@ -45,8 +45,6 @@ int DivPlatformYM2203Ext::dispatch(DivCommand c) {
if (opChan[ch].insChanged) {
chan[2].state.alg=ins->fm.alg;
chan[2].state.fb=ins->fm.fb;
chan[2].state.fms=ins->fm.fms;
chan[2].state.ams=ins->fm.ams;
chan[2].state.op[ordch]=ins->fm.op[ordch];
}
@ -80,7 +78,6 @@ int DivPlatformYM2203Ext::dispatch(DivCommand c) {
}
if (opChan[ch].insChanged) { // TODO how does this work?
rWrite(chanOffs[2]+0xb0,(chan[2].state.alg&7)|(chan[2].state.fb<<3));
rWrite(chanOffs[2]+0xb4,(IS_EXTCH_MUTED?0:(opChan[ch].pan<<6))|(chan[2].state.fms&7)|((chan[2].state.ams&3)<<4));
}
opChan[ch].insChanged=false;