Add boot namespace and adjust names
This commit is contained in:
parent
16350d3828
commit
57d4fa4e67
|
@ -4,6 +4,10 @@
|
|||
|
||||
namespace JabyEngine {
|
||||
//boot namespace?
|
||||
namespace boot {
|
||||
namespace BootFile {
|
||||
JabyEngine::NextRoutine setup();
|
||||
}
|
||||
|
||||
namespace CD {
|
||||
void setup();
|
||||
|
@ -19,11 +23,7 @@ namespace JabyEngine {
|
|||
void setup();
|
||||
}
|
||||
|
||||
namespace Setup {
|
||||
JabyEngine::NextRoutine start();
|
||||
}
|
||||
|
||||
namespace BootFile {
|
||||
namespace Start {
|
||||
JabyEngine::NextRoutine setup();
|
||||
}
|
||||
|
||||
|
@ -31,4 +31,5 @@ namespace JabyEngine {
|
|||
void setup();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //!BOOT_LOADER_HPP
|
|
@ -4,6 +4,7 @@
|
|||
extern JabyEngine::NextRoutine main();
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace boot {
|
||||
namespace BootFile {
|
||||
JabyEngine::NextRoutine setup() {
|
||||
printf("Running main!\n");
|
||||
|
@ -11,3 +12,4 @@ namespace JabyEngine {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace boot {
|
||||
namespace BootFile {
|
||||
JabyEngine::NextRoutine setup() {
|
||||
printf("Overlay boot not implemented!\n");
|
||||
|
@ -9,3 +10,4 @@ namespace JabyEngine {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,9 +2,11 @@
|
|||
#include <PSX/System/IOPorts/cd_io.hpp>
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace boot {
|
||||
namespace CD {
|
||||
void setup() {
|
||||
CD_IO::change_to_index0();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -13,7 +13,10 @@
|
|||
extern "C" uint32_t __boot_loader_end;
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace boot {
|
||||
namespace GPU {
|
||||
using namespace JabyEngine::GPU;
|
||||
|
||||
static size_t decompress_logo() {
|
||||
LZ4Decompressor lz4_decomp(reinterpret_cast<uint8_t*>(&__boot_loader_end));
|
||||
|
||||
|
@ -55,3 +58,4 @@ namespace JabyEngine {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
#include <limits.h>
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace boot {
|
||||
namespace SPU {
|
||||
using namespace JabyEngine;
|
||||
|
||||
|
@ -97,3 +98,4 @@ namespace JabyEngine {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,12 +5,13 @@
|
|||
#include <stdio.h>
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace Setup {
|
||||
namespace boot {
|
||||
namespace Start {
|
||||
static void enable_DMA() {
|
||||
DMA_IO::DPCR.write(DMA_IO::DPCR.read() | DMA_IO::DMAControlRegister::SPUEnable | DMA_IO::DMAControlRegister::GPUEnable);
|
||||
}
|
||||
|
||||
JabyEngine::NextRoutine start() {
|
||||
JabyEngine::NextRoutine setup() {
|
||||
enable_DMA();
|
||||
|
||||
SPU::stop_voices();
|
||||
|
@ -30,3 +31,4 @@ namespace JabyEngine {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,6 +9,12 @@
|
|||
namespace JabyEngine {
|
||||
namespace Timer {
|
||||
extern InterrupCallback IRQCallback;
|
||||
}
|
||||
|
||||
namespace boot {
|
||||
namespace Timer {
|
||||
using namespace JabyEngine::Timer;
|
||||
|
||||
void setup() {
|
||||
using namespace Timer_IO;
|
||||
|
||||
|
@ -27,11 +33,14 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
namespace JabyEngine {
|
||||
namespace boot {
|
||||
namespace Timer {
|
||||
void setup() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //JABYENGINE_USE_HIGH_PERCISION_TIMER
|
|
@ -8,7 +8,7 @@ namespace JabyEngine {
|
|||
}
|
||||
|
||||
void start() {
|
||||
NextRoutine next_routine = JabyEngine::NextRoutine::from(Setup::start);
|
||||
NextRoutine next_routine = JabyEngine::NextRoutine::from(boot::Start::setup);
|
||||
|
||||
printf("Starting Planschbecken 0x%p\n", next_routine.value);
|
||||
while(true) {
|
||||
|
|
Loading…
Reference in New Issue