Skip to content

Commit

Permalink
Merge pull request #230 from aura-systems/impl-svgaIIconsole
Browse files Browse the repository at this point in the history
Merge SVGAII changes.
  • Loading branch information
valentinbreiz authored Jan 18, 2022
2 parents 5b64368 + 61fc71a commit 57b3299
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 40 deletions.
10 changes: 5 additions & 5 deletions Aura Operating System/Aura_Boot/Aura_Boot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<DebugEnabled>False</DebugEnabled>
<DebugMode>Source</DebugMode>
<IgnoreDebugStubAttribute>False</IgnoreDebugStubAttribute>
<ISOFile>bin\Debug\net5.0\Aura_OS.iso</ISOFile>
<ISOFile>bin\Debug\net5.0\Aura_Boot.iso</ISOFile>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<Profile>VMware</Profile>
<Description>Use VMware Player or Workstation to deploy and debug.</Description>
Expand All @@ -39,7 +39,7 @@
<ISO_PxeInterface>192.168.0.8</ISO_PxeInterface>
<ISO_EnableGDB>False</ISO_EnableGDB>
<ISO_StartCosmosGDB>False</ISO_StartCosmosGDB>
<ISO_ISOFile>bin\Debug\net5.0\Aura_OS.iso</ISO_ISOFile>
<ISO_ISOFile>bin\Debug\net5.0\Aura_Boot.iso</ISO_ISOFile>
<VMware_StackCorruptionDetectionEnabled>True</VMware_StackCorruptionDetectionEnabled>
<VMware_StackCorruptionDetectionLevel>MethodFooters</VMware_StackCorruptionDetectionLevel>
<VMware_Description>Use VMware Player or Workstation to deploy and debug.</VMware_Description>
Expand All @@ -53,7 +53,7 @@
<VMware_PxeInterface>192.168.0.8</VMware_PxeInterface>
<VMware_EnableGDB>False</VMware_EnableGDB>
<VMware_StartCosmosGDB>False</VMware_StartCosmosGDB>
<VMware_ISOFile>bin\Debug\net5.0\Aura_OS.iso</VMware_ISOFile>
<VMware_ISOFile>bin\Debug\net5.0\Aura_Boot.iso</VMware_ISOFile>
<VMware_VMwareEdition>Workstation</VMware_VMwareEdition>
<VMware_CompileVBEMultiboot>False</VMware_CompileVBEMultiboot>
<VMware_VBEResolution>800x600x32</VMware_VBEResolution>
Expand All @@ -72,7 +72,7 @@
<HyperV_VMwareEdition>Workstation</HyperV_VMwareEdition>
<HyperV_EnableGDB>False</HyperV_EnableGDB>
<HyperV_StartCosmosGDB>False</HyperV_StartCosmosGDB>
<HyperV_ISOFile>bin\Debug\net5.0\Aura_OS.iso</HyperV_ISOFile>
<HyperV_ISOFile>bin\Debug\net5.0\Aura_Boot.iso</HyperV_ISOFile>
<HyperV_CompileVBEMultiboot>False</HyperV_CompileVBEMultiboot>
<HyperV_VBEResolution>800x600x32</HyperV_VBEResolution>
<HyperV_ExtractMapFile>False</HyperV_ExtractMapFile>
Expand All @@ -90,7 +90,7 @@
<Bochs_VMwareEdition>Workstation</Bochs_VMwareEdition>
<Bochs_EnableGDB>False</Bochs_EnableGDB>
<Bochs_StartCosmosGDB>False</Bochs_StartCosmosGDB>
<Bochs_ISOFile>bin\Debug\net5.0\Aura_OS.iso</Bochs_ISOFile>
<Bochs_ISOFile>bin\Debug\net5.0\Aura_Boot.iso</Bochs_ISOFile>
<Bochs_CompileVBEMultiboot>False</Bochs_CompileVBEMultiboot>
<Bochs_VBEResolution>800x600x32</Bochs_VBEResolution>
<Bochs_ExtractMapFile>False</Bochs_ExtractMapFile>
Expand Down
8 changes: 4 additions & 4 deletions Aura Operating System/Aura_Boot/Kernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ protected override void BeforeRun()

