C219: don't phase reset if duty macro hasn't chang
ed
This commit is contained in:
parent
f0255f30e8
commit
4777284a7c
|
|
@ -152,6 +152,12 @@ void DivPlatformC140::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
if (is219) {
|
if (is219) {
|
||||||
if (chan[i].std.duty.had) {
|
if (chan[i].std.duty.had) {
|
||||||
|
unsigned char singleByte=(
|
||||||
|
(chan[i].noise?1:0)|
|
||||||
|
(chan[i].invert?2:0)|
|
||||||
|
(chan[i].surround?4:0)
|
||||||
|
);
|
||||||
|
if (singleByte!=(chan[i].std.duty.val&7)) {
|
||||||
chan[i].noise=chan[i].std.duty.val&1;
|
chan[i].noise=chan[i].std.duty.val&1;
|
||||||
chan[i].invert=chan[i].std.duty.val&2;
|
chan[i].invert=chan[i].std.duty.val&2;
|
||||||
chan[i].surround=chan[i].std.duty.val&4;
|
chan[i].surround=chan[i].std.duty.val&4;
|
||||||
|
|
@ -159,6 +165,7 @@ void DivPlatformC140::tick(bool sysTick) {
|
||||||
chan[i].writeCtrl=true;
|
chan[i].writeCtrl=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (chan[i].std.pitch.had) {
|
if (chan[i].std.pitch.had) {
|
||||||
if (chan[i].std.pitch.mode) {
|
if (chan[i].std.pitch.mode) {
|
||||||
chan[i].pitch2+=chan[i].std.pitch.val;
|
chan[i].pitch2+=chan[i].std.pitch.val;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue