예제 #1
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "MAPPER031":
                AssertChr(0, 8);
                if (Cart.ChrSize == 0)
                {
                    Cart.VramSize = 8;
                }
                break;

            case "MAPPER0031-00":
                AssertVram(8);
                break;

            default:
                return(false);
            }
            SetMirrorType(CalculateMirrorType(Cart.PadH, Cart.PadV));
            AssertPrg(16, 32, 64, 128, 256, 512, 1024);
            Cart.WramSize    = 0;
            prg_bank_mask_4k = Cart.PrgSize / 4 - 1;
            prg[7]           = prg_bank_mask_4k;
            return(true);
        }
예제 #2
0
파일: Mapper015.cs 프로젝트: zcatt/BizHawk
        public override bool Configure(EDetectionOrigin origin)
        {
            //configure
            switch (Cart.BoardType)
            {
            case "MAPPER015":
                break;

            default:
                return(false);
            }
            prg_bank_mask_8k = (Cart.PrgSize / 8) - 1;

            // not a maskable size (BF=10111111)
            // so just set mask to FF and hope for the best
            if (Cart.PrgSize == 192)
            {
                prg_bank_mask_8k = 0xFF;
            }

            prg_banks_8k[0] = 0;
            prg_banks_8k[1] = 1;
            prg_banks_8k[2] = 2;
            prg_banks_8k[3] = 3;
            ApplyMemoryMapMask(prg_bank_mask_8k, prg_banks_8k);

            SetMirrorType(EMirrorType.Horizontal);

            return(true);
        }
예제 #3
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "MAPPER087":
                AssertPrg(8, 16, 32);
                AssertChr(8, 16, 32);
                AssertVram(0);
                Cart.WramSize = 0;
                break;

            case "JALECO-JF-05":
            case "JALECO-JF-06":
            case "TAITO-74*139/74":
            case "JALECO-JF-07":
            case "JALECO-JF-08":
            case "JALECO-JF-09":                     // untested
            case "KONAMI-74*139/74":
            case "JALECO-JF-10":
                AssertPrg(16, 32); AssertChr(16, 32); AssertVram(0); AssertWram(0);
                break;

            default:
                return(false);
            }
            prg_byte_mask = Cart.PrgSize * 1024 - 1;
            chr_mask_8k   = Cart.ChrSize / 8 - 1;
            SetMirrorType(Cart.PadH, Cart.PadV);

            return(true);
        }
예제 #4
0
        public override bool Configure(EDetectionOrigin origin)
        {
            //configure
            switch (Cart.BoardType)
            {
            case "MAPPER080":
                break;

            case "MAPPER207":
                tlsrewire = true;
                break;

            case "TAITO-X1-005":
                if (Cart.Pcb == "アシユラー")
                {
                    tlsrewire = true;
                }
                break;

            default:
                return(false);
            }

            SetMirrorType(EMirrorType.Vertical);
            chr_bank_mask = Cart.ChrSize / 1 - 1;
            prg_bank_mask = Cart.PrgSize / 8 - 1;

            // the chip has 128 bytes of WRAM built into it, which we have to instantiate ourselves
            Cart.WramSize = 0;

            prg_regs_8k[3] = 0xFF;
            return(true);
        }
        public override bool Configure(EDetectionOrigin origin)
        {
            //configure
            switch (Cart.BoardType)
            {
            // http://wiki.nesdev.com/w/index.php/INES_Mapper_176
            // Mapper 176 was originally used for some Waixing boards, but goodNES 3.23 seems to go with CaH4e3's opinion that this mapper is FK23C
            // We will default 176 to FK23C, and use this board to support the tradional Waixing boards.  These ROMs will have to be specifically set to this board by the Game Database
            // case "MAPPER176":
            case "WAIXINGMAPPER176":
                break;

            default:
                return(false);
            }
            prg_bank_mask_8k = (Cart.PrgSize / 8) - 1;
            chr_bank_mask_8k = (Cart.ChrSize / 8) - 1;

            mirror = 0;
            SyncMirror();

            sbw             = 0;
            prg_banks_8k[0] = 0;
            prg_banks_8k[1] = 1;
            prg_banks_8k[2] = 62;
            prg_banks_8k[3] = 63;
            ApplyMemoryMapMask(prg_bank_mask_8k, prg_banks_8k);

            chr_banks_8k[0] = 0;
            ApplyMemoryMapMask(chr_bank_mask_8k, chr_banks_8k);

            return(true);
        }