#region Console Encoding Provider

if (Global.AConsole.Type == System.AConsole.ConsoleType.Graphical && Global.AConsole.Name != "SVGAII")
Encoding.RegisterProvider(CosmosEncodingProvider.Instance);

if (Global.AConsole.Type == System.AConsole.ConsoleType.Graphical)
{
Encoding.RegisterProvider(CosmosEncodingProvider.Instance);
Console.InputEncoding = Encoding.Unicode;
Console.OutputEncoding = Encoding.Unicode;
}
else if (Global.AConsole.Type == System.AConsole.ConsoleType.Text)
else
{
Encoding.RegisterProvider(CosmosEncodingProvider.Instance);
Console.InputEncoding = Encoding.GetEncoding(437);
Console.OutputEncoding = Encoding.GetEncoding(437);
}
Expand Down
2 changes: 1 addition & 1 deletion Aura Operating System/Aura_OS/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class Global

public static Setup setup = new Setup();
public static bool running;
public static string version = "0.5.2";
public static string version = "0.5.3";
public static string revision = VersionInfo.revision;
public static string current_directory = @"0:\";
public static string langSelected = "en_US";
Expand Down
2 changes: 1 addition & 1 deletion Aura Operating System/Aura_OS/Properties/VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ namespace Aura_OS
{
public class VersionInfo
{
public static string revision = "170120222212";
public static string revision = "180120220352";
}
}
24 changes: 12 additions & 12 deletions Aura Operating System/Aura_OS/System/CustomConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ public class CustomConsole
public static void WriteLineInfo(string text)
{
Console.ForegroundColor = ConsoleColor.Cyan;
Global.AConsole.Write("[Info] ".ToCharArray());
Console.Write("[Info] ");
Console.ForegroundColor = ConsoleColor.White;
Global.AConsole.Write((text + "\n").ToCharArray());
Console.Write(text + "\n");
Global.debugger.Send("[Info] " + text);
}
public static void WriteLineWarning(string text)
{
Console.ForegroundColor = ConsoleColor.Yellow;
Global.AConsole.Write("[WARNING] ".ToCharArray());
Console.Write("[WARNING] ");
Console.ForegroundColor = ConsoleColor.White;
Global.AConsole.Write((text + "\n").ToCharArray());
Console.Write(text + "\n");
Global.debugger.Send("[WARNING] " + text);
}
/// <summary>
Expand All @@ -35,29 +35,29 @@ public static void WriteLineWarning(string text)
/// <param name="tipColor"></param>
/// <param name="text"></param>
/// <param name="tipText"></param>
public static void WriteLineCustom(ConsoleColor tipColor,string text,string tipText)
public static void WriteLineCustom(ConsoleColor tipColor, string text, string tipText)
{
Console.ForegroundColor = tipColor;
Global.AConsole.Write(("[" + tipText + "] ").ToCharArray());
Console.Write("[" + tipText + "] ");
Console.ForegroundColor = ConsoleColor.White;
Global.AConsole.Write((text + "\n").ToCharArray());
Console.Write(text + "\n");
Global.debugger.Send("[" + tipText + "] " + text);
}
public static void WriteLineOK(string text)
{
Console.ForegroundColor = ConsoleColor.Green;
Global.AConsole.Write("[OK] ".ToCharArray());
Console.Write("[OK] ");
Console.ForegroundColor = ConsoleColor.White;
Global.AConsole.Write((text + "\n").ToCharArray());
Console.Write(text + "\n");
Global.debugger.Send("[OK] " + text);
}
public static void WriteLineError(string text)
{
Console.ForegroundColor = ConsoleColor.DarkRed;
Global.AConsole.Write(("[Error] ").ToCharArray());
Console.Write("[Error] ");
Console.ForegroundColor = ConsoleColor.White;
Global.AConsole.Write((text + "\n").ToCharArray());
Console.Write(text + "\n");
Global.debugger.Send("[Error] " + text);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Aura_OS.System.Shell.cmdIntr.Settings
{
class Settings
/*class Settings
{
private static string HelpInfo = "";
Expand All @@ -20,7 +20,7 @@ class Settings
public static string HI
{
get { return HelpInfo; }
set { HelpInfo = value; /*PUSHED OUT VALUE (in)*/}
set { HelpInfo = value; /*PUSHED OUT VALUE (in)*//*}
}
/// <summary>
Expand Down Expand Up @@ -176,5 +176,5 @@ public static void c_Settings(string settings)
}
}
}
}*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private ReturnInfo ExecuteHelp(bool showaliases)
Console.WriteLine(" (" + command.Description + ")");

count++;
if (count == Global.AConsole.Rows)
if (count == Global.AConsole.Rows - 3)
{
Console.ReadKey();
count = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public override ReturnInfo Execute()
{
Console.WriteLine(Conversion.D2(device.bus) + ":" + Conversion.D2(device.slot) + ":" + Conversion.D2(device.function) + " - " + "0x" + Conversion.D4(Conversion.DecToHex(device.VendorID)) + ":0x" + Conversion.D4(Conversion.DecToHex(device.DeviceID)) + " : " + DeviceClass.GetTypeString(device) + ": " + DeviceClass.GetDeviceString(device));
count++;
if (count == Global.AConsole.Rows)
if (count == Global.AConsole.Rows - 4)
{
Console.ReadKey();
count = 0;
Expand Down
10 changes: 2 additions & 8 deletions Aura Operating System/Aura_Plugs/HAL/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,9 @@ public static class Global

static public void Init(TextScreenBase textScreen, bool InitScrollWheel, bool InitPS2, bool InitNetwork, bool IDEInit)
{
Cosmos.HAL.Global.mDebugger.Send("Before Core.Global.Init");
Cosmos.Core.Global.Init();

PCI.Setup();
var _SVGAIIDevice = PCI.GetDevice(VendorID.VMWare, DeviceID.SVGAIIAdapter);

if (VBEAvailable() || (_SVGAIIDevice != null && PCI.Exists(_SVGAIIDevice)))
if (VBEAvailable())
{
Aura_OS.Global.AConsole = new Aura_OS.System.AConsole.GraphicConsole();
}
Expand All @@ -36,11 +32,10 @@ static public void Init(TextScreenBase textScreen, bool InitScrollWheel, bool In
Aura_OS.Global.AConsole = new Aura_OS.System.AConsole.VGAConsole(textScreen);
}

Aura_OS.Global.AConsole.Write(("[Aura Operating System v" + Aura_OS.Global.version + " - Made by valentinbreiz and geomtech]\n").ToCharArray());
Console.WriteLine("[Aura Operating System v" + Aura_OS.Global.version + " - Made by valentinbreiz and geomtech]");
Aura_OS.System.CustomConsole.WriteLineInfo("Starting Cosmos kernel...");

Aura_OS.System.CustomConsole.WriteLineOK("PCI Devices Scan");
Aura_OS.System.CustomConsole.WriteLineOK("Plugged Console");

ACPI.Start();
Aura_OS.System.CustomConsole.WriteLineOK("ACPI Initialization");
Expand All @@ -58,7 +53,6 @@ static public void Init(TextScreenBase textScreen, bool InitScrollWheel, bool In
Aura_OS.System.CustomConsole.WriteLineOK("Network Devices Initialization");

Aura_OS.System.CustomConsole.WriteLineOK("Kernel successfully initialized!");

}

/// <summary>
Expand Down
4 changes: 0 additions & 4 deletions Aura Operating System/Aura_Plugs/System/ConsoleImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -861,10 +861,6 @@ public static void Write(string aText)
{
GetConsole().Write(aText.ToCharArray());
}
else
{
GetConsole().Write(aText.ToCharArray());
}
}

public static void Write(uint aInt) => Write(aInt.ToString());
Expand Down

0 comments on commit 57b3299

Please sign in to comment.