genesis: implement 10xx command

This commit is contained in:
tildearrow 2021-06-05 23:27:02 -05:00
parent c519b84c91
commit 0b8fcc6e8d
3 changed files with 9 additions and 0 deletions

View File

@ -18,6 +18,7 @@ enum DivDispatchCmds {
DIV_CMD_SAMPLE_MODE,
DIV_CMD_FM_LFO,
DIV_CMD_FM_TL,
DIV_CMD_FM_AR,
DIV_CMD_FM_FB,

View File

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

View File

@ -26,6 +26,7 @@ const char* cmdName[DIV_CMD_MAX]={
"SAMPLE_MODE",
"FM_LFO",
"FM_TL",
"FM_AR",
"FM_FB",
@ -119,6 +120,9 @@ bool DivEngine::perSystemPostEffect(int ch, unsigned char effect, unsigned char
case DIV_SYSTEM_GENESIS:
case DIV_SYSTEM_GENESIS_EXT:
switch (effect) {
case 0x10: // LFO
dispatchCmd(DivCommand(DIV_CMD_FM_LFO,ch,effectVal));
break;
case 0x11: // FB
dispatchCmd(DivCommand(DIV_CMD_FM_FB,ch,effectVal&7));
break;