rename a couple things
This commit is contained in:
parent
e3daca9c83
commit
c90c05fde3
|
@ -263,21 +263,21 @@ enum DivDispatchCmds {
|
||||||
DIV_CMD_BIFURCATOR_STATE_LOAD,
|
DIV_CMD_BIFURCATOR_STATE_LOAD,
|
||||||
DIV_CMD_BIFURCATOR_PARAMETER,
|
DIV_CMD_BIFURCATOR_PARAMETER,
|
||||||
|
|
||||||
DIV_CMD_OPL4_PCM_MIX_FM, // (value)
|
DIV_CMD_MULTIPCM_MIX_FM, // (value)
|
||||||
DIV_CMD_OPL4_PCM_MIX_PCM, // (value)
|
DIV_CMD_MULTIPCM_MIX_PCM, // (value)
|
||||||
DIV_CMD_OPL4_PCM_LFO, // (value)
|
DIV_CMD_MULTIPCM_LFO, // (value)
|
||||||
DIV_CMD_OPL4_PCM_VIB, // (value)
|
DIV_CMD_MULTIPCM_VIB, // (value)
|
||||||
DIV_CMD_OPL4_PCM_AM, // (value)
|
DIV_CMD_MULTIPCM_AM, // (value)
|
||||||
DIV_CMD_OPL4_PCM_AR, // (value)
|
DIV_CMD_MULTIPCM_AR, // (value)
|
||||||
DIV_CMD_OPL4_PCM_D1R, // (value)
|
DIV_CMD_MULTIPCM_D1R, // (value)
|
||||||
DIV_CMD_OPL4_PCM_DL, // (value)
|
DIV_CMD_MULTIPCM_DL, // (value)
|
||||||
DIV_CMD_OPL4_PCM_D2R, // (value)
|
DIV_CMD_MULTIPCM_D2R, // (value)
|
||||||
DIV_CMD_OPL4_PCM_RC, // (value)
|
DIV_CMD_MULTIPCM_RC, // (value)
|
||||||
DIV_CMD_OPL4_PCM_RR, // (value)
|
DIV_CMD_MULTIPCM_RR, // (value)
|
||||||
DIV_CMD_OPL4_PCM_DAMP, // (value)
|
DIV_CMD_MULTIPCM_DAMP, // (value)
|
||||||
DIV_CMD_OPL4_PCM_PSEUDO_REVERB, // (value)
|
DIV_CMD_MULTIPCM_PSEUDO_REVERB, // (value)
|
||||||
DIV_CMD_OPL4_PCM_LFO_RESET, // (value)
|
DIV_CMD_MULTIPCM_LFO_RESET, // (value)
|
||||||
DIV_CMD_OPL4_PCM_LEVEL_DIRECT, // (value)
|
DIV_CMD_MULTIPCM_LEVEL_DIRECT, // (value)
|
||||||
|
|
||||||
DIV_CMD_MAX
|
DIV_CMD_MAX
|
||||||
};
|
};
|
||||||
|
|
|
@ -2427,91 +2427,91 @@ int DivPlatformOPL::dispatch(DivCommand c) {
|
||||||
if (c.chan==adpcmChan) break;
|
if (c.chan==adpcmChan) break;
|
||||||
chan[c.chan].hardReset=c.value;
|
chan[c.chan].hardReset=c.value;
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_MIX_FM:
|
case DIV_CMD_MULTIPCM_MIX_FM:
|
||||||
if (chipType==4) {
|
if (chipType==4) {
|
||||||
rWrite(PCM_ADDR_MIX_FM,(CLAMP((0x70-(c.value&0x70)),0,0x70)>>1)|(CLAMP((7-(c.value&7)),0,7)));
|
rWrite(PCM_ADDR_MIX_FM,(CLAMP((0x70-(c.value&0x70)),0,0x70)>>1)|(CLAMP((7-(c.value&7)),0,7)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_MIX_PCM:
|
case DIV_CMD_MULTIPCM_MIX_PCM:
|
||||||
if (chipType==4) {
|
if (chipType==4) {
|
||||||
rWrite(PCM_ADDR_MIX_PCM,(CLAMP((0x70-(c.value&0x70)),0,0x70)>>1)|(CLAMP((7-(c.value&7)),0,7)));
|
rWrite(PCM_ADDR_MIX_PCM,(CLAMP((0x70-(c.value&0x70)),0,0x70)>>1)|(CLAMP((7-(c.value&7)),0,7)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_LFO:
|
case DIV_CMD_MULTIPCM_LFO:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
chan[c.chan].lfo=c.value&7;
|
chan[c.chan].lfo=c.value&7;
|
||||||
rWrite(PCM_ADDR_LFO_VIB+PCM_REG(c.chan),(chan[c.chan].lfo<<3)|(chan[c.chan].vib));
|
rWrite(PCM_ADDR_LFO_VIB+PCM_REG(c.chan),(chan[c.chan].lfo<<3)|(chan[c.chan].vib));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_VIB:
|
case DIV_CMD_MULTIPCM_VIB:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
chan[c.chan].vib=c.value&7;
|
chan[c.chan].vib=c.value&7;
|
||||||
rWrite(PCM_ADDR_LFO_VIB+PCM_REG(c.chan),(chan[c.chan].lfo<<3)|(chan[c.chan].vib));
|
rWrite(PCM_ADDR_LFO_VIB+PCM_REG(c.chan),(chan[c.chan].lfo<<3)|(chan[c.chan].vib));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_AM:
|
case DIV_CMD_MULTIPCM_AM:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
chan[c.chan].am=c.value&7;
|
chan[c.chan].am=c.value&7;
|
||||||
rWrite(PCM_ADDR_AM+PCM_REG(c.chan),chan[c.chan].am);
|
rWrite(PCM_ADDR_AM+PCM_REG(c.chan),chan[c.chan].am);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_AR:
|
case DIV_CMD_MULTIPCM_AR:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
chan[c.chan].ar=c.value&0xf;
|
chan[c.chan].ar=c.value&0xf;
|
||||||
rWrite(PCM_ADDR_AR_D1R+PCM_REG(c.chan),(chan[c.chan].ar<<4)|(chan[c.chan].d1r));
|
rWrite(PCM_ADDR_AR_D1R+PCM_REG(c.chan),(chan[c.chan].ar<<4)|(chan[c.chan].d1r));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_D1R:
|
case DIV_CMD_MULTIPCM_D1R:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
chan[c.chan].d1r=c.value&0xf;
|
chan[c.chan].d1r=c.value&0xf;
|
||||||
rWrite(PCM_ADDR_AR_D1R+PCM_REG(c.chan),(chan[c.chan].ar<<4)|(chan[c.chan].d1r));
|
rWrite(PCM_ADDR_AR_D1R+PCM_REG(c.chan),(chan[c.chan].ar<<4)|(chan[c.chan].d1r));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_DL:
|
case DIV_CMD_MULTIPCM_DL:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
chan[c.chan].dl=c.value&0xf;
|
chan[c.chan].dl=c.value&0xf;
|
||||||
rWrite(PCM_ADDR_DL_D2R+PCM_REG(c.chan),(chan[c.chan].dl<<4)|(chan[c.chan].d2r));
|
rWrite(PCM_ADDR_DL_D2R+PCM_REG(c.chan),(chan[c.chan].dl<<4)|(chan[c.chan].d2r));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_D2R:
|
case DIV_CMD_MULTIPCM_D2R:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
chan[c.chan].d2r=c.value&0xf;
|
chan[c.chan].d2r=c.value&0xf;
|
||||||
rWrite(PCM_ADDR_DL_D2R+PCM_REG(c.chan),(chan[c.chan].dl<<4)|(chan[c.chan].d2r));
|
rWrite(PCM_ADDR_DL_D2R+PCM_REG(c.chan),(chan[c.chan].dl<<4)|(chan[c.chan].d2r));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_RC:
|
case DIV_CMD_MULTIPCM_RC:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
chan[c.chan].rc=c.value&0xf;
|
chan[c.chan].rc=c.value&0xf;
|
||||||
rWrite(PCM_ADDR_RC_RR+PCM_REG(c.chan),(chan[c.chan].rc<<4)|(chan[c.chan].rr));
|
rWrite(PCM_ADDR_RC_RR+PCM_REG(c.chan),(chan[c.chan].rc<<4)|(chan[c.chan].rr));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_RR:
|
case DIV_CMD_MULTIPCM_RR:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
chan[c.chan].rr=c.value&0xf;
|
chan[c.chan].rr=c.value&0xf;
|
||||||
rWrite(PCM_ADDR_RC_RR+PCM_REG(c.chan),(chan[c.chan].rc<<4)|(chan[c.chan].rr));
|
rWrite(PCM_ADDR_RC_RR+PCM_REG(c.chan),(chan[c.chan].rc<<4)|(chan[c.chan].rr));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_DAMP:
|
case DIV_CMD_MULTIPCM_DAMP:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
chan[c.chan].damp=c.value&1;
|
chan[c.chan].damp=c.value&1;
|
||||||
chan[c.chan].freqChanged=true;
|
chan[c.chan].freqChanged=true;
|
||||||
chan[c.chan].writeCtrl=true;
|
chan[c.chan].writeCtrl=true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_PSEUDO_REVERB:
|
case DIV_CMD_MULTIPCM_PSEUDO_REVERB:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
chan[c.chan].pseudoReverb=c.value&1;
|
chan[c.chan].pseudoReverb=c.value&1;
|
||||||
chan[c.chan].freqChanged=true;
|
chan[c.chan].freqChanged=true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_LFO_RESET:
|
case DIV_CMD_MULTIPCM_LFO_RESET:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
chan[c.chan].lfoReset=c.value&1;
|
chan[c.chan].lfoReset=c.value&1;
|
||||||
chan[c.chan].freqChanged=true;
|
chan[c.chan].freqChanged=true;
|
||||||
chan[c.chan].writeCtrl=true;
|
chan[c.chan].writeCtrl=true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_OPL4_PCM_LEVEL_DIRECT:
|
case DIV_CMD_MULTIPCM_LEVEL_DIRECT:
|
||||||
if (PCM_CHECK(c.chan)) {
|
if (PCM_CHECK(c.chan)) {
|
||||||
immWrite(PCM_ADDR_TL+PCM_REG(c.chan),((0x7f-chan[c.chan].outVol)<<1)|(chan[c.chan].levelDirect?1:0));
|
immWrite(PCM_ADDR_TL+PCM_REG(c.chan),((0x7f-chan[c.chan].outVol)<<1)|(chan[c.chan].levelDirect?1:0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -263,21 +263,21 @@ const char* cmdName[]={
|
||||||
"BIFURCATOR_STATE_LOAD",
|
"BIFURCATOR_STATE_LOAD",
|
||||||
"BIFURCATOR_PARAMETER",
|
"BIFURCATOR_PARAMETER",
|
||||||
|
|
||||||
"OPL4_MIX_FM",
|
"MULTIPCM_MIX_FM",
|
||||||
"OPL4_MIX_PCM",
|
"MULTIPCM_MIX_PCM",
|
||||||
"OPL4_LFO",
|
"MULTIPCM_LFO",
|
||||||
"OPL4_VIB",
|
"MULTIPCM_VIB",
|
||||||
"OPL4_AM",
|
"MULTIPCM_AM",
|
||||||
"OPL4_AR",
|
"MULTIPCM_AR",
|
||||||
"OPL4_D1R",
|
"MULTIPCM_D1R",
|
||||||
"OPL4_DL",
|
"MULTIPCM_DL",
|
||||||
"OPL4_D2R",
|
"MULTIPCM_D2R",
|
||||||
"OPL4_RR",
|
"MULTIPCM_RR",
|
||||||
"OPL4_RC",
|
"MULTIPCM_RC",
|
||||||
"OPL4_DAMP",
|
"MULTIPCM_DAMP",
|
||||||
"OPL4_PSEUDO_REVERB",
|
"MULTIPCM_PSEUDO_REVERB",
|
||||||
"OPL4_LFO_RESET",
|
"MULTIPCM_LFO_RESET",
|
||||||
"OPL4_LEVEL_DIRECT"
|
"MULTIPCM_LEVEL_DIRECT"
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert((sizeof(cmdName)/sizeof(void*))==DIV_CMD_MAX,"update cmdName!");
|
static_assert((sizeof(cmdName)/sizeof(void*))==DIV_CMD_MAX,"update cmdName!");
|
||||||
|
|
|
@ -601,21 +601,21 @@ void DivEngine::registerSystems() {
|
||||||
|
|
||||||
EffectHandlerMap fmOPL4PostEffectHandlerMap(fmOPLPostEffectHandlerMap);
|
EffectHandlerMap fmOPL4PostEffectHandlerMap(fmOPLPostEffectHandlerMap);
|
||||||
fmOPL4PostEffectHandlerMap.insert({
|
fmOPL4PostEffectHandlerMap.insert({
|
||||||
{0x1e, {DIV_CMD_OPL4_PCM_MIX_FM, _("1Exy: FM global level (left, right; 0 to 7)"), effectVal}},
|
{0x1e, {DIV_CMD_MULTIPCM_MIX_FM, _("1Exy: FM global level (left, right; 0 to 7)"), effectVal}},
|
||||||
{0x1f, {DIV_CMD_OPL4_PCM_MIX_PCM, _("1Fxy: PCM global level (left, right; 0 to 7)"), effectVal}},
|
{0x1f, {DIV_CMD_MULTIPCM_MIX_PCM, _("1Fxy: PCM global level (left, right; 0 to 7)"), effectVal}},
|
||||||
{0x20, {DIV_CMD_OPL4_PCM_LFO, _("20xx: PCM LFO Rate (0 to 7)"), effectValAnd<7>}},
|
{0x20, {DIV_CMD_MULTIPCM_LFO, _("20xx: PCM LFO Rate (0 to 7)"), effectValAnd<7>}},
|
||||||
{0x21, {DIV_CMD_OPL4_PCM_VIB, _("21xx: PCM LFO PM Depth (0 to 7)"), effectValAnd<7>}},
|
{0x21, {DIV_CMD_MULTIPCM_VIB, _("21xx: PCM LFO PM Depth (0 to 7)"), effectValAnd<7>}},
|
||||||
{0x22, {DIV_CMD_OPL4_PCM_AM, _("22xx: PCM LFO AM Depth (0 to 7)"), effectValAnd<7>}},
|
{0x22, {DIV_CMD_MULTIPCM_AM, _("22xx: PCM LFO AM Depth (0 to 7)"), effectValAnd<7>}},
|
||||||
{0x23, {DIV_CMD_OPL4_PCM_AR, _("23xx: PCM Attack Rate (0 to 15)"), effectValAnd<15>}},
|
{0x23, {DIV_CMD_MULTIPCM_AR, _("23xx: PCM Attack Rate (0 to 15)"), effectValAnd<15>}},
|
||||||
{0x24, {DIV_CMD_OPL4_PCM_D1R, _("24xx: PCM Decay 1 Rate (0 to 15)"), effectValAnd<15>}},
|
{0x24, {DIV_CMD_MULTIPCM_D1R, _("24xx: PCM Decay 1 Rate (0 to 15)"), effectValAnd<15>}},
|
||||||
{0x25, {DIV_CMD_OPL4_PCM_DL, _("25xx: PCM Decay Level (0 to 15)"), effectValAnd<15>}},
|
{0x25, {DIV_CMD_MULTIPCM_DL, _("25xx: PCM Decay Level (0 to 15)"), effectValAnd<15>}},
|
||||||
{0x26, {DIV_CMD_OPL4_PCM_D2R, _("26xx: PCM Decay 2 Rate (0 to 15)"), effectValAnd<15>}},
|
{0x26, {DIV_CMD_MULTIPCM_D2R, _("26xx: PCM Decay 2 Rate (0 to 15)"), effectValAnd<15>}},
|
||||||
{0x27, {DIV_CMD_OPL4_PCM_RC, _("27xx: PCM Release Rate (0 to 15)"), effectValAnd<15>}},
|
{0x27, {DIV_CMD_MULTIPCM_RC, _("27xx: PCM Release Rate (0 to 15)"), effectValAnd<15>}},
|
||||||
{0x28, {DIV_CMD_OPL4_PCM_RR, _("28xx: PCM Rate Correction (0 to 15)"), effectValAnd<15>}},
|
{0x28, {DIV_CMD_MULTIPCM_RR, _("28xx: PCM Rate Correction (0 to 15)"), effectValAnd<15>}},
|
||||||
{0x2c, {DIV_CMD_OPL4_PCM_DAMP, _("2Cxx: PCM Damp"), effectValAnd<1>}},
|
{0x2c, {DIV_CMD_MULTIPCM_DAMP, _("2Cxx: PCM Damp"), effectValAnd<1>}},
|
||||||
{0x2d, {DIV_CMD_OPL4_PCM_PSEUDO_REVERB, _("2Dxx: PCM Pseudo Reverb"), effectValAnd<1>}},
|
{0x2d, {DIV_CMD_MULTIPCM_PSEUDO_REVERB, _("2Dxx: PCM Pseudo Reverb"), effectValAnd<1>}},
|
||||||
{0x2e, {DIV_CMD_OPL4_PCM_LFO_RESET, _("2Exx: PCM LFO Reset"), effectValAnd<1>}},
|
{0x2e, {DIV_CMD_MULTIPCM_LFO_RESET, _("2Exx: PCM LFO Reset"), effectValAnd<1>}},
|
||||||
{0x2f, {DIV_CMD_OPL4_PCM_LEVEL_DIRECT, _("2Fxx: PCM Level Direct"), effectValAnd<1>}},
|
{0x2f, {DIV_CMD_MULTIPCM_LEVEL_DIRECT, _("2Fxx: PCM Level Direct"), effectValAnd<1>}},
|
||||||
});
|
});
|
||||||
|
|
||||||
EffectHandlerMap c64PostEffectHandlerMap={
|
EffectHandlerMap c64PostEffectHandlerMap={
|
||||||
|
|
Loading…
Reference in a new issue