Ejemplo n.º 1
0
        public static bool isMapperWriteAddress(ushort address)
        {
            if (Core.rom != null)
            {
                int mapperSetting = Core.rom.getMapperSetting();

                if (mapperSetting == 1)
                {
                    return(MMC1.isMapperWriteAddress(address));
                }
                else if (mapperSetting == 2)
                {
                    return(UNROM.isMapperWriteAddress(address));
                }
                else if (mapperSetting == 3)
                {
                    return(CNROM.isMapperWriteAddress(address));
                }
                else if (mapperSetting == 4)
                {
                    return(MMC3.isMapperWriteAddress(address));
                }
            }

            return(false);
        }
Ejemplo n.º 2
0
        public static void writeToCurrentMapper(ushort address, byte value)
        {
            if (Core.rom != null)
            {
                int mapperSetting = Core.rom.getMapperSetting();

                if (mapperSetting == 1)
                {
                    MMC1.writeMMC1(address, value);
                }
                else if (mapperSetting == 2)
                {
                    UNROM.writeUNROM(address, value);
                }
                else if (mapperSetting == 3)
                {
                    CNROM.writeCNROM(address, value);
                }
                else if (mapperSetting == 4)
                {
                    MMC3.writeMMC3(address, value);
                }
            }
        }