From d21ccddeefac3d21abfa07b9da1b249c18d7db62 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 17 Aug 2015 17:54:36 -0400 Subject: [PATCH] Fixed: _vBlankExtend is now cleared at the correct moment. --- Machines/Atari2600.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Machines/Atari2600.cpp b/Machines/Atari2600.cpp index 913399ff1..3a51b7c9b 100644 --- a/Machines/Atari2600.cpp +++ b/Machines/Atari2600.cpp @@ -240,9 +240,6 @@ void Machine::output_pixels(unsigned int count) } } - if(_vBlankExtend && _horizontalTimer == 151) - _vBlankExtend = false; - if(_horizontalTimer < (_vBlankExtend ? 152 : 160)) { if(_outputBuffer) @@ -262,6 +259,9 @@ void Machine::output_pixels(unsigned int count) const int32_t sign_extension = _horizontalTimer >> 31; _horizontalTimer = (_horizontalTimer&~sign_extension) | (sign_extension&horizontalTimerReload); + if(!_horizontalTimer) + _vBlankExtend = false; + _timestamp ++; } }