Use main
This commit is contained in:
@@ -16,4 +16,8 @@ namespace Setup {
|
||||
JabyEngine::NextRoutine start();
|
||||
}
|
||||
|
||||
namespace BootFile {
|
||||
JabyEngine::NextRoutine setup();
|
||||
}
|
||||
|
||||
#endif //!BOOT_LOADER_HPP
|
11
src/Library/src/BootLoader/boot_file/main_boot.cpp
Normal file
11
src/Library/src/BootLoader/boot_file/main_boot.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "../../../include/BootLoader/boot_loader.hpp"
|
||||
#include <stdio.h>
|
||||
|
||||
extern JabyEngine::NextRoutine main();
|
||||
|
||||
namespace BootFile {
|
||||
JabyEngine::NextRoutine setup() {
|
||||
printf("Running main!\n");
|
||||
return JabyEngine::NextRoutine::from(main);
|
||||
}
|
||||
}
|
@@ -17,6 +17,6 @@ namespace Setup {
|
||||
//Pause??
|
||||
|
||||
SPU::setup();
|
||||
return JabyEngine::NextRoutine::null();
|
||||
return BootFile::setup();
|
||||
}
|
||||
}
|
@@ -2,9 +2,27 @@
|
||||
#include <stdio.h>
|
||||
|
||||
namespace JabyEngine {
|
||||
static NextRoutine execute(NextRoutine routine) {
|
||||
// Support currently only direct call
|
||||
return reinterpret_cast<MainRoutine>((routine.value & ~JabyEngine::NextRoutine::OverlayBit))();
|
||||
}
|
||||
|
||||
void start() {
|
||||
printf("Starting Planschbecken\n");
|
||||
Setup::start();
|
||||
NextRoutine next_routine = JabyEngine::NextRoutine::from(Setup::start);
|
||||
|
||||
printf("Starting Planschbecken 0x%p\n", next_routine.value);
|
||||
while(true) {
|
||||
if(next_routine.is_null()) {
|
||||
break;
|
||||
}
|
||||
|
||||
if(next_routine.is_overlay()) {
|
||||
printf("Overlay not supported yet!\n");
|
||||
break;
|
||||
}
|
||||
|
||||
next_routine = execute(next_routine);
|
||||
}
|
||||
printf("Stop!\n");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user