Update VBEDriver.cs

This commit is contained in:
hannah 2016-12-31 01:52:53 +00:00 committed by GitHub
parent 72c0143918
commit dc47fa3c4c

View file

@ -10,7 +10,12 @@ namespace Cosmos.HAL.Drivers
{
private Core.IOGroup.VBE IO = Core.Global.BaseIOGroups.VBE;
public VBEDriver()
{
if (Cosmos.HAL.PCI.GetDevice(1234, 1111) == null){
throw new Exception("No BGA adapter found..");
}
}
private void vbe_write(ushort index, ushort value)
{
IO.VbeIndex.Word = index;
@ -19,9 +24,7 @@ namespace Cosmos.HAL.Drivers
public void vbe_set(ushort xres, ushort yres, ushort bpp)
{
if (Cosmos.HAL.PCI.GetDevice(1234, 1111) == null){
throw new Exception("No BGA adapter found..");
}
//Disable Display
vbe_write(0x4, 0x00);
//Set Display Xres