mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 01:35:07 +00:00
SMS: fix channel 3 muting at the beginning of song
This commit is contained in:
parent
3da54fc519
commit
271c0dc08b
1 changed files with 12 additions and 5 deletions
|
@ -77,7 +77,6 @@ void DivPlatformSMS::tick() {
|
||||||
chan[3].freq=parent->calcFreq(chan[3].baseFreq,chan[3].pitch-1-(isRealSN?127:0),true);
|
chan[3].freq=parent->calcFreq(chan[3].baseFreq,chan[3].pitch-1-(isRealSN?127:0),true);
|
||||||
if (chan[3].freq>1023) chan[3].freq=1023;
|
if (chan[3].freq>1023) chan[3].freq=1023;
|
||||||
if (chan[3].actualNote>0x5d) chan[3].freq=0x01;
|
if (chan[3].actualNote>0x5d) chan[3].freq=0x01;
|
||||||
chan[3].freqChanged=false;
|
|
||||||
if (snNoiseMode&2) { // take period from channel 3
|
if (snNoiseMode&2) { // take period from channel 3
|
||||||
if (updateSNMode || resetPhase) {
|
if (updateSNMode || resetPhase) {
|
||||||
if (snNoiseMode&1) {
|
if (snNoiseMode&1) {
|
||||||
|
@ -85,10 +84,16 @@ void DivPlatformSMS::tick() {
|
||||||
} else {
|
} else {
|
||||||
rWrite(0xe3);
|
rWrite(0xe3);
|
||||||
}
|
}
|
||||||
}
|
if (updateSNMode) {
|
||||||
rWrite(0xdf);
|
rWrite(0xdf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (chan[3].freqChanged) {
|
||||||
|
|
||||||
rWrite(0xc0|(chan[3].freq&15));
|
rWrite(0xc0|(chan[3].freq&15));
|
||||||
rWrite(chan[3].freq>>4);
|
rWrite(chan[3].freq>>4);
|
||||||
|
}
|
||||||
} else { // 3 fixed values
|
} else { // 3 fixed values
|
||||||
unsigned char value;
|
unsigned char value;
|
||||||
if (chan[3].std.hadArp) {
|
if (chan[3].std.hadArp) {
|
||||||
|
@ -105,6 +110,7 @@ void DivPlatformSMS::tick() {
|
||||||
rWrite(0xe0|value|((snNoiseMode&1)<<2));
|
rWrite(0xe0|value|((snNoiseMode&1)<<2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
chan[3].freqChanged=false;
|
||||||
updateSNMode=false;
|
updateSNMode=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -233,7 +239,8 @@ void DivPlatformSMS::reset() {
|
||||||
}
|
}
|
||||||
sn->device_start();
|
sn->device_start();
|
||||||
snNoiseMode=3;
|
snNoiseMode=3;
|
||||||
updateSNMode=true;
|
rWrite(0xe7);
|
||||||
|
updateSNMode=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivPlatformSMS::keyOffAffectsArp(int ch) {
|
bool DivPlatformSMS::keyOffAffectsArp(int ch) {
|
||||||
|
|
Loading…
Reference in a new issue