GBA: update to latest dispatch spec

remove ALWAYS_SET_VOLUME
implement macro restart
This commit is contained in:
tildearrow 2024-03-17 15:57:41 -05:00
parent 11e492c897
commit 0a498dc4c4
4 changed files with 8 additions and 11 deletions

View file

@ -252,16 +252,14 @@ enum DivDispatchCmds {
DIV_CMD_POWERNOISE_COUNTER_LOAD, // (which, val)
DIV_CMD_POWERNOISE_IO_WRITE, // (port, value)
DIV_CMD_MINMOD_ECHO,
DIV_ALWAYS_SET_VOLUME, // () -> alwaysSetVol
DIV_CMD_DAVE_HIGH_PASS,
DIV_CMD_DAVE_RING_MOD,
DIV_CMD_DAVE_SWAP_COUNTERS,
DIV_CMD_DAVE_LOW_PASS,
DIV_CMD_DAVE_CLOCK_DIV,
DIV_CMD_MINMOD_ECHO,
DIV_CMD_MAX
};

View file

@ -333,8 +333,8 @@ int DivPlatformGBADMA::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
case DIV_CMD_MACRO_RESTART:
chan[c.chan].std.restart(c.value);
break;
default:
break;

View file

@ -519,8 +519,8 @@ int DivPlatformGBAMinMod::dispatch(DivCommand c) {
case DIV_CMD_MACRO_ON:
chan[c.chan].std.mask(c.value,false);
break;
case DIV_ALWAYS_SET_VOLUME:
return 1;
case DIV_CMD_MACRO_RESTART:
chan[c.chan].std.restart(c.value);
break;
default:
break;

View file

@ -247,6 +247,8 @@ const char* cmdName[]={
"ESFM_MODIN",
"ESFM_ENV_DELAY",
"MACRO_RESTART",
"POWERNOISE_COUNTER_LOAD",
"POWERNOISE_IO_WRITE",
@ -256,10 +258,7 @@ const char* cmdName[]={
"DAVE_LOW_PASS",
"DAVE_CLOCK_DIV",
"MACRO_RESTART",
"MINMOD_ECHO",
"ALWAYS_SET_VOLUME"
};
static_assert((sizeof(cmdName)/sizeof(void*))==DIV_CMD_MAX,"update cmdName!");