# HG changeset patch # User Paul Boddie # Date 1466603394 -7200 # Node ID 528acbe53d796de8179f98766f6f289b65a79787 # Parent 0f424c197e9279d42c8a461fcfc483ac878d0142 Introduced a separate state-updating method and reordered methods. diff -r 0f424c197e92 -r 528acbe53d79 ula.py --- a/ula.py Wed Jun 22 01:04:11 2016 +0200 +++ b/ula.py Wed Jun 22 15:49:54 2016 +0200 @@ -410,26 +410,6 @@ self.ram.column_select(self.ram_address) - def negedge_pixel(self): - - "Pixel production." - - # For pixels within the frame, obtain and output the value. - - if self.write_pixels(): - self.output_colour_value() - - # Scale pixels horizontally, only accessing the next pixel value - # after the required number of scan positions. - - if self.next_pixel(): - self.next_pixel_value() - - # Detect spacing between character rows. - - else: - self.video.colour = BLANK - def negedge(self): """ @@ -438,6 +418,7 @@ self.negedge_video() self.negedge_ram() + self.negedge_state() self.negedge_pixel() def negedge_video(self): @@ -539,11 +520,33 @@ if self.access_ram(): self.have_pixels = 1 - # Start a new cycle. + def negedge_state(self): + + "Start a new cycle." self.cycle = rotate(self.cycle, 1) self.x += 1 + def negedge_pixel(self): + + "Pixel production." + + # For pixels within the frame, obtain and output the value. + + if self.write_pixels(): + self.output_colour_value() + + # Scale pixels horizontally, only accessing the next pixel value + # after the required number of scan positions. + + if self.next_pixel(): + self.next_pixel_value() + + # Detect spacing between character rows. + + else: + self.video.colour = BLANK + def output_colour_value(self): """