From b8af22cd679ceb835a82f82cd216bdf82c5f6ef8 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Thu, 8 Feb 2018 20:53:42 +0100 Subject: [PATCH] Fix playfield signal during hblank. --- src/emucore/tia/Playfield.cxx | 6 ++++++ src/emucore/tia/Playfield.hxx | 2 ++ src/emucore/tia/TIA.cxx | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/emucore/tia/Playfield.cxx b/src/emucore/tia/Playfield.cxx index 3ec2d730f..9d3adba74 100644 --- a/src/emucore/tia/Playfield.cxx +++ b/src/emucore/tia/Playfield.cxx @@ -204,6 +204,12 @@ void Playfield::tick(uInt32 x) collision = currentPixel ? myCollisionMaskEnabled : myCollisionMaskDisabled; } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void Playfield::nextLine() +{ + collision = myCollisionMaskDisabled; +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Playfield::applyColors() { diff --git a/src/emucore/tia/Playfield.hxx b/src/emucore/tia/Playfield.hxx index 7dde0ad0c..d851f8d28 100644 --- a/src/emucore/tia/Playfield.hxx +++ b/src/emucore/tia/Playfield.hxx @@ -59,6 +59,8 @@ class Playfield : public Serializable void tick(uInt32 x); + void nextLine(); + bool isOn() const { return (collision & 0x8000); } uInt8 getColor() const; diff --git a/src/emucore/tia/TIA.cxx b/src/emucore/tia/TIA.cxx index da5fbba28..b3d78c015 100644 --- a/src/emucore/tia/TIA.cxx +++ b/src/emucore/tia/TIA.cxx @@ -1271,7 +1271,6 @@ void TIA::nextLine() cloneLastLine(); } - myPlayfield.tick(0); myHctr = 0; if (!myMovementInProgress && myLinesSinceChange < 2) myLinesSinceChange++; @@ -1285,6 +1284,7 @@ void TIA::nextLine() myPlayer0.nextLine(); myPlayer1.nextLine(); myBall.nextLine(); + myPlayfield.nextLine(); if (myFrameManager->isRendering() && myFrameManager->getY() == 0) flushLineCache();