(self, addr)
return page, x, y
Get video page and coordinates for address.
Get video page and coordinates for address.
Get video page and coordinates for address .
def _get_coords(self, addr):
        """Get video page and coordinates for address."""
        addr =  int(addr) - self._video_segment * 0x10
        page, addr = divmod(addr, self._page_size)
        # 4 x interleaved scan lines of 160bytes
        bank, offset = divmod(addr, self._bank_size)
        row, col = divmod(offset, self._bytes_per_row)
        x = (col // 2) * 8
        y = bank + 4 * row
        return page, x, y
def _get_coords ( self , addr ) : addr = int ( addr ) - self . _video_segment * 0x10 page , addr = divmod ( addr , self . _page_size ) # 4 x interleaved scan lines of 160bytes bank , offset = divmod ( addr , self . _bank_size ) row , col = divmod ( offset , self . _bytes_per_row ) x = ( col // 2 ) * 8 y = bank + 4 * row return page , x , y