상속: IDevice
예제 #1
0
파일: CMOS.cs 프로젝트: hmyit/VM86CS
        public CMOS(ATA ata)
        {
            statusA = 0x26; /* default 32.768 divider and default rate selection */
            statusB = 0x02; /* no DST, 12 hour clock, BCD, all flags cleared */
            statusC = 0x00;
            statusD = 0x80;

            ataDevice = ata;
        }
예제 #2
0
파일: CMOS.cs 프로젝트: cryogen/VM86CS
        public CMOS(ATA ata)
        {
            statusA = 0x26; /* default 32.768 divider and default rate selection */
            statusB = 0x02;  /* no DST, 12 hour clock, BCD, all flags cleared */
            statusC = 0x00;
            statusD = 0x80;

            ataDevice = ata;
        }
예제 #3
0
파일: Machine.cs 프로젝트: cryogen/VM86CS
        public Machine(Form uiForm)
        {
            picDevice = new PIC8259();
            vgaDevice = new VGA();
            FloppyDrive = new Floppy();
            dmaController = new DMAController();
            keyboard = new KeyboardDevice();
            ataDevice = new ATA();

            if(SystemConfig.Machine.Floppies.Count > 0)
            {
                FloppyDrive.MountImage(SystemConfig.Machine.Floppies[0].Image);
            }

            switch (Settings.Default.graphics.ToUpper())
            {
                case "XNA":
                    gui = new XNAUI(uiForm, vgaDevice);
                    break;
                case "SDL":
                    gui = new SDLUI(uiForm, vgaDevice);
                    break;
            }

            Application.Idle += new System.EventHandler(ApplicationIdle);

            gui.KeyDown += new EventHandler<UIntEventArgs>(GUIKeyDown);
            gui.KeyUp += new EventHandler<UIntEventArgs>(GUIKeyUp);

            gui.Init();

            devices = new IDevice[]
                          {
                              FloppyDrive, new CMOS(ataDevice), new Misc(), new PIT8253(), picDevice, keyboard, dmaController, vgaDevice, ataDevice
                          };

            CPU = new CPU.CPU();

            picDevice.Interrupt += PicDeviceInterrupt;

            SetupSystem();

            CPU.IORead += CPUIORead;
            CPU.IOWrite += CPUIOWrite;
        }