Merge branch 'ToolBox_FontWriter_BSS-Improvement' into ToolBox_FontWriter
This commit is contained in:
commit
79fdc3a26c
|
@ -1,11 +1,24 @@
|
||||||
#include <PSX/GPU/gpu_primitives.hpp>
|
#include <PSX/GPU/gpu_primitives.hpp>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
extern "C" uint32_t __bss_start;
|
||||||
|
extern "C" uint32_t __bss_end;
|
||||||
extern void main();
|
extern void main();
|
||||||
|
|
||||||
namespace JabyEngine {
|
namespace JabyEngine {
|
||||||
|
static void clear_bss() {
|
||||||
|
uint32_t* bss_adr = &__bss_start;
|
||||||
|
while(bss_adr < &__bss_end) {
|
||||||
|
printf("Free: 0x%p\n", bss_adr);
|
||||||
|
*bss_adr = 0;
|
||||||
|
bss_adr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Executes the game
|
// Executes the game
|
||||||
void __no_return run() {
|
void __no_return run() {
|
||||||
|
clear_bss();
|
||||||
|
|
||||||
main();
|
main();
|
||||||
printf("Stop!!\n");
|
printf("Stop!!\n");
|
||||||
while(true);
|
while(true);
|
||||||
|
|
Loading…
Reference in New Issue