(self, display, addr, num_bytes)
return byte_array
Retrieve bytes from CGA memory.
Retrieve bytes from CGA memory.
Retrieve bytes from CGA memory .
def get_memory(self, display, addr, num_bytes):
        """Retrieve bytes from CGA memory."""
        byte_array = bytearray(num_bytes)
        for page, x, y, ofs, length in self._walk_memory(addr, num_bytes):
            #interval_to_bytes
            pixarray = display.pages[page].pixels[y, x:x+length*self._ppb]
            byte_array[ofs:ofs+length] = pixarray.packed(self._ppb)
        return byte_array
def get_memory ( self , display , addr , num_bytes ) : byte_array = bytearray ( num_bytes ) for page , x , y , ofs , length in self . _walk_memory ( addr , num_bytes ) : #interval_to_bytes pixarray = display . pages [ page ] . pixels [ y , x : x + length * self . _ppb ] byte_array [ ofs : ofs + length ] = pixarray . packed ( self . _ppb ) return byte_array