Collect information for future work

This commit is contained in:
2024-02-06 22:21:44 -05:00
parent b20e6133a4
commit 507615df97
6 changed files with 46 additions and 39 deletions

View File

@@ -16,7 +16,7 @@ namespace JabyEngine {
#ifdef __USE_DEBUG_COLOR__
#define __debug_boot_color_at(color, x, y, scale) { \
::JabyEngine::GPU::internal::quick_fill_fast(color, {{64*x, 64*y}, {static_cast<uint16_t>(64*scale), static_cast<uint16_t>(64*scale)}}); \
::JabyEngine::GPU::internal::quick_fill_fast(color, ::JabyEngine::GPU::AreaU16::create(64*x, 64*y, static_cast<uint16_t>(64*scale), static_cast<uint16_t>(64*scale))); \
}
#define __debug_boot_print_at(color, x, y, scale, ...) { \

View File

@@ -30,6 +30,7 @@ namespace JabyEngine {
};
// Letters are actually only 16x15 but should be treated 16x16
// TODO: DMA this?
struct Letter : public GPU::internal::LinkedElementCreator<Letter> {
CPU2VRAM cmd;
Line lines[BIOS_Font::Size.height - 1];

View File

@@ -16,42 +16,6 @@ extern "C" uint32_t __planschi_start;
extern "C" uint32_t __planschi_end;
namespace JabyEngine {
namespace boot {
namespace Start {
static void enable_DMA() {
DMA_IO::DPCR.write(DMA_IO::DPCR.read().set(DMA_IO::DPCR::SPUEnable, DMA_IO::DPCR::GPUEnable, DMA_IO::DPCR::CDROMEnable));
}
static void setup() {
static constexpr auto DebugX = 1;
static constexpr auto DebugY = 0;
static constexpr auto DebugScale = 1.0;
__debug_boot_color_at(::JabyEngine::GPU::Color24::White(), DebugX, DebugY, DebugScale);
Periphery::setup();
__debug_boot_color_at(::JabyEngine::GPU::Color24::White(), DebugX, DebugY, DebugScale);
enable_DMA();
__debug_boot_color_at(::JabyEngine::GPU::Color24::Red(), DebugX, DebugY, DebugScale);
SPU::stop_voices();
__debug_boot_color_at(::JabyEngine::GPU::Color24::Green(), DebugX, DebugY, DebugScale);
CD::setup();
__debug_boot_color_at(::JabyEngine::GPU::Color24::Blue(), DebugX, DebugY, DebugScale);
Timer::setup();
__debug_boot_color_at(::JabyEngine::GPU::Color24::Yellow(), DebugX, DebugY, DebugScale);
GPU::setup();
GPU::display_logo();
GTE::setup();
//Pause??
SPU::setup();
}
}
}
static void test_bios_font() {
static constexpr uint16_t SJIS = 0x83B5;
@@ -136,6 +100,44 @@ namespace JabyEngine {
printf("---\n");
}
}
namespace boot {
namespace Start {
static void enable_DMA() {
DMA_IO::DPCR.write(DMA_IO::DPCR.read().set(DMA_IO::DPCR::SPUEnable, DMA_IO::DPCR::GPUEnable, DMA_IO::DPCR::CDROMEnable));
}
static void setup() {
static constexpr auto DebugX = 1;
static constexpr auto DebugY = 0;
static constexpr auto DebugScale = 1.0;
__debug_boot_color_at(::JabyEngine::GPU::Color24::White(), DebugX, DebugY, DebugScale);
Periphery::setup();
__debug_boot_color_at(::JabyEngine::GPU::Color24::White(), DebugX, DebugY, DebugScale);
enable_DMA();
__debug_boot_color_at(::JabyEngine::GPU::Color24::Red(), DebugX, DebugY, DebugScale);
SPU::stop_voices();
__debug_boot_color_at(::JabyEngine::GPU::Color24::Green(), DebugX, DebugY, DebugScale);
CD::setup();
__debug_boot_color_at(::JabyEngine::GPU::Color24::Blue(), DebugX, DebugY, DebugScale);
Timer::setup();
__debug_boot_color_at(::JabyEngine::GPU::Color24::Yellow(), DebugX, DebugY, DebugScale);
GPU::setup();
GPU::display_logo();
GTE::setup();
test_bios_font();
test_gte();
//Pause??
SPU::setup();
}
}
}
void start() {
static constexpr auto DebugX = 0;
@@ -145,8 +147,6 @@ 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();
test_gte();
__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();