Пример #1
0
        public void Write(UInt16 address, Cartridge.MirrorMode mirrorMode, byte data)
        {
            UInt16 maskedAddress = Nametable.MaskAddress(address);

            int id     = Nametable.MirrorNametable(maskedAddress, mirrorMode);
            int offset = Nametable.Offset(maskedAddress);

            nameTable[id, offset] = data;
        }
Пример #2
0
        public byte Read(UInt16 address, Cartridge.MirrorMode mirrorMode)
        {
            UInt16 maskedAddress = Nametable.MaskAddress(address);

            int id     = Nametable.MirrorNametable(maskedAddress, mirrorMode);
            int offset = Nametable.Offset(maskedAddress);

            return(nameTable[id, offset]);
        }