fix negative notes

This commit is contained in:
tildearrow 2022-01-20 16:56:35 -05:00
parent 46fd774f30
commit 4b43694db0
9 changed files with 26 additions and 25 deletions

View File

@ -14,7 +14,8 @@ class DivPlatformAmiga: public DivDispatch {
int audSub;
signed char audDat;
int sample, wave;
unsigned char ins, note;
unsigned char ins;
int note;
bool active, insChanged, freqChanged, keyOn, keyOff, inPorta, useWave;
signed char vol, outVol;
DivMacroInt std;

View File

@ -9,14 +9,14 @@ class DivPlatformAY8910: public DivDispatch {
protected:
struct Channel {
unsigned char freqH, freqL;
int freq, baseFreq, pitch;
unsigned char ins, note, psgMode, autoEnvNum, autoEnvDen;
int freq, baseFreq, note, pitch;
unsigned char ins, psgMode, autoEnvNum, autoEnvDen;
signed char konCycles;
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta;
int vol, outVol;
unsigned char pan;
DivMacroInt std;
Channel(): freqH(0), freqL(0), freq(0), baseFreq(0), pitch(0), ins(-1), note(0), psgMode(1), autoEnvNum(0), autoEnvDen(0), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), inPorta(false), vol(0), outVol(15), pan(3) {}
Channel(): freqH(0), freqL(0), freq(0), baseFreq(0), note(0), pitch(0), ins(-1), psgMode(1), autoEnvNum(0), autoEnvDen(0), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), inPorta(false), vol(0), outVol(15), pan(3) {}
};
Channel chan[3];
bool isMuted[3];

View File

@ -9,14 +9,14 @@ class DivPlatformAY8930: public DivDispatch {
protected:
struct Channel {
unsigned char freqH, freqL;
int freq, baseFreq, pitch;
unsigned char ins, note, psgMode, autoEnvNum, autoEnvDen, duty;
int freq, baseFreq, note, pitch;
unsigned char ins, psgMode, autoEnvNum, autoEnvDen, duty;
signed char konCycles;
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta;
int vol, outVol;
unsigned char pan;
DivMacroInt std;
Channel(): freqH(0), freqL(0), freq(0), baseFreq(0), pitch(0), ins(-1), note(0), psgMode(1), autoEnvNum(0), autoEnvDen(0), duty(4), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), inPorta(false), vol(0), outVol(31), pan(3) {}
Channel(): freqH(0), freqL(0), freq(0), baseFreq(0), note(0), pitch(0), ins(-1), psgMode(1), autoEnvNum(0), autoEnvDen(0), duty(4), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), inPorta(false), vol(0), outVol(31), pan(3) {}
};
Channel chan[3];
bool isMuted[3];

View File

@ -7,8 +7,8 @@
class DivPlatformGB: public DivDispatch {
struct Channel {
int freq, baseFreq, pitch;
unsigned char ins, note, duty, sweep;
int freq, baseFreq, pitch, note;
unsigned char ins, duty, sweep;
bool active, insChanged, freqChanged, sweepChanged, keyOn, keyOff, inPorta;
signed char vol, outVol, wave;
DivMacroInt std;
@ -16,8 +16,8 @@ class DivPlatformGB: public DivDispatch {
freq(0),
baseFreq(0),
pitch(0),
ins(-1),
note(0),
ins(-1),
duty(0),
sweep(0),
active(false),

View File

@ -6,8 +6,8 @@
class DivPlatformNES: public DivDispatch {
struct Channel {
int freq, baseFreq, pitch, prevFreq;
unsigned char ins, note, duty, sweep;
int freq, baseFreq, pitch, prevFreq, note;
unsigned char ins, duty, sweep;
bool active, insChanged, freqChanged, sweepChanged, keyOn, keyOff, inPorta, furnaceDac;
signed char vol, outVol, wave;
DivMacroInt std;
@ -16,8 +16,8 @@ class DivPlatformNES: public DivDispatch {
baseFreq(0),
pitch(0),
prevFreq(65535),
ins(-1),
note(0),
ins(-1),
duty(0),
sweep(0),
active(false),

View File

@ -9,14 +9,14 @@ class DivPlatformSAA1099: public DivDispatch {
protected:
struct Channel {
unsigned char freqH, freqL;
int freq, baseFreq, pitch;
unsigned char ins, note, psgMode;
int freq, baseFreq, pitch, note;
unsigned char ins, psgMode;
signed char konCycles;
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta;
int vol, outVol;
unsigned char pan;
DivMacroInt std;
Channel(): freqH(0), freqL(0), freq(0), baseFreq(0), pitch(0), ins(-1), note(0), psgMode(1), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), inPorta(false), vol(0), outVol(15), pan(255) {}
Channel(): freqH(0), freqL(0), freq(0), baseFreq(0), pitch(0), note(0), ins(-1), psgMode(1), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), inPorta(false), vol(0), outVol(15), pan(255) {}
};
Channel chan[6];
bool isMuted[6];

View File

@ -7,8 +7,8 @@
class DivPlatformSMS: public DivDispatch {
struct Channel {
int freq, baseFreq, pitch;
unsigned char ins, note;
int freq, baseFreq, pitch, note;
unsigned char ins;
bool active, insChanged, freqChanged, keyOn, keyOff;
signed char vol, outVol;
DivMacroInt std;
@ -16,8 +16,8 @@ class DivPlatformSMS: public DivDispatch {
freq(0),
baseFreq(0),
pitch(0),
ins(-1),
note(0),
ins(-1),
active(false),
insChanged(true),
freqChanged(false),

View File

@ -8,13 +8,13 @@
class DivPlatformTIA: public DivDispatch {
protected:
struct Channel {
int freq, baseFreq, pitch;
unsigned char ins, note, shape;
int freq, baseFreq, pitch, note;
unsigned char ins, shape;
signed char konCycles;
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta;
int vol, outVol;
DivMacroInt std;
Channel(): freq(0), baseFreq(0), pitch(0), ins(-1), note(0), shape(4), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), inPorta(false), vol(0), outVol(15) {}
Channel(): freq(0), baseFreq(0), pitch(0), note(0), ins(-1), shape(4), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), inPorta(false), vol(0), outVol(15) {}
};
Channel chan[2];
bool isMuted[2];

View File

@ -18,14 +18,14 @@ class DivPlatformYM2610: public DivDispatch {
protected:
struct Channel {
unsigned char freqH, freqL;
int freq, baseFreq, pitch;
unsigned char ins, note, psgMode, autoEnvNum, autoEnvDen;
int freq, baseFreq, pitch, note;
unsigned char ins, psgMode, autoEnvNum, autoEnvDen;
signed char konCycles;
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta;
int vol, outVol;
unsigned char pan;
DivMacroInt std;
Channel(): freqH(0), freqL(0), freq(0), baseFreq(0), pitch(0), ins(-1), note(0), psgMode(1), autoEnvNum(0), autoEnvDen(0), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), inPorta(false), vol(0), outVol(15), pan(3) {}
Channel(): freqH(0), freqL(0), freq(0), baseFreq(0), pitch(0), note(0), ins(-1), psgMode(1), autoEnvNum(0), autoEnvDen(0), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), inPorta(false), vol(0), outVol(15), pan(3) {}
};
Channel chan[13];
bool isMuted[13];