works on jenesis

This commit is contained in:
Eknous-P 2025-05-20 21:24:20 +04:00 committed by tildearrow
parent 9fd586c1c4
commit d7c79a85d9
5 changed files with 10 additions and 2 deletions

View file

@ -315,6 +315,8 @@ enum DivDispatchCmds {
DIV_CMD_WS_GLOBAL_SPEAKER_VOLUME, // (multiplier)
DIV_CMD_FM_ALG,
DIV_CMD_MAX
};

View file

@ -1539,6 +1539,9 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
break;
case DIV_CMD_PRE_NOTE:
break;
case DIV_CMD_FM_ALG:
if (c.value>7) break;
rWrite(ADDR_FB_ALG+chanOffs[c.chan], c.value&7);
default:
//printf("WARNING: unimplemented command %d\n",c.cmd);
break;

View file

@ -309,7 +309,9 @@ const char* cmdName[]={
"SID3_CUTOFF_SCALING",
"SID3_RESONANCE_SCALING",
"WS_GLOBAL_SPEAKER_VOLUME"
"WS_GLOBAL_SPEAKER_VOLUME",
"FM_ALGORITHM"
};
static_assert((sizeof(cmdName)/sizeof(void*))==DIV_CMD_MAX,"update cmdName!");

View file

@ -502,6 +502,7 @@ void DivEngine::registerSystems() {
{0x5e, {DIV_CMD_FM_D2R, _("5Exx: Set decay 2 of operator 3 (0 to 1F)"), constVal<2>, effectValAnd<31>}},
{0x5f, {DIV_CMD_FM_D2R, _("5Fxx: Set decay 2 of operator 4 (0 to 1F)"), constVal<3>, effectValAnd<31>}},
{0x60, {DIV_CMD_FM_OPMASK, _("60xx: Set operator mask (bits 0-3)")}},
{0xb3, {DIV_CMD_FM_ALG, _("B3xx: Set algorithm (0 to 7)")}},
};
EffectHandlerMap fmOPMPostEffectHandlerMap(fmOPNPostEffectHandlerMap);

View file

@ -478,7 +478,7 @@ const FurnaceGUIColors fxColors[256]={
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
GUI_COLOR_PATTERN_EFFECT_INVALID,
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
GUI_COLOR_PATTERN_EFFECT_INVALID,
GUI_COLOR_PATTERN_EFFECT_INVALID,
GUI_COLOR_PATTERN_EFFECT_INVALID,