示例#1
0
        public virtual bool Execute(Clock clock, out ClockEntry next)
        {
            _op.Execute(clock, 0);
            next = _next;

            return(_comboNext);
        }
示例#2
0
        public void Prolong(byte cycles, byte phase)
        {
            if (cycles > 0)
            {
                ClockEntry stall = cycles > 1 ? new ClockEntryRep(new StallOp(), cycles) : new ClockEntry(new StallOp());

                stall.Next = _currentOps[phase].Next;
                _currentOps[phase].Next = stall;
            }
        }
示例#3
0
        protected void WritePhaseToDeviceState(C64Interfaces.IFile stateFile, byte phase)
        {
            byte opCount = 0;

            for (ClockEntry op = _currentOps[phase]; op != null; op = op.Next)
            {
                opCount++;
            }

            stateFile.Write(opCount);

            for (ClockEntry op = _currentOps[phase]; op != null; op = op.Next)
            {
                op.WriteToStateFile(stateFile);
            }
        }
示例#4
0
        public override bool Execute(Clock clock, out ClockEntry next)
        {
            _op.Execute(clock, _cycle);

            _cycle = (byte)((_cycle + 1) % _length);
            if (_cycle == 0)
            {
                next = _next;
                return(_comboNext);
            }
            else
            {
                next = this;
                return(false);
            }
        }
示例#5
0
        protected void ReadPhaseFromDeviceState(C64Interfaces.IFile stateFile, byte phase)
        {
            ClockEntry previousOp = null;
            byte       opCount    = stateFile.ReadByte();

            for (byte i = 0; i < opCount; i++)
            {
                ClockEntry op = stateFile.ReadByte() == 0 ? new ClockEntry(stateFile, _opFactory) : new ClockEntryRep(stateFile, _opFactory);

                if (previousOp == null)
                {
                    _currentOps[phase] = op;
                }
                else
                {
                    previousOp.Next = op;
                }

                previousOp = op;
            }
        }
示例#6
0
        public override bool Execute(Clock clock, out ClockEntry next)
        {
            _op.Execute(clock, _cycle);

            _cycle = (byte)((_cycle + 1) % _length);
            if (_cycle == 0)
            {
                next = _next;
                return _comboNext;
            }
            else
            {
                next = this;
                return false;
            }
        }
示例#7
0
        public virtual bool Execute(Clock clock, out ClockEntry next)
        {
            _op.Execute(clock, 0);
            next = _next;

            return _comboNext;
        }
示例#8
0
 public void QueueOpsStart(ClockEntry first, byte phase)
 {
     _currentOps[phase] = first;
 }
示例#9
0
 public void QueueOps(ClockEntry ops, byte phase)
 {
     _currentOps[phase].Next = ops;
 }
示例#10
0
 public void QueueOps(ClockEntry ops, byte phase)
 {
     _currentOps[phase].Next = ops;
 }
示例#11
0
 public void QueueOpsStart(ClockEntry first, byte phase)
 {
     _currentOps[phase] = first;
 }