WonderSwan: fix noise phase reset

This commit is contained in:
tildearrow 2022-04-25 18:07:49 -05:00
parent 3e1c2197eb
commit 2e52a2855c

View file

@ -226,6 +226,7 @@ void DivPlatformSwan::tick(bool sysTick) {
} }
} }
if (chan[3].std.duty.had) { if (chan[3].std.duty.had) {
if (noise!=chan[3].std.duty.val) {
noise=chan[3].std.duty.val; noise=chan[3].std.duty.val;
if (noise>0) { if (noise>0) {
rWrite(0x0e,((noise-1)&0x07)|0x18); rWrite(0x0e,((noise-1)&0x07)|0x18);
@ -234,6 +235,7 @@ void DivPlatformSwan::tick(bool sysTick) {
sndCtrl&=~0x80; sndCtrl&=~0x80;
} }
} }
}
rWrite(0x10,sndCtrl); rWrite(0x10,sndCtrl);
} }