1.1 --- a/ula.py Sat Jun 18 00:03:20 2016 +0200
1.2 +++ b/ula.py Sun Jun 19 16:15:39 2016 +0200
1.3 @@ -379,7 +379,6 @@
1.4 # Initialise the pixel buffer if appropriate.
1.5
1.6 if not self.writing_pixels and self.have_pixels:
1.7 - self.pixelpos = 0
1.8 self.buffer_index = 0
1.9 self.fill_pixel_buffer()
1.10 self.writing_pixels = 1
1.11 @@ -497,6 +496,8 @@
1.12 self.vsync(1)
1.13
1.14
1.15 + self.x += 1
1.16 +
1.17
1.18 # Pixel production.
1.19
1.20 @@ -508,22 +509,19 @@
1.21 # For pixels within the frame, obtain and output the value.
1.22
1.23 else:
1.24 - self.pixelpos += 1
1.25 self.video.colour = self.buffer[self.buffer_index]
1.26
1.27 # Scale pixels horizontally, only accessing the next pixel value
1.28 # after the required number of scan positions.
1.29
1.30 - if self.pixelpos % self.xscale == 0:
1.31 + if self.x % self.xscale == 0:
1.32 self.buffer_index += 1
1.33
1.34 # Finish writing pixels.
1.35
1.36 - if self.pixelpos == PIXEL_POSITIONS:
1.37 + if self.x % PIXEL_POSITIONS == 0:
1.38 self.writing_pixels = 0
1.39
1.40 - self.x += 1
1.41 -
1.42 def fill_pixel_buffer(self):
1.43
1.44 """