Beispiel #1
0
        public TIA(DeserializationContext input, MachineBase m) : this()
        {
            if (input == null)
                throw new ArgumentNullException("input");
            if (m == null)
                throw new ArgumentNullException("m");

            M = m;
            TIASound = input.ReadTIASound(M, CPU_TICKS_PER_AUDIO_SAMPLE);

            input.CheckVersion(2);
            RegW = input.ReadExpectedBytes(0x40);
            HSync = input.ReadInt32();
            HMoveCounter = input.ReadInt32();
            ScanLine = input.ReadInt32();
            FrameBufferIndex = input.ReadInt32();
            //FrameBufferElement = input.ReadBufferElement();
            StartHMOVEClock = input.ReadUInt64();
            HMoveLatch = input.ReadBoolean();
            StartClock = input.ReadUInt64();
            P0 = input.ReadInt32();
            P0mmr = input.ReadBoolean();
            EffGRP0 = input.ReadByte();
            OldGRP0 = input.ReadByte();
            P0type = input.ReadInt32();
            P0suppress = input.ReadInt32();
            P1 = input.ReadInt32();
            P1mmr = input.ReadBoolean();
            EffGRP1 = input.ReadByte();
            OldGRP1 = input.ReadByte();
            P1type = input.ReadInt32();
            P1suppress = input.ReadInt32();
            M0 = input.ReadInt32();
            M0mmr = input.ReadBoolean();
            M0type = input.ReadInt32();
            M0size = input.ReadInt32();
            m0on = input.ReadBoolean();
            M1 = input.ReadInt32();
            M1mmr = input.ReadBoolean();
            M1type = input.ReadInt32();
            M1size = input.ReadInt32();
            m1on = input.ReadBoolean();
            BL = input.ReadInt32();
            BLmmr = input.ReadBoolean();
            OldENABL = input.ReadBoolean();
            BLsize = input.ReadInt32();
            blon = input.ReadBoolean();
            PF210 = input.ReadUInt32();
            PFReflectionState = input.ReadInt32();
            colubk = input.ReadByte();
            colupf = input.ReadByte();
            colup0 = input.ReadByte();
            colup1 = input.ReadByte();
            vblankon = input.ReadBoolean();
            scoreon = input.ReadBoolean();
            pfpriority = input.ReadBoolean();
            DumpEnabled = input.ReadBoolean();
            DumpDisabledCycle = input.ReadUInt64();
            Collisions = (TIACxPairFlags)input.ReadInt32();
            WSYNCDelayClocks = input.ReadInt32();
            EndOfFrame = input.ReadBoolean();
        }
Beispiel #2
0
        public TIA(DeserializationContext input, MachineBase m) : this()
        {
            if (input == null)
            {
                throw new ArgumentNullException("input");
            }
            if (m == null)
            {
                throw new ArgumentNullException("m");
            }

            M        = m;
            TIASound = input.ReadTIASound(M, CPU_TICKS_PER_AUDIO_SAMPLE);

            input.CheckVersion(2);
            RegW             = input.ReadExpectedBytes(0x40);
            HSync            = input.ReadInt32();
            HMoveCounter     = input.ReadInt32();
            ScanLine         = input.ReadInt32();
            FrameBufferIndex = input.ReadInt32();
            //FrameBufferElement = input.ReadBufferElement();
            StartHMOVEClock = input.ReadUInt64();
            HMoveLatch      = input.ReadBoolean();
            StartClock      = input.ReadUInt64();
            P0                = input.ReadInt32();
            P0mmr             = input.ReadBoolean();
            EffGRP0           = input.ReadByte();
            OldGRP0           = input.ReadByte();
            P0type            = input.ReadInt32();
            P0suppress        = input.ReadInt32();
            P1                = input.ReadInt32();
            P1mmr             = input.ReadBoolean();
            EffGRP1           = input.ReadByte();
            OldGRP1           = input.ReadByte();
            P1type            = input.ReadInt32();
            P1suppress        = input.ReadInt32();
            M0                = input.ReadInt32();
            M0mmr             = input.ReadBoolean();
            M0type            = input.ReadInt32();
            M0size            = input.ReadInt32();
            m0on              = input.ReadBoolean();
            M1                = input.ReadInt32();
            M1mmr             = input.ReadBoolean();
            M1type            = input.ReadInt32();
            M1size            = input.ReadInt32();
            m1on              = input.ReadBoolean();
            BL                = input.ReadInt32();
            BLmmr             = input.ReadBoolean();
            OldENABL          = input.ReadBoolean();
            BLsize            = input.ReadInt32();
            blon              = input.ReadBoolean();
            PF210             = input.ReadUInt32();
            PFReflectionState = input.ReadInt32();
            colubk            = input.ReadByte();
            colupf            = input.ReadByte();
            colup0            = input.ReadByte();
            colup1            = input.ReadByte();
            vblankon          = input.ReadBoolean();
            scoreon           = input.ReadBoolean();
            pfpriority        = input.ReadBoolean();
            DumpEnabled       = input.ReadBoolean();
            DumpDisabledCycle = input.ReadUInt64();
            Collisions        = (TIACxPairFlags)input.ReadInt32();
            WSYNCDelayClocks  = input.ReadInt32();
            EndOfFrame        = input.ReadBoolean();
        }