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(); }
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; }
public SDLUI(Form uiForm, VGA device) : base(uiForm, device) { UIForm = uiForm; UIForm.Close(); }
public UI(Form uiForm, VGA device) { vgaDevice = device; }