Esempio n. 1
0
        public void ReadDeviceState(C64Interfaces.IFile stateFile)
        {
            _portA.ReadDeviceState(stateFile);
            _portB.ReadDeviceState(stateFile);

            _pcState   = stateFile.ReadBool();
            _todPause  = stateFile.ReadBool();
            _todLatch  = stateFile.ReadBool();
            _todClkCnt = stateFile.ReadByte();
            stateFile.ReadBytes(_todLimits);

            for (int i = 0; i < _tod.GetLength(0); i++)
            {
                for (int j = 0; j < _tod.GetLength(1); j++)
                {
                    _tod[i, j] = stateFile.ReadByte();
                }
            }

            stateFile.ReadBytes(_interruptRegisters);
            _serialRegister = stateFile.ReadByte();
            _flag           = stateFile.ReadBool();
            _cntState       = stateFile.ReadBool();
            _cntEdge        = stateFile.ReadBool();

            _timerA.ReadDeviceState(stateFile);
            _timerB.ReadDeviceState(stateFile);
        }
Esempio n. 2
0
        public void ReadDeviceState(C64Interfaces.IFile stateFile)
        {
            _portA.ReadDeviceState(stateFile);
            _portB.ReadDeviceState(stateFile);

            _latchPortA    = stateFile.ReadBool();
            _latchedValueA = stateFile.ReadByte();
            _ca1           = stateFile.ReadBool();
            _ca2           = stateFile.ReadBool();
            _latchPortB    = stateFile.ReadBool();
            _latchedValueB = stateFile.ReadByte();
            _cb1           = stateFile.ReadBool();
            _pulseCA2      = stateFile.ReadBool();
            _cb2           = stateFile.ReadBool();
            _pulseCB2      = stateFile.ReadBool();

            _t1Counter = stateFile.ReadWord();
            _t1Latch   = stateFile.ReadWord();
            _t1Count   = stateFile.ReadBool();
            _t1OutPB   = stateFile.ReadBool();
            _t1FreeRun = stateFile.ReadBool();
            _t2Counter = stateFile.ReadWord();
            _t2Latch   = stateFile.ReadByte();
            _t2Count   = stateFile.ReadBool();
            _t2InPB    = stateFile.ReadBool();

            _functionControlRegister  = stateFile.ReadByte();
            _auxiliaryControlRegister = stateFile.ReadByte();
            _interruptFlagRegister    = stateFile.ReadByte();
            _interruptEnabledRegister = stateFile.ReadByte();
        }