Esempio n. 1
0
        public Mapper000(INesHeader nesHeader, byte[] programRomData, byte[] characterRomData)
        {
            _programRomData   = programRomData;
            _characterRomData = characterRomData;

            _mirrorRom = nesHeader.PrgRomSize < 2;

            _programRamData = new byte[nesHeader.Flags8 == 0 ? 8192 : 8192];
        }
Esempio n. 2
0
        public Mapper002(INesHeader nesHeader, byte[] programRomData, byte[] characterRomData)
        {
            _nesHeader        = nesHeader;
            _programRomData   = programRomData;
            _characterRomData = characterRomData;

            // 8kb potential ram if no rom is present
            if (characterRomData.Length == 0)
            {
                _characterRomData = new byte[0x2000];
            }
        }
Esempio n. 3
0
        public Mapper001(INesHeader nesHeader, byte[] programRomData, byte[] characterRomData, string romFilePath)
        {
            _nesHeader        = nesHeader;
            _programRomData   = programRomData;
            _characterRomData = characterRomData;

            // If volitile memory then 8Kb present
            if (nesHeader.HasNonVolMemory)
            {
                _programRamData = new BatteryRam(0x2000, romFilePath);
            }

            // 128kb potential ram if no rom is present
            if (characterRomData.Length == 0)
            {
                _characterRomData = new byte[0x20000];
            }
        }