WonderSwan: fix noise phase reset
This commit is contained in:
parent
3e1c2197eb
commit
2e52a2855c
|
|
@ -226,12 +226,14 @@ void DivPlatformSwan::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[3].std.duty.had) {
|
if (chan[3].std.duty.had) {
|
||||||
noise=chan[3].std.duty.val;
|
if (noise!=chan[3].std.duty.val) {
|
||||||
if (noise>0) {
|
noise=chan[3].std.duty.val;
|
||||||
rWrite(0x0e,((noise-1)&0x07)|0x18);
|
if (noise>0) {
|
||||||
sndCtrl|=0x80;
|
rWrite(0x0e,((noise-1)&0x07)|0x18);
|
||||||
} else {
|
sndCtrl|=0x80;
|
||||||
sndCtrl&=~0x80;
|
} else {
|
||||||
|
sndCtrl&=~0x80;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rWrite(0x10,sndCtrl);
|
rWrite(0x10,sndCtrl);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue