Prep work for A9LH screen init
This commit is contained in:
@@ -17,6 +17,8 @@ void clearScreen(void){
|
||||
}
|
||||
|
||||
void loadSplash(void){
|
||||
//Check that it's a no-LCD-init boot via PDN_GPU_CNT
|
||||
if (*((u8*)0x10141200) == 0x1) return;
|
||||
clearScreen();
|
||||
if(fileRead(fb->top_left, "/rei/splash.bin", 0x46500) != 0) return;
|
||||
unsigned i,t; for(t=220;t>0;t--){for(i=0xFFFF;i>0;i--);}; //Ghetto sleep func
|
||||
|
||||
@@ -21,14 +21,14 @@ u8 mode = 1,
|
||||
u16 pressed;
|
||||
|
||||
//Load firm into FCRAM
|
||||
u8 loadFirm(u8 a9lhBoot){
|
||||
u8 loadFirm(void){
|
||||
|
||||
//Detect the console being used
|
||||
if(PDN_MPCORE_CFG == 1) console = 0;
|
||||
//Get pressed buttons
|
||||
pressed = HID_PAD;
|
||||
//Determine if A9LH is installed
|
||||
if(a9lhBoot || fileExists("/rei/installeda9lh")){
|
||||
//Determine if A9LH is installed via PDN_SPI_CNT and an user flag
|
||||
if((*((u8*)0x101401C0) == 0x0) || fileExists("/rei/installeda9lh")){
|
||||
a9lhSetup = 1;
|
||||
//Check flag for > 9.2 SysNAND
|
||||
if(fileExists("/rei/updatedsysnand")) updatedSys = 1;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#define SAFEMODE (BUTTON_L1 | BUTTON_R1 | BUTTON_A | (1 << 6))
|
||||
#define PATCHED_FIRM_PATH "/rei/patched_firmware.bin"
|
||||
|
||||
u8 loadFirm(u8 a9lhBoot);
|
||||
u8 loadFirm(void);
|
||||
u8 loadEmu(void);
|
||||
u8 patchFirm(void);
|
||||
void launchFirm(void);
|
||||
|
||||
@@ -10,14 +10,10 @@
|
||||
#include "firm.h"
|
||||
#include "draw.h"
|
||||
|
||||
u8 a9lhBoot = 0;
|
||||
|
||||
u8 main(){
|
||||
mountSD();
|
||||
//Detect an A9LH boot checking PDN_GPU_CNT register
|
||||
if (*((u8*)0x10141200) == 0x1) a9lhBoot = 1;
|
||||
else loadSplash();
|
||||
if (loadFirm(a9lhBoot)) return 1;
|
||||
loadSplash();
|
||||
if (loadFirm()) return 1;
|
||||
if (patchFirm()) return 1;
|
||||
launchFirm();
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user