mirror of https://github.com/stella-emu/stella.git
WSYNC should only work when the last access was a read.
This commit is contained in:
parent
07287fe761
commit
a6bc247852
|
@ -347,9 +347,15 @@ bool TIA::poke(uInt16 address, uInt8 value)
|
||||||
switch (address)
|
switch (address)
|
||||||
{
|
{
|
||||||
case WSYNC:
|
case WSYNC:
|
||||||
mySubClock += (228 - myHctr) % 228;
|
// It appears that the 6507 only halts during a read cycle so
|
||||||
mySystem->incrementCycles(mySubClock / 3);
|
// we test here for follow-on writes which should be ignored as
|
||||||
mySubClock %= 3;
|
// far as halting the processor is concerned.
|
||||||
|
if (mySystem->m6502().lastAccessWasRead())
|
||||||
|
{
|
||||||
|
mySubClock += (228 - myHctr) % 228;
|
||||||
|
mySystem->incrementCycles(mySubClock / 3);
|
||||||
|
mySubClock %= 3;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VSYNC:
|
case VSYNC:
|
||||||
|
|
Loading…
Reference in New Issue