From 0ce807805d7de8d888710848f5a8a99a4e5395bb Mon Sep 17 00:00:00 2001
From: Thomas Harte <thomas.harte@gmail.com>
Date: Tue, 5 Nov 2019 23:17:59 -0500
Subject: [PATCH] Eliminates most masks, at least for now.

---
 Machines/AtariST/Video.cpp | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Machines/AtariST/Video.cpp b/Machines/AtariST/Video.cpp
index e5745f16d..34c878caa 100644
--- a/Machines/AtariST/Video.cpp
+++ b/Machines/AtariST/Video.cpp
@@ -137,9 +137,10 @@ void Video::run_for(HalfCycles duration) {
 					output_border(run_length);
 				} else {
 					if(run_length < 32) {
-						shift_out(run_length);
+						shift_out(run_length);	// TODO: this might end up overrunning.
 					} else {
 						shift_out(32);
+						output_shifter = 0;
 						output_border(run_length - 32);
 					}
 				}
@@ -255,12 +256,12 @@ void Video::shift_out(int length) {
 						((output_shifter >> 63) & 1) |
 						((output_shifter >> 46) & 2)
 					];
-					output_shifter = (output_shifter << 1) & 0xefff;
+					output_shifter = (output_shifter << 1);// & 0xfeffffff;
 					++pixel_buffer_.pixel_pointer;
 				}
 			} else {
 				while(length--) {
-					output_shifter = (output_shifter << 1) & 0xefff;
+					output_shifter = (output_shifter << 1);// & 0xfeffffff;
 				}
 			}
 		break;
@@ -275,13 +276,13 @@ void Video::shift_out(int length) {
 						((output_shifter >> 29) & 4) |
 						((output_shifter >> 12) & 8)
 					];
-					output_shifter = (output_shifter << 1) & 0xeeee;
+					output_shifter = (output_shifter << 1);// & 0xfefefefe;
 					++pixel_buffer_.pixel_pointer;
 					length -= 2;
 				}
 			} else {
 				while(length) {
-					output_shifter = (output_shifter << 1) & 0xeeee;
+					output_shifter = (output_shifter << 1);// & 0xfefefefe;
 					length -= 2;
 				}
 			}