port ExtCh op macro code to OPN family, part 6

This commit is contained in:
tildearrow 2022-12-23 19:00:03 -05:00
parent f19472f84a
commit 75416fc63e
4 changed files with 18 additions and 11 deletions

View file

@ -930,7 +930,9 @@ int DivPlatformYM2610::dispatch(DivCommand c) {
break;
}
case DIV_CMD_FM_LFO: {
rWrite(0x22,(c.value&7)|((c.value>>4)<<3));
if (c.chan>=psgChanOffs) break;
lfoValue=(c.value&7)|((c.value>>4)<<3);
rWrite(0x22,lfoValue);
break;
}
case DIV_CMD_FM_FB: {
@ -1173,6 +1175,7 @@ void DivPlatformYM2610::forceIns() {
chan[i].freqChanged=true;
}
}
immWrite(0x22,lfoValue);
for (int i=adpcmAChanOffs; i<=adpcmBChanOffs; i++) {
chan[i].insChanged=true;
}
@ -1247,6 +1250,7 @@ void DivPlatformYM2610::reset() {
}
lastBusy=60;
lfoValue=8;
sampleBank=0;
DivPlatformYM2610Base::reset();
@ -1255,7 +1259,7 @@ void DivPlatformYM2610::reset() {
extMode=false;
// LFO
immWrite(0x22,0x08);
immWrite(0x22,lfoValue);
// PCM volume
immWrite(0x101,globalADPCMAVolume); // A