Exemple #1
0
        public void ReadDeviceState(IFile stateFile)
        {
            stateFile.ReadBytes(_registers);
            _colorRam.ReadDeviceState(stateFile);
            _rasterLine.ReadDeviceState(stateFile);
            stateFile.ReadWords(_collisionMatrix);
            stateFile.ReadWords(_spritePointers);

            for (int i = 0; i < _sDataBuffer.Length; i++)
                _sDataBuffer[i].ReadDeviceState(stateFile);

            stateFile.ReadBytes(_videoMatrix);
            _xCoord = stateFile.ReadWord();
            _vmliRead = stateFile.ReadByte();
            _vmliWrite = stateFile.ReadByte();
            _vc = stateFile.ReadWord();
            _vcBase = stateFile.ReadWord();
            _rc = stateFile.ReadByte();
            stateFile.ReadBytes(_mc);
            stateFile.ReadBytes(_mcBase);

            stateFile.ReadBools(_yExpandFlip);
            stateFile.ReadBools(_spriteDMA);
            stateFile.ReadBools(_spriteDisplay);

            _auxBorderFlip = stateFile.ReadBool();
            _displayState = stateFile.ReadBool();
            _badLine = stateFile.ReadBool();
            _rasterComparison = stateFile.ReadWord();
            _raster = stateFile.ReadWord();

            _borderColor = stateFile.ReadDWord();
            stateFile.ReadDWords(_backGroundColor);

            _topBorder = stateFile.ReadWord();
            _bottomBorder = stateFile.ReadWord();
            _leftBorder = stateFile.ReadWord();
            _rightBorder = stateFile.ReadWord();

            _memoryBank = stateFile.ReadWord();
            _videoMemoryBase = stateFile.ReadWord();
            _charGenMemoryBase = stateFile.ReadWord();
            _bitmapMemoryBase = stateFile.ReadWord();

            _graphicMode = _graphicModes[((_registers[(ushort)Registers.CR_2] & (byte)CR2.MCM) | (_registers[(ushort)Registers.CR_1] & (byte)(CR1.ECM | CR1.BMM))) >> 4];
        }
Exemple #2
0
 public void ReadDeviceState(IFile stateFile)
 {
     _bits = stateFile.ReadDWord();
     _bitCount = stateFile.ReadByte();
     _emptyMultiplier = stateFile.ReadBool();
     _multiplierData = stateFile.ReadByte();
 }