summaryrefslogtreecommitdiffhomepage
path: root/Private/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Private/Source')
-rw-r--r--Private/Source/KernelMain.cxx49
1 files changed, 48 insertions, 1 deletions
diff --git a/Private/Source/KernelMain.cxx b/Private/Source/KernelMain.cxx
index e1fba478..e641c7e9 100644
--- a/Private/Source/KernelMain.cxx
+++ b/Private/Source/KernelMain.cxx
@@ -10,7 +10,9 @@
#include <ArchKit/ArchKit.hpp>
#include <EFIKit/Handover.hxx>
#include <KernelKit/FileManager.hpp>
+#include <KernelKit/Framebuffer.hpp>
#include <KernelKit/PEFCodeManager.hxx>
+#include <KernelKit/Rsrc/HCore.hxx>
#include <NewKit/Json.hpp>
#include <NewKit/KernelHeap.hpp>
#include <NewKit/UserHeap.hpp>
@@ -30,7 +32,7 @@ EXTERN_C void RuntimeMain(
/// Init the HAL.
MUST_PASS(HCore::ke_init_hal());
- if (!HandoverHeader->f_LiteEdition) {
+ if (HandoverHeader->f_Bootloader == 0xDD) {
/// Mount a New partition.
HCore::IFilesystemManager::Mount(new HCore::NewFilesystemManager());
@@ -42,6 +44,51 @@ EXTERN_C void RuntimeMain(
HCore::ke_stop(RUNTIME_CHECK_BOOTSTRAP);
}
} else {
+ /**
+ ** This draws the background.
+ */
+
+ for (HCore::SizeT i = 0ul; i < HandoverHeader->f_GOP.f_Width; ++i) {
+ for (HCore::SizeT u = 0ul; u < HandoverHeader->f_GOP.f_Height; ++u) {
+ *(((volatile HCore::UInt32*)(HandoverHeader->f_GOP.f_The +
+ 4 * HandoverHeader->f_GOP.f_PixelPerLine *
+ i +
+ 4 * u))) = RGB(20, 20, 20);
+ }
+ }
+
+ /**
+ ** This draws the HCore resource icon..
+ */
+
+ HCore::SizeT uA = 0;
+
+ for (HCore::SizeT i = 10ul; i < HCORELOGO_WIDTH + 10; ++i) {
+ for (HCore::SizeT u = 10ul; u < HCORELOGO_HEIGHT + 10; ++u) {
+ if (HCoreLogo[uA] == 0) {
+ *(((volatile HCore::UInt32*)(HandoverHeader->f_GOP.f_The +
+ 4 *
+ HandoverHeader->f_GOP
+ .f_PixelPerLine *
+ i +
+ 4 * u))) |= HCoreLogo[uA];
+ } else {
+ *(((volatile HCore::UInt32*)(HandoverHeader->f_GOP.f_The +
+ 4 *
+ HandoverHeader->f_GOP
+ .f_PixelPerLine *
+ i +
+ 4 * u))) = HCoreLogo[uA];
+ }
+
+ ++uA;
+ }
+ }
+
+ /**
+ This mounts the NewFS drive.
+ */
+
HCore::kcout << "HCoreKrnl: Setup is starting...\n";
HCore::kcout << "HCoreKrnl: Mounting drive A: ...\n";
}