Пример #1
0
        private void ExecuteSystem()
        {
            Via0.Ca1 = ViaReadAtn();
            Via0.ExecutePhase();
            Via1.ExecutePhase();

            // SO pin pipeline
            if ((_overflowFlagDelaySr & 0x01) != 0)
            {
                _cpu.SetOverflow();
            }

            _overflowFlagDelaySr >>= 1;

            _cpu.IRQ = !(Via0.Irq && Via1.Irq);             // active low IRQ line
            _cpu.ExecuteOne();

            if (_ledEnabled)
            {
                _driveLightOffTime = 25000;
            }
            else if (_driveLightOffTime > 0)
            {
                _driveLightOffTime--;
            }
        }
Пример #2
0
        private void ExecutePhaseInternal()
        {
            Via0.Ca1 = ViaReadAtn();

            // clock output from 325572-01 drives CPU clock (phi0)
            ExecuteMotor();
            ExecuteFlux();
            Via0.ExecutePhase();
            Via1.ExecutePhase();

            // SO pin pipeline
            if ((_overflowFlagDelaySr & 0x01) != 0)
            {
                _cpu.SetOverflow();
            }
            _overflowFlagDelaySr >>= 1;

            _cpu.IRQ = !(Via0.Irq && Via1.Irq); // active low IRQ line
            _cpu.ExecuteOne();

            _via0PortBtemp = Via0.EffectivePrB;
            _ledEnabled    = (_via0PortBtemp & 0x08) != 0;

            if (_ledEnabled)
            {
                _driveLightOffTime = 1000000;
            }
            else if (_driveLightOffTime > 0)
            {
                _driveLightOffTime--;
            }
        }