SMS/T6W28: limit upper period
This commit is contained in:
parent
565e8cc314
commit
560ec19176
|
@ -228,6 +228,7 @@ void DivPlatformSMS::tick(bool sysTick) {
|
||||||
if (parent->song.snNoLowPeriods) {
|
if (parent->song.snNoLowPeriods) {
|
||||||
if (chan[3].actualNote>0x5d) chan[3].freq=0x01;
|
if (chan[3].actualNote>0x5d) chan[3].freq=0x01;
|
||||||
}
|
}
|
||||||
|
if (chan[3].freq<0) chan[3].freq=0;
|
||||||
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) {
|
||||||
|
|
|
@ -146,6 +146,7 @@ void DivPlatformT6W28::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||||
chan[i].freq=snCalcFreq(i);
|
chan[i].freq=snCalcFreq(i);
|
||||||
|
if (chan[i].freq<0) chan[i].freq=0;
|
||||||
if (chan[i].freq>1023) chan[i].freq=1023;
|
if (chan[i].freq>1023) chan[i].freq=1023;
|
||||||
if (i==3) {
|
if (i==3) {
|
||||||
rWrite(1,0x80|(2<<5)|(chan[3].freq&15));
|
rWrite(1,0x80|(2<<5)|(chan[3].freq&15));
|
||||||
|
|
Loading…
Reference in a new issue