Exemple #1
0
        public void SyncState(Serializer ser)
        {
            ser.BeginSection("ZXMachine");
            ser.Sync("FrameCompleted", ref FrameCompleted);
            ser.Sync("OverFlow", ref OverFlow);
            ser.Sync("FrameCount", ref FrameCount);
            ser.Sync("_frameCycles", ref _frameCycles);
            ser.Sync("inputRead", ref inputRead);
            ser.Sync("LastFrameStartCPUTick", ref LastFrameStartCPUTick);
            ser.Sync("LastULAOutByte", ref LastULAOutByte);
            ser.Sync("ROM0", ref ROM0, false);
            ser.Sync("ROM1", ref ROM1, false);
            ser.Sync("ROM2", ref ROM2, false);
            ser.Sync("ROM3", ref ROM3, false);
            ser.Sync("RAM0", ref RAM0, false);
            ser.Sync("RAM1", ref RAM1, false);
            ser.Sync("RAM2", ref RAM2, false);
            ser.Sync("RAM3", ref RAM3, false);
            ser.Sync("RAM4", ref RAM4, false);
            ser.Sync("RAM5", ref RAM5, false);
            ser.Sync("RAM6", ref RAM6, false);
            ser.Sync("RAM7", ref RAM7, false);
            ser.Sync("ROMPaged", ref ROMPaged);
            ser.Sync("SHADOWPaged", ref SHADOWPaged);
            ser.Sync("RAMPaged", ref RAMPaged);
            ser.Sync("PagingDisabled", ref PagingDisabled);
            ser.Sync("SpecialPagingMode", ref SpecialPagingMode);
            ser.Sync("PagingConfiguration", ref PagingConfiguration);
            ser.Sync("ROMhigh", ref ROMhigh);
            ser.Sync("ROMlow", ref ROMlow);

            KeyboardDevice.SyncState(ser);
            BuzzerDevice.SyncState(ser);
            TapeBuzzer.SyncState(ser);
            ULADevice.SyncState(ser);

            if (AYDevice != null)
            {
                AYDevice.SyncState(ser);
                ((AYChip)AYDevice as AYChip).PanningConfiguration = Spectrum.Settings.AYPanConfig;
            }

            if (UPDDiskDevice != null)
            {
                UPDDiskDevice.SyncState(ser);
            }

            ser.Sync("tapeMediaIndex", ref tapeMediaIndex);
            TapeMediaIndex = tapeMediaIndex;

            ser.Sync("diskMediaIndex", ref diskMediaIndex);
            DiskMediaIndex = diskMediaIndex;

            TapeDevice.SyncState(ser);

            ser.EndSection();
        }
Exemple #2
0
        public void SyncState(Serializer ser)
        {
            ser.BeginSection("CPCMachine");
            ser.Sync("FrameCompleted", ref FrameCompleted);
            ser.Sync("OverFlow", ref OverFlow);
            ser.Sync("FrameCount", ref FrameCount);
            ser.Sync("_frameCycles", ref _frameCycles);
            ser.Sync("inputRead", ref inputRead);
            ser.Sync("LastFrameStartCPUTick", ref LastFrameStartCPUTick);
            ser.Sync("ROMLower", ref ROMLower, false);
            ser.Sync("ROM0", ref ROM0, false);
            ser.Sync("ROM7", ref ROM7, false);
            ser.Sync("RAM0", ref RAM0, false);
            ser.Sync("RAM1", ref RAM1, false);
            ser.Sync("RAM2", ref RAM2, false);
            ser.Sync("RAM3", ref RAM3, false);
            ser.Sync("RAM4", ref RAM4, false);
            ser.Sync("RAM5", ref RAM5, false);
            ser.Sync("RAM6", ref RAM6, false);
            ser.Sync("RAM7", ref RAM7, false);

            ser.Sync("UpperROMPosition", ref UpperROMPosition);
            ser.Sync("UpperROMPaged", ref UpperROMPaged);
            ser.Sync("LowerROMPaged", ref LowerROMPaged);
            ser.Sync("RAMConfig", ref RAMConfig);
            ser.Sync("RAM64KBank", ref RAM64KBank);

            CRCT.SyncState(ser);
            //CRT.SyncState(ser);
            GateArray.SyncState(ser);
            KeyboardDevice.SyncState(ser);
            TapeBuzzer.SyncState(ser);
            AYDevice.SyncState(ser);

            ser.Sync("tapeMediaIndex", ref tapeMediaIndex);
            if (ser.IsReader)
            {
                TapeMediaIndex = tapeMediaIndex;
            }

            TapeDevice.SyncState(ser);

            ser.Sync("diskMediaIndex", ref diskMediaIndex);
            if (ser.IsReader)
            {
                DiskMediaIndex = diskMediaIndex;
            }

            if (UPDDiskDevice != null)
            {
                UPDDiskDevice.SyncState(ser);
            }

            ser.EndSection();
        }
Exemple #3
0
        public void SyncState(Serializer ser)
        {
            ser.BeginSection("CPCMachine");
            ser.Sync(nameof(FrameCompleted), ref FrameCompleted);
            ser.Sync(nameof(OverFlow), ref OverFlow);
            ser.Sync(nameof(FrameCount), ref FrameCount);
            ser.Sync(nameof(_frameCycles), ref _frameCycles);
            ser.Sync(nameof(inputRead), ref inputRead);
            ser.Sync(nameof(LastFrameStartCPUTick), ref LastFrameStartCPUTick);
            ser.Sync(nameof(ROMLower), ref ROMLower, false);
            ser.Sync(nameof(ROM0), ref ROM0, false);
            ser.Sync(nameof(ROM7), ref ROM7, false);
            ser.Sync(nameof(RAM0), ref RAM0, false);
            ser.Sync(nameof(RAM1), ref RAM1, false);
            ser.Sync(nameof(RAM2), ref RAM2, false);
            ser.Sync(nameof(RAM3), ref RAM3, false);
            ser.Sync(nameof(RAM4), ref RAM4, false);
            ser.Sync(nameof(RAM5), ref RAM5, false);
            ser.Sync(nameof(RAM6), ref RAM6, false);
            ser.Sync(nameof(RAM7), ref RAM7, false);

            ser.Sync(nameof(UpperROMPosition), ref UpperROMPosition);
            ser.Sync(nameof(UpperROMPaged), ref UpperROMPaged);
            ser.Sync(nameof(LowerROMPaged), ref LowerROMPaged);
            ser.Sync(nameof(RAMConfig), ref RAMConfig);
            ser.Sync(nameof(RAM64KBank), ref RAM64KBank);

            CRCT.SyncState(ser);
            //CRT.SyncState(ser);
            GateArray.SyncState(ser);
            KeyboardDevice.SyncState(ser);
            TapeBuzzer.SyncState(ser);
            AYDevice.SyncState(ser);

            ser.Sync(nameof(tapeMediaIndex), ref tapeMediaIndex);
            if (ser.IsReader)
            {
                TapeMediaIndex = tapeMediaIndex;
            }

            TapeDevice.SyncState(ser);

            ser.Sync(nameof(diskMediaIndex), ref diskMediaIndex);
            if (ser.IsReader)
            {
                DiskMediaIndex = diskMediaIndex;
            }

            if (UPDDiskDevice != null)
            {
                UPDDiskDevice.SyncState(ser);
            }

            ser.EndSection();
        }
Exemple #4
0
        public void SyncState(Serializer ser)
        {
            ser.BeginSection("ZXMachine");
            ser.Sync(nameof(FrameCompleted), ref FrameCompleted);
            ser.Sync(nameof(OverFlow), ref OverFlow);
            ser.Sync(nameof(FrameCount), ref FrameCount);
            ser.Sync(nameof(_frameCycles), ref _frameCycles);
            ser.Sync(nameof(inputRead), ref inputRead);
            ser.Sync(nameof(LastFrameStartCPUTick), ref LastFrameStartCPUTick);
            ser.Sync(nameof(LastULAOutByte), ref LastULAOutByte);
            ser.Sync(nameof(ROM0), ref ROM0, false);
            ser.Sync(nameof(ROM1), ref ROM1, false);
            ser.Sync(nameof(ROM2), ref ROM2, false);
            ser.Sync(nameof(ROM3), ref ROM3, false);
            ser.Sync(nameof(RAM0), ref RAM0, false);
            ser.Sync(nameof(RAM1), ref RAM1, false);
            ser.Sync(nameof(RAM2), ref RAM2, false);
            ser.Sync(nameof(RAM3), ref RAM3, false);
            ser.Sync(nameof(RAM4), ref RAM4, false);
            ser.Sync(nameof(RAM5), ref RAM5, false);
            ser.Sync(nameof(RAM6), ref RAM6, false);
            ser.Sync(nameof(RAM7), ref RAM7, false);
            ser.Sync(nameof(ROMPaged), ref ROMPaged);
            ser.Sync(nameof(SHADOWPaged), ref SHADOWPaged);
            ser.Sync(nameof(RAMPaged), ref RAMPaged);
            ser.Sync(nameof(PagingDisabled), ref PagingDisabled);
            ser.Sync(nameof(SpecialPagingMode), ref SpecialPagingMode);
            ser.Sync(nameof(PagingConfiguration), ref PagingConfiguration);
            ser.Sync(nameof(ROMhigh), ref ROMhigh);
            ser.Sync(nameof(ROMlow), ref ROMlow);
            ser.Sync(nameof(LastContendedReadByte), ref LastContendedReadByte);

            KeyboardDevice.SyncState(ser);
            BuzzerDevice.SyncState(ser);
            TapeBuzzer.SyncState(ser);
            ULADevice.SyncState(ser);
            CPUMon.SyncState(ser);

            if (AYDevice != null)
            {
                AYDevice.SyncState(ser);
                ((AY38912)AYDevice).PanningConfiguration = Spectrum.Settings.AYPanConfig;
            }

            ser.Sync(nameof(tapeMediaIndex), ref tapeMediaIndex);
            if (ser.IsReader)
            {
                IsLoadState    = true;
                TapeMediaIndex = tapeMediaIndex;
                IsLoadState    = false;
            }

            TapeDevice.SyncState(ser);

            ser.Sync(nameof(diskMediaIndex), ref diskMediaIndex);
            if (ser.IsReader)
            {
                IsLoadState    = true;
                DiskMediaIndex = diskMediaIndex;
                IsLoadState    = false;
            }

            UPDDiskDevice?.SyncState(ser);

            ser.EndSection();
        }