当前位置: 首页>>代码示例>>C#>>正文


C# Serializer.BeginSection方法代码示例

本文整理汇总了C#中Serializer.BeginSection方法的典型用法代码示例。如果您正苦于以下问题:C# Serializer.BeginSection方法的具体用法?C# Serializer.BeginSection怎么用?C# Serializer.BeginSection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Serializer的用法示例。


在下文中一共展示了Serializer.BeginSection方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SyncState

		public override void SyncState(Serializer ser)
		{
			base.SyncState(ser);
			ser.BeginSection("FDS");
			ser.BeginSection("RamAdapter");
			diskdrive.SyncState(ser);
			ser.EndSection();
			ser.BeginSection("audio");
			audio.SyncState(ser);
			ser.EndSection();
			{
				// silly little hack
				int tmp = currentside != null ? (int)currentside : 1234567;
				ser.Sync("currentside", ref tmp);
				currentside = tmp == 1234567 ? null : (int?)tmp;
			}
			for (int i = 0; i < NumSides; i++)
				ser.Sync("diskdiffs" + i, ref diskdiffs[i], true);
			ser.Sync("_timerirq", ref _timerirq);
			ser.Sync("_diskirq", ref _diskirq);
			ser.Sync("diskenable", ref diskenable);
			ser.Sync("soundenable", ref soundenable);
			ser.Sync("reg4026", ref reg4026);
			ser.Sync("timerlatch", ref timerlatch);
			ser.Sync("timervalue", ref timervalue);
			ser.Sync("timerreg", ref timerreg);
			ser.EndSection();

			SetIRQ();
		}
开发者ID:henke37,项目名称:BizHawk,代码行数:30,代码来源:FDS.cs

示例2: SyncState

        private void SyncState(Serializer ser)
        {
            int version = 4;
            ser.BeginSection("NES");
            ser.Sync("version", ref version);
            ser.Sync("Frame", ref _frame);
            ser.Sync("Lag", ref _lagcount);
            ser.Sync("IsLag", ref islag);
            cpu.SyncState(ser);
            ser.Sync("ram", ref ram, false);
            ser.Sync("CIRAM", ref CIRAM, false);
            ser.Sync("cpu_accumulate", ref cpu_accumulate);
            ser.Sync("_irq_apu", ref _irq_apu);
            ser.Sync("sprdma_countdown", ref sprdma_countdown);
            ser.Sync("cpu_step", ref cpu_step);
            ser.Sync("cpu_stepcounter", ref cpu_stepcounter);
            ser.Sync("cpu_deadcounter", ref cpu_deadcounter);

            //oam related
            ser.Sync("Oam_Dma_Index", ref oam_dma_index);
            ser.Sync("Oam_Dma_Exec", ref oam_dma_exec);
            ser.Sync("Oam_Dma_Addr", ref oam_dma_addr);
            ser.Sync("Oam_Dma_Byte", ref oam_dma_byte);
            ser.Sync("Dmc_Dma_Exec", ref dmc_dma_exec);
            ser.Sync("dmc_realign", ref dmc_realign);
            ser.Sync("IRQ_delay", ref IRQ_delay);
            ser.Sync("special_case_delay", ref special_case_delay);
            ser.Sync("do_the_reread", ref do_the_reread);

            ser.BeginSection("Board");
            Board.SyncState(ser);
            if (Board is NESBoardBase && !((NESBoardBase)Board).SyncStateFlag)
                throw new InvalidOperationException("the current NES mapper didnt call base.SyncState");
            ser.EndSection();
            ppu.SyncState(ser);
            apu.SyncState(ser);

            if (version >= 2)
            {
                ser.Sync("DB", ref DB);
            }
            if (version >= 3)
            {
                ser.Sync("latched4016", ref latched4016);
                ser.BeginSection("ControllerDeck");
                ControllerDeck.SyncState(ser);
                ser.EndSection();
            }
            if (version >= 4)
            {
                ser.Sync("resetSignal", ref resetSignal);
                ser.Sync("hardResetSignal", ref hardResetSignal);
            }

            ser.EndSection();
        }
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:56,代码来源:NES.IStatable.cs

示例3: SyncState

 public void SyncState(Serializer ser)
 {
     ser.BeginSection("Sunsoft5BAudio");
     ser.Sync("RegNum", ref RegNum);
     for (int i = 0; i < pulse.Length; i++)
     {
         ser.BeginSection("Pulse" + i);
         pulse[i].SyncState(ser);
         ser.EndSection();
     }
     ser.EndSection();
 }
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:12,代码来源:Sunsoft5BAudio.cs

