OPN: fix LFO effect not working in ext ch mode

This commit is contained in:
tildearrow 2022-03-30 00:09:53 -05:00
parent 7e34c7746e
commit af6bbf9493
3 changed files with 13 additions and 0 deletions

View file

@ -159,6 +159,11 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
opChan[ch].freqChanged=true; opChan[ch].freqChanged=true;
break; break;
} }
case DIV_CMD_FM_LFO: {
lfoValue=(c.value&7)|((c.value>>4)<<3);
rWrite(0x22,lfoValue);
break;
}
case DIV_CMD_FM_MULT: { // TODO case DIV_CMD_FM_MULT: { // TODO
unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[c.value]]; unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[c.value]];
DivInstrumentFM::Operator& op=chan[2].state.op[orderedOps[c.value]]; DivInstrumentFM::Operator& op=chan[2].state.op[orderedOps[c.value]];

View file

@ -147,6 +147,10 @@ int DivPlatformYM2610BExt::dispatch(DivCommand c) {
opChan[ch].freqChanged=true; opChan[ch].freqChanged=true;
break; break;
} }
case DIV_CMD_FM_LFO: {
rWrite(0x22,(c.value&7)|((c.value>>4)<<3));
break;
}
case DIV_CMD_FM_MULT: { // TODO case DIV_CMD_FM_MULT: { // TODO
unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[c.value]]; unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[c.value]];
DivInstrument* ins=parent->getIns(opChan[ch].ins); DivInstrument* ins=parent->getIns(opChan[ch].ins);

View file

@ -147,6 +147,10 @@ int DivPlatformYM2610Ext::dispatch(DivCommand c) {
opChan[ch].freqChanged=true; opChan[ch].freqChanged=true;
break; break;
} }
case DIV_CMD_FM_LFO: {
rWrite(0x22,(c.value&7)|((c.value>>4)<<3));
break;
}
case DIV_CMD_FM_MULT: { // TODO case DIV_CMD_FM_MULT: { // TODO
unsigned short baseAddr=chanOffs[1]|opOffs[orderedOps[c.value]]; unsigned short baseAddr=chanOffs[1]|opOffs[orderedOps[c.value]];
DivInstrument* ins=parent->getIns(opChan[ch].ins); DivInstrument* ins=parent->getIns(opChan[ch].ins);