예제 #6
0
        public override bool Configure(EDetectionOrigin origin)
        {
            //configure
            switch (Cart.BoardType)
            {
            case "MAPPER232":
                break;

            case "CAMERICA-ALGQ":                     //Quattro Adventure (U)
            case "CAMERICA-BF9096":                   //Quattro Arcade (U)
                AssertPrg(256); AssertChr(0); AssertWram(0); AssertVram(8);
                break;

            default:
                return(false);
            }

            prg_bank_mask_16k = Cart.PrgSize / 16 - 1;

            SetMirrorType(Cart.PadH, Cart.PadV);
            SyncPRG();


            return(true);
        }
        public override bool Configure(EDetectionOrigin origin)
        {
            int prg_mask_hack = 1;

            switch (Cart.BoardType)
            {
            case "MAPPER226":
                break;

            case "UNIF_BMC-42in1ResetSwitch":
                resetSwitchMode = true;
                prg_mask_hack   = 2;
                break;

            default:
                return(false);
            }
            prg_page = 0;
            prg_mode = false;

            prg_mask_32k = (Cart.PrgSize / prg_mask_hack) / 32 - 1;
            prg_mask_16k = (Cart.PrgSize / prg_mask_hack) / 16 - 1;

            return(true);
        }
예제 #8
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "MAPPER132":
            case "UNIF_UNL-22211":
                break;

            case "MAPPER172":
                is172 = true;
                break;

            case "MAPPER173":
                is173 = true;
                break;

            default:
                return(false);
            }

            prg_mask = Cart.PrgSize / 32 - 1;
            chr_mask = Cart.ChrSize / 8 - 1;
            SetMirrorType(Cart.PadH, Cart.PadV);
            //SetMirrorType(EMirrorType.Vertical);
            return(true);
        }
예제 #9
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "Pocahontas":
                break;

            default:
                return(false);
            }

            BaseSetup();
            exRegs[0] = 0;
            exRegs[1] = 0;
            exRegs[2] = 0;

            prg_mask_8k = Cart.PrgSize / 8 - 1;
            chr_mask_1k = Cart.ChrSize - 1;

            prg_regs_8k[0] = 0;
            prg_regs_8k[1] = 1;
            prg_regs_8k[2] = (byte)(0xFE & prg_mask_8k);
            prg_regs_8k[3] = (byte)(0xFF & prg_mask_8k);


            return(true);
        }
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "MAPPER091":
                break;

            default:
                return(false);
            }

            int chrSize = Cart.ChrSize;

            if (chrSize > 256)             // Hack to support some bad dumps
            {
                chrSize = 512;
            }

            chr_bank_mask_2k = chrSize / 2 - 1;
            prg_bank_mask_8k = Cart.PrgSize / 8 - 1;

            prg_regs_8k[3] = 0xFF;
            prg_regs_8k[2] = 0xFE;

            mmc3 = new MMC3(this, 0x7FFFFFFF);

            SetMirrorType(Cart.PadH, Cart.PadV);

            return(true);
        }
