PowerNoise: POWER_NOISE -> POWERNOISE

This commit is contained in:
tildearrow 2024-01-24 03:15:41 -05:00
parent 8342af8f96
commit c098e0bcd1
13 changed files with 31 additions and 31 deletions

View file

@ -250,8 +250,8 @@ enum DivDispatchCmds {
DIV_CMD_MACRO_RESTART, // (which)
DIV_CMD_POWER_NOISE_COUNTER_LOAD, // (which, val)
DIV_CMD_POWER_NOISE_IO_WRITE, // (port, value)
DIV_CMD_POWERNOISE_COUNTER_LOAD, // (which, val)
DIV_CMD_POWERNOISE_IO_WRITE, // (port, value)
DIV_CMD_MAX
};

View file

@ -649,7 +649,7 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do
case DIV_SYSTEM_ESFM:
dispatch=new DivPlatformESFM;
break;
case DIV_SYSTEM_POWER_NOISE:
case DIV_SYSTEM_POWERNOISE:
dispatch=new DivPlatformPowerNoise;
break;
case DIV_SYSTEM_DUMMY:

View file

@ -1043,7 +1043,7 @@ void DivInstrument::putInsData2(SafeWriter* w, bool fui, const DivSong* song, bo
featureFM=true;
featureEF=true;
break;
case DIV_INS_POWER_NOISE:
case DIV_INS_POWERNOISE:
break;
case DIV_INS_MAX:
break;

View file

@ -86,7 +86,7 @@ enum DivInstrumentType: unsigned short {
DIV_INS_C140=53,
DIV_INS_C219=54,
DIV_INS_ESFM=55,
DIV_INS_POWER_NOISE=56,
DIV_INS_POWERNOISE=56,
DIV_INS_MAX,
DIV_INS_NULL
};

View file

@ -284,8 +284,8 @@ void DivPlatformPowerNoise::tick(bool sysTick) {
int DivPlatformPowerNoise::dispatch(DivCommand c) {
switch (c.cmd) {
case DIV_CMD_NOTE_ON: {
DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_POWER_NOISE);
if (ins->type==DIV_INS_POWER_NOISE) {
DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_POWERNOISE);
if (ins->type==DIV_INS_POWERNOISE) {
if (skipRegisterWrites) break;
if (c.value!=DIV_NOTE_NULL) {
chan[c.chan].baseFreq=NOTE_PERIODIC(c.value);
@ -378,7 +378,7 @@ int DivPlatformPowerNoise::dispatch(DivCommand c) {
}
case DIV_CMD_PRE_PORTA: {
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) {
chan[c.chan].baseFreq=NOTE_PERIODIC(c.value);
@ -389,7 +389,7 @@ int DivPlatformPowerNoise::dispatch(DivCommand c) {
case DIV_CMD_GET_VOLMAX:
return 15;
break;
case DIV_CMD_POWER_NOISE_COUNTER_LOAD: {
case DIV_CMD_POWERNOISE_COUNTER_LOAD: {
if (chan[c.chan].slope && c.value == 0) {
rWrite(0x18, c.value2 & 0x7f);
}
@ -398,7 +398,7 @@ int DivPlatformPowerNoise::dispatch(DivCommand c) {
}
break;
}
case DIV_CMD_POWER_NOISE_IO_WRITE:
case DIV_CMD_POWERNOISE_IO_WRITE:
rWrite(0x08 + (c.value << 3), c.value2);
break;
case DIV_CMD_MACRO_OFF:

View file

@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _POWER_NOISE_H
#define _POWER_NOISE_H
#ifndef _POWERNOISE_H
#define _POWERNOISE_H
#include "../dispatch.h"
#include "../../../extern/pwrnoise/pwrnoise.h"

View file

@ -247,8 +247,8 @@ const char* cmdName[]={
"ESFM_MODIN",
"ESFM_ENV_DELAY",
"POWER_NOISE_COUNTER_LOAD",
"POWER_NOISE_IO_WRITE",
"POWERNOISE_COUNTER_LOAD",
"POWERNOISE_IO_WRITE",
"MACRO_RESTART",
};

View file

@ -133,7 +133,7 @@ enum DivSystem {
DIV_SYSTEM_C140,
DIV_SYSTEM_C219,
DIV_SYSTEM_ESFM,
DIV_SYSTEM_POWER_NOISE,
DIV_SYSTEM_POWERNOISE,
};
enum DivEffectType: unsigned short {

View file

@ -1985,19 +1985,19 @@ void DivEngine::registerSystems() {
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,
"a fantasy sound chip designed by jvsTSX and The Beesh-Spweesh!\nused in the Hexheld fantasy console.",
{"Noise 1", "Noise 2", "Noise 3", "Slope"},
{"N1", "N2", "N3", "SL"},
{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}},
{0x21, {DIV_CMD_POWER_NOISE_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}},
{0x23, {DIV_CMD_POWER_NOISE_IO_WRITE, "23xx: Write to I/O port B", constVal<1>, 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_POWERNOISE_COUNTER_LOAD, "21xx: Load high byte of noise channel LFSR (00 to FF)", constVal<1>, effectVal}},
{0x22, {DIV_CMD_POWERNOISE_IO_WRITE, "22xx: Write to I/O port A", constVal<0>, effectVal}},
{0x23, {DIV_CMD_POWERNOISE_IO_WRITE, "23xx: Write to I/O port B", constVal<1>, effectVal}},
},
{}
);