mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
WonderSwan: fix noise phase reset
This commit is contained in:
parent
3e1c2197eb
commit
2e52a2855c
1 changed files with 8 additions and 6 deletions
|
@ -226,12 +226,14 @@ void DivPlatformSwan::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
if (chan[3].std.duty.had) {
|
||||
noise=chan[3].std.duty.val;
|
||||
if (noise>0) {
|
||||
rWrite(0x0e,((noise-1)&0x07)|0x18);
|
||||
sndCtrl|=0x80;
|
||||
} else {
|
||||
sndCtrl&=~0x80;
|
||||
if (noise!=chan[3].std.duty.val) {
|
||||
noise=chan[3].std.duty.val;
|
||||
if (noise>0) {
|
||||
rWrite(0x0e,((noise-1)&0x07)|0x18);
|
||||
sndCtrl|=0x80;
|
||||
} else {
|
||||
sndCtrl&=~0x80;
|
||||
}
|
||||
}
|
||||
}
|
||||
rWrite(0x10,sndCtrl);
|
||||
|
|
Loading…
Reference in a new issue