예제 #11
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "UNIF_BMC-BS-5":
                break;

            default:
                return(false);
            }

            reg_prg[0] = 0xFF;
            reg_prg[1] = 0xFF;
            reg_prg[2] = 0xFF;
            reg_prg[3] = 0xFF;

            SetMirrorType(EMirrorType.Vertical);

            _prgMask8k = Cart.PrgSize / 8 - 1;
            _chrMask2k = Cart.PrgSize / 2 - 1;

            AutoMapperProps.Apply(this);

            return(true);
        }
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "NAMCOT-175":
                SetMirrorType(Cart.PadH, Cart.PadV);
                break;

            case "NAMCOT-340":
                enablemirror = true;
                break;

            case "MAPPER210":
                // not sure what to do here because the popular public collection
                // has nothing in mapper 210 except some mortal kombat pirate cart
                enablemirror = true;
                SetMirrorType(Cart.PadH, Cart.PadV);
                break;

            default:
                return(false);
            }
            AssertPrg(64, 128, 256, 512);
            AssertChr(64, 128, 256);
            AssertVram(0);

            prg_bank_mask_8k = Cart.PrgSize / 8 - 1;
            chr_bank_mask_1k = Cart.ChrSize / 1 - 1;
            prg[3]           = prg_bank_mask_8k;
            return(true);
        }
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "MAPPER193":
                break;

            case "NTDEC-TC-112":                     // untested
                break;

            default:
                return(false);
            }

            prg_bank_mask_8k = (Cart.PrgSize / 8) - 1;
            prg_banks_8k[1]  = 0xFD;
            prg_banks_8k[2]  = 0xFE;
            prg_banks_8k[3]  = 0xFF;

            chr_bank_mask_2k = (Cart.ChrSize / 2) - 1;

            SetMirrorType(EMirrorType.Vertical);
            SyncMap();
            return(true);
        }
예제 #14
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "AVE-NINA-07":                     // wally bear and the gang
                // it's not the NINA_001 but something entirely different; actually a colordreams with VRAM
                // this actually works
                AssertPrg(32, 128); AssertChr(0, 16); AssertWram(0); AssertVram(0, 8);
                break;

            case "IREM-BNROM":                    //Mashou (J).nes
            case "NES-BNROM":                     //Deadly Towers (U)
                AssertPrg(128, 256); AssertChr(0); AssertWram(0, 8); AssertVram(8);
                break;

            default:
                return(false);
            }

            prg_bank_mask_32k = Cart.PrgSize / 32 - 1;
            chr_bank_mask_8k  = Cart.ChrSize / 8 - 1;

            SetMirrorType(Cart.PadH, Cart.PadV);

            return(true);
        }
예제 #15
0
        public override bool Configure(EDetectionOrigin origin)
        {
            //configure
            switch (Cart.BoardType)
            {
            case "MAPPER099":
                NES._isVS = true;
                break;

            default:
                return(false);
            }

            prg_byte_mask = Cart.PrgSize * 1024 - 1;
            chr_mask      = (Cart.ChrSize / 8) - 1;

            //update the state of the dip switches
            //this is only done at power on
            NES.VS_dips[0] = (byte)(NES.SyncSettings.VSDipswitches.Dip_Switch_1 ? 1 : 0);
            NES.VS_dips[1] = (byte)(NES.SyncSettings.VSDipswitches.Dip_Switch_2 ? 1 : 0);
            NES.VS_dips[2] = (byte)(NES.SyncSettings.VSDipswitches.Dip_Switch_3 ? 1 : 0);
            NES.VS_dips[3] = (byte)(NES.SyncSettings.VSDipswitches.Dip_Switch_4 ? 1 : 0);
            NES.VS_dips[4] = (byte)(NES.SyncSettings.VSDipswitches.Dip_Switch_5 ? 1 : 0);
            NES.VS_dips[5] = (byte)(NES.SyncSettings.VSDipswitches.Dip_Switch_6 ? 1 : 0);
            NES.VS_dips[6] = (byte)(NES.SyncSettings.VSDipswitches.Dip_Switch_7 ? 1 : 0);
            NES.VS_dips[7] = (byte)(NES.SyncSettings.VSDipswitches.Dip_Switch_8 ? 1 : 0);

            return(true);
        }
예제 #16
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "MAPPER093":
                break;

            case "SUNSOFT-2":
                if (Cart.Pcb != "SUNSOFT-3R")
                {
                    return(false);
                }
                break;

            case "SUNSOFT-1":
                if (Cart.Pcb != "SUNSOFT-4")
                {
                    return(false);
                }
                return(false);                        // this has been moved to Sunsoft1_Alt

            default:
                return(false);
            }

            SetMirrorType(Cart.PadH, Cart.PadV);
            prg_bank_mask_16k = (Cart.PrgSize / 16) - 1;
            prg_banks_16k[1]  = 0xFF;
            return(true);
        }
