Load a BIOS font
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
#include <PSX/System/IOPorts/dma_io.hpp>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <PSX/System/syscalls.hpp>
|
||||
|
||||
extern "C" uint32_t __heap_start;
|
||||
extern "C" uint32_t __bss_start;
|
||||
extern "C" uint32_t __bss_end;
|
||||
@@ -42,6 +44,24 @@ namespace JabyEngine {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void test_bios_font() {
|
||||
static constexpr uint16_t SJIS = 0x83B5;
|
||||
|
||||
const auto* font = SysCall::Krom2RawAdd(SJIS);
|
||||
const auto*const font_end = font + 16;
|
||||
printf("Loading SJIS from @0x%p\n", font);
|
||||
|
||||
for(; font < font_end; font++) {
|
||||
const auto cur_char = __builtin_bswap16(*font);
|
||||
for(uint16_t shift = 1 << 15; shift; shift = shift >> 1) {
|
||||
printf(cur_char & shift ? "#" : " ");
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
void start() {
|
||||
static constexpr auto DebugX = 0;
|
||||
static constexpr auto DebugY = 0;
|
||||
@@ -50,6 +70,7 @@ namespace JabyEngine {
|
||||
__debug_boot_print_at(GPU::Color24::White(), DebugX, DebugY, DebugScale, "Starting Planschbecken\n");
|
||||
printf("Heap starts @0x%p\n", &__heap_start);
|
||||
printf("BSS from 0x%p to 0x%p (%u)\n", &__bss_start, &__bss_end, __bss_len);
|
||||
test_bios_font();
|
||||
__debug_boot_print_at(GPU::Color24::Green(), DebugX, DebugY, DebugScale, "PLANSCHI from 0x%p to 0x%p\n", &__planschi_start, &__planschi_end);
|
||||
boot::Start::setup();
|
||||
|
||||
|
Reference in New Issue
Block a user