PowerNoise: POWER_NOISE -> POWERNOISE
This commit is contained in:
parent
8342af8f96
commit
c098e0bcd1
|
@ -250,8 +250,8 @@ enum DivDispatchCmds {
|
||||||
|
|
||||||
DIV_CMD_MACRO_RESTART, // (which)
|
DIV_CMD_MACRO_RESTART, // (which)
|
||||||
|
|
||||||
DIV_CMD_POWER_NOISE_COUNTER_LOAD, // (which, val)
|
DIV_CMD_POWERNOISE_COUNTER_LOAD, // (which, val)
|
||||||
DIV_CMD_POWER_NOISE_IO_WRITE, // (port, value)
|
DIV_CMD_POWERNOISE_IO_WRITE, // (port, value)
|
||||||
|
|
||||||
DIV_CMD_MAX
|
DIV_CMD_MAX
|
||||||
};
|
};
|
||||||
|
|
|
@ -649,7 +649,7 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do
|
||||||
case DIV_SYSTEM_ESFM:
|
case DIV_SYSTEM_ESFM:
|
||||||
dispatch=new DivPlatformESFM;
|
dispatch=new DivPlatformESFM;
|
||||||
break;
|
break;
|
||||||
case DIV_SYSTEM_POWER_NOISE:
|
case DIV_SYSTEM_POWERNOISE:
|
||||||
dispatch=new DivPlatformPowerNoise;
|
dispatch=new DivPlatformPowerNoise;
|
||||||
break;
|
break;
|
||||||
case DIV_SYSTEM_DUMMY:
|
case DIV_SYSTEM_DUMMY:
|
||||||
|
|
|
@ -1043,7 +1043,7 @@ void DivInstrument::putInsData2(SafeWriter* w, bool fui, const DivSong* song, bo
|
||||||
featureFM=true;
|
featureFM=true;
|
||||||
featureEF=true;
|
featureEF=true;
|
||||||
break;
|
break;
|
||||||
case DIV_INS_POWER_NOISE:
|
case DIV_INS_POWERNOISE:
|
||||||
break;
|
break;
|
||||||
case DIV_INS_MAX:
|
case DIV_INS_MAX:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -86,7 +86,7 @@ enum DivInstrumentType: unsigned short {
|
||||||
DIV_INS_C140=53,
|
DIV_INS_C140=53,
|
||||||
DIV_INS_C219=54,
|
DIV_INS_C219=54,
|
||||||
DIV_INS_ESFM=55,
|
DIV_INS_ESFM=55,
|
||||||
DIV_INS_POWER_NOISE=56,
|
DIV_INS_POWERNOISE=56,
|
||||||
DIV_INS_MAX,
|
DIV_INS_MAX,
|
||||||
DIV_INS_NULL
|
DIV_INS_NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -284,8 +284,8 @@ void DivPlatformPowerNoise::tick(bool sysTick) {
|
||||||
int DivPlatformPowerNoise::dispatch(DivCommand c) {
|
int DivPlatformPowerNoise::dispatch(DivCommand c) {
|
||||||
switch (c.cmd) {
|
switch (c.cmd) {
|
||||||
case DIV_CMD_NOTE_ON: {
|
case DIV_CMD_NOTE_ON: {
|
||||||
DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_POWER_NOISE);
|
DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_POWERNOISE);
|
||||||
if (ins->type==DIV_INS_POWER_NOISE) {
|
if (ins->type==DIV_INS_POWERNOISE) {
|
||||||
if (skipRegisterWrites) break;
|
if (skipRegisterWrites) break;
|
||||||
if (c.value!=DIV_NOTE_NULL) {
|
if (c.value!=DIV_NOTE_NULL) {
|
||||||
chan[c.chan].baseFreq=NOTE_PERIODIC(c.value);
|
chan[c.chan].baseFreq=NOTE_PERIODIC(c.value);
|
||||||
|
@ -378,7 +378,7 @@ int DivPlatformPowerNoise::dispatch(DivCommand c) {
|
||||||
}
|
}
|
||||||
case DIV_CMD_PRE_PORTA: {
|
case DIV_CMD_PRE_PORTA: {
|
||||||
if (chan[c.chan].active && c.value2) {
|
if (chan[c.chan].active && c.value2) {
|
||||||
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_POWER_NOISE));
|
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_POWERNOISE));
|
||||||
}
|
}
|
||||||
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) {
|
||||||
chan[c.chan].baseFreq=NOTE_PERIODIC(c.value);
|
chan[c.chan].baseFreq=NOTE_PERIODIC(c.value);
|
||||||
|
@ -389,7 +389,7 @@ int DivPlatformPowerNoise::dispatch(DivCommand c) {
|
||||||
case DIV_CMD_GET_VOLMAX:
|
case DIV_CMD_GET_VOLMAX:
|
||||||
return 15;
|
return 15;
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_POWER_NOISE_COUNTER_LOAD: {
|
case DIV_CMD_POWERNOISE_COUNTER_LOAD: {
|
||||||
if (chan[c.chan].slope && c.value == 0) {
|
if (chan[c.chan].slope && c.value == 0) {
|
||||||
rWrite(0x18, c.value2 & 0x7f);
|
rWrite(0x18, c.value2 & 0x7f);
|
||||||
}
|
}
|
||||||
|
@ -398,7 +398,7 @@ int DivPlatformPowerNoise::dispatch(DivCommand c) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DIV_CMD_POWER_NOISE_IO_WRITE:
|
case DIV_CMD_POWERNOISE_IO_WRITE:
|
||||||
rWrite(0x08 + (c.value << 3), c.value2);
|
rWrite(0x08 + (c.value << 3), c.value2);
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_MACRO_OFF:
|
case DIV_CMD_MACRO_OFF:
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _POWER_NOISE_H
|
#ifndef _POWERNOISE_H
|
||||||
#define _POWER_NOISE_H
|
#define _POWERNOISE_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../../../extern/pwrnoise/pwrnoise.h"
|
#include "../../../extern/pwrnoise/pwrnoise.h"
|
||||||
|
|
|
@ -247,8 +247,8 @@ const char* cmdName[]={
|
||||||
"ESFM_MODIN",
|
"ESFM_MODIN",
|
||||||
"ESFM_ENV_DELAY",
|
"ESFM_ENV_DELAY",
|
||||||
|
|
||||||
"POWER_NOISE_COUNTER_LOAD",
|
"POWERNOISE_COUNTER_LOAD",
|
||||||
"POWER_NOISE_IO_WRITE",
|
"POWERNOISE_IO_WRITE",
|
||||||
|
|
||||||
"MACRO_RESTART",
|
"MACRO_RESTART",
|
||||||
};
|
};
|
||||||
|
|
|
@ -133,7 +133,7 @@ enum DivSystem {
|
||||||
DIV_SYSTEM_C140,
|
DIV_SYSTEM_C140,
|
||||||
DIV_SYSTEM_C219,
|
DIV_SYSTEM_C219,
|
||||||
DIV_SYSTEM_ESFM,
|
DIV_SYSTEM_ESFM,
|
||||||
DIV_SYSTEM_POWER_NOISE,
|
DIV_SYSTEM_POWERNOISE,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum DivEffectType: unsigned short {
|
enum DivEffectType: unsigned short {
|
||||||
|
|
|
@ -1985,19 +1985,19 @@ void DivEngine::registerSystems() {
|
||||||
fmESFMPostEffectHandlerMap
|
fmESFMPostEffectHandlerMap
|
||||||
);
|
);
|
||||||
|
|
||||||
sysDefs[DIV_SYSTEM_POWER_NOISE]=new DivSysDef(
|
sysDefs[DIV_SYSTEM_POWERNOISE]=new DivSysDef(
|
||||||
"PowerNoise", NULL, 0xd4, 0, 4, false, false, 0, false, 0, 0, 0,
|
"PowerNoise", NULL, 0xd4, 0, 4, false, false, 0, false, 0, 0, 0,
|
||||||
"a fantasy sound chip designed by jvsTSX and The Beesh-Spweesh!\nused in the Hexheld fantasy console.",
|
"a fantasy sound chip designed by jvsTSX and The Beesh-Spweesh!\nused in the Hexheld fantasy console.",
|
||||||
{"Noise 1", "Noise 2", "Noise 3", "Slope"},
|
{"Noise 1", "Noise 2", "Noise 3", "Slope"},
|
||||||
{"N1", "N2", "N3", "SL"},
|
{"N1", "N2", "N3", "SL"},
|
||||||
{DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_PULSE},
|
{DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_PULSE},
|
||||||
{DIV_INS_POWER_NOISE, DIV_INS_POWER_NOISE, DIV_INS_POWER_NOISE, DIV_INS_POWER_NOISE},
|
{DIV_INS_POWERNOISE, DIV_INS_POWERNOISE, DIV_INS_POWERNOISE, DIV_INS_POWERNOISE},
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
{0x20, {DIV_CMD_POWER_NOISE_COUNTER_LOAD, "20xx: Load low byte of noise channel LFSR (00 to FF) or slope channel accumulator (00 to 7F)", constVal<0>, effectVal}},
|
{0x20, {DIV_CMD_POWERNOISE_COUNTER_LOAD, "20xx: Load low byte of noise channel LFSR (00 to FF) or slope channel accumulator (00 to 7F)", constVal<0>, effectVal}},
|
||||||
{0x21, {DIV_CMD_POWER_NOISE_COUNTER_LOAD, "21xx: Load high byte of noise channel LFSR (00 to FF)", constVal<1>, effectVal}},
|
{0x21, {DIV_CMD_POWERNOISE_COUNTER_LOAD, "21xx: Load high byte of noise channel LFSR (00 to FF)", constVal<1>, effectVal}},
|
||||||
{0x22, {DIV_CMD_POWER_NOISE_IO_WRITE, "22xx: Write to I/O port A", constVal<0>, effectVal}},
|
{0x22, {DIV_CMD_POWERNOISE_IO_WRITE, "22xx: Write to I/O port A", constVal<0>, effectVal}},
|
||||||
{0x23, {DIV_CMD_POWER_NOISE_IO_WRITE, "23xx: Write to I/O port B", constVal<1>, effectVal}},
|
{0x23, {DIV_CMD_POWERNOISE_IO_WRITE, "23xx: Write to I/O port B", constVal<1>, effectVal}},
|
||||||
},
|
},
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
|
|
|
@ -291,7 +291,7 @@ enum FurnaceGUIColors {
|
||||||
GUI_COLOR_INSTR_C140,
|
GUI_COLOR_INSTR_C140,
|
||||||
GUI_COLOR_INSTR_C219,
|
GUI_COLOR_INSTR_C219,
|
||||||
GUI_COLOR_INSTR_ESFM,
|
GUI_COLOR_INSTR_ESFM,
|
||||||
GUI_COLOR_INSTR_POWER_NOISE,
|
GUI_COLOR_INSTR_POWERNOISE,
|
||||||
GUI_COLOR_INSTR_UNKNOWN,
|
GUI_COLOR_INSTR_UNKNOWN,
|
||||||
|
|
||||||
GUI_COLOR_CHANNEL_BG,
|
GUI_COLOR_CHANNEL_BG,
|
||||||
|
|
|
@ -987,7 +987,7 @@ const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={
|
||||||
D(GUI_COLOR_INSTR_C140,"",ImVec4(1.0f,1.0f,0.0f,1.0f)),
|
D(GUI_COLOR_INSTR_C140,"",ImVec4(1.0f,1.0f,0.0f,1.0f)),
|
||||||
D(GUI_COLOR_INSTR_C219,"",ImVec4(1.0f,0.8f,0.0f,1.0f)),
|
D(GUI_COLOR_INSTR_C219,"",ImVec4(1.0f,0.8f,0.0f,1.0f)),
|
||||||
D(GUI_COLOR_INSTR_ESFM,"",ImVec4(0.1f,0.9f,1.0f,1.0f)),
|
D(GUI_COLOR_INSTR_ESFM,"",ImVec4(0.1f,0.9f,1.0f,1.0f)),
|
||||||
D(GUI_COLOR_INSTR_POWER_NOISE,"",ImVec4(1.0f,1.0f,0.8f,1.0f)),
|
D(GUI_COLOR_INSTR_POWERNOISE,"",ImVec4(1.0f,1.0f,0.8f,1.0f)),
|
||||||
D(GUI_COLOR_INSTR_UNKNOWN,"",ImVec4(0.3f,0.3f,0.3f,1.0f)),
|
D(GUI_COLOR_INSTR_UNKNOWN,"",ImVec4(0.3f,0.3f,0.3f,1.0f)),
|
||||||
|
|
||||||
D(GUI_COLOR_CHANNEL_BG,"",ImVec4(0.4f,0.6f,0.8f,1.0f)),
|
D(GUI_COLOR_CHANNEL_BG,"",ImVec4(0.4f,0.6f,0.8f,1.0f)),
|
||||||
|
@ -1205,7 +1205,7 @@ const int availableSystems[]={
|
||||||
DIV_SYSTEM_PCM_DAC,
|
DIV_SYSTEM_PCM_DAC,
|
||||||
DIV_SYSTEM_ESFM,
|
DIV_SYSTEM_ESFM,
|
||||||
DIV_SYSTEM_PONG,
|
DIV_SYSTEM_PONG,
|
||||||
DIV_SYSTEM_POWER_NOISE,
|
DIV_SYSTEM_POWERNOISE,
|
||||||
0 // don't remove this last one!
|
0 // don't remove this last one!
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1295,7 +1295,7 @@ const int chipsSpecial[]={
|
||||||
DIV_SYSTEM_VRC6,
|
DIV_SYSTEM_VRC6,
|
||||||
DIV_SYSTEM_MMC5,
|
DIV_SYSTEM_MMC5,
|
||||||
DIV_SYSTEM_SM8521,
|
DIV_SYSTEM_SM8521,
|
||||||
DIV_SYSTEM_POWER_NOISE,
|
DIV_SYSTEM_POWERNOISE,
|
||||||
0 // don't remove this last one!
|
0 // don't remove this last one!
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6906,7 +6906,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
dutyLabel="OP4 Noise Mode";
|
dutyLabel="OP4 Noise Mode";
|
||||||
dutyMax=3;
|
dutyMax=3;
|
||||||
}
|
}
|
||||||
if (ins->type==DIV_INS_POWER_NOISE) {
|
if (ins->type==DIV_INS_POWERNOISE) {
|
||||||
dutyMax=0;
|
dutyMax=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6943,7 +6943,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
if (ins->type==DIV_INS_TED) waveMax=0;
|
if (ins->type==DIV_INS_TED) waveMax=0;
|
||||||
if (ins->type==DIV_INS_C140) waveMax=0;
|
if (ins->type==DIV_INS_C140) waveMax=0;
|
||||||
if (ins->type==DIV_INS_C219) waveMax=0;
|
if (ins->type==DIV_INS_C219) waveMax=0;
|
||||||
if (ins->type==DIV_INS_POWER_NOISE) waveMax=0;
|
if (ins->type==DIV_INS_POWERNOISE) waveMax=0;
|
||||||
if (ins->type==DIV_INS_SU || ins->type==DIV_INS_POKEY) waveMax=7;
|
if (ins->type==DIV_INS_SU || ins->type==DIV_INS_POKEY) waveMax=7;
|
||||||
if (ins->type==DIV_INS_PET) {
|
if (ins->type==DIV_INS_PET) {
|
||||||
waveMax=8;
|
waveMax=8;
|
||||||
|
@ -7082,7 +7082,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
if (ins->type==DIV_INS_ES5506) {
|
if (ins->type==DIV_INS_ES5506) {
|
||||||
panMax=4095;
|
panMax=4095;
|
||||||
}
|
}
|
||||||
if (ins->type==DIV_INS_POWER_NOISE) {
|
if (ins->type==DIV_INS_POWERNOISE) {
|
||||||
panMax=15;
|
panMax=15;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7173,7 +7173,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
ins->type==DIV_INS_C219 ||
|
ins->type==DIV_INS_C219 ||
|
||||||
ins->type==DIV_INS_TED ||
|
ins->type==DIV_INS_TED ||
|
||||||
ins->type==DIV_INS_ESFM ||
|
ins->type==DIV_INS_ESFM ||
|
||||||
ins->type==DIV_INS_POWER_NOISE) {
|
ins->type==DIV_INS_POWERNOISE) {
|
||||||
macroList.push_back(FurnaceGUIMacroDesc("Phase Reset",&ins->std.phaseResetMacro,0,1,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true));
|
macroList.push_back(FurnaceGUIMacroDesc("Phase Reset",&ins->std.phaseResetMacro,0,1,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true));
|
||||||
}
|
}
|
||||||
if (ex1Max>0) {
|
if (ex1Max>0) {
|
||||||
|
@ -7266,7 +7266,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
if (ins->type==DIV_INS_MSM5232) {
|
if (ins->type==DIV_INS_MSM5232) {
|
||||||
macroList.push_back(FurnaceGUIMacroDesc("Noise",&ins->std.ex3Macro,0,1,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true));
|
macroList.push_back(FurnaceGUIMacroDesc("Noise",&ins->std.ex3Macro,0,1,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true));
|
||||||
}
|
}
|
||||||
if (ins->type==DIV_INS_POWER_NOISE) {
|
if (ins->type==DIV_INS_POWERNOISE) {
|
||||||
macroList.push_back(FurnaceGUIMacroDesc("Control",&ins->std.ex1Macro,0,6,96,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true,powernoiseControlBits));
|
macroList.push_back(FurnaceGUIMacroDesc("Control",&ins->std.ex1Macro,0,6,96,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true,powernoiseControlBits));
|
||||||
macroList.push_back(FurnaceGUIMacroDesc("Portion A Length",&ins->std.ex2Macro,0,255,128,uiColors[GUI_COLOR_MACRO_OTHER]));
|
macroList.push_back(FurnaceGUIMacroDesc("Portion A Length",&ins->std.ex2Macro,0,255,128,uiColors[GUI_COLOR_MACRO_OTHER]));
|
||||||
macroList.push_back(FurnaceGUIMacroDesc("Portion B Length",&ins->std.ex3Macro,0,255,128,uiColors[GUI_COLOR_MACRO_OTHER]));
|
macroList.push_back(FurnaceGUIMacroDesc("Portion B Length",&ins->std.ex3Macro,0,255,128,uiColors[GUI_COLOR_MACRO_OTHER]));
|
||||||
|
|
|
@ -2747,7 +2747,7 @@ void FurnaceGUI::initSystemPresets() {
|
||||||
);
|
);
|
||||||
ENTRY(
|
ENTRY(
|
||||||
"PowerNoise", {
|
"PowerNoise", {
|
||||||
CH(DIV_SYSTEM_POWER_NOISE, 1.0f, 0, "")
|
CH(DIV_SYSTEM_POWERNOISE, 1.0f, 0, "")
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
CATEGORY_END;
|
CATEGORY_END;
|
||||||
|
|
Loading…
Reference in a new issue