示例4: SyncState

		public override void SyncState(Serializer ser)
		{
			ser.Sync("mod", ref mode);
			ser.BeginSection("M116MMC1");
			mmc1.SyncState(ser);
			ser.EndSection();
			ser.BeginSection("M116MMC3");
			mmc3.SyncState(ser);
			ser.EndSection();
			ser.BeginSection("M116VRC2");
			vrc2.SyncState(ser);
			ser.EndSection();
			base.SyncState(ser);
			SyncIRQ(mmc3.mmc3.irq_pending);
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:15,代码来源:Mapper116.cs

示例5: SyncState

		public void SyncState(Serializer ser)
		{
			ser.BeginSection("VRC6Alt");
			ser.Sync("masterenable", ref masterenable);
			ser.BeginSection("Pulse1");
			pulse1.SyncState(ser);
			ser.EndSection();
			ser.BeginSection("Pulse2");
			pulse2.SyncState(ser);
			ser.EndSection();
			ser.BeginSection("Saw");
			saw.SyncState(ser);
			ser.EndSection();
			ser.EndSection();
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:15,代码来源:VRC6Alt.cs

示例6: SyncState

		public void SyncState(Serializer ser)
		{
			ser.BeginSection("HuC6280");
			ser.Sync("A", ref A);
			ser.Sync("X", ref X);
			ser.Sync("Y", ref Y);
			ser.Sync("P", ref P);
			ser.Sync("PC", ref PC);
			ser.Sync("S", ref S);
			ser.Sync("MPR", ref MPR, false);
			ser.Sync("LagIFlag", ref LagIFlag);
			ser.Sync("IRQ1Assert", ref IRQ1Assert);
			ser.Sync("IRQ2Assert", ref IRQ2Assert);
			ser.Sync("TimerAssert", ref TimerAssert);
			ser.Sync("IRQControlByte", ref IRQControlByte);
			ser.Sync("IRQNextControlByte", ref IRQNextControlByte);
			ser.Sync("ExecutedCycles", ref TotalExecutedCycles);
			ser.Sync("PendingCycles", ref PendingCycles);
			ser.Sync("LowSpeed", ref LowSpeed);
			ser.Sync("TimerTickCounter", ref TimerTickCounter);
			ser.Sync("TimerReloadValue", ref TimerReloadValue);
			ser.Sync("TimerValue", ref TimerValue);
			ser.Sync("TimerEnabled", ref TimerEnabled);
			ser.Sync("InBlockTransfer", ref InBlockTransfer);
			ser.Sync("BTFrom", ref btFrom);
			ser.Sync("BTTo", ref btTo);
			ser.Sync("BTLen", ref btLen);
			ser.Sync("BTAlternator", ref btAlternator);
			ser.EndSection();
		}
开发者ID:henke37,项目名称:BizHawk,代码行数:30,代码来源:HuC6280.cs

示例7: SyncState

 public void SyncState(Serializer ser)
 {
     ser.BeginSection("HMove");
     ser.Sync("hmoveEnabled", ref HMoveEnabled);
     ser.Sync("lateHBlankReset", ref LateHBlankReset);
     ser.Sync("decCntEnabled", ref DecCntEnabled);
     ser.Sync("player0Latch", ref Player0Latch);
     ser.Sync("player1Latch", ref Player1Latch);
     ser.Sync("missile0Latch", ref Missile0Latch);
     ser.Sync("missile1Latch", ref Missile1Latch);
     ser.Sync("ballLatch", ref BallLatch);
     ser.Sync("hmoveDelayCnt", ref HMoveDelayCnt);
     ser.Sync("hmoveCnt", ref HMoveCnt);
     ser.Sync("player0Cnt", ref Player0Cnt);
     ser.Sync("player1Cnt", ref Player1Cnt);
     ser.Sync("missile0Cnt", ref Missile0Cnt);
     ser.Sync("missile1Cnt", ref Missile1Cnt);
     ser.Sync("Test_count_p0", ref test_count_p0);
     ser.Sync("Test_count_p1", ref test_count_p1);
     ser.Sync("Test_count_m0", ref test_count_m0);
     ser.Sync("Test_count_m1", ref test_count_m1);
     ser.Sync("Test_count_b", ref test_count_b);
     ser.Sync("ballCnt", ref BallCnt);
     ser.EndSection();
 }
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:25,代码来源:Tia.HMoveData.cs

示例8: SyncState

		// State Save/Load

		public void SyncState(Serializer ser)
		{
			ser.BeginSection("Z80");
			ser.Sync("AF", ref RegAF.Word);
			ser.Sync("BC", ref RegBC.Word);
			ser.Sync("DE", ref RegDE.Word);
			ser.Sync("HL", ref RegHL.Word);
			ser.Sync("ShadowAF", ref RegAltAF.Word);
			ser.Sync("ShadowBC", ref RegAltBC.Word);
			ser.Sync("ShadowDE", ref RegAltDE.Word);
			ser.Sync("ShadowHL", ref RegAltHL.Word);
			ser.Sync("I", ref RegI);
			ser.Sync("R", ref RegR);
			ser.Sync("IX", ref RegIX.Word);
			ser.Sync("IY", ref RegIY.Word);
			ser.Sync("SP", ref RegSP.Word);
			ser.Sync("PC", ref RegPC.Word);
			ser.Sync("IRQ", ref interrupt);
			ser.Sync("NMI", ref nonMaskableInterrupt);
			ser.Sync("NMIPending", ref nonMaskableInterruptPending);
			ser.Sync("IM", ref interruptMode);
			ser.Sync("IFF1", ref iff1);
			ser.Sync("IFF2", ref iff2);
			ser.Sync("Halted", ref halted);
			ser.Sync("ExecutedCycles", ref totalExecutedCycles);
			ser.Sync("PendingCycles", ref pendingCycles);
			ser.EndSection();
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:30,代码来源:Z80A.cs

示例9: SyncState

		private void SyncState(Serializer ser)
		{
			ser.BeginSection("A2600");
			Cpu.SyncState(ser);
			ser.Sync("ram", ref this.Ram, false);
			ser.Sync("Lag", ref _lagcount);
			ser.Sync("Frame", ref _frame);
			ser.Sync("IsLag", ref _islag);
			ser.Sync("frameStartPending", ref _frameStartPending);
			_tia.SyncState(ser);
			M6532.SyncState(ser);
			ser.BeginSection("Mapper");
			_mapper.SyncState(ser);
			ser.EndSection();
			ser.EndSection();
		}
开发者ID:henke37,项目名称:BizHawk,代码行数:16,代码来源:Atari2600.IStatable.cs

示例10: SyncState

			public override void SyncState(Serializer ser)
			{
				base.SyncState(ser);
				ser.BeginSection("mmc3variant");
				ser.Sync("pending", ref pending);
				ser.Sync("delay", ref delay);
				ser.EndSection();
			}
开发者ID:ddugovic,项目名称:RASuite,代码行数:8,代码来源:Taito_TC0190FMC.cs

示例11: SyncState

		public override void SyncState(Serializer ser)
		{
			base.SyncState(ser);
			ser.BeginSection("Mapper196");
			ser.Sync("prgmode", ref prgmode);
			ser.Sync("prgreg", ref prgreg);
			ser.EndSection();
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:8,代码来源:Mapper196.cs

示例12: SyncState

		public void SyncState(Serializer ser)
		{
			ser.BeginSection("VPC");
			ser.Sync("Registers", ref Registers, false);
			ser.EndSection();

			if (ser.IsReader)
				WriteVPC(0x0E, Registers[6]);
		}
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:9,代码来源:VPC.cs

示例13: SyncState

		private void SyncState(Serializer ser)
		{
			ser.BeginSection("core");
			ser.Sync("frame", ref _frame);
			ser.Sync("islag", ref _islag);
			ser.Sync("lagcount", ref _lagcount);
			board.SyncState(ser);
			ser.EndSection();
		}
开发者ID:henke37,项目名称:BizHawk,代码行数:9,代码来源:C64.IStatable.cs

示例14: SyncState

		public void SyncState(Serializer ser)
		{
			ser.BeginSection("DatachBarcode");
			ser.Sync("cycles", ref cycles);
			ser.Sync("output", ref output);
			ser.Sync("stream_idx", ref stream_idx);
			ser.Sync("data", ref data, false);
			ser.EndSection();
		}
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:9,代码来源:DatachBarcode.cs

示例15: SyncState

		private void SyncState(Serializer ser)
		{
			int version = 4;
			ser.BeginSection("NES");
			ser.Sync("version", ref version);
			ser.Sync("Frame", ref _frame);
			ser.Sync("Lag", ref _lagcount);
			ser.Sync("IsLag", ref islag);
			cpu.SyncState(ser);
			ser.Sync("ram", ref ram, false);
			ser.Sync("CIRAM", ref CIRAM, false);
			ser.Sync("cpu_accumulate", ref cpu_accumulate);
			ser.Sync("_irq_apu", ref _irq_apu);
			ser.Sync("sprdma_countdown", ref sprdma_countdown);
			ser.Sync("cpu_step", ref cpu_step);
			ser.Sync("cpu_stepcounter", ref cpu_stepcounter);
			ser.Sync("cpu_deadcounter", ref cpu_deadcounter);
			ser.BeginSection("Board");
			Board.SyncState(ser);
			if (Board is NESBoardBase && !((NESBoardBase)Board).SyncStateFlag)
				throw new InvalidOperationException("the current NES mapper didnt call base.SyncState");
			ser.EndSection();
			ppu.SyncState(ser);
			apu.SyncState(ser);

			if (version >= 2)
			{
				ser.Sync("DB", ref DB);
			}
			if (version >= 3)
			{
				ser.Sync("latched4016", ref latched4016);
				ser.BeginSection("ControllerDeck");
				ControllerDeck.SyncState(ser);
				ser.EndSection();
			}
			if (version >= 4)
			{
				ser.Sync("resetSignal", ref resetSignal);
				ser.Sync("hardResetSignal", ref hardResetSignal);
			}

			ser.EndSection();
		}
开发者ID:henke37,项目名称:BizHawk,代码行数:44,代码来源:NES.IStatable.cs


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