From 58908b60ac60771980df3a7ea95f15902ab3ba96 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 30 Jul 2015 15:49:38 -0400 Subject: [PATCH] So, provisionally: this looks like (i) the one cycle to write; plus (ii) the number of cycles to get to the end of the pixels (which is _horizontalTimer+1 for me because _horizontalTimer = 0 is a pixel); plus (iii) one cycle of latency to wake up. Am I making that up? Time will tell. --- Machines/Atari2600.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Machines/Atari2600.cpp b/Machines/Atari2600.cpp index b9b9b0f80..2c921d5f5 100644 --- a/Machines/Atari2600.cpp +++ b/Machines/Atari2600.cpp @@ -217,8 +217,8 @@ int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t add case 0x01: _vBlankEnabled = !!(*value & 0x02); break; case 0x02: { - cycle_count += (_horizontalTimer / 3)+1; - output_pixels(_horizontalTimer+3); + cycle_count += ((_horizontalTimer+4) / 3); + output_pixels(_horizontalTimer+4); } break; case 0x03: _horizontalTimer = 227; break;