1.1 --- a/ula.py Mon Jun 20 18:54:52 2016 +0200
1.2 +++ b/ula.py Mon Jun 20 21:32:22 2016 +0200
1.3 @@ -269,34 +269,37 @@
1.4 self.y += 1
1.5 self.x = 0
1.6
1.7 - if not self.inside_frame():
1.8 - return
1.9 + if self.inside_frame():
1.10 + self.line += 1
1.11
1.12 - self.line += 1
1.13 + # At the end of a row...
1.14 +
1.15 + if self.line == self.row_height:
1.16
1.17 - # After the end of the last line in a row, the address should already
1.18 - # have been positioned on the last line of the next column.
1.19 + # After the end of the last line in a row, the address should already
1.20 + # have been positioned on the last line of the next column.
1.21
1.22 - if self.line == self.row_height:
1.23 - self.address -= LINES_PER_ROW - 1
1.24 - self.wrap_address()
1.25 - self.line = 0
1.26 + self.address -= LINES_PER_ROW - 1
1.27 + self.wrap_address()
1.28 + self.line = 0
1.29 +
1.30 + # Record the position of the start of the pixel row.
1.31
1.32 - # Support spacing between character rows.
1.33 + self.line_start = self.address
1.34
1.35 - elif not self.in_line():
1.36 - return
1.37 + # Before any spacing between character rows...
1.38
1.39 - # If not on a row boundary, move to the next line. Here, the address
1.40 - # needs bringing back to the previous character row.
1.41 + elif self.in_line():
1.42
1.43 - else:
1.44 - self.address = self.line_start + 1
1.45 - self.wrap_address()
1.46 + # If not on a row boundary, move to the next line. Here, the address
1.47 + # needs bringing back to the previous character row.
1.48
1.49 - # Record the position of the start of the pixel row.
1.50 + self.address = self.line_start + 1
1.51 + self.wrap_address()
1.52
1.53 - self.line_start = self.address
1.54 + # Record the position of the start of the pixel row.
1.55 +
1.56 + self.line_start = self.address
1.57
1.58 def in_line(self): return self.line < LINES_PER_ROW
1.59 def in_frame(self): return MIN_PIXELLINE <= self.y < (MIN_PIXELLINE + self.display_height)