FDS: prepare for auto mod
This commit is contained in:
parent
0fd72afeb4
commit
f50911ea49
5 changed files with 15 additions and 1 deletions
|
|
@ -342,6 +342,12 @@ int DivPlatformFDS::dispatch(DivCommand c) {
|
|||
rWrite(0x4087,chan[c.chan].modFreq>>8);
|
||||
break;
|
||||
}
|
||||
case DIV_CMD_FDS_MOD_AUTO:
|
||||
chan[c.chan].autoModNum=c.value>>4;
|
||||
chan[c.chan].autoModDen=c.value&15;
|
||||
chan[c.chan].freqChanged=true;
|
||||
chan[c.chan].modOn=(chan[c.chan].autoModNum || chan[c.chan].autoModDen);
|
||||
break;
|
||||
case DIV_CMD_NOTE_PORTA: {
|
||||
int destFreq=NOTE_FREQUENCY(c.value2);
|
||||
bool return2=false;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class DivPlatformFDS: public DivDispatch {
|
|||
struct Channel: public SharedChannel<signed char> {
|
||||
int prevFreq, modFreq;
|
||||
unsigned char duty, sweep, modDepth, modPos;
|
||||
unsigned char autoModNum, autoModDen;
|
||||
bool sweepChanged, modOn;
|
||||
signed short wave;
|
||||
signed char modTable[32];
|
||||
|
|
@ -40,6 +41,8 @@ class DivPlatformFDS: public DivDispatch {
|
|||
sweep(8),
|
||||
modDepth(0),
|
||||
modPos(0),
|
||||
autoModNum(0),
|
||||
autoModDen(0),
|
||||
sweepChanged(false),
|
||||
modOn(false),
|
||||
wave(-1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue