From 151c6b4421250f6eb1b791981e04fc56161d26c8 Mon Sep 17 00:00:00 2001
From: Thomas Harte <thomas.harte@gmail.com>
Date: Thu, 30 Jul 2015 00:00:35 -0400
Subject: [PATCH] Quick fix: add one cycle to get to the genuine end of the
 line (i.e. after cycle 0, not on it). Not 3, with the video then becoming
 desynchronised from the CPU clock.

---
 Machines/Atari2600.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Machines/Atari2600.cpp b/Machines/Atari2600.cpp
index 226886686..4700ed5bb 100644
--- a/Machines/Atari2600.cpp
+++ b/Machines/Atari2600.cpp
@@ -186,8 +186,8 @@ int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t add
 				case 0x01:	_vBlankEnabled = !!(*value & 0x02);	break;
 
 				case 0x02: {
-					cycle_count += (_horizontalTimer / 3)+3;
-					output_pixels(_horizontalTimer+1);
+					cycle_count += (_horizontalTimer / 3)+1;
+					output_pixels(_horizontalTimer+3);
 				} break;
 				case 0x03: _horizontalTimer = 227; break;