/// <summary> /// Initializes a new instance of the <see cref="VGAConsole"/> class. /// </summary> public VGAConsole(SimCPU simCPU, ISimDisplay dislayForm) : base(simCPU) { this.dislayForm = dislayForm; this.IsMemoryMonitor = true; ioBase = StandardIOBase; baseAddress = StandardAddressBase; width = 80; height = 27; cursorPosition = 0; lastCommand = 0; font = new Font("Lucida Console", 9, FontStyle.Regular); //font = new Font("Consolas", 8, FontStyle.Regular); fontWidth = (int)font.SizeInPoints; fontHeight = (int)font.SizeInPoints + 5; bitmap = new System.Drawing.Bitmap(fontWidth * width, fontHeight * height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); graphic = Graphics.FromImage(bitmap); dislayForm.SetBitMap(bitmap); }
public SimStandardPCAdapter(ISimDisplay simDisplay) { CPU.AddDevice(new PowerUp(CPU)); CPU.AddDevice(new CMOS(CPU)); CPU.AddDevice(new VGAConsole(CPU, simDisplay)); CPU.AddDevice(new Multiboot(CPU)); CPU.AddDevice(new MosaKernel(CPU)); CPU.AddDevice(new MosaImage(CPU)); }
/// <summary> /// Initializes a new instance of the <see cref="VGAConsole"/> class. /// </summary> public VGAConsole(SimCPU simCPU, ISimDisplay dislayForm) : base(simCPU) { this.dislayForm = dislayForm; IsMemoryMonitor = true; ioBase = StandardIOBase; baseAddress = StandardAddressBase; width = 80; height = 27; cursorPosition = 0; lastCommand = 0; font = new Font("Lucida Console", 9, FontStyle.Regular); //font = new Font("Consolas", 8, FontStyle.Regular); fontWidth = (int)font.SizeInPoints; fontHeight = (int)font.SizeInPoints + 5; bitmap = new System.Drawing.Bitmap(fontWidth * width, fontHeight * height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); graphic = Graphics.FromImage(bitmap); dislayForm.SetBitMap(bitmap); }