SID2: fix duty overflow

This commit is contained in:
tildearrow 2024-04-24 12:15:05 -05:00
parent 41fcdb7529
commit fd60d5c2c2

View file

@ -133,6 +133,7 @@ void DivPlatformSID2::tick(bool sysTick) {
} else {
chan[i].duty-=chan[i].std.duty.val;
}
chan[i].duty&=4095;
rWrite(i*7+2,chan[i].duty&0xff);
rWrite(i*7+3,(chan[i].duty>>8) | (chan[i].outVol << 4));
}