port macro retrigger to orig Furnace

This commit is contained in:
LTVA1 2024-01-17 15:28:29 +03:00
parent 3cb8190258
commit 7f94cdc930
68 changed files with 265 additions and 1 deletions

View file

@ -93,7 +93,9 @@ not all chips support these effects.
- this effect is currently incomplete.
- `F5xx`: **Disable macro.**
- `F6xx`: **Enable macro.**
- `F7xx`: **Retrigger macro.**
- see macro table at the end of this document for possible values.
- `F7xx` resets LFO macro phase to the phase that is set in instrument macro settings.
additionally, [each chip has its own effects](../7-systems/README.md).

View file

@ -233,6 +233,7 @@ bool DivCSPlayer::tick() {
case DIV_CMD_AMIGA_PM:
case DIV_CMD_MACRO_OFF:
case DIV_CMD_MACRO_ON:
case DIV_CMD_MACRO_RETRIG:
arg0=(unsigned char)stream.readC();
break;
case DIV_CMD_FM_TL:

View file

@ -153,6 +153,7 @@ void writePackedCommandValues(SafeWriter* w, const DivCommand& c) {
case DIV_CMD_AMIGA_PM:
case DIV_CMD_MACRO_OFF:
case DIV_CMD_MACRO_ON:
case DIV_CMD_MACRO_RETRIG:
case DIV_CMD_HINT_ARP_TIME:
w->writeC(1); // length
w->writeC(c.value);

View file

@ -213,6 +213,7 @@ enum DivDispatchCmds {
DIV_CMD_MACRO_OFF, // (which)
DIV_CMD_MACRO_ON, // (which)
DIV_CMD_MACRO_RETRIG, // (which)
DIV_CMD_SURROUND_PANNING, // (out, val)

View file

@ -129,6 +129,8 @@ const char* DivEngine::getEffectDesc(unsigned char effect, int chan, bool notNul
return "F5xx: Disable macro (see manual)";
case 0xf6:
return "F6xx: Enable macro (see manual)";
case 0xf7:
return "F7xx: Retrigger macro (see manual)";
case 0xf8:
return "F8xx: Single tick volume slide up";
case 0xf9:

View file

@ -245,6 +245,77 @@ void DivMacroInt::mask(unsigned char id, bool enabled) {
#undef CONSIDER_OP
#undef CONSIDER
void DivMacroInt::retrig(unsigned char id)
{
if(id < 0x20)
{
DivMacroStruct* m = NULL;
DivInstrumentMacro* sm = NULL;
for(int i = 0; i < macroListLen; i++)
{
if(macroList[i]->macroType == id)
{
m = macroList[i];
sm = macroSource[i];
break;
}
}
if(sm == NULL || m == NULL) return;
if(sm->len == 0 && m->type == 0) return;
m->has=m->had=m->actualHad=m->will=true;
m->lfoPos = sm->val[13];
m->pos = 0;
m->lastPos = 0;
m->delay = 0;
}
else //here we can't run the search since macros share ID
{
DivMacroStruct* m = NULL;
DivInstrumentMacro* sm = NULL;
int oper = (id >> 5) - 1;
int type = (id & 0x1f) + 0x20;
switch(type)
{
case DIV_MACRO_OP_AM: m = &op[oper].am; sm = &ins->std.opMacros[oper].amMacro; break;
case DIV_MACRO_OP_AR: m = &op[oper].ar; sm = &ins->std.opMacros[oper].arMacro; break;
case DIV_MACRO_OP_DR: m = &op[oper].dr; sm = &ins->std.opMacros[oper].drMacro; break;
case DIV_MACRO_OP_MULT: m = &op[oper].mult; sm = &ins->std.opMacros[oper].multMacro; break;
case DIV_MACRO_OP_RR: m = &op[oper].rr; sm = &ins->std.opMacros[oper].rrMacro; break;
case DIV_MACRO_OP_SL: m = &op[oper].sl; sm = &ins->std.opMacros[oper].slMacro; break;
case DIV_MACRO_OP_TL: m = &op[oper].tl; sm = &ins->std.opMacros[oper].tlMacro; break;
case DIV_MACRO_OP_DT2: m = &op[oper].dt2; sm = &ins->std.opMacros[oper].dt2Macro; break;
case DIV_MACRO_OP_RS: m = &op[oper].rs; sm = &ins->std.opMacros[oper].rsMacro; break;
case DIV_MACRO_OP_DT: m = &op[oper].dt; sm = &ins->std.opMacros[oper].dtMacro; break;
case DIV_MACRO_OP_D2R: m = &op[oper].d2r; sm = &ins->std.opMacros[oper].d2rMacro; break;
case DIV_MACRO_OP_SSG: m = &op[oper].ssg; sm = &ins->std.opMacros[oper].ssgMacro; break;
case DIV_MACRO_OP_DAM: m = &op[oper].dam; sm = &ins->std.opMacros[oper].damMacro; break;
case DIV_MACRO_OP_DVB: m = &op[oper].dvb; sm = &ins->std.opMacros[oper].dvbMacro; break;
case DIV_MACRO_OP_EGT: m = &op[oper].egt; sm = &ins->std.opMacros[oper].egtMacro; break;
case DIV_MACRO_OP_KSL: m = &op[oper].ksl; sm = &ins->std.opMacros[oper].kslMacro; break;
case DIV_MACRO_OP_SUS: m = &op[oper].sus; sm = &ins->std.opMacros[oper].susMacro; break;
case DIV_MACRO_OP_VIB: m = &op[oper].vib; sm = &ins->std.opMacros[oper].vibMacro; break;
case DIV_MACRO_OP_WS: m = &op[oper].ws; sm = &ins->std.opMacros[oper].wsMacro; break;
case DIV_MACRO_OP_KSR: m = &op[oper].ksr; sm = &ins->std.opMacros[oper].ksrMacro; break;
default: return; break;
}
if(sm == NULL || m == NULL) return;
if(sm->len == 0 && m->type == 0) return;
m->has=m->had=m->actualHad=m->will=true;
m->lfoPos = sm->val[13];
m->pos = 0;
m->lastPos = 0;
m->delay = 0;
}
}
void DivMacroInt::release() {
released=true;
}

View file

@ -119,6 +119,11 @@ class DivMacroInt {
*/
void release();
/**
* retrigger macro.
*/
void retrig(unsigned char id);
/**
* trigger next macro tick.
*/

View file

@ -721,6 +721,9 @@ int DivPlatformAmiga::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -783,6 +783,9 @@ int DivPlatformArcade::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
return 127;
break;

View file

@ -651,6 +651,9 @@ int DivPlatformAY8910::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
return 15;
break;

View file

@ -653,6 +653,9 @@ int DivPlatformAY8930::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
return 31;
break;

View file

@ -246,6 +246,9 @@ int DivPlatformBubSysWSG::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -441,6 +441,9 @@ int DivPlatformC140::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -536,6 +536,9 @@ int DivPlatformC64::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -1022,6 +1022,9 @@ int DivPlatformES5506::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -920,6 +920,9 @@ int DivPlatformESFM::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
return 63;
break;

View file

@ -387,6 +387,9 @@ int DivPlatformFDS::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -311,6 +311,9 @@ int DivPlatformGA20::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -553,6 +553,9 @@ int DivPlatformGB::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -1183,6 +1183,9 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
return 127;
break;

View file

@ -395,6 +395,9 @@ int DivPlatformK007232::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -345,6 +345,9 @@ int DivPlatformK053260::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -353,6 +353,9 @@ int DivPlatformLynx::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -327,6 +327,9 @@ int DivPlatformMMC5::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -297,6 +297,9 @@ int DivPlatformMSM5232::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -268,6 +268,9 @@ int DivPlatformMSM6258::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
return 8;
break;

View file

@ -226,6 +226,9 @@ int DivPlatformMSM6295::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
return 8;
break;

View file

@ -452,6 +452,9 @@ int DivPlatformN163::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -445,6 +445,9 @@ int DivPlatformNamcoWSG::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -659,6 +659,9 @@ int DivPlatformNES::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -1970,6 +1970,9 @@ int DivPlatformOPL::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
if (c.chan==adpcmChan) return 255;
if (pretendYMU) return 127;

View file

@ -853,6 +853,9 @@ int DivPlatformOPLL::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
return 15;
break;

View file

@ -474,6 +474,9 @@ int DivPlatformPCE::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -452,6 +452,9 @@ int DivPlatformPCMDAC::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -476,6 +476,9 @@ int DivPlatformPCSpeaker::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -239,6 +239,9 @@ int DivPlatformPET::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -253,6 +253,9 @@ int DivPlatformPokeMini::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -374,6 +374,9 @@ int DivPlatformPOKEY::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -180,6 +180,9 @@ int DivPlatformPong::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -188,6 +188,9 @@ int DivPlatformPV1000::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -587,6 +587,9 @@ int DivPlatformQSound::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -291,6 +291,9 @@ int DivPlatformRF5C68::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -316,6 +316,9 @@ int DivPlatformSAA1099::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
return 15;
break;

View file

@ -261,6 +261,9 @@ int DivPlatformSCC::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -339,6 +339,9 @@ int DivPlatformSegaPCM::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
return 127;
break;

View file

@ -277,6 +277,9 @@ int DivPlatformSM8521::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -420,6 +420,9 @@ int DivPlatformSMS::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -587,6 +587,9 @@ int DivPlatformSNES::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -502,6 +502,9 @@ int DivPlatformSoundUnit::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -446,6 +446,9 @@ int DivPlatformSwan::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -271,6 +271,9 @@ int DivPlatformT6W28::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -236,6 +236,9 @@ int DivPlatformTED::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -258,6 +258,9 @@ int DivPlatformTIA::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
return 15;
break;

View file

@ -880,6 +880,9 @@ int DivPlatformTX81Z::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
return 127;
break;

View file

@ -395,6 +395,9 @@ int DivPlatformVB::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -434,6 +434,9 @@ int DivPlatformVERA::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_EXTERNAL:
rWriteZSMSync(c.value);
break;

View file

@ -252,6 +252,9 @@ int DivPlatformVIC20::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -412,6 +412,9 @@ int DivPlatformVRC6::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -832,6 +832,9 @@ int DivPlatformX1_010::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -861,6 +861,9 @@ int DivPlatformYM2203::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
if (c.chan>2) return 15;
return 127;

View file

@ -1352,6 +1352,9 @@ int DivPlatformYM2608::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
if (c.chan>14) return 255;
if (c.chan>8) return 31;

View file

@ -1324,6 +1324,9 @@ int DivPlatformYM2610::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
if (c.chan>=adpcmBChanOffs) return 255;
if (c.chan>=adpcmAChanOffs) return 31;

View file

@ -1391,6 +1391,9 @@ int DivPlatformYM2610B::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
case DIV_CMD_GET_VOLMAX:
if (c.chan>=adpcmBChanOffs) return 255;
if (c.chan>=adpcmAChanOffs) return 31;

View file

@ -321,6 +321,9 @@ int DivPlatformYMZ280B::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -218,6 +218,9 @@ int DivPlatformZXBeeper::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -288,6 +288,9 @@ int DivPlatformZXBeeperQuadTone::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_CMD_MACRO_RETRIG:
chan[c.chan].std.retrig(c.value);
break;
default:
break;
}

View file

@ -212,6 +212,7 @@ const char* cmdName[]={
"MACRO_OFF",
"MACRO_ON",
"MACRO_RETRIG",
"SURROUND_PANNING",
@ -1006,6 +1007,9 @@ void DivEngine::processRow(int i, bool afterDelay) {
case 0xf6: // enable macro
dispatchCmd(DivCommand(DIV_CMD_MACRO_ON,i,effectVal&0xff));
break;
case 0xf7: // retrigger macro
dispatchCmd(DivCommand(DIV_CMD_MACRO_RETRIG,i,effectVal&0xff));
break;
case 0xf8: // single volume ramp up
chan[i].volume=MIN(chan[i].volume+effectVal*256,chan[i].volMax);
dispatchCmd(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8));

View file

@ -516,7 +516,7 @@ const FurnaceGUIColors fxColors[256]={
GUI_COLOR_PATTERN_EFFECT_VOLUME, // F4
GUI_COLOR_PATTERN_EFFECT_MISC, // F5
GUI_COLOR_PATTERN_EFFECT_MISC, // F6
GUI_COLOR_PATTERN_EFFECT_INVALID, // F7
GUI_COLOR_PATTERN_EFFECT_MISC, // F7
GUI_COLOR_PATTERN_EFFECT_VOLUME, // F8
GUI_COLOR_PATTERN_EFFECT_VOLUME, // F9
GUI_COLOR_PATTERN_EFFECT_VOLUME, // FA