Delay REFP[01] by one clock.

This commit is contained in:
Christian Speckner 2016-12-09 12:50:26 +01:00
parent f360e7fba2
commit b3c0993dcc
1 changed files with 14 additions and 5 deletions

View File

@ -44,7 +44,8 @@ enum Delay: uInt8 {
hmp = 2, hmp = 2,
hmm = 2, hmm = 2,
hmbl = 2, hmbl = 2,
hmclr = 2 hmclr = 2,
refp = 1
}; };
enum DummyRegisters: uInt8 { enum DummyRegisters: uInt8 {
@ -541,13 +542,11 @@ bool TIA::poke(uInt16 address, uInt8 value)
break; break;
case REFP0: case REFP0:
myLinesSinceChange = 0; myDelayQueue.push(REFP0, value, Delay::refp);
myPlayer0.refp(value);
break; break;
case REFP1: case REFP1:
myLinesSinceChange = 0; myDelayQueue.push(REFP1, value, Delay::refp);
myPlayer1.refp(value);
break; break;
case VDELP0: case VDELP0:
@ -1196,6 +1195,16 @@ void TIA::delayedWrite(uInt8 address, uInt8 value)
myLinesSinceChange = 0; myLinesSinceChange = 0;
myBall.hmbl(value); myBall.hmbl(value);
break; break;
case REFP0:
myLinesSinceChange = 0;
myPlayer0.refp(value);
break;
case REFP1:
myLinesSinceChange = 0;
myPlayer1.refp(value);
break;
} }
} }