Prepare save spot for booting

This commit is contained in:
Jaby
2022-12-16 03:20:08 +01:00
parent 01148b8c52
commit 8a6293dc87
5 changed files with 44 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
#ifndef BOOT_LOADER_HPP
#define BOOT_LOADER_HPP
#include <PSX/jabyengine.h>
namespace GPU {
void display_logo();
@@ -11,4 +12,8 @@ namespace SPU {
void setup();
}
namespace Setup {
JabyEngine::NextRoutine start();
}
#endif //!BOOT_LOADER_HPP

View File

@@ -2,15 +2,12 @@
#include <PSX/System/IOPorts/dMa_io.hpp>
#include <stdio.h>
extern int main();
namespace JabyEngine {
namespace Setup {
static void enable_DMA() {
DMA::DPCR.write(DMA::DPCR.read() | DMA::DMAControlRegister::SPUEnable | DMA::DMAControlRegister::GPUEnable);
}
void start() {
printf("Starting Planschbecken\n");
JabyEngine::NextRoutine start() {
enable_DMA();
SPU::stop_voices();
@@ -20,6 +17,6 @@ namespace JabyEngine {
//Pause??
SPU::setup();
printf("Setup done!\n");
return JabyEngine::NextRoutine::null();
}
}

View File

@@ -0,0 +1,10 @@
#include "../include/BootLoader/boot_loader.hpp"
#include <stdio.h>
namespace JabyEngine {
void start() {
printf("Starting Planschbecken\n");
Setup::start();
printf("Stop!\n");
}
}