Reduce duplicates of channel struct
Add/Fix custom clock limit defines (for YMF278B)
This commit is contained in:
parent
fd3f381bc3
commit
2ec4237076
69 changed files with 457 additions and 1151 deletions
|
|
@ -27,58 +27,46 @@
|
|||
class DivPlatformLynx: public DivDispatch {
|
||||
|
||||
struct MikeyFreqDiv {
|
||||
uint8_t clockDivider;
|
||||
uint8_t backup;
|
||||
unsigned char clockDivider;
|
||||
unsigned char backup;
|
||||
|
||||
MikeyFreqDiv(int frequency);
|
||||
};
|
||||
|
||||
struct MikeyDuty {
|
||||
uint8_t int_feedback7;
|
||||
uint8_t feedback;
|
||||
unsigned char int_feedback7;
|
||||
unsigned char feedback;
|
||||
|
||||
MikeyDuty(int duty);
|
||||
};
|
||||
|
||||
struct Channel {
|
||||
struct Channel: public SharedChannelFreq, public SharedChannelVolume<signed char> {
|
||||
DivMacroInt std;
|
||||
MikeyFreqDiv fd;
|
||||
MikeyDuty duty;
|
||||
int baseFreq, pitch, pitch2, note, actualNote, lfsr, ins, sample, samplePos, sampleAccum, sampleBaseFreq, sampleFreq;
|
||||
int actualNote, lfsr, sample, samplePos, sampleAccum, sampleBaseFreq, sampleFreq;
|
||||
unsigned char pan;
|
||||
bool active, insChanged, freqChanged, keyOn, keyOff, inPorta, pcm;
|
||||
signed char vol, outVol;
|
||||
bool pcm;
|
||||
int macroVolMul;
|
||||
void macroInit(DivInstrument* which) {
|
||||
std.init(which);
|
||||
pitch2=0;
|
||||
}
|
||||
Channel():
|
||||
SharedChannelFreq(),
|
||||
SharedChannelVolume<signed char>(127),
|
||||
std(),
|
||||
fd(0),
|
||||
duty(0),
|
||||
baseFreq(0),
|
||||
pitch(0),
|
||||
pitch2(0),
|
||||
note(0),
|
||||
actualNote(0),
|
||||
lfsr(-1),
|
||||
ins(-1),
|
||||
sample(-1),
|
||||
samplePos(0),
|
||||
sampleAccum(0),
|
||||
sampleBaseFreq(0),
|
||||
sampleFreq(0),
|
||||
pan(0xff),
|
||||
active(false),
|
||||
insChanged(true),
|
||||
freqChanged(false),
|
||||
keyOn(false),
|
||||
keyOff(false),
|
||||
inPorta(false),
|
||||
pcm(false),
|
||||
vol(127),
|
||||
outVol(127),
|
||||
macroVolMul(127) {}
|
||||
};
|
||||
Channel chan[4];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue