public IOProcessor(DSystem system)
        {
            _system   = system;
            _io       = new IOPIOBus();
            _mem      = new IOPMemoryBus(_io);
            _cpu      = new i8085(_mem, _io);
            _keyboard = new Keyboard();
            _mouse    = new Mouse();

            //
            // 8" floppy drive used by the IOP
            //
            _floppyDrive = new FloppyDrive(_system);

            //
            // Add devices to the IO bus
            //
            _miscIO           = new MiscIO(this);
            _floppyController = new FloppyController(_floppyDrive, _system);
            _dma    = new DMAController(this);
            _tty    = new Printer();
            _beeper = new Beeper();

            //
            // Register DMA devices with controller
            //
            _dma.RegisterDevice(_floppyController, 0);  // Floppy, DMA Channel 0
            _dma.RegisterDevice(_system.CP, 1);         // CP, DMA Channel 1

            _io.RegisterDevice(_miscIO);
            _io.RegisterDevice(_floppyController);
            _io.RegisterDevice(_dma);
            _io.RegisterDevice(_system.CP);
            _io.RegisterDevice(_tty);

            Reset();
        }
Example #2
0
 public FloppyController(FloppyDrive drive, DSystem system)
 {
     _system = system;
     _drive  = drive;
 }