From 7b7f8767aaed6102b5114b18211e945ed99c36e6 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Sun, 18 Dec 2016 00:48:17 +0100 Subject: [PATCH] Emulate final movement counter reset -> fixes Masters of the Universe. --- src/emucore/tia/TIA.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/emucore/tia/TIA.cxx b/src/emucore/tia/TIA.cxx index cf8757635..5eead0823 100644 --- a/src/emucore/tia/TIA.cxx +++ b/src/emucore/tia/TIA.cxx @@ -923,14 +923,14 @@ void TIA::tickMovement() myLinesSinceChange = 0; const bool apply = myHstate == HState::blank; - bool m = false; + uInt8 movementCounter = myMovementClock > 15 ? 0 : myMovementClock; - m = myMissile0.movementTick(myMovementClock, apply) || m; - m = myMissile1.movementTick(myMovementClock, apply) || m; - m = myPlayer0.movementTick(myMovementClock, apply) || m; - m = myPlayer1.movementTick(myMovementClock, apply) || m; - m = myBall.movementTick(myMovementClock, apply) || m; + m = myMissile0.movementTick(movementCounter, apply) || m; + m = myMissile1.movementTick(movementCounter, apply) || m; + m = myPlayer0.movementTick(movementCounter, apply) || m; + m = myPlayer1.movementTick(movementCounter, apply) || m; + m = myBall.movementTick(movementCounter, apply) || m; myMovementInProgress = m; myCollisionUpdateRequired = m;