diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-02-07 09:25:08 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-02-07 09:25:08 +0100 |
| commit | 513077cfec0ea87303ba19502c368f5adcc8ed99 (patch) | |
| tree | 8ed03e4ebbd78366b7e8ce6c3647e990261d521d /dev/Kernel/HALKit/AMD64/HalDebugOutput.cc | |
| parent | d282d5301dcc7d46c2d9a40a71eecfc1f674b107 (diff) | |
ADD: VGA logging and tweaks.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/HALKit/AMD64/HalDebugOutput.cc')
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/HalDebugOutput.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc b/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc index 6a484723..539d8178 100644 --- a/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc +++ b/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc @@ -8,6 +8,8 @@ #include <KernelKit/DebugOutput.h> #include <NewKit/Utils.h> #include <NewKit/New.h> +#include <Mod/CoreGfx/FBMgr.h> +#include <Mod/CoreGfx/TextMgr.h> namespace Kernel { @@ -80,12 +82,30 @@ namespace Kernel index = 0; len = rt_string_len(bytes, 255); + static int x = kFontSizeX, y = kFontSizeY; + auto log_txt = RGB(0xff, 0xff, 0xff); + while (index < len) { if (bytes[index] == '\r') HAL::rt_out8(Detail::kPort, '\r'); HAL::rt_out8(Detail::kPort, bytes[index] == '\r' ? '\n' : bytes[index]); + + char tmp_str[2]; + tmp_str[0] = bytes[index]; + tmp_str[1] = 0; + + fb_render_string(tmp_str, y, x, log_txt); + + if (bytes[index] == '\r') + { + y += kFontSizeY; + x = kFontSizeX; + } + + x += kFontSizeX; + ++index; } |
