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; int audSub;
signed char audDat; signed char audDat;
int sample, wave; int sample, wave;
unsigned char ins, note; unsigned char ins;
int note;
bool active, insChanged, freqChanged, keyOn, keyOff, inPorta, useWave; bool active, insChanged, freqChanged, keyOn, keyOff, inPorta, useWave;
signed char vol, outVol; signed char vol, outVol;
DivMacroInt std; DivMacroInt std;

View File

@ -9,14 +9,14 @@ class DivPlatformAY8910: public DivDispatch {
protected: protected:
struct Channel { struct Channel {
unsigned char freqH, freqL; unsigned char freqH, freqL;
int freq, baseFreq, pitch; int freq, baseFreq, note, pitch;
unsigned char ins, note, psgMode, autoEnvNum, autoEnvDen; unsigned char ins, psgMode, autoEnvNum, autoEnvDen;
signed char konCycles; signed char konCycles;
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta; bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta;
int vol, outVol; int vol, outVol;
unsigned char pan; unsigned char pan;
DivMacroInt std; 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]; Channel chan[3];
bool isMuted[3]; bool isMuted[3];

View File

@ -9,14 +9,14 @@ class DivPlatformAY8930: public DivDispatch {
protected: protected:
struct Channel { struct Channel {
unsigned char freqH, freqL; unsigned char freqH, freqL;
int freq, baseFreq, pitch; int freq, baseFreq, note, pitch;
unsigned char ins, note, psgMode, autoEnvNum, autoEnvDen, duty; unsigned char ins, psgMode, autoEnvNum, autoEnvDen, duty;
signed char konCycles; signed char konCycles;
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta; bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta;
int vol, outVol; int vol, outVol;
unsigned char pan; unsigned char pan;
DivMacroInt std; 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]; Channel chan[3];
bool isMuted[3]; bool isMuted[3];

View File

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

View File

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

View File

@ -9,14 +9,14 @@ class DivPlatformSAA1099: public DivDispatch {
protected: protected:
struct Channel { struct Channel {
unsigned char freqH, freqL; unsigned char freqH, freqL;
int freq, baseFreq, pitch; int freq, baseFreq, pitch, note;
unsigned char ins, note, psgMode; unsigned char ins, psgMode;
signed char konCycles; signed char konCycles;
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta; bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta;
int vol, outVol; int vol, outVol;
unsigned char pan; unsigned char pan;
DivMacroInt std; 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]; Channel chan[6];
bool isMuted[6]; bool isMuted[6];

View File

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

View File

@ -8,13 +8,13 @@
class DivPlatformTIA: public DivDispatch { class DivPlatformTIA: public DivDispatch {
protected: protected:
struct Channel { struct Channel {
int freq, baseFreq, pitch; int freq, baseFreq, pitch, note;
unsigned char ins, note, shape; unsigned char ins, shape;
signed char konCycles; signed char konCycles;
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta; bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta;
int vol, outVol; int vol, outVol;
DivMacroInt std; 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]; Channel chan[2];
bool isMuted[2]; bool isMuted[2];

View File

@ -18,14 +18,14 @@ class DivPlatformYM2610: public DivDispatch {
protected: protected:
struct Channel { struct Channel {
unsigned char freqH, freqL; unsigned char freqH, freqL;
int freq, baseFreq, pitch; int freq, baseFreq, pitch, note;
unsigned char ins, note, psgMode, autoEnvNum, autoEnvDen; unsigned char ins, psgMode, autoEnvNum, autoEnvDen;
signed char konCycles; signed char konCycles;
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta; bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta;
int vol, outVol; int vol, outVol;
unsigned char pan; unsigned char pan;
DivMacroInt std; 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]; Channel chan[13];
bool isMuted[13]; bool isMuted[13];