本文整理汇总了C#中Clock.QueueOps方法的典型用法代码示例。如果您正苦于以下问题:C# Clock.QueueOps方法的具体用法?C# Clock.QueueOps怎么用?C# Clock.QueueOps使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Clock
的用法示例。
在下文中一共展示了Clock.QueueOps方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public virtual void Execute(Clock.Clock clock, byte cycle)
{
Clock.ClockEntry first = null;
Clock.ClockEntry next = null;
if (_cpu.NMI.Check())
first = next = new Clock.ClockEntryRep(new InterruptOp(_cpu, 0xfffa), 7);
else if (_cpu.IRQ.IsRaised && !_cpu.State.P.IrqMask)
first = next = new Clock.ClockEntryRep(new InterruptOp(_cpu, 0xfffe), 7);
else
{
_cpu.Opcode = _cpu.Memory.Read(_cpu.State.PC.Value);
_cpu.State.PC.Next();
DecodingTable.Entry decoded = DecodingTable.Opcodes[_cpu.Opcode];
DecodeAddressOp addrOp = new DecodeAddressOp(_cpu, decoded._addressing);
ExecuteOpcodeOp execOp = new ExecuteOpcodeOp(_cpu, decoded._instruction, decoded._timing._prolongOnPageCross);
byte addrTime = decoded._timing._addressingTime;
byte execTime = decoded._timing._execTime;
first = addrTime < 2 ? new Clock.ClockEntry(addrOp, true) : new Clock.ClockEntryRep(addrOp, addrTime);
first.ComboNext = execTime == 0 || addrTime == 0;
next = first.Next = execTime < 2 ? new Clock.ClockEntry(execOp) : new Clock.ClockEntryRep(execOp, execTime);
sbyte writeCycles = decoded._timing._writeTime;
if (writeCycles >= 0)
{
if (writeCycles < 2)
{
next.ComboNext = writeCycles == 0;
next = next.Next = new Clock.ClockEntry(new WriteResultOp(_cpu));
}
else
{
next = next.Next = new Clock.ClockEntryRep(new Clock.StallOp(), (byte)(writeCycles - 1));
next = next.Next = new Clock.ClockEntry(new WriteResultOp(_cpu));
}
}
}
next.Next = new Clock.ClockEntry(new DecodeOpcodeOp(_cpu));
clock.QueueOps(first, _cpu.Phase);
}