示例#1
0
        public override bool Configure(NES.EDetectionOrigin origin)
        {
            switch (Cart.board_type)
            {
            // see notes above that explain some of this in more detail

            case "BANDAI-FCG-1":                   // [1]
            case "BANDAI-FCG-2":                   // [1]
            case "IREM-FCG-1":                     // [1] (the extra glue logic is to connect the two chr roms, and doesn't affect emulation)
                AssertPrg(128, 256); AssertChr(128, 256); AssertWram(0); AssertVram(0);
                regs_prg_enable  = false;
                regs_wram_enable = true;
                break;

            case "BANDAI-LZ93D50":                     // [2]
                AssertPrg(128, 256); AssertChr(128, 256); AssertWram(0); AssertVram(0);
                regs_prg_enable  = true;
                regs_wram_enable = false;
                break;

            case "BANDAI-LZ93D50+24C01":                     // [3]
                AssertPrg(128, 256); AssertChr(128, 256); AssertWram(0); AssertVram(0);
                eprom            = new SEEPROM(false);
                regs_prg_enable  = true;
                regs_wram_enable = false;
                break;

            case "MAPPER159":                     // [3]
                AssertPrg(128, 256); AssertChr(128, 256);
                Cart.wram_size   = 0;
                regs_prg_enable  = true;
                regs_wram_enable = false;
                eprom            = new SEEPROM(false);
                break;

            case "BANDAI-LZ93D50+24C02":                     // [4]
                AssertPrg(128, 256); AssertChr(128, 256); AssertWram(0); AssertVram(0);
                eprom            = new SEEPROM(true);
                regs_prg_enable  = true;
                regs_wram_enable = false;
                break;

            case "MAPPER016":                     // [7]
                if (Cart.prg_size > 256)
                {
                    // you have two options:
                    // 1) assume prg > 256 => jump2 (aka mapper 153, type [5])
                    //    this will break hypothetical prg oversize hacks
                    // 2) assume prg > 256 => oversize regular FCG
                    //    this will break famicom 2 dumps without hash match,
                    //    which are marked mapper016 usually
                    goto case "MAPPER153";
                }
                AssertPrg(128, 256); AssertChr(128, 256);
                Cart.wram_size   = 0;
                regs_prg_enable  = true;
                regs_wram_enable = true;
                eprom            = new SEEPROM(true);
                break;

            case "MAPPER153":                     // [5]
                AssertPrg(512);
                AssertChr(0);
                Cart.vram_size   = 8;
                Cart.wram_size   = 8;
                regs_prg_enable  = true;
                regs_wram_enable = false;
                jump2            = true;
                vram             = true;
                break;

            case "BANDAI-JUMP2":                     // [5]
                AssertPrg(512);
                AssertChr(0);
                AssertVram(8);
                AssertWram(8);
                regs_prg_enable  = true;
                regs_wram_enable = false;
                jump2            = true;
                vram             = true;
                break;

            case "MAPPER157":                     // [6]
                // incomplete
                // bootgod doesn't have any of these recorded
                AssertPrg(128, 256);
                AssertChr(0);
                Cart.vram_size   = 8;
                Cart.wram_size   = 0;
                regs_prg_enable  = true;
                regs_wram_enable = false;
                // 24C02 is present on all boards
                // some also have a 24C01 with SCK connected to reg ($8000-$8003).3
                // (does that second seeprom use the same SDA and OE connections as the first? 99% yes, but not implemented)
                eprom  = new SEEPROM(true);
                vram   = true;
                reader = new DatachBarcode();
                break;

            default:
                return(false);
            }

            prg_bank_mask_16k = (Cart.prg_size / 16) - 1;

            // for Jump2 boards, we only mask up to 256K, the outer bank is determined seperately
            if (jump2)
            {
                prg_bank_mask_16k = 256 / 16 - 1;
            }

            chr_bank_mask_1k = Cart.chr_size - 1;

            SetMirrorType(EMirrorType.Vertical);

            prg_reg_16k = 0;
            SyncPRG();

            return(true);
        }
