mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-31 20:11:29 +00:00
more LFO fix code
This commit is contained in:
parent
59cbfdcad9
commit
026b232c02
2 changed files with 12 additions and 3 deletions
|
@ -294,10 +294,14 @@ int DivPlatformPCE::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOn=true;
|
||||
break;
|
||||
case DIV_CMD_PCE_LFO_MODE:
|
||||
rWrite(0x09,c.value);
|
||||
lfoMode=c.value;
|
||||
rWrite(0x08,lfoSpeed);
|
||||
rWrite(0x09,lfoMode);
|
||||
break;
|
||||
case DIV_CMD_PCE_LFO_SPEED:
|
||||
rWrite(0x08,255-c.value);
|
||||
lfoSpeed=255-c.value;
|
||||
rWrite(0x08,lfoSpeed);
|
||||
rWrite(0x09,lfoMode);
|
||||
break;
|
||||
case DIV_CMD_NOTE_PORTA: {
|
||||
int destFreq=NOTE_PERIODIC(c.value2);
|
||||
|
@ -394,9 +398,14 @@ void DivPlatformPCE::reset() {
|
|||
cycles=0;
|
||||
curChan=-1;
|
||||
sampleBank=0;
|
||||
lfoMode=0x80;
|
||||
lfoSpeed=255;
|
||||
// set global volume
|
||||
rWrite(0,0);
|
||||
rWrite(0x01,0xff);
|
||||
// set LFO
|
||||
rWrite(0x08,lfoSpeed);
|
||||
rWrite(0x09,lfoMode);
|
||||
// set per-channel initial panning
|
||||
for (int i=0; i<6; i++) {
|
||||
chWrite(i,0x05,isMuted[i]?0:chan[i].pan);
|
||||
|
|
|
@ -53,7 +53,7 @@ class DivPlatformPCE: public DivDispatch {
|
|||
int cycles, curChan, delay;
|
||||
int tempL[32];
|
||||
int tempR[32];
|
||||
unsigned char sampleBank;
|
||||
unsigned char sampleBank, lfoMode, lfoSpeed;
|
||||
PCE_PSG* pce;
|
||||
void updateWave(int ch);
|
||||
friend void putDispatchChan(void*,int,int);
|
||||
|
|
Loading…
Reference in a new issue