AY8930: fix negative octaves

This commit is contained in:
tildearrow 2022-02-03 02:46:42 -05:00
parent 35e39d2c32
commit 9b83c304e5
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ void DivPlatformAY8930::tick() {
}
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,true);
if (chan[i].freq>4095) chan[i].freq=4095;
if (chan[i].freq>65535) chan[i].freq=65535;
if (chan[i].keyOn) {
if (chan[i].insChanged) {
if (!chan[i].std.willEx1) immWrite(0x16+i,chan[i].duty);