Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09cc7c903c | ||
|
|
9be7481c14 | ||
|
|
9f68ce0d70 | ||
|
|
4748c0292c | ||
|
|
c3ebce1666 | ||
|
|
b1a428f6bc | ||
|
|
3e0b928db0 |
@@ -1314,7 +1314,7 @@ int cmp_lfn ( /* 1:Matched, 0:Not matched */
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if _FS_MINIMIZE <= 1 || _USE_LABEL || _FS_RPATH >= 2
|
||||||
static
|
static
|
||||||
int pick_lfn ( /* 1:Succeeded, 0:Buffer overflow */
|
int pick_lfn ( /* 1:Succeeded, 0:Buffer overflow */
|
||||||
WCHAR* lfnbuf, /* Pointer to the Unicode-LFN buffer */
|
WCHAR* lfnbuf, /* Pointer to the Unicode-LFN buffer */
|
||||||
@@ -1345,6 +1345,7 @@ int pick_lfn ( /* 1:Succeeded, 0:Buffer overflow */
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if !_FS_READONLY
|
#if !_FS_READONLY
|
||||||
@@ -1385,7 +1386,7 @@ void fit_lfn (
|
|||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
/* Create numbered name */
|
/* Create numbered name */
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
#if _USE_LFN
|
#if _USE_LFN && !_FS_READONLY
|
||||||
static
|
static
|
||||||
void gen_numname (
|
void gen_numname (
|
||||||
BYTE* dst, /* Pointer to the buffer to store numbered SFN */
|
BYTE* dst, /* Pointer to the buffer to store numbered SFN */
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ static int SD_Init()
|
|||||||
{
|
{
|
||||||
inittarget(&handleSD);
|
inittarget(&handleSD);
|
||||||
|
|
||||||
waitcycles(1u << 18); //Card needs a little bit of time to be detected, it seems
|
waitcycles(1u << 19); //Card needs a little bit of time to be detected, it seems
|
||||||
|
|
||||||
//If not inserted
|
//If not inserted
|
||||||
if (!(*((vu16*)0x1000601c) & TMIO_STAT0_SIGSTATE)) return -1;
|
if (!(*((vu16*)0x1000601c) & TMIO_STAT0_SIGSTATE)) return -1;
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ void shutdownLCD(void){
|
|||||||
*arm11 = 0;
|
*arm11 = 0;
|
||||||
|
|
||||||
//Shutdown LCDs
|
//Shutdown LCDs
|
||||||
*(vu32*)0x10202A44 = 0;
|
*(vu32 *)0x10202A44 = 0;
|
||||||
*(vu32*)0x10202244 = 0;
|
*(vu32 *)0x10202244 = 0;
|
||||||
*(vu32*)0x10202014 = 0;
|
*(vu32 *)0x10202014 = 0;
|
||||||
|
|
||||||
//Wait for the ARM11 entrypoint to be set
|
//Wait for the ARM11 entrypoint to be set
|
||||||
while(!*arm11);
|
while(!*arm11);
|
||||||
@@ -35,9 +35,10 @@ void clearScreen(void){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void loadSplash(void){
|
void loadSplash(void){
|
||||||
//Check if it's a no-screen-init A9LH boot via PDN_GPU_CNT
|
|
||||||
if(*(u8 *)0x10141200 == 0x1) return;
|
|
||||||
clearScreen();
|
clearScreen();
|
||||||
if(!fileRead(fb->top_left, "/rei/splash.bin", 0x46500)) return;
|
//Don't delay boot if no splash image is on the SD
|
||||||
u64 i = 0xFFFFFF; while(--i) __asm("mov r0, r0"); //Less Ghetto sleep func
|
if(fileRead(fb->top_left, "/rei/splash.bin", 0x46500) +
|
||||||
|
fileRead(fb->bottom, "/rei/splashbottom.bin", 0x38400)){
|
||||||
|
u64 i = 0xFFFFFF; while(--i) __asm("mov r0, r0"); //Less Ghetto sleep func
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1314,7 +1314,7 @@ int cmp_lfn ( /* 1:Matched, 0:Not matched */
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if _FS_MINIMIZE <= 1 || _USE_LABEL || _FS_RPATH >= 2
|
||||||
static
|
static
|
||||||
int pick_lfn ( /* 1:Succeeded, 0:Buffer overflow */
|
int pick_lfn ( /* 1:Succeeded, 0:Buffer overflow */
|
||||||
WCHAR* lfnbuf, /* Pointer to the Unicode-LFN buffer */
|
WCHAR* lfnbuf, /* Pointer to the Unicode-LFN buffer */
|
||||||
@@ -1345,6 +1345,7 @@ int pick_lfn ( /* 1:Succeeded, 0:Buffer overflow */
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if !_FS_READONLY
|
#if !_FS_READONLY
|
||||||
@@ -1385,7 +1386,7 @@ void fit_lfn (
|
|||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
/* Create numbered name */
|
/* Create numbered name */
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
#if _USE_LFN
|
#if _USE_LFN && !_FS_READONLY
|
||||||
static
|
static
|
||||||
void gen_numname (
|
void gen_numname (
|
||||||
BYTE* dst, /* Pointer to the buffer to store numbered SFN */
|
BYTE* dst, /* Pointer to the buffer to store numbered SFN */
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ static int SD_Init()
|
|||||||
{
|
{
|
||||||
inittarget(&handleSD);
|
inittarget(&handleSD);
|
||||||
|
|
||||||
waitcycles(1u << 18); //Card needs a little bit of time to be detected, it seems
|
waitcycles(1u << 19); //Card needs a little bit of time to be detected, it seems
|
||||||
|
|
||||||
//If not inserted
|
//If not inserted
|
||||||
if (!(*((vu16*)0x1000601c) & TMIO_STAT0_SIGSTATE)) return -1;
|
if (!(*((vu16*)0x1000601c) & TMIO_STAT0_SIGSTATE)) return -1;
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ void setupCFW(void){
|
|||||||
//If L and R are pressed, chainload an external payload
|
//If L and R are pressed, chainload an external payload
|
||||||
if(a9lhBoot && (pressed & BUTTON_L1R1) == BUTTON_L1R1) loadPayload();
|
if(a9lhBoot && (pressed & BUTTON_L1R1) == BUTTON_L1R1) loadPayload();
|
||||||
|
|
||||||
|
//Check if it's a no-screen-init A9LH boot via PDN_GPU_CNT
|
||||||
|
if(*(u8 *)0x10141200 != 0x1) loadSplash();
|
||||||
|
|
||||||
/* If L is pressed, and on an updated SysNAND setup the SAFE MODE combo
|
/* If L is pressed, and on an updated SysNAND setup the SAFE MODE combo
|
||||||
is not pressed, boot 9.0 FIRM */
|
is not pressed, boot 9.0 FIRM */
|
||||||
if((pressed & BUTTON_L1) && !(updatedSys && pressed == SAFEMODE)) mode = 0;
|
if((pressed & BUTTON_L1) && !(updatedSys && pressed == SAFEMODE)) mode = 0;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ void main(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void startCFW(){
|
void startCFW(){
|
||||||
loadSplash();
|
|
||||||
if(!loadFirm()) return;
|
if(!loadFirm()) return;
|
||||||
if(!patchFirm()) return;
|
if(!patchFirm()) return;
|
||||||
launchFirm();
|
launchFirm();
|
||||||
|
|||||||
@@ -50,11 +50,9 @@ _start:
|
|||||||
|
|
||||||
@ Set cache settings
|
@ Set cache settings
|
||||||
mov r0, #0x25
|
mov r0, #0x25
|
||||||
mov r1, #0x25
|
|
||||||
mov r2, #0x25
|
|
||||||
mcr p15, 0, r0, c3, c0, 0 @ Write bufferable 0, 2, 5
|
mcr p15, 0, r0, c3, c0, 0 @ Write bufferable 0, 2, 5
|
||||||
mcr p15, 0, r1, c2, c0, 0 @ Data cacheable 0, 2, 5
|
mcr p15, 0, r0, c2, c0, 0 @ Data cacheable 0, 2, 5
|
||||||
mcr p15, 0, r2, c2, c0, 1 @ Inst cacheable 0, 2, 5
|
mcr p15, 0, r0, c2, c0, 1 @ Inst cacheable 0, 2, 5
|
||||||
|
|
||||||
bl startCFW
|
bl startCFW
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user