• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# NES.NES类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中BizHawk.Emulation.Cores.Nintendo.NES.NES的典型用法代码示例。如果您正苦于以下问题:C# NES类的具体用法?C# NES怎么用?C# NES使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NES类属于BizHawk.Emulation.Cores.Nintendo.NES命名空间,在下文中一共展示了NES类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Configure

        public override bool Configure(NES.EDetectionOrigin origin)
        {
            //configure
            switch (Cart.board_type)
            {
                case "MAPPER033":
                    break;
                case "TAITO-TC0190FMC":
                case "TAITO-TC0350FMR":
                    AssertPrg(128, 256); AssertChr(128, 256); AssertWram(0); AssertVram(0);
                    pal16 = false;
                    break;
                case "TAITO-TC0190FMC+PAL16R4":
                    //this is the same as the base TAITO-TC0190FMC, with an added PAL16R4ACN which is a "programmable TTL device", presumably just the IRQ and mirroring
                    AssertPrg(128, 256); AssertChr(256); AssertWram(0); AssertVram(0);
                    pal16 = true;
                    mmc3 = new MMC3Variant(this);
                    break;
                default:
                    return false;
            }

            prg_bank_mask = Cart.prg_size / 8 - 1;
            chr_bank_mask = Cart.chr_size - 1;

            prg_regs_8k[0] = 0x00;
            prg_regs_8k[1] = 0x00;
            prg_regs_8k[2] = 0xFE; //constant
            prg_regs_8k[3] = 0xFF; //constant

            SyncMirror();

            return true;
        }
开发者ID:cas1993per,项目名称:bizhawk,代码行数:34,代码来源:Taito_TC0190FMC.cs


示例2: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			//configure
			switch (Cart.board_type)
			{
				case "MAPPER013":
					AssertPrg(32);
					AssertChr(0);
					Cart.vram_size = 16;
					Cart.wram_size = 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(NES.NESBoardBase.EMirrorType.Vertical);

			return true;
		}
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:27,代码来源:CPROM.cs


示例3: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			switch (Cart.board_type)
			{
				case "MAPPER091":
					break;
				default:
					return false;
			}

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

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

			prg_regs_8k[3] = 0xFF;
			prg_regs_8k[2] = 0xFE;
			
			mmc3 = new MMC3(this, 0x7FFFFFFF);

			SetMirrorType(Cart.pad_h, Cart.pad_v);

			return true;
		}
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:28,代码来源:Mapper091.cs


示例4: Configure

        public override bool Configure(NES.EDetectionOrigin origin)
        {
            switch (Cart.board_type)
            {
                case "UNIF_UNL-DRIPGAME":
                    break;
                default:
                    return false;
            }
            Cart.wram_size = 8;
            Cart.wram_battery = false;
            AssertPrg(16, 32, 64, 128, 256); // 4 bits x 16
            AssertChr(8, 16, 32); // 4 bits x 2

            AutoMapperProps.Apply(this);

            prgmask = Cart.prg_size / 16 - 1;
            chrmask = Cart.prg_size / 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;
        }
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:30,代码来源:UNIF_UNL_DripGame.cs


示例5: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			//configure
			switch (Cart.board_type)
			{
				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.chr_size / 1 - 1;
			prg_bank_mask = Cart.prg_size / 8 - 1;
			
			// the chip has 128 bytes of WRAM built into it, which we have to instantiate ourselves
			Cart.wram_size = 0;

			prg_regs_8k[3] = 0xFF;
			return true;
		}
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:28,代码来源:Taito_X1_005.cs


示例6: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			switch (Cart.board_type)
			{
				case "MAPPER090":
				case "UNIF_UNL-TEK90":
					mapper_090 = true;
					nt_advanced_control = false;
					break;
				case "MAPPER209":
					mapper_209 = true;	
					break;
				case "MAPPER211":
					nt_advanced_control = true;
					mapper_211 = true;
					break;
				default:
					return false;
			}

			prg_bank_mask_8k = Cart.prg_size / 8 - 1;
			chr_bank_mask_1k = Cart.chr_size - 1;

			InitValues();

			return true;
		}
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:27,代码来源:Mapper090.cs


