Example #1
0
        public override bool Configure(EDetectionOrigin origin)
        {
            switch (Cart.BoardType)
            {
            case "MAPPER024":
                newer_variant = false;
                break;

            case "MAPPER026":
                newer_variant = true;
                break;

            case "KONAMI-VRC-6":
                if (Cart.Pcb == "351951")
                {
                    newer_variant = false;
                }
                else if (Cart.Pcb == "351949A")
                {
                    newer_variant = true;
                }
                else
                {
                    throw new Exception("Unknown PCB type for VRC6");
                }
                AssertPrg(256); AssertChr(128, 256);
                break;

            default:
                return(false);
            }
            AssertVram(0); AssertWram(0, 8);

            prg_bank_mask_8k = Cart.PrgSize / 8 - 1;
            chr_bank_mask_1k = Cart.ChrSize - 1;
            chr_byte_mask    = Cart.ChrSize * 1024 - 1;

            prg_bank_16k = 0;
            prg_bank_8k  = 0;
            SyncPRG();

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

            return(true);
        }