public M6502(DeserializationContext input, MachineBase m, int runClocksMultiple) : this(m, runClocksMultiple) { if (input == null) { throw new ArgumentNullException("input"); } input.CheckVersion(1); Clock = input.ReadUInt64(); RunClocks = input.ReadInt32(); RunClocksMultiple = input.ReadInt32(); EmulatorPreemptRequest = input.ReadBoolean(); Jammed = input.ReadBoolean(); IRQInterruptRequest = input.ReadBoolean(); NMIInterruptRequest = input.ReadBoolean(); PC = input.ReadUInt16(); A = input.ReadByte(); X = input.ReadByte(); Y = input.ReadByte(); S = input.ReadByte(); P = input.ReadByte(); }
public M6502(DeserializationContext input, MachineBase m, int runClocksMultiple) : this(m, runClocksMultiple) { if (input == null) throw new ArgumentNullException("input"); input.CheckVersion(1); Clock = input.ReadUInt64(); RunClocks = input.ReadInt32(); RunClocksMultiple = input.ReadInt32(); EmulatorPreemptRequest = input.ReadBoolean(); Jammed = input.ReadBoolean(); IRQInterruptRequest = input.ReadBoolean(); NMIInterruptRequest = input.ReadBoolean(); PC = input.ReadUInt16(); A = input.ReadByte(); X = input.ReadByte(); Y = input.ReadByte(); S = input.ReadByte(); P = input.ReadByte(); }
public Maria(DeserializationContext input, Machine7800 m, int scanlines) { if (input == null) throw new ArgumentNullException("input"); if (m == null) throw new ArgumentNullException("m"); M = m; InitializeVisibleScanlineValues(scanlines); TIASound = new TIASound(input, M, CPU_TICKS_PER_AUDIO_SAMPLE); var version = input.CheckVersion(1, 2); LineRAM = input.ReadExpectedBytes(512); if (version == 1) { // formerly persisted values, MariaPalette[8,4] for (var i = 0; i < 32; i++) input.ReadByte(); } Registers = input.ReadExpectedBytes(0x40); if (version == 1) { // formerly persisted value, Scanline input.ReadInt32(); } switch (version) { case 1: WM = (input.ReadByte() != 0); break; case 2: WM = input.ReadBoolean(); break; } DLL = input.ReadUInt16(); DL = input.ReadUInt16(); Offset = input.ReadInt32(); Holey = input.ReadInt32(); Width = input.ReadInt32(); HPOS = input.ReadByte(); PaletteNo = input.ReadByte(); INDMode = input.ReadBoolean(); if (version == 1) { // formerly persisted value (DLI) input.ReadBoolean(); } CtrlLock = input.ReadBoolean(); if (version == 1) { // formerly persisted value (VBLANK) input.ReadByte(); } DMAEnabled = input.ReadBoolean(); if (version == 1) { // formerly persisted value (DMAOn) input.ReadBoolean(); } ColorKill = input.ReadBoolean(); CWidth = input.ReadBoolean(); BCntl = input.ReadBoolean(); Kangaroo = input.ReadBoolean(); RM = input.ReadByte(); }
public Maria(DeserializationContext input, Machine7800 m, int scanlines) { if (input == null) { throw new ArgumentNullException("input"); } if (m == null) { throw new ArgumentNullException("m"); } M = m; InitializeVisibleScanlineValues(scanlines); TIASound = new TIASound(input, M, CPU_TICKS_PER_AUDIO_SAMPLE); var version = input.CheckVersion(1, 2); LineRAM = input.ReadExpectedBytes(512); if (version == 1) { // formerly persisted values, MariaPalette[8,4] for (var i = 0; i < 32; i++) { input.ReadByte(); } } Registers = input.ReadExpectedBytes(0x40); if (version == 1) { // formerly persisted value, Scanline input.ReadInt32(); } switch (version) { case 1: WM = (input.ReadByte() != 0); break; case 2: WM = input.ReadBoolean(); break; } DLL = input.ReadUInt16(); DL = input.ReadUInt16(); Offset = input.ReadInt32(); Holey = input.ReadInt32(); Width = input.ReadInt32(); HPOS = input.ReadByte(); PaletteNo = input.ReadByte(); INDMode = input.ReadBoolean(); if (version == 1) { // formerly persisted value (DLI) input.ReadBoolean(); } CtrlLock = input.ReadBoolean(); if (version == 1) { // formerly persisted value (VBLANK) input.ReadByte(); } DMAEnabled = input.ReadBoolean(); if (version == 1) { // formerly persisted value (DMAOn) input.ReadBoolean(); } ColorKill = input.ReadBoolean(); CWidth = input.ReadBoolean(); BCntl = input.ReadBoolean(); Kangaroo = input.ReadBoolean(); RM = input.ReadByte(); }