Turn only SPU GPU and CD DMA on and set to highest

This commit is contained in:
Jaby 2024-03-06 18:31:43 -06:00
parent 599a346b0d
commit ad06128d99
3 changed files with 19 additions and 7 deletions

View File

@ -8,6 +8,10 @@ namespace JabyEngine {
void setup();
}
namespace DMA {
void setup();
}
namespace GPU {
void display_logo();
void setup();

View File

@ -0,0 +1,13 @@
#include <PSX/System/IOPorts/dma_io.hpp>
namespace JabyEngine {
namespace boot {
namespace DMA {
void setup() {
static constexpr auto EnableDMA = DMA_IO::DPCR::from(DMA_IO::DPCR::SPUEnable, DMA_IO::DPCR::GPUEnable, DMA_IO::DPCR::CDROMEnable);
DMA_IO::DPCR.write(EnableDMA);
}
}
}
}

View File

@ -1,6 +1,5 @@
#include "../../internal-include/BootLoader/boot_loader.hpp"
#include "../../internal-include/GPU/gpu_internal.hpp"
#include <PSX/System/IOPorts/dma_io.hpp>
#include <stdio.h>
#include <PSX/GTE/gte.hpp>
@ -102,18 +101,14 @@ 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));
}
namespace Start {
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::Grey(), DebugX, DebugY, DebugScale);
enable_DMA();
DMA::setup();
__debug_boot_color_at(::JabyEngine::GPU::Color24::White(), DebugX, DebugY, DebugScale);
Periphery::setup();