Prepare save spot for booting
This commit is contained in:
@@ -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
|
@@ -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();
|
||||
}
|
||||
}
|
10
src/Library/src/startup.cpp
Normal file
10
src/Library/src/startup.cpp
Normal 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");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user