예제 #17
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "MAPPER105":
                break;

            case "NES-EVENT":
                AssertPrg(256); AssertChr(0); AssertVram(8); AssertWram(8);
                break;

            default:
                return(false);
            }

            prg_bank_mask_16k = Cart.PrgSize / 16 - 1;
            init_sequence     = 0;

            SetMirrorType(EMirrorType.Vertical);

            scnt = new MMC1.MMC1_SerialController
            {
                WriteRegister = SerialWriteRegister,
                Reset         = SerialReset
            };

            InitValues();

            return(true);
        }
예제 #18
0
        public override bool Configure(EDetectionOrigin origin)
        {
            //configure
            switch (Cart.BoardType)
            {
            case "MAPPER013":
                AssertPrg(32);
                AssertChr(0);
                Cart.VramSize = 16;
                Cart.WramSize = 0;
                break;

            case "NES-CPROM":                     //videomation
                AssertPrg(32); AssertChr(0); AssertVram(16); AssertWram(0);
                break;

            default:
                return(false);
            }

            //TODO - assert that mirror type is vertical?
            //set it in the cart?

            SetMirrorType(EMirrorType.Vertical);

            return(true);
        }
예제 #19
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "UNIF_UNL-DRIPGAME":
                break;

            default:
                return(false);
            }
            Cart.WramSize    = 8;
            Cart.WramBattery = false;
            AssertPrg(16, 32, 64, 128, 256);  // 4 bits x 16
            AssertChr(8, 16, 32);             // 4 bits x 2

            AutoMapperProps.Apply(this);

            prgmask = Cart.PrgSize / 16 - 1;
            chrmask = Cart.PrgSize / 2 - 1;

            prg[1] = prgmask;
            SetMirror(0);

            if (NES.apu != null)             // don't start up sound when in configurator
            {
                sound0 = new SoundChannel(NES.apu.ExternalQueue);
                sound1 = new SoundChannel(NES.apu.ExternalQueue);
            }

            return(true);
        }
예제 #20
0
        public override bool Configure(EDetectionOrigin origin)
        {
            //SUROM uses CHR A16 to control the upper address line (PRG A18) of its 512KB PRG ROM.

            switch (Cart.BoardType)
            {
            case "MAPPER001":
                // we try to heuristic match to iNES 001 roms with big PRG only
                if (Cart.PrgSize <= 256)
                {
                    return(false);
                }
                AssertPrg(512); AssertChr(0);
                Cart.VramSize    = 8;
                Cart.WramSize    = 8;
                Cart.WramBattery = true;                         // all SUROM boards had batteries
                Console.WriteLine("Guessing SUROM for 512KiB PRG ROM");
                break;

            case "NES-SUROM":                     //dragon warrior 4
            case "HVC-SUROM":
                AssertPrg(512); AssertChr(0); AssertVram(8); AssertWram(8);
                break;

            default:
                return(false);
            }

            BaseConfigure();
            return(true);
        }
예제 #21
0
        public override bool Configure(EDetectionOrigin origin)
        {
            //analyze board type
            switch (Cart.BoardType)
            {
            case "NES-HKROM":
                AssertPrg(256); AssertChr(256); AssertVram(0); AssertWram(0, 1);
                Cart.WramSize    = 1;                      //1K of wram is in the mmc6
                Cart.WramBattery = true;                   //and its battery backed.
                break;

            case "MAPPER004_MMC6":
                Cart.WramSize    = 1;                      //1K of wram is in the mmc6
                Cart.WramBattery = true;                   //and its battery backed.
                break;

            default:
                return(false);
            }

            BaseSetup();
            mmc3.MMC3Type = MMC3.EMMC3Type.MMC6;

            return(true);
        }
