(self, addr)
Retrieve the value at an emulated memory location.
Retrieve the value at an emulated memory location.
Retrieve the value at an emulated memory location .
def _get_memory(self, addr):
        """Retrieve the value at an emulated memory location."""
        try:
            # try if there's a preset value
            return self._peek_values[addr]
        except KeyError:
            if addr >= self.rom_segment*0x10:
                # ROM font
                return max(0, self._get_rom_memory(addr))
            elif addr >= self.ram_font_segment*0x10:
                # RAM font
                return max(0, self._get_font_memory(addr))
            elif addr >= self.video_segment*0x10:
                # graphics and text memory
                return max(0, self._get_video_memory(addr))
            elif addr >= self._memory.data_segment*0x10:
                return max(0, self._memory.get_memory(addr))
            elif addr >= 0:
                return max(0, self._get_low_memory(addr))
            else:
                return 0
def _get_memory ( self , addr ) : try : # try if there's a preset value return self . _peek_values [ addr ] except KeyError : if addr >= self . rom_segment * 0x10 : # ROM font return max ( 0 , self . _get_rom_memory ( addr ) ) elif addr >= self . ram_font_segment * 0x10 : # RAM font return max ( 0 , self . _get_font_memory ( addr ) ) elif addr >= self . video_segment * 0x10 : # graphics and text memory return max ( 0 , self . _get_video_memory ( addr ) ) elif addr >= self . _memory . data_segment * 0x10 : return max ( 0 , self . _memory . get_memory ( addr ) ) elif addr >= 0 : return max ( 0 , self . _get_low_memory ( addr ) ) else : return 0