# HG changeset patch # User Paul Boddie # Date 1466458811 -7200 # Node ID 05ee520ae9d1e0288a15e6084a25183f6eb2cafa # Parent 5101ef5b3e3a7c7694d6005bbe22e1765095e57f Renamed address to pixel_address. diff -r 5101ef5b3e3a -r 05ee520ae9d1 ula.py --- a/ula.py Mon Jun 20 23:17:48 2016 +0200 +++ b/ula.py Mon Jun 20 23:40:11 2016 +0200 @@ -270,7 +270,7 @@ "Signal the start of a frame." - self.line_start = self.address = self.screen_start + self.line_start = self.pixel_address = self.screen_start self.line = self.line_start % LINES_PER_ROW self.y = 0 self.x = 0 @@ -279,7 +279,7 @@ "Visit the next horizontal position." - self.address += LINES_PER_ROW + self.pixel_address += LINES_PER_ROW self.wrap_address() def next_vertical(self): @@ -299,13 +299,13 @@ # After the end of the last line in a row, the address should already # have been positioned on the last line of the next column. - self.address -= LINES_PER_ROW - 1 + self.pixel_address -= LINES_PER_ROW - 1 self.wrap_address() self.line = 0 # Record the position of the start of the pixel row. - self.line_start = self.address + self.line_start = self.pixel_address # Before any spacing between character rows... @@ -314,12 +314,12 @@ # If not on a row boundary, move to the next line. Here, the address # needs bringing back to the previous character row. - self.address = self.line_start + 1 + self.pixel_address = self.line_start + 1 self.wrap_address() # Record the position of the start of the pixel row. - self.line_start = self.address + self.line_start = self.pixel_address def in_line(self): return self.line < LINES_PER_ROW def in_frame(self): return MIN_PIXELLINE <= self.y < (MIN_PIXELLINE + self.display_height) @@ -383,7 +383,7 @@ # Either assert a required address or propagate the CPU address. if access_ram: - self.init_row_address(self.address) + self.init_row_address(self.pixel_address) else: self.init_row_address(self.cpu_address) @@ -398,7 +398,7 @@ # Either assert a required address or propagate the CPU address. if access_ram: - self.init_column_address(self.address, 0) + self.init_column_address(self.pixel_address, 0) else: self.init_column_address(self.cpu_address, 0) @@ -436,7 +436,7 @@ # Either assert a required address or propagate the CPU address. if access_ram: - self.init_column_address(self.address, 1) + self.init_column_address(self.pixel_address, 1) else: self.init_column_address(self.cpu_address, 1) @@ -532,8 +532,8 @@ self.pcycle = rotate(self.pcycle, self.depth, zero=True) def wrap_address(self): - if self.address >= SCREEN_LIMIT: - self.address -= self.screen_size + if self.pixel_address >= SCREEN_LIMIT: + self.pixel_address -= self.screen_size def init_row_address(self, address): self.ram_address = (address & 0xff80) >> 7