compound system flattening, part 1

as of now compound systems (Genesis and Arcade) are translated to
separate chips.

this improves audio quality and makes things easier.

it also allows you to change the volume of each chip on a Genesis.

also adds SegaPCM system with 16 channels!
This commit is contained in:
tildearrow 2022-02-23 02:52:30 -05:00
parent a7ecb4ecdb
commit e4b9a6d1d9
13 changed files with 641 additions and 286 deletions

View file

@ -42,17 +42,9 @@ class DivPlatformArcade: public DivDispatch {
bool active, insChanged, freqChanged, keyOn, keyOff, inPorta, portaPause, furnacePCM;
int vol, outVol;
unsigned char chVolL, chVolR;
struct PCMChannel {
int sample;
unsigned int pos; // <<8
unsigned short len;
unsigned char freq;
PCMChannel(): sample(-1), pos(0), len(0), freq(0) {}
} pcm;
Channel(): freqH(0), freqL(0), freq(0), baseFreq(0), pitch(0), note(0), ins(-1), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), inPorta(false), portaPause(false), furnacePCM(false), vol(0), outVol(0), chVolL(127), chVolR(127) {}
};
Channel chan[13];
Channel chan[8];
struct QueuedWrite {
unsigned short addr;
unsigned char val;
@ -63,7 +55,6 @@ class DivPlatformArcade: public DivDispatch {
opm_t fm;
int delay, baseFreqOff;
int pcmL, pcmR, pcmCycles;
unsigned char sampleBank;
unsigned char lastBusy;
unsigned char amDepth, pmDepth;
@ -75,7 +66,7 @@ class DivPlatformArcade: public DivDispatch {
bool extMode, useYMFM;
bool isMuted[13];
bool isMuted[8];
short oldWrites[256];
short pendingWrites[256];