Exemplo n.º 1
0
 public void Install(IBusDevice device)
 {
     if (!Tracers.ContainsKey(device) && !Devices.Contains(device))
     {
         Devices.Insert(0, device);
     }
 }
Exemplo n.º 2
0
        public void ConnectDevice(IBusDevice device)
        {
            if (!_connectedDevices.Contains(device))
            {
                _connectedDevices.Add(device);
            }

            device.ConnectToBus(this);
        }
Exemplo n.º 3
0
 public void Uninstall(IBusDevice device)
 {
     if (Tracers.ContainsKey(device))
     {
         var tracer = Tracers[device];
         Tracers.Remove(device);
         Devices.Remove(tracer);
     }
     else
     {
         Devices.Remove(device);
     }
 }
Exemplo n.º 4
0
        public ITracer InstallTraced(IBusDevice device)
        {
            if (Tracers.ContainsKey(device))
            {
                return(Tracers[device]);
            }

            if (Devices.Contains(device))
            {
                Devices.Remove(device);
            }

            var tracer = new DeviceTracer(device);

            Tracers[device] = tracer;
            Devices.Insert(0, tracer);
            return(tracer);
        }
Exemplo n.º 5
0
 public Mcp23x1x(IBusDevice device, int deviceAddress, int reset = -1, int interruptA = -1, int interruptB = -1)
     : base(device, deviceAddress, reset, interruptA, interruptB)
 {
 }
Exemplo n.º 6
0
 /// <summary>
 /// Create a CPU device using the specified device as a read/write target.
 /// </summary>
 /// <param name="name">Name of the CPU device.</param>
 /// <param name="busDevice">Device to target with read/write operations.</param>
 public Cpu6502Device(string name, IBusDevice busDevice) : base(name)
 {
     _cpu      = new Mos6502(new Mos6502Configuration(0xFF, false, _busRead, _busWrite, () => busDevice.Rdy, () => busDevice.Irq, () => busDevice.Nmi));
     _busWrite = busDevice.CpuWrite;
     _busRead  = busDevice.CpuRead;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Create a PPU device.
 /// </summary>
 /// <param name="name">Name of the device.</param>
 /// <param name="system">System to perform reads from.</param>
 public PpuDevice(string name, IBusDevice system) : base(name)
 {
     _system = system;
 }
Exemplo n.º 8
0
 public BusDeviceInterface(IBusDevice device, int selectMask, int chipSelect)
 {
     BusDevice        = device;
     DeviceSelectMask = selectMask;
     DeviceChipSelect = chipSelect;
 }
Exemplo n.º 9
0
 public CPU(IBusDevice bus) : base(bus)
 {
 }
Exemplo n.º 10
0
 public CPU(IBusDevice bus, e6502Type cpuType) : base(bus, cpuType)
 {
 }
Exemplo n.º 11
0
 public Mcp23x0x(IBusDevice device, int deviceAddress, int reset = -1, int interrupt = -1)
     : base(device, deviceAddress, reset, interrupt)
 {
 }
Exemplo n.º 12
0
 public McpMock(IBusDevice device, BankStyle bankStyle)
     : base(device, 0x20, bankStyle: bankStyle)
 {
 }
Exemplo n.º 13
0
 public DeviceTracer(IBusDevice subject)
 {
     _subject = subject;
     Enabled  = true;
 }
Exemplo n.º 14
0
 public void ConnectDevice(IBusDevice device)
 {
 }