public VBEScreen() : base() { Global.mDebugger.SendInternal($"Creating new VBEScreen() with default mode {defaultGraphicMode}"); // We don't need to add a Control for defaultGraphicMode we assume it to be always a valid mode VBEDriver = new VBEDriver((ushort)defaultGraphicMode.Columns, (ushort)defaultGraphicMode.Rows, (ushort)defaultGraphicMode.ColorDepth); }
public VBEScreen(Mode mode) : base(mode) { Global.mDebugger.SendInternal($"Creating new VBEScreen() with mode {mode.Columns}x{mode.Rows}x{(uint)mode.ColorDepth}"); ThrowIfModeIsNotValid(mode); VBEDriver = new VBEDriver((ushort)mode.Columns, (ushort)mode.Rows, (ushort)mode.ColorDepth); }
public VBECanvas(Mode aMode) { Global.mDebugger.SendInternal($"Creating new VBEScreen() with mode {aMode.Columns}x{aMode.Rows}x{(uint)aMode.ColorDepth}"); ThrowIfModeIsNotValid(aMode); _VBEDriver = new VBEDriver((ushort)aMode.Columns, (ushort)aMode.Rows, (ushort)aMode.ColorDepth); Mode = aMode; }
/// <summary> /// Create new instance of the <see cref="VBEScreen"/> class. /// </summary> /// <param name="mode">VBE mode.</param> /// <exception cref="ArgumentOutOfRangeException">Thrown if mode is not suppoted.</exception> public VBECanvas(Mode aMode) { Global.mDebugger.SendInternal($"Creating new VBEScreen() with mode {aMode.Columns}x{aMode.Rows}x{(uint)aMode.ColorDepth}"); if (Core.VBE.IsAvailable()) { Core.VBE.ModeInfo ModeInfo = Core.VBE.getModeInfo(); aMode = new Mode(ModeInfo.width, ModeInfo.height, (ColorDepth)ModeInfo.bpp); Global.mDebugger.SendInternal($"Detected VBE VESA with {aMode.Columns}x{aMode.Rows}x{(uint)aMode.ColorDepth}"); } ThrowIfModeIsNotValid(aMode); _VBEDriver = new VBEDriver((ushort)aMode.Columns, (ushort)aMode.Rows, (ushort)aMode.ColorDepth); Mode = aMode; }
/// <summary> /// Checks whether the Bochs Graphics Adapter exists (not limited to Bochs) /// </summary> /// <returns></returns> public static bool BGAExists() { return(VBEDriver.ISAModeAvailable()); }