From 24e449c5d4c340580af8832adc554040db570619 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Tue, 25 Apr 2017 22:58:05 +0200 Subject: [PATCH] Setters for player and ball old registers. --- src/emucore/tia/Ball.cxx | 9 +++++++++ src/emucore/tia/Ball.hxx | 2 ++ src/emucore/tia/Player.cxx | 9 +++++++++ src/emucore/tia/Player.hxx | 2 ++ 4 files changed, 22 insertions(+) diff --git a/src/emucore/tia/Ball.cxx b/src/emucore/tia/Ball.cxx index 720e363a0..92755a814 100644 --- a/src/emucore/tia/Ball.cxx +++ b/src/emucore/tia/Ball.cxx @@ -203,6 +203,15 @@ void Ball::tick(bool isReceivingMclock) myCounter = 0; } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void Ball::setENABLOld(bool enabled) +{ + myTIA->flushLineCache(); + + myIsEnabledOld = enabled; + updateEnabled(); +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Ball::shuffleStatus() { diff --git a/src/emucore/tia/Ball.hxx b/src/emucore/tia/Ball.hxx index bf100db3f..0297aff27 100644 --- a/src/emucore/tia/Ball.hxx +++ b/src/emucore/tia/Ball.hxx @@ -74,6 +74,8 @@ class Ball : public Serializable bool getENABLOld() const { return myIsEnabledOld; } bool getENABLNew() const { return myIsEnabledNew; } + void setENABLOld(bool enabled); + /** Serializable methods (see that class for more information). */ diff --git a/src/emucore/tia/Player.cxx b/src/emucore/tia/Player.cxx index a12871eba..a9c7689d1 100644 --- a/src/emucore/tia/Player.cxx +++ b/src/emucore/tia/Player.cxx @@ -336,6 +336,15 @@ uInt8 Player::getRespClock() const } } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void Player::setGRPOld(uInt8 pattern) +{ + myTIA->flushLineCache(); + + myPatternOld = pattern; + updatePattern(); +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Player::updatePattern() { diff --git a/src/emucore/tia/Player.hxx b/src/emucore/tia/Player.hxx index 55b9ba820..11ac11594 100644 --- a/src/emucore/tia/Player.hxx +++ b/src/emucore/tia/Player.hxx @@ -78,6 +78,8 @@ class Player : public Serializable uInt8 getGRPOld() const { return myPatternOld; }; uInt8 getGRPNew() const { return myPatternNew; }; + void setGRPOld(uInt8 pattern); + /** Serializable methods (see that class for more information). */