mirror of https://github.com/stella-emu/stella.git
Avoid side effects if the divider is unchanged by a NUSIZ write.
This commit is contained in:
parent
1a7ac60232
commit
cef5fb4da0
|
@ -84,6 +84,13 @@ void Player::nusiz(uInt8 value)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
myDecodes = DrawCounterDecodes::get().playerDecodes()[masked];
|
||||||
|
|
||||||
|
if (myDividerPending == myDivider) return;
|
||||||
|
|
||||||
|
// The following is an effective description of the effects of NUSIZ during
|
||||||
|
// decode and rendering.
|
||||||
|
|
||||||
if (myIsRendering) {
|
if (myIsRendering) {
|
||||||
|
|
||||||
switch ((myDivider << 4) | myDividerPending) {
|
switch ((myDivider << 4) | myDividerPending) {
|
||||||
|
@ -108,19 +115,23 @@ void Player::nusiz(uInt8 value)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
case 0x42:
|
||||||
|
case 0x24:
|
||||||
if (myRenderCounter < 1)
|
if (myRenderCounter < 1)
|
||||||
myDivider = myDividerPending;
|
myDivider = myDividerPending;
|
||||||
else
|
else
|
||||||
myDividerChangeCounter = (myDivider - (myRenderCounter - 1) % myDivider);
|
myDividerChangeCounter = (myDivider - (myRenderCounter - 1) % myDivider);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// should never happen
|
||||||
|
myDivider = myDividerPending;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
myDivider = myDividerPending;
|
myDivider = myDividerPending;
|
||||||
}
|
}
|
||||||
|
|
||||||
myDecodes = DrawCounterDecodes::get().playerDecodes()[masked];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
Loading…
Reference in New Issue