(self, addr, length)
return block
Retrieve a contiguous block of bytes from memory.
Retrieve a contiguous block of bytes from memory.
Retrieve a contiguous block of bytes from memory .
def _get_memory_block(self, addr, length):
        """Retrieve a contiguous block of bytes from memory."""
        block = bytearray()
        if addr >= self.video_segment*0x10:
            video_len = 0x20000 - (addr - self.video_segment*0x10)
            # graphics and text memory - specialised call
            block += self._get_video_memory_block(addr, min(length, video_len))
            addr += video_len
            length -= video_len
        for a in range(addr, addr+length):
            block.append(max(0, self._get_memory(a)))
        return block
def _get_memory_block ( self , addr , length ) : block = bytearray ( ) if addr >= self . video_segment * 0x10 : video_len = 0x20000 - ( addr - self . video_segment * 0x10 ) # graphics and text memory - specialised call block += self . _get_video_memory_block ( addr , min ( length , video_len ) ) addr += video_len length -= video_len for a in range ( addr , addr + length ) : block . append ( max ( 0 , self . _get_memory ( a ) ) ) return block