예제 #22
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "MAPPER092":
                break;

            case "JALECO-JF-19":
                break;

            default:
                return(false);
            }

            prg_bank_mask_16k = (Cart.PrgSize / 16) - 1;
            chr_bank_mask_8k  = (Cart.ChrSize / 8) - 1;

            SetMirrorType(Cart.PadH, Cart.PadV);

            prg_banks_16k[0] = 0;
            chr_banks_8k[0]  = 0;
            SyncMap();

            return(true);
        }
예제 #23
0
        public override bool Configure(EDetectionOrigin origin)
        {
            //configure
            switch (Cart.BoardType)
            {
            case "MAPPER065":
                break;

            case "IREM-H3001":
                AssertPrg(128, 256); AssertChr(128, 256); AssertVram(0); AssertWram(0);
                break;

            default:
                return(false);
            }

            prg_bank_mask = Cart.PrgSize / 8 - 1;
            chr_bank_mask = Cart.ChrSize - 1;

            prg_regs_8k[0] = 0x00;
            prg_regs_8k[1] = 0x01;
            prg_regs_8k[2] = 0xFE;
            prg_regs_8k[3] = 0xFF;             //constant
            return(true);
        }
예제 #24
0
파일: Mapper042.cs 프로젝트: zcatt/BizHawk
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "MAPPER042":
                break;

            default:
                return(false);
            }
            AssertPrg(128);

            if (Cart.VramSize == 0)
            {
                AssertChr(128);
            }
            else
            {
                AssertVram(8);
                AssertChr(0);
            }

            Cart.WramSize = 0;
            // not sure on initial mirroring
            SetMirrorType(EMirrorType.Vertical);
            return(true);
        }
예제 #25
0
        public override bool Configure(EDetectionOrigin origin)
        {
            //analyze board type
            switch (Cart.BoardType)
            {
            case "MAPPER004":
                if (Cart.InesMirroring != 2)                         // send these to TxROM
                {
                    return(false);
                }
                Cart.VramSize = 8;
                break;


            case "NES-TVROM":                     //rad racer II (U)
                AssertPrg(64); AssertChr(64); AssertVram(8); AssertWram(0);
                AssertBattery(false);
                break;

            case "NES-TR1ROM":                     // Gauntlet variant (untested!)
                break;

            default:
                return(false);
            }

            BaseSetup();

            return(true);
        }
예제 #26
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "MAPPER228":
            case "MLT-ACTION52":
                break;

            default:
                return(false);
            }

            AssertPrg(256, 1536);

            chr_bank_mask_8k  = Cart.ChrSize / 8 - 1;
            prg_bank_mask_16k = Cart.PrgSize / 16 - 1;
            prg_bank_mask_32k = Cart.PrgSize / 32 - 1;

            if (Cart.PrgSize == 256)
            {
                cheetahmen = true;
            }
            else
            {
                prg_bank_mask_16k = 0x1F;
                prg_bank_mask_32k = 0xF;
            }

            AutoMapperProps.Apply(this);

            return(true);
        }
예제 #27
0
        public override bool Configure(EDetectionOrigin origin)
        {
            //analyze board type
            switch (Cart.BoardType)
            {
            case "MAPPER018":
            case "JALECO-JF-23":
            case "JALECO-JF-24":
            case "JALECO-JF-25":
            case "JALECO-JF-27":
            case "JALECO-JF-29":
            case "JALECO-JF-37":
            case "JALECO-JF-40":
                break;

            default:
                return(false);
            }

            chr_bank_mask_1k = Cart.ChrSize / 1 - 1;
            prg_bank_mask_8k = Cart.PrgSize / 8 - 1;
            prg_banks_8k[3]  = 0xFF;

            // i have no idea what power-on defaults are supposed to be used
            ppuclock       = 0;
            irqclock       = 0xffff;
            irqreload      = 0xffff;
            irqcountwidth  = 16;
            irqcountpaused = true;

            SetMirrorType(EMirrorType.Horizontal);
            return(true);
        }
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            // only game i'm aware of is "The Great Wall"
            case "MAPPER137":
            case "UNIF_UNL-Sachen-8259D":
            case "SACHEN-8259D":
                break;

            default:
                return(false);
            }
            Cart.WramSize     = 0;         // cart responds to regs in 6000:7fff
            Cart.VramSize     = 0;
            prg_bank_mask_32k = Cart.PrgSize / 32 - 1;
            chr_bank_mask_1k  = Cart.ChrSize / 1 - 1;

            // last 4k of chr is fixed
            chr[4] = 0x1c;
            chr[5] = 0x1d;
            chr[6] = 0x1e;
            chr[7] = 0x1f;

            SetMirrorType(EMirrorType.Vertical);
            return(true);
        }
        public override bool Configure(EDetectionOrigin origin)
        {
            holydiver = false;

            switch (Cart.BoardType)
            {
            case "MAPPER078":
                break;

            case "IREM-HOLYDIVER":
                holydiver = true;
                break;

            case "JALECO-JF-16":
                break;

            default:
                return(false);
            }

            SetMirrorType(Cart.PadH, Cart.PadV);
            prg_bank_mask_16k = (Cart.PrgSize / 16) - 1;
            prg_banks_16k[1]  = 0xFF;
            return(true);
        }
