(
            self, pixel_height, pixel_width,
            video_mem_size, max_pages, interleave_times, bank_size, bitsperpixel
        )
Initialise video mode settings.
Initialise video mode settings.
Initialise video mode settings .
def __init__(
            self, pixel_height, pixel_width,
            video_mem_size, max_pages, interleave_times, bank_size, bitsperpixel
        ):
        """Initialise video mode settings."""
        page_size = interleave_times * bank_size
        _MemoryMapper.__init__(self, video_mem_size, max_pages, page_size)
        self._pixel_height = pixel_height
        self._pixel_width = pixel_width
        # cga bank_size = 0x2000 interleave_times=2
        self._interleave_times = interleave_times
        self._bank_size = bank_size
        self._bitsperpixel = bitsperpixel
        # number of pixels referenced in each byte of a plane
        self._ppb = 8 // bitsperpixel
        # strides
        self._bytes_per_row = self._pixel_width * bitsperpixel // 8
def __init__ ( self , pixel_height , pixel_width , video_mem_size , max_pages , interleave_times , bank_size , bitsperpixel ) : page_size = interleave_times * bank_size _MemoryMapper . __init__ ( self , video_mem_size , max_pages , page_size ) self . _pixel_height = pixel_height self . _pixel_width = pixel_width # cga bank_size = 0x2000 interleave_times=2 self . _interleave_times = interleave_times self . _bank_size = bank_size self . _bitsperpixel = bitsperpixel # number of pixels referenced in each byte of a plane self . _ppb = 8 // bitsperpixel # strides self . _bytes_per_row = self . _pixel_width * bitsperpixel // 8