Inheritance: IDevice, INeedsMMIO
コード例 #1
0
ファイル: XNAUI.cs プロジェクト: cryogen/VM86CS
        public XNAUI(Form UIForm, VGA device)
            : base(UIForm, device)
        {
            Panel panel = new Panel();

            panel.Location = new System.Drawing.Point(0, 0);
            panel.ClientSize = UIForm.ClientSize;
            UIForm.Controls.Add(panel);
            renderControl = panel;
            oldKeyboardState = Keyboard.GetState();
            UIForm.Show();
        }
コード例 #2
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;
        }
コード例 #3
0
ファイル: SDLUI.cs プロジェクト: cryogen/VM86CS
 public SDLUI(Form uiForm, VGA device)
     : base(uiForm, device)
 {
     UIForm = uiForm;
     UIForm.Close();
 }
コード例 #4
0
ファイル: UI.cs プロジェクト: cryogen/VM86CS
 public UI(Form uiForm, VGA device)
 {
     vgaDevice = device;
 }