예제 #30
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "MAPPER085":
                // as in some VRC2/VRC4 cases, this is actually a "composite" mapping that catches
                // both kinds of VRC7 (but screws up some of the address mirrors)
                remap = (addr) => (addr & 0xF000) | (addr & 0x30) >> 4 | (addr & 0x8) >> 3;
                fm    = new YM2413(YM2413.ChipType.VRC7);
                break;

            case "KONAMI-VRC-7":
                AssertPrg(128, 512); AssertChr(0, 128); AssertVram(0, 8); AssertWram(0, 8);
                if (Cart.Pcb == "353429")
                {
                    //tiny toons 2
                    // for consistency, we map the addr line used for the FM chip even though
                    // there is no resonator or crystal on the board for the fm chip
                    remap = (addr) => (addr & 0xF000) | ((addr & 0x8) >> 3) | (addr & 0x20) >> 4;
                    fm    = null;
                }
                else if (Cart.Pcb == "352402")
                {
                    //lagrange point
                    remap = addr => ((addr & 0xF000) | ((addr & 0x30) >> 4));
                    fm    = new YM2413(YM2413.ChipType.VRC7);
                }
                else
                {
                    throw new Exception("Unknown PCB type for VRC7");
                }
                break;

            case "MAPPER117":
                // not sure quite what this is
                // different address mapping, and somewhat different irq logic
                Cart.VramSize = 0;
                Cart.WramSize = 0;
                remap         = RemapM117;
                fm            = null;
                break;

            default:
                return(false);
            }

            prg_bank_mask_8k = Cart.PrgSize / 8 - 1;
            chr_bank_mask_1k = 0xff;             // Cart.chr_size - 1;

            SetMirrorType(EMirrorType.Vertical);

            prg_banks_8k[3] = (byte)(0xFF & prg_bank_mask_8k);

            return(true);
        }
예제 #31
0
        /// <summary>
        /// finds a board class which can handle the provided cart
        /// </summary>
        static Type FindBoard(CartInfo cart, EDetectionOrigin origin, Dictionary<string, string> properties)
        {
            NES nes = new NES();
            nes.cart = cart;
            Type ret = null;
            lock(INESBoardImplementors)
                foreach (var type in INESBoardImplementors)
                {
                    using (NESBoardBase board = (NESBoardBase)Activator.CreateInstance(type))
                    {
                        //unif demands that the boards set themselves up with expected legal values based on the board size
                        //except, i guess, for the rom/chr sizes. go figure.
                        //so, disable the asserts here
                        if (origin == EDetectionOrigin.UNIF)
                            board.DisableConfigAsserts = true;

                        board.Create(nes);
                        board.InitialRegisterValues = properties;
                        if (board.Configure(origin))
                        {
            #if DEBUG
                            if (ret != null)
                                throw new Exception(string.Format("Boards {0} and {1} both responded to Configure!", ret, type));
                            else
                                ret = type;
            #else
                            return type;
            #endif
                        }
                    }
                }
            return ret;
        }