コード例 #1
0
 public SpectrumMemoryContents(IMemoryDevice memoryDevice, IZ80Cpu cpu)
 {
     _memoryDevice = memoryDevice;
     if (!(cpu is IZ80CpuTestSupport runSupport))
     {
         throw new ArgumentException("The cpu instance should implement IZ80CpuTestSupport", nameof(cpu));
     }
     ReadTrackingState  = new AddressTrackingState(runSupport.MemoryReadStatus);
     WriteTrackingState = new AddressTrackingState(runSupport.MemoryReadStatus);
 }
コード例 #2
0
 /// <summary>
 /// Binds this instance to the specified Z80 CPU instance
 /// </summary>
 /// <param name="cpu"></param>
 internal CpuZ80(IZ80Cpu cpu)
 {
     _cpu = cpu;
     _cpu.StackDebugSupport = new ScriptingStackDebugSupport();
     if (!(cpu is IZ80CpuTestSupport runSupport))
     {
         throw new ArgumentException("The cpu instance should implement IZ80CpuTestSupport",
                                     nameof(cpu));
     }
     OperationTrackingState = new AddressTrackingState(runSupport.ExecutionFlowStatus);
 }