diff --git a/Build.bat b/Build.bat
new file mode 100644
index 0000000..6ec1dee
--- /dev/null
+++ b/Build.bat
@@ -0,0 +1,2 @@
+"D:\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\amd64\MSBuild.exe" "CMLeonOS.csproj" /t:Build /p:Configuration=Fixed_Release /p:Platform=x64
+@REM "C:\Program Files (x86)\VMware\VMware Workstation\vmplayer.exe" "C:\Users\leon\AppData\Roaming\Cosmos User Kit\Build\VMware\Workstation\Cosmos.vmx"
\ No newline at end of file
diff --git a/CMLeonOS.csproj b/CMLeonOS.csproj
index be5e211..3a69ccd 100644
--- a/CMLeonOS.csproj
+++ b/CMLeonOS.csproj
@@ -15,7 +15,7 @@
False
Pipe: Cosmos\Serial
Serial: COM1
- VMware
+ HyperV
VMware
Use VMware Player or Workstation to deploy and debug.
192.168.0.8
@@ -30,7 +30,37 @@
800x600x32
+
+ 8
+
+
+
+ 8
+
+
+
+ 8
+
+
+
+ 8
+
+
+
+ 8
+
+
+
+ 8
+
+
+
+
+
+
+
+
diff --git a/Kernel.cs b/Kernel.cs
index 105a2c9..43a52d8 100644
--- a/Kernel.cs
+++ b/Kernel.cs
@@ -1,19 +1,23 @@
+using CMLeonOS.Logger;
+using CMLeonOS.Settings;
using Cosmos.HAL;
+using Cosmos.HAL.BlockDevice;
+using Cosmos.HAL.Drivers.Video;
using Cosmos.System.FileSystem;
using Cosmos.System.FileSystem.FAT;
using Cosmos.System.FileSystem.VFS;
+using Cosmos.System.Graphics;
+using Cosmos.System.Graphics.Fonts;
using Cosmos.System.Network.Config;
-using Cosmos.System.Network.IPv4.UDP.DHCP;
-using Cosmos.HAL.BlockDevice;
using Cosmos.System.Network.IPv4;
+using Cosmos.System.Network.IPv4.UDP.DHCP;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection.Metadata.Ecma335;
+using System.Security.Cryptography.X509Certificates;
using System.Text;
using Sys = Cosmos.System;
-using CMLeonOS.Logger;
-using CMLeonOS.Settings;
namespace CMLeonOS
{
@@ -31,9 +35,31 @@ namespace CMLeonOS
public static Cosmos.HAL.NetworkDevice NetworkDevice = null;
public static string IPAddress = "Unknown";
+
+ [IL2CPU.API.Attribs.ManifestResourceStream(ResourceName = "CMLeonOS.font.psf")]
+ public static readonly byte[] file;
protected override void BeforeRun()
{
+ // 我认了,我用默认字体
+ // try
+ // {
+ // PCScreenFont screenFont = PCScreenFont.LoadFont(file);
+ // VGAScreen.SetFont(screenFont.CreateVGAFont(), screenFont.Height);
+ // VGAScreen.SetGraphicsMode(VGADriver.ScreenSize.Size720x480, ColorDepth.ColorDepth32);
+ // }
+ // catch (Exception ex)
+ // {
+ // 我不认,我试着转换成Base64
+ // 我认了
+ PCScreenFont defaultFont = PCScreenFont.Default;
+ VGAScreen.SetFont(defaultFont.CreateVGAFont(), defaultFont.Height);
+ // Console.WriteLine($"{defaultFont.Height}");
+ // Console.WriteLine($"{defaultFont.Width}");
+ // VGAScreen.SetGraphicsMode(VGADriver.ScreenSize.Size720x480, ColorDepth.ColorDepth32);
+ // Console.WriteLine($"Error loading font: {ex.Message}");
+ // }
+
Console.WriteLine("Kernel load done!");
Console.WriteLine(@"-------------------------------------------------");
Console.WriteLine(@" ____ __ __ _ ___ ____ ");
diff --git a/font.psf b/font.psf
new file mode 100644
index 0000000..0a78e48
Binary files /dev/null and b/font.psf differ
diff --git a/shell/Shell.cs b/shell/Shell.cs
index 966f731..cae0044 100644
--- a/shell/Shell.cs
+++ b/shell/Shell.cs
@@ -19,7 +19,6 @@ using Cosmos.Core.Memory;
using UniLua;
using Cosmos.HAL;
using CMLeonOS.Commands;
-
namespace CMLeonOS
{
public class Shell