Introduce a one clock delay on ENAM. Fixes Midnight Magic.

This commit is contained in:
Christian Speckner 2017-01-20 01:02:52 +01:00
parent 6bb64d55e2
commit d521a230bd
1 changed files with 13 additions and 4 deletions

View File

@ -44,6 +44,7 @@ enum Delay: uInt8 {
hmclr = 2, hmclr = 2,
refp = 1, refp = 1,
enabl = 1, enabl = 1,
enam = 1,
vblank = 1 vblank = 1
}; };
@ -449,13 +450,11 @@ bool TIA::poke(uInt16 address, uInt8 value)
} }
case ENAM0: case ENAM0:
myLinesSinceChange = 0; myDelayQueue.push(ENAM0, value, Delay::enam);
myMissile0.enam(value);
break; break;
case ENAM1: case ENAM1:
myLinesSinceChange = 0; myDelayQueue.push(ENAM1, value, Delay::enam);
myMissile1.enam(value);
break; break;
case RESM0: case RESM0:
@ -1237,6 +1236,16 @@ void TIA::delayedWrite(uInt8 address, uInt8 value)
myLinesSinceChange = 0; myLinesSinceChange = 0;
myBall.enabl(value); myBall.enabl(value);
break; break;
case ENAM0:
myLinesSinceChange = 0;
myMissile0.enam(value);
break;
case ENAM1:
myLinesSinceChange = 0;
myMissile1.enam(value);
break;
} }
} }