Ejemplo n.º 1
0
        public TIA(MachineBase m) : this()
        {
            if (m == null)
            {
                throw new ArgumentNullException("m");
            }

            M        = m;
            TIASound = new TIASound(M, CPU_TICKS_PER_AUDIO_SAMPLE);
        }
Ejemplo n.º 2
0
        public Maria(Machine7800 m, int scanlines)
        {
            if (m == null)
            {
                throw new ArgumentNullException("m");
            }

            M = m;
            InitializeVisibleScanlineValues(scanlines);
            TIASound = new TIASound(M, CPU_TICKS_PER_AUDIO_SAMPLE);
        }
Ejemplo n.º 3
0
        public TIA(MachineBase m) : this()
        {
            if (m == null)
                throw new ArgumentNullException("m");

            M = m;
            TIASound = new TIASound(M, CPU_TICKS_PER_AUDIO_SAMPLE);
        }
Ejemplo n.º 4
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();
        }
Ejemplo n.º 5
0
 public TIASound ReadTIASound(MachineBase m, int cpuClocksPerSample)
 {
     var tiaSound = new TIASound(this, m, cpuClocksPerSample);
     return tiaSound;
 }
        public TIASound ReadTIASound(MachineBase m, int cpuClocksPerSample)
        {
            var tiaSound = new TIASound(this, m, cpuClocksPerSample);

            return(tiaSound);
        }
Ejemplo n.º 7
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();
        }
Ejemplo n.º 8
0
 public void Write(TIASound tiaSound)
 {
     tiaSound.GetObjectData(this);
 }
Ejemplo n.º 9
0
        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();
        }
Ejemplo n.º 10
0
        public Maria(Machine7800 m, int scanlines)
        {
            if (m == null)
                throw new ArgumentNullException("m");

            M = m;
            InitializeVisibleScanlineValues(scanlines);
            TIASound = new TIASound(M, CPU_TICKS_PER_AUDIO_SAMPLE);
        }
Ejemplo n.º 11
0
        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();
        }
Ejemplo n.º 12
0
 public void Write(TIASound tiaSound)
 {
     tiaSound.GetObjectData(this);
 }