public void Add (IDMAChannel dmaChannel) { if (dmaChannelCount >= MaxDMAChannels) return; dmaChannels[dmaChannelCount++] = dmaChannel; }
public FloppyControllerAdapter(X8086 cpu) : base(cpu) { task = new TaskSC(this); this.sched = cpu.Sched; if (cpu.PIC != null) { this.irq = cpu.PIC.GetIrqLine((byte)6); } if (cpu.DMA != null) { this.dma = cpu.DMA.GetChannel(2); cpu.DMA.BindChannel(2, this); } curCylinder = new byte[4]; diskimg = new DiskImage[512]; regDOR = (byte)(0xC); ctlStepRateTime = (byte)0; ctlHeadUnloadTime = (byte)0; ctlHeadLoadTime = (byte)0; ctlNonDma = false; for (uint i = 0x3F0; i <= 0x3F7; i++) { ValidPortAddress.Add(i); } }
public FloppyDiskDriver(ushort ioBase) { base.name = "FDC_0x" + ioBase.ToString("X"); base.parent = null; // no parent base.deviceStatus = DeviceStatus.Initializing; this.ioBase = ioBase; floppyDrives = new FloppyDriveInfo[DrivesPerController]; floppyMedia = new FloppyMediaInfo[DrivesPerController]; trackCache = new TrackCache[DrivesPerController]; lastSeek = new LastSeek[DrivesPerController]; for (int drive = 0; drive < DrivesPerController; drive++) { trackCache[drive].buffer = new byte[FDC.MaxBytesPerTrack]; } ControllerCommands = base.CreateIOPort(ioBase); StatusPort = base.CreateIOPort(ioBase, 2); DataPort = base.CreateIOPort(ioBase, 3); ConfigPort = base.CreateIOPort(ioBase, 5); CMOSComand = base.CreateIOPort(0x70); CMOSResponse = base.CreateIOPort(0x71); floppyDMA = base.CreateDMAChannel(2); floppyIRQ = base.CreateIRQHandler(6); this.Initialize(); }
public void Add(IDMAChannel dmaChannel) { if (dmaChannelCount >= MaxDMAChannels) { return; } dmaChannels[dmaChannelCount++] = dmaChannel; }
public FloppyDiskDriver (ushort ioBase) { base.name = "FDC_0x" + ioBase.ToString ("X"); base.parent = null; // no parent base.deviceStatus = DeviceStatus.Initializing; this.ioBase = ioBase; floppyDrives = new FloppyDriveInfo[DrivesPerController]; floppyMedia = new FloppyMediaInfo[DrivesPerController]; trackCache = new TrackCache[DrivesPerController]; lastSeek = new LastSeek[DrivesPerController]; for (int drive = 0; drive < DrivesPerController; drive++) trackCache[drive].buffer = new byte[FDC.MaxBytesPerTrack]; ControllerCommands = base.CreateIOPort (ioBase); StatusPort = base.CreateIOPort (ioBase, 2); DataPort = base.CreateIOPort (ioBase, 3); ConfigPort = base.CreateIOPort (ioBase, 5); CMOSComand = base.CreateIOPort (0x70); CMOSResponse = base.CreateIOPort (0x71); floppyDMA = base.CreateDMAChannel (2); floppyIRQ = base.CreateIRQHandler (6); this.Initialize (); }