2016-02-13 17:29:56 +01:00
|
|
|
#include "common.h"
|
2016-02-25 16:57:01 +01:00
|
|
|
#include "godmode.h"
|
2016-03-28 17:32:29 +02:00
|
|
|
#include "ui.h"
|
2017-06-09 01:45:00 +02:00
|
|
|
#include "power.h"
|
2016-02-13 17:29:56 +01:00
|
|
|
|
2017-05-26 01:51:14 +02:00
|
|
|
u8 *top_screen, *bottom_screen;
|
2016-02-13 17:29:56 +01:00
|
|
|
|
2017-05-26 01:51:14 +02:00
|
|
|
void main(int argc, char** argv)
|
2016-02-13 17:29:56 +01:00
|
|
|
{
|
2017-05-26 01:51:14 +02:00
|
|
|
// Fetch the framebuffer addresses
|
|
|
|
if(argc >= 2) {
|
|
|
|
// newer entrypoints
|
|
|
|
u8 **fb = (u8 **)(void *)argv[1];
|
|
|
|
top_screen = fb[0];
|
|
|
|
bottom_screen = fb[2];
|
|
|
|
} else {
|
|
|
|
// outdated entrypoints
|
|
|
|
top_screen = (u8*)(*(u32*)0x23FFFE00);
|
|
|
|
bottom_screen = (u8*)(*(u32*)0x23FFFE08);
|
|
|
|
}
|
2016-09-07 00:21:38 +02:00
|
|
|
u32 godmode_exit = GodMode();
|
|
|
|
(godmode_exit == GODMODE_EXIT_REBOOT) ? Reboot() : PowerOff();
|
2016-02-13 17:29:56 +01:00
|
|
|
}
|