(self, addr)
Retrieve data from ROM.
Retrieve data from ROM.
Retrieve data from ROM .
def _get_rom_memory(self, addr):
        """Retrieve data from ROM."""
        addr -= self.rom_segment*0x10
        if addr == 0xfffe:
            # machine ID byte
            # see http://stanislavs.org/helppc/id_bytes.html
            # FF	Original IBM PC  4/24/81
    		# FE	IBM XT (Original)
    		# FD	PCjr
    		# FC	IBM AT, XT 286, PS/1, PS/2 Model 50/60
    		# FB	IBM 256/640K XT (aka XT/2)
    		# FA	IBM PS/2 Model 30
    		# F9	IBM PC Convertible
    		# F8	IBM PS/2 Model 80/70
    		# B6    Hewlett Packard 110
    		# 9A	Compaq Plus
    		# 2D	Compaq PC
            # most clones including Tandy return FF (IBM PC) for compatibility
            # http://nerdlypleasures.blogspot.co.uk/2012/06/ibm-pcjr-and-tandy-1000-games.html
            if self._syntax == 'pcjr':
                return 0xfd
            return 0xff
        elif addr >= 0xe00e and addr < 0xe00e + 80:
            # version & copyright info instead of IBM BIOS copyright notice
            pos = addr - 0xe00e
            try:
                return NOTICE[pos]
            except IndexError:
                return -1
        else:
            # ROM font
            addr -= self.rom_font_addr
            char = addr // 8
            if char > 127 or char < 0:
                return -1
            return self.font_8.get_byte(char, addr%8)
def _get_rom_memory ( self , addr ) : addr -= self . rom_segment * 0x10 if addr == 0xfffe : # machine ID byte # see http://stanislavs.org/helppc/id_bytes.html # FF	Original IBM PC  4/24/81 # FE	IBM XT (Original) # FD	PCjr # FC	IBM AT, XT 286, PS/1, PS/2 Model 50/60 # FB	IBM 256/640K XT (aka XT/2) # FA	IBM PS/2 Model 30 # F9	IBM PC Convertible # F8	IBM PS/2 Model 80/70 # B6    Hewlett Packard 110 # 9A	Compaq Plus # 2D	Compaq PC # most clones including Tandy return FF (IBM PC) for compatibility # http://nerdlypleasures.blogspot.co.uk/2012/06/ibm-pcjr-and-tandy-1000-games.html if self . _syntax == 'pcjr' : return 0xfd return 0xff elif addr >= 0xe00e and addr < 0xe00e + 80 : # version & copyright info instead of IBM BIOS copyright notice pos = addr - 0xe00e try : return NOTICE [ pos ] except IndexError : return - 1 else : # ROM font addr -= self . rom_font_addr char = addr // 8 if char > 127 or char < 0 : return - 1 return self . font_8 . get_byte ( char , addr % 8 )