mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-30 08:23:01 +00:00
port ExtCh op macro code to OPN family, part 6
This commit is contained in:
parent
f19472f84a
commit
75416fc63e
4 changed files with 18 additions and 11 deletions
|
@ -173,11 +173,6 @@ int DivPlatformYM2203Ext::dispatch(DivCommand c) {
|
||||||
immWrite(0x27,extMode?0x40:0);
|
immWrite(0x27,extMode?0x40:0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DIV_CMD_FM_LFO: { // ???
|
|
||||||
lfoValue=(c.value&7)|((c.value>>4)<<3);
|
|
||||||
rWrite(0x22,lfoValue);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case DIV_CMD_FM_FB: {
|
case DIV_CMD_FM_FB: {
|
||||||
chan[2].state.fb=c.value&7;
|
chan[2].state.fb=c.value&7;
|
||||||
rWrite(chanOffs[2]+ADDR_FB_ALG,(chan[2].state.alg&7)|(chan[2].state.fb<<3));
|
rWrite(chanOffs[2]+ADDR_FB_ALG,(chan[2].state.alg&7)|(chan[2].state.fb<<3));
|
||||||
|
|
|
@ -950,7 +950,9 @@ int DivPlatformYM2608::dispatch(DivCommand c) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DIV_CMD_FM_LFO: {
|
case DIV_CMD_FM_LFO: {
|
||||||
rWrite(0x22,(c.value&7)|((c.value>>4)<<3));
|
if (c.chan>=6) break;
|
||||||
|
lfoValue=(c.value&7)|((c.value>>4)<<3);
|
||||||
|
rWrite(0x22,lfoValue);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DIV_CMD_FM_FB: {
|
case DIV_CMD_FM_FB: {
|
||||||
|
@ -1200,6 +1202,7 @@ void DivPlatformYM2608::forceIns() {
|
||||||
chan[i].freqChanged=true;
|
chan[i].freqChanged=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
immWrite(0x22,lfoValue);
|
||||||
for (int i=9; i<16; i++) {
|
for (int i=9; i<16; i++) {
|
||||||
chan[i].insChanged=true;
|
chan[i].insChanged=true;
|
||||||
if (i>14) { // ADPCM-B
|
if (i>14) { // ADPCM-B
|
||||||
|
@ -1276,6 +1279,7 @@ void DivPlatformYM2608::reset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
lastBusy=60;
|
lastBusy=60;
|
||||||
|
lfoValue=8;
|
||||||
sampleBank=0;
|
sampleBank=0;
|
||||||
writeRSSOff=0;
|
writeRSSOff=0;
|
||||||
writeRSSOn=0;
|
writeRSSOn=0;
|
||||||
|
@ -1286,7 +1290,7 @@ void DivPlatformYM2608::reset() {
|
||||||
extMode=false;
|
extMode=false;
|
||||||
|
|
||||||
// LFO
|
// LFO
|
||||||
immWrite(0x22,0x08);
|
immWrite(0x22,lfoValue);
|
||||||
|
|
||||||
// PCM volume
|
// PCM volume
|
||||||
immWrite(0x11,globalRSSVolume); // A
|
immWrite(0x11,globalRSSVolume); // A
|
||||||
|
|
|
@ -930,7 +930,9 @@ int DivPlatformYM2610::dispatch(DivCommand c) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DIV_CMD_FM_LFO: {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case DIV_CMD_FM_FB: {
|
case DIV_CMD_FM_FB: {
|
||||||
|
@ -1173,6 +1175,7 @@ void DivPlatformYM2610::forceIns() {
|
||||||
chan[i].freqChanged=true;
|
chan[i].freqChanged=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
immWrite(0x22,lfoValue);
|
||||||
for (int i=adpcmAChanOffs; i<=adpcmBChanOffs; i++) {
|
for (int i=adpcmAChanOffs; i<=adpcmBChanOffs; i++) {
|
||||||
chan[i].insChanged=true;
|
chan[i].insChanged=true;
|
||||||
}
|
}
|
||||||
|
@ -1247,6 +1250,7 @@ void DivPlatformYM2610::reset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
lastBusy=60;
|
lastBusy=60;
|
||||||
|
lfoValue=8;
|
||||||
sampleBank=0;
|
sampleBank=0;
|
||||||
DivPlatformYM2610Base::reset();
|
DivPlatformYM2610Base::reset();
|
||||||
|
|
||||||
|
@ -1255,7 +1259,7 @@ void DivPlatformYM2610::reset() {
|
||||||
extMode=false;
|
extMode=false;
|
||||||
|
|
||||||
// LFO
|
// LFO
|
||||||
immWrite(0x22,0x08);
|
immWrite(0x22,lfoValue);
|
||||||
|
|
||||||
// PCM volume
|
// PCM volume
|
||||||
immWrite(0x101,globalADPCMAVolume); // A
|
immWrite(0x101,globalADPCMAVolume); // A
|
||||||
|
|
|
@ -993,7 +993,9 @@ int DivPlatformYM2610B::dispatch(DivCommand c) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DIV_CMD_FM_LFO: {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case DIV_CMD_FM_FB: {
|
case DIV_CMD_FM_FB: {
|
||||||
|
@ -1236,6 +1238,7 @@ void DivPlatformYM2610B::forceIns() {
|
||||||
chan[i].freqChanged=true;
|
chan[i].freqChanged=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
immWrite(0x22,lfoValue);
|
||||||
for (int i=adpcmAChanOffs; i<=adpcmBChanOffs; i++) {
|
for (int i=adpcmAChanOffs; i<=adpcmBChanOffs; i++) {
|
||||||
chan[i].insChanged=true;
|
chan[i].insChanged=true;
|
||||||
}
|
}
|
||||||
|
@ -1310,6 +1313,7 @@ void DivPlatformYM2610B::reset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
lastBusy=60;
|
lastBusy=60;
|
||||||
|
lfoValue=8;
|
||||||
sampleBank=0;
|
sampleBank=0;
|
||||||
DivPlatformYM2610Base::reset();
|
DivPlatformYM2610Base::reset();
|
||||||
|
|
||||||
|
@ -1318,7 +1322,7 @@ void DivPlatformYM2610B::reset() {
|
||||||
extMode=false;
|
extMode=false;
|
||||||
|
|
||||||
// LFO
|
// LFO
|
||||||
immWrite(0x22,0x08);
|
immWrite(0x22,lfoValue);
|
||||||
|
|
||||||
// PCM volume
|
// PCM volume
|
||||||
immWrite(0x101,0x3f); // A
|
immWrite(0x101,0x3f); // A
|
||||||
|
|
Loading…
Reference in a new issue