示例#2
0
		public override bool Configure(NES.EDetectionOrigin origin)
		{
			switch (Cart.board_type)
			{
				// see notes above that explain some of this in more detail

				case "BANDAI-FCG-1": // [1]
				case "BANDAI-FCG-2": // [1]
				case "IREM-FCG-1": // [1] (the extra glue logic is to connect the two chr roms, and doesn't affect emulation)
					AssertPrg(128, 256); AssertChr(128, 256); AssertWram(0); AssertVram(0);
					regs_prg_enable = false;
					regs_wram_enable = true;
					break;
				case "BANDAI-LZ93D50": // [2]
					AssertPrg(128, 256); AssertChr(128, 256); AssertWram(0); AssertVram(0);
					regs_prg_enable = true;
					regs_wram_enable = false;
					break;
				case "BANDAI-LZ93D50+24C01": // [3]
					AssertPrg(128, 256); AssertChr(128, 256); AssertWram(0); AssertVram(0);
					eprom = new SEEPROM(false);
					regs_prg_enable = true;
					regs_wram_enable = false;
					break;
				case "MAPPER159": // [3]
					AssertPrg(128, 256); AssertChr(128, 256);
					Cart.wram_size = 0;
					regs_prg_enable = true;
					regs_wram_enable = false;
					eprom = new SEEPROM(false);
					break;
				case "BANDAI-LZ93D50+24C02": // [4]
					AssertPrg(128, 256); AssertChr(128, 256); AssertWram(0); AssertVram(0);
					eprom = new SEEPROM(true);
					regs_prg_enable = true;
					regs_wram_enable = false;
					break;
				case "MAPPER016": // [7]
					if (Cart.prg_size > 256)
					{
						// you have two options:
						// 1) assume prg > 256 => jump2 (aka mapper 153, type [5])
						//    this will break hypothetical prg oversize hacks
						// 2) assume prg > 256 => oversize regular FCG
						//    this will break famicom 2 dumps without hash match,
						//    which are marked mapper016 usually
						goto case "MAPPER153";
					}
					AssertPrg(128, 256); AssertChr(128, 256);
					Cart.wram_size = 0;
					regs_prg_enable = true;
					regs_wram_enable = true;
					eprom = new SEEPROM(true);
					break;
				case "MAPPER153": // [5]
					AssertPrg(512);
					AssertChr(0);
					Cart.vram_size = 8;
					Cart.wram_size = 8;
					regs_prg_enable = true;
					regs_wram_enable = false;
					jump2 = true;
					vram = true;
					break;
				case "BANDAI-JUMP2": // [5]
					AssertPrg(512);
					AssertChr(0);
					AssertVram(8);
					AssertWram(8);
					regs_prg_enable = true;
					regs_wram_enable = false;
					jump2 = true;
					vram = true;
					break;
				case "MAPPER157": // [6]
					// incomplete
					// bootgod doesn't have any of these recorded
					AssertPrg(128, 256);
					AssertChr(0);
					Cart.vram_size = 8;
					Cart.wram_size = 0;
					regs_prg_enable = true;
					regs_wram_enable = false;
					// 24C02 is present on all boards
					// some also have a 24C01 with SCK connected to reg ($8000-$8003).3
					// (does that second seeprom use the same SDA and OE connections as the first? 99% yes, but not implemented)
					eprom = new SEEPROM(true);
					vram = true;
					reader = new DatachBarcode();
					break;
				default:
					return false;
			}

			prg_bank_mask_16k = (Cart.prg_size / 16) - 1;
			chr_bank_mask_1k = Cart.chr_size - 1;
			
			SetMirrorType(EMirrorType.Vertical);

			prg_reg_16k = 0;
			SyncPRG();

			return true;
		}