示例7: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			//configure
			switch (Cart.board_type)
			{
				case "MAPPER071":
					break;
				case "CAMERICA-ALGN": //Linus Spacehead's Cosmic Crusade (U)
					AssertPrg(128,256); AssertChr(0); AssertWram(0); 
					AssertVram(8,16); //zero 22-mar-2012 - added 16 here as a hack to make micro machines (aladdin) load. should remove this after it is fixed in the DB
					break;
				case "CAMERICA-BF9093": //Big Nose Freaks Out (U)
					AssertPrg(64,128,256); AssertChr(0); AssertWram(0); AssertVram(8);
					break;
				case "CAMERICA-BF9097": //Fire Hawk
					AssertPrg(128); AssertChr(0); AssertWram(0); AssertVram(8);
					mirror_control_enabled = true;
					break;
				case "CODEMASTERS-NR8N": // untested
					AssertPrg(256); AssertChr(0); AssertWram(0); AssertVram(8);
					break;
				default:
					return false;
			}

			prg_bank_mask_16k = Cart.prg_size / 16 - 1;

			prg_banks_16k[0] = 0x00;
			prg_banks_16k[1] = 0xFF & prg_bank_mask_16k;

			SetMirrorType(Cart.pad_h, Cart.pad_v);

			return true;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:34,代码来源:Camerica.cs


示例8: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			switch (Cart.board_type)
			{
				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(128); AssertChr(0); AssertWram(0); AssertVram(8);
					break;

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

				default:
					return false;
			}

			prg_bank_mask_32k = Cart.prg_size / 32 - 1;

			SetMirrorType(Cart.pad_h, Cart.pad_v);

			return true;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:25,代码来源:BxROM.cs


示例9: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			switch (Cart.board_type)
			{
				case "MAPPER011":
					break;

				case "Discrete_74x377-FLEX":
					break;
				case "COLORDREAMS-74*377":
					AssertPrg(32, 64, 128); AssertChr(16, 32, 64, 128); AssertVram(0); AssertWram(0);
					break;

				case "AGCI-47516":
					SetMirrorType(Cart.pad_h, Cart.pad_v);
					break;

				case "AGCI-50282": // death race
				case "MAPPER144":
					bus_conflict_50282 = true;
					bus_conflict = false;
					SetMirrorType(Cart.pad_h, Cart.pad_v);
					break;

				default:
					return false;
			}
			AssertPrg(32, 64, 128);
			AssertChr(8, 16, 32, 64, 128);

			prg_bank_mask_32k = Cart.prg_size / 32 - 1;
			chr_bank_mask_8k = Cart.chr_size / 8 - 1;

			return true;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:35,代码来源:IC_74x377.cs


示例10: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			switch (Cart.board_type)
			{
				case "MAPPER105":
					break;
				case "NES-EVENT":
					AssertPrg(256); AssertChr(0); AssertVram(8); AssertWram(8);
					break;
				default:
					return false;
			}

			prg_bank_mask_16k = Cart.prg_size / 16 - 1;

			SetMirrorType(EMirrorType.Vertical);

			scnt = new MMC1.MMC1_SerialController();
			scnt.WriteRegister = SerialWriteRegister;
			scnt.Reset = SerialReset;

			Sync();

			return true;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:25,代码来源:NES-EVENT.cs


示例11: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			//configure
			switch (Cart.board_type)
			{
				case "MAPPER176":
					break;
				default:
					return false;
			}
			prg_bank_mask_8k = (Cart.prg_size / 8) - 1;
			chr_bank_mask_8k = (Cart.chr_size / 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;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:28,代码来源:Mapper176.cs


示例12: Apply

        public static void Apply(NES.INESBoard board)
        {
            var fields = board.GetType().GetFields();
            foreach (var field in fields)
            {
                var attribs = field.GetCustomAttributes(false);
                foreach (var attrib in attribs)
                {
                    if (attrib is MapperPropAttribute)
                    {
                        string Name = ((MapperPropAttribute)attrib).Name ?? field.Name;

                        string Value;
                        if (board.InitialRegisterValues.TryGetValue(Name, out Value))
                        {
                            try
                            {
                                field.SetValue(board, Convert.ChangeType(Value, field.FieldType));
                            }
                            catch (Exception e)
                            {
                                if (e is InvalidCastException || e is FormatException || e is OverflowException)
                                    throw new InvalidDataException("Auto Mapper Properties were in a bad format!", e);
                                else
                                    throw e;
                            }
                        }
                        break;
                    }
                }
            }
        }
开发者ID:cas1993per,项目名称:bizhawk,代码行数:32,代码来源:NES.BoardSystem.cs


示例13: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			switch (Cart.board_type)
			{
				case "MAPPER087":
					AssertPrg(8, 16, 32);
					AssertChr(8, 16, 32);
					AssertVram(0);
					Cart.wram_size = 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.prg_size * 1024 - 1;
			chr_mask_8k = Cart.chr_size / 8 - 1;
			SetMirrorType(Cart.pad_h, Cart.pad_v);

			return true;
		}
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:29,代码来源:JALECO_JF_05_06_07.cs


示例14: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			//configure
			switch (Cart.board_type)
			{
				case "MAPPER032":
					break;
				case "IREM-G101":
					if (Cart.pcb == "UNK-IF-13")
					{
						//special case for major league
						oneScreenHack = true;
					}
					AssertPrg(128, 256); AssertChr(128); AssertWram(0, 8); AssertVram(0);
					break;
				default:
					return false;
			}

			prg_bank_mask = Cart.prg_size / 8 - 1;
			chr_bank_mask = Cart.chr_size - 1;

			prg_regs_8k[0] = 0x00;
			prg_regs_8k[1] = 0x01;
			prg_regs_8k[2] = 0xFE; //constant
			prg_regs_8k[3] = 0xFF; //constant
			prg_regs_8k[4] = 0xFE; //constant //** NOTE ** according to disch's doc this would be fixed to 0. but it needs to be this to work. someone should let him know.
			prg_regs_8k[5] = 0x01;
			prg_regs_8k[6] = 0x00;
			prg_regs_8k[7] = 0xFF; //constant

			SyncMirror();

			return true;
		}
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:35,代码来源:Irem_G101.cs


示例15: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			switch (Cart.board_type)
			{
				case "NAMCOT-175":
					//wagyan land 2
					//splatter house
					SetMirrorType(Cart.pad_h, Cart.pad_v);
					break;
				case "NAMCOT-340":
					//family circuit '91
					//dream master
					//famista '92
					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.pad_h, Cart.pad_v);
					break;
				default:
					return false;
			}
			AssertPrg(64, 128, 256, 512);
			AssertChr(64, 128, 256);
			AssertVram(0);

			prg_bank_mask_8k = Cart.prg_size / 8 - 1;
			chr_bank_mask_1k = Cart.chr_size / 1 - 1;
			prg[3] = prg_bank_mask_8k;
			return true;
		}
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:33,代码来源:Namcot175_340.cs


示例16: Configure

		bool simple; // when true, we're in some sort of "simplified" mode

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			switch (Cart.board_type)
			{
				// quite a few crappy games on these boards, shouldn't be hard to find examples?
				case "MAPPER141":
				case "UNIF_UNL-Sachen-8259A":
				case "SACHEN-8259A":
					shiftout = 1; // 256KiB chr max
					break;
				case "MAPPER138":
				case "UNIF_UNL-Sachen-8259B":
				case "SACHEN-8259B":
					shiftout = 0; // 128KiB chr max
					break;
				case "MAPPER139":
				case "UNIF_UNL-Sachen-8259C":
				case "SACHEN-8259C":
					shiftout = 2; // 512KiB chr max
					break;
				default:
					return false;
			}
			Cart.wram_size = 0; // cart responds to regs in 6000:7fff
			Cart.vram_size = 0;

			shiftmask = (1 << shiftout) - 1;
			prg_bank_mask_32k = Cart.prg_size / 32 - 1;
			chr_bank_mask_2k = Cart.chr_size / 2 - 1;

			SetMirrorType(EMirrorType.Vertical);

			return true;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:36,代码来源:Sachen8259.cs


示例17: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			//configure
			switch (Cart.board_type)
			{
				case "MAPPER068":
					break;
				case "TENGEN-800042":
					AssertPrg(128); AssertChr(256); AssertVram(0); AssertWram(0);
					break;
				case "SUNSOFT-4":
					AssertPrg(128); AssertChr(128,256); AssertVram(0); AssertWram(0,8); 
					break;
				case "UNIF_NES-NTBROM":
					AssertPrg(128 + 16); AssertChr(128); Cart.wram_size = 8; Cart.vram_size = 0;
					/* The actual cart had 128k prg, with a small slot on the top that can load an optional daughterboard.
					 * The UNIF dump has this as an extra 16k prg lump.  I don't know how this lump is actually used,
					 * though.
					 */
					break;
				default:
					return false;
			}

			SetMirrorType(EMirrorType.Vertical);
			prg_regs_16k[1] = 0xFF;
			prg_bank_mask = Cart.prg_size / 16 - 1;
			if (Cart.prg_size == 128 + 16)
				prg_bank_mask = 7; // ignore extra prg lump
			chr_bank_mask = Cart.chr_size / 2 - 1;
			nt_bank_mask = Cart.chr_size - 1;
			return true;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:33,代码来源:Sunsoft4.cs


示例18: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			//analyze board type
			switch (Cart.board_type)
			{
				case "MAPPER018":
				case "JALECO-JF-23":
				case "JALECO-JF-24": //TODO: there will be many boards to list here
				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.chr_size / 1 - 1;
			prg_bank_mask_8k = Cart.prg_size / 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;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:32,代码来源:JALECO_SS8806.cs


示例19: Configure

		public override bool Configure(NES.EDetectionOrigin origin)
		{
			//configure
			switch (Cart.board_type)
			{
				case "MAPPER066":
					break;
				case "NES-GNROM": //thunder & lightning
				case "BANDAI-GNROM":
				case "HVC-GNROM":
				case "NES-MHROM": //Super Mario Bros. / Duck Hunt
					AssertPrg(Cart.board_type == "NES-MHROM" ? 64 : 128); AssertChr(8, 16, 32); AssertVram(0); AssertWram(0);
					break;

				default:
					return false;
			}

			prg_mask = (Cart.prg_size / 32) - 1;
			chr_mask = (Cart.chr_size / 8) - 1;
			SetMirrorType(Cart.pad_h, Cart.pad_v);

			if(origin == NES.EDetectionOrigin.INES)
				Console.WriteLine("Caution! This board (inferred from iNES) might have wrong mirr.type");


			return true;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:28,代码来源:GxROM.cs


示例20: NesPPU_Load

		private void NesPPU_Load(object sender, EventArgs e)
		{
			LoadConfigSettings();
			_nes = Global.Emulator as NES;
			ClearDetails();
			RefreshRate.Value = Global.Config.NESPPURefreshRate;
			Generate(true);
			CHRROMViewReload();
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:9,代码来源:NESPPU.cs



注:本文中的BizHawk.Emulation.Cores.Nintendo.NES.NES类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ViewModels.BasicSurveyReportViewModel类代码示例发布时间:2022-05-24
下一篇:
C# M68000.DisassemblyInfo类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap