mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
エラー時の描画色を変更。
bannerがmakespだとビルドに失敗していたのを修正。 RED FATALとBOOTのエラーの場合だけ対応するエラー文字列を出力するよう変更。 git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2683 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
114d026a08
commit
b1ee59b766
@ -28,7 +28,13 @@ extern "C" {
|
|||||||
|
|
||||||
extern u16 gScreen[32 * 32];
|
extern u16 gScreen[32 * 32];
|
||||||
|
|
||||||
#define CONSOLE_WHITE 15
|
#define CONSOLE_BLACK 0
|
||||||
|
#define CONSOLE_RED 1
|
||||||
|
#define CONSOLE_GREEN 2
|
||||||
|
#define CONSOLE_BLUE 3
|
||||||
|
#define CONSOLE_YELLOW 4
|
||||||
|
#define CONSOLE_WHITE 15
|
||||||
|
|
||||||
void ClearScreen(void);
|
void ClearScreen(void);
|
||||||
void PrintString(s16 x, s16 y, u8 palette, char *text, ...);
|
void PrintString(s16 x, s16 y, u8 palette, char *text, ...);
|
||||||
void ColorString(s16 x, s16 y, s16 length, u8 palette);
|
void ColorString(s16 x, s16 y, s16 length, u8 palette);
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#define BUFSIZE 256
|
#define BUFSIZE 256
|
||||||
|
|
||||||
|
#define FATAL_ERROR_MAX 51
|
||||||
#define SCREEN_WIDTH 32
|
#define SCREEN_WIDTH 32
|
||||||
#define RESULT_LINE_OFFSET 6
|
#define RESULT_LINE_OFFSET 6
|
||||||
|
|
||||||
@ -40,6 +41,7 @@ extern void* nandfirm_end;
|
|||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
内部変数定義
|
内部変数定義
|
||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
|
static char * FatalErrorCode[FATAL_ERROR_MAX];
|
||||||
static BOOL resetConsoleFlag;
|
static BOOL resetConsoleFlag;
|
||||||
static s16 lineoffset;
|
static s16 lineoffset;
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
@ -56,6 +58,10 @@ static BOOL writebackFirm( void );
|
|||||||
static int convertLF( char *dst, char *src );
|
static int convertLF( char *dst, char *src );
|
||||||
static void drawMenu( void );
|
static void drawMenu( void );
|
||||||
static void myInit(void);
|
static void myInit(void);
|
||||||
|
static void printConsole(char *text, ...);
|
||||||
|
static void printConsoleErr(char *text, ...);
|
||||||
|
static u64 parseRedError(const ErrorLogEntry *entry);
|
||||||
|
static BOOL putRedError( FSFile *dst, u64 code );
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
Name: TwlMain
|
Name: TwlMain
|
||||||
@ -92,12 +98,13 @@ TwlMain()
|
|||||||
|
|
||||||
resetConsoleFlag = TRUE;
|
resetConsoleFlag = TRUE;
|
||||||
OS_TPrintf( "boottype : %d\n", OS_GetBootType() );
|
OS_TPrintf( "boottype : %d\n", OS_GetBootType() );
|
||||||
|
|
||||||
drawMenu();
|
drawMenu();
|
||||||
doProc();
|
doProc();
|
||||||
|
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "process finished.");
|
printConsole("process finished.");
|
||||||
OS_WaitVBlankIntr();
|
OS_WaitVBlankIntr();
|
||||||
|
ERRORLOG_End();
|
||||||
OS_Terminate();
|
OS_Terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +123,7 @@ static void doProc()
|
|||||||
// 空行挿入
|
// 空行挿入
|
||||||
lineoffset++;
|
lineoffset++;
|
||||||
|
|
||||||
PrintString(0, lineoffset++, CONSOLE_WHITE, "Copying logfile ...") ;
|
printConsole( "Copying logfile ..." );
|
||||||
|
|
||||||
if( copyLogToSD() )
|
if( copyLogToSD() )
|
||||||
{
|
{
|
||||||
@ -144,15 +151,14 @@ static BOOL deleteLogfile( void )
|
|||||||
|
|
||||||
if( !FS_DeleteFile( ERRORLOG_LOGFILE_PATH ) )
|
if( !FS_DeleteFile( ERRORLOG_LOGFILE_PATH ) )
|
||||||
{
|
{
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Delete Failed.") ;
|
printConsoleErr( "Delete Failed." );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "func: FS_DeleteFile" );
|
printConsoleErr( "func: FS_DeleteFile" );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE,
|
printConsoleErr( "errorCode : %d", FS_GetArchiveResultCode( ERRORLOG_LOGFILE_PATH ) );
|
||||||
"errorCode : %d", FS_GetArchiveResultCode( ERRORLOG_LOGFILE_PATH ) );
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Delete Succeeded.") ;
|
printConsole( "Delete Succeeded." );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,6 +166,9 @@ static BOOL copyLogToSD( void )
|
|||||||
{
|
{
|
||||||
FSFile src, dst;
|
FSFile src, dst;
|
||||||
// 最悪で読み込んだサイズの倍の文字列になる可能性がある
|
// 最悪で読み込んだサイズの倍の文字列になる可能性がある
|
||||||
|
BOOL result = TRUE;
|
||||||
|
int idxlog;
|
||||||
|
int sizelog;
|
||||||
char buf[BUFSIZE + 1];
|
char buf[BUFSIZE + 1];
|
||||||
char winbuf[BUFSIZE*2 +1];
|
char winbuf[BUFSIZE*2 +1];
|
||||||
s32 readSize;
|
s32 readSize;
|
||||||
@ -173,9 +182,9 @@ static BOOL copyLogToSD( void )
|
|||||||
|
|
||||||
if( ! FS_CreateFile( DST_LOGFILE_PATH, FS_PERMIT_R | FS_PERMIT_W ) )
|
if( ! FS_CreateFile( DST_LOGFILE_PATH, FS_PERMIT_R | FS_PERMIT_W ) )
|
||||||
{
|
{
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Copy Failed.") ;
|
printConsoleErr( "Copy Failed." );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "func: FS_CreateFile" );
|
printConsoleErr( "func: FS_CreateFile" );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "errorCode : %d", FS_GetArchiveResultCode( DST_LOGFILE_PATH ) );
|
printConsoleErr( "errorCode : %d", FS_GetArchiveResultCode( DST_LOGFILE_PATH ) );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,69 +192,91 @@ static BOOL copyLogToSD( void )
|
|||||||
if( !FS_OpenFileEx( &dst , DST_LOGFILE_PATH, FS_FILEMODE_RW ))
|
if( !FS_OpenFileEx( &dst , DST_LOGFILE_PATH, FS_FILEMODE_RW ))
|
||||||
{
|
{
|
||||||
// 作成したファイルをopenできなかった場合
|
// 作成したファイルをopenできなかった場合
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Copy Failed.") ;
|
printConsoleErr( "Copy Failed." );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "func: FS_OpenFile / FS_SetFileLength" );
|
printConsoleErr( "func: FS_OpenFile / FS_SetFileLength" );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "errorCode : %d", FS_GetArchiveResultCode( DST_LOGFILE_PATH ) );
|
printConsoleErr( "errorCode : %d", FS_GetArchiveResultCode( DST_LOGFILE_PATH ) );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// サイズ変更が終わったら、念のためファイルサイズ変更不可なRWLモードで開きなおしておく
|
// サイズ変更が終わったら、念のためファイルサイズ変更不可なRWLモードで開きなおしておく
|
||||||
// →ファイルサイズ可変長に変更
|
// →改行文字の置換やログの置換に伴いファイルサイズ可変長に変更
|
||||||
|
/*
|
||||||
FS_CloseFile( &dst );
|
FS_CloseFile( &dst );
|
||||||
|
|
||||||
if( !FS_OpenFileEx( &dst, DST_LOGFILE_PATH, FS_FILEMODE_RW ) )
|
if( !FS_OpenFileEx( &dst, DST_LOGFILE_PATH, FS_FILEMODE_RW ) )
|
||||||
{
|
{
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Copy Failed.") ;
|
printConsoleErr( "Copy Failed." );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "func: FS_OpenFile dst" );
|
printConsoleErr( "func: FS_OpenFile dst" );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "errorCode : %d", FS_GetArchiveResultCode( DST_LOGFILE_PATH ) );
|
printConsoleErr( "errorCode : %d", FS_GetArchiveResultCode( DST_LOGFILE_PATH ) );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if( !FS_OpenFileEx( &src, ERRORLOG_LOGFILE_PATH, FS_FILEMODE_R ) )
|
if( !FS_OpenFileEx( &src, ERRORLOG_LOGFILE_PATH, FS_FILEMODE_R ) )
|
||||||
{
|
{
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Copy Failed.") ;
|
printConsoleErr( "Copy Failed." );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "func: FS_OpenFile src" );
|
printConsoleErr( "func: FS_OpenFile src" );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "errorCode : %d", FS_GetArchiveResultCode( DST_LOGFILE_PATH ) );
|
printConsoleErr( "errorCode : %d", FS_GetArchiveResultCode( DST_LOGFILE_PATH ) );
|
||||||
|
result = FALSE;
|
||||||
|
goto ERRORPATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !FS_SeekFileToBegin( &src ))
|
if( !FS_SeekFileToBegin( &src ))
|
||||||
{
|
{
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Copy Failed.") ;
|
printConsoleErr( "Copy Failed." );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "func: FS_SeekFileToBegin" );
|
printConsoleErr( "func: FS_SeekFileToBegin" );
|
||||||
return FALSE;
|
result = FALSE;
|
||||||
|
goto ERRORPATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
while( ( readSize = FS_ReadFile( &src, buf, 256 )) > 0 )
|
sizelog = ERRORLOG_GetNum();
|
||||||
|
idxlog = 0;
|
||||||
|
while( ( readSize = FS_ReadFile( &src, buf, 256 )) > 0 &&
|
||||||
|
idxlog < sizelog )
|
||||||
{
|
{
|
||||||
int size;
|
int size;
|
||||||
|
const ErrorLogEntry *entry = ERRORLOG_Read( idxlog++ );
|
||||||
|
u64 errorcode;
|
||||||
|
|
||||||
// 改行文字を置換しておく
|
// 改行文字を置換しておく
|
||||||
size = convertLF( winbuf, buf );
|
size = convertLF( winbuf, buf );
|
||||||
|
|
||||||
if( FS_WriteFile( &dst, winbuf, size ) < 0 )
|
if( FS_WriteFile( &dst, winbuf, size ) < 0 )
|
||||||
{
|
{
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Copy Failed.") ;
|
printConsoleErr( "Copy Failed." );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "func: FS_WriteFile" );
|
printConsoleErr( "func: FS_WriteFile" );
|
||||||
return FALSE;
|
result = FALSE;
|
||||||
|
goto ERRORPATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 最上位ビットが立っていたらマッチングしてない
|
||||||
|
if(!((errorcode = parseRedError(entry)) & (0x1ULL << 63)))
|
||||||
|
{
|
||||||
|
if(!putRedError(&dst, errorcode))
|
||||||
|
{
|
||||||
|
result = FALSE;
|
||||||
|
goto ERRORPATH;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ERRORPATH:
|
||||||
|
|
||||||
if( !FS_CloseFile( &src ))
|
if( !FS_CloseFile( &src ))
|
||||||
{
|
{
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Copy Failed!") ;
|
printConsoleErr( "Copy Failed!" );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "func: FS_CloseFile(src)" );
|
printConsoleErr( "func: FS_CloseFile(src)" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if( !FS_CloseFile( &dst ))
|
if( !FS_CloseFile( &dst ))
|
||||||
{
|
{
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Copy Failed.") ;
|
printConsoleErr( "Copy Failed." );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "func: FS_CloseFile(dst)" );
|
printConsoleErr( "func: FS_CloseFile(dst)" );
|
||||||
}
|
}
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Copy Succeeded.") ;
|
printConsole( "Copy Succeeded." );
|
||||||
|
|
||||||
return TRUE;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,20 +291,20 @@ static BOOL writebackFirm( void )
|
|||||||
|
|
||||||
if( 800*1024 < fileSize )
|
if( 800*1024 < fileSize )
|
||||||
{
|
{
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "too large file size.") ;
|
printConsoleErr( "too large file size." );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 書き込みサイズは512バイトのブロック単位なのでそれに配慮
|
// 書き込みサイズは512バイトのブロック単位なのでそれに配慮
|
||||||
allocSize = MATH_ROUNDUP(fileSize, 512);
|
allocSize = MATH_ROUNDUP(fileSize, 512);
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "fileBegin: %08x", &nandfirm_begin) ;
|
printConsole( "fileBegin: %08x", &nandfirm_begin );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "fileEnd: %08x", &nandfirm_end) ;
|
printConsole( "fileEnd: %08x", &nandfirm_end );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "fileSize: %08x", fileSize) ;
|
printConsole( "fileSize: %08x", fileSize );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "allocsize: %08x", allocSize) ;
|
printConsole( "allocsize: %08x", allocSize );
|
||||||
pBuf = OS_Alloc(allocSize);
|
pBuf = OS_Alloc(allocSize);
|
||||||
if(pBuf == NULL)
|
if(pBuf == NULL)
|
||||||
{
|
{
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Alloc failed.") ;
|
printConsoleErr( "Alloc failed." );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -281,17 +312,17 @@ static BOOL writebackFirm( void )
|
|||||||
MI_CpuClear8(pBuf, allocSize);
|
MI_CpuClear8(pBuf, allocSize);
|
||||||
DC_FlushRange(pBuf, allocSize);
|
DC_FlushRange(pBuf, allocSize);
|
||||||
MI_CpuCopy8( &nandfirm_begin, pBuf, fileSize);
|
MI_CpuCopy8( &nandfirm_begin, pBuf, fileSize);
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "read firm succeeded.") ;
|
printConsole( "read firm succeeded." );
|
||||||
//CARD_ReadRom( MI_DMA_NOT_USE, nandfirm_begin, pBuf, fileSize);
|
//CARD_ReadRom( MI_DMA_NOT_USE, nandfirm_begin, pBuf, fileSize);
|
||||||
|
|
||||||
// データの書き出し
|
// データの書き出し
|
||||||
writeBlock = nandfirmSize/NAND_BLOCK_BYTE + (nandfirmSize % NAND_BLOCK_BYTE != 0);
|
writeBlock = nandfirmSize/NAND_BLOCK_BYTE + (nandfirmSize % NAND_BLOCK_BYTE != 0);
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "Blocksize : %08x", writeBlock) ;
|
printConsole( "Blocksize : %08x", writeBlock );
|
||||||
DC_FlushRange(pBuf, allocSize);
|
DC_FlushRange(pBuf, allocSize);
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "nandfirm writing...") ;
|
printConsole( "nandfirm writing..." );
|
||||||
kamiNandWrite( NAND_START_OFFSET/NAND_BLOCK_BYTE, pBuf+NANDFIRM_FILE_START_OFFSET, writeBlock);
|
kamiNandWrite( NAND_START_OFFSET/NAND_BLOCK_BYTE, pBuf+NANDFIRM_FILE_START_OFFSET, writeBlock);
|
||||||
// まだ書き込まないで出力だけする
|
// まだ書き込まないで出力だけする
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "write firm succeeded.") ;
|
printConsole( "write firm succeeded." );
|
||||||
OS_Free(pBuf);
|
OS_Free(pBuf);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -300,14 +331,14 @@ static void drawMenu( void )
|
|||||||
{
|
{
|
||||||
lineoffset = 0;
|
lineoffset = 0;
|
||||||
ClearScreen();
|
ClearScreen();
|
||||||
/* PrintString( 0, lineoffset++, CONSOLE_WHITE, "SystemLog Reader");
|
/* printConsole( "SystemLog Reader" );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "+-----------------------------+");
|
printConsole( "+-----------------------------+" );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "l A Button : Copy log to SD l");
|
printConsole( "l A Button : Copy log to SD l" );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "+-----------------------------+");
|
printConsole( "+-----------------------------+" );
|
||||||
*/
|
*/
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "+--------------------+");
|
printConsole( "+--------------------+" );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "l System Log Reader l");
|
printConsole( "l System Log Reader l" );
|
||||||
PrintString( 0, lineoffset++, CONSOLE_WHITE, "+--------------------+");
|
printConsole( "+--------------------+" );
|
||||||
lineoffset++;
|
lineoffset++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -337,6 +368,56 @@ int convertLF( char *dst, char *src )
|
|||||||
return writesize;
|
return writesize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RedErrorの類ならエラーコードを、そうでなければ最上位ビットを立てて返す
|
||||||
|
static u64 parseRedError(const ErrorLogEntry *entry)
|
||||||
|
{
|
||||||
|
u64 errorcode;
|
||||||
|
|
||||||
|
if(entry->isLauncherError)
|
||||||
|
{
|
||||||
|
// REDFormatのログだったらそのまま出力すればいいので拒否
|
||||||
|
return 0x1ULL << 63;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (STD_TSScanf(entry->errorStr,"%*s [l.%*d] RED FATAL %16llx (%*16llx)", &errorcode) == 1||
|
||||||
|
STD_TSScanf(entry->errorStr,"%*s [l.%*d] BOOT %16llx (%*16llx)", &errorcode) == 1 )
|
||||||
|
{
|
||||||
|
printConsole("matched");
|
||||||
|
return errorcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
// マッチしなかった場合
|
||||||
|
return 0x1ULL << 63;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static BOOL putRedError( FSFile *dst, u64 code )
|
||||||
|
{
|
||||||
|
char buf[BUFSIZE];
|
||||||
|
u8 counter = 0;
|
||||||
|
|
||||||
|
// codeのどこかにビットが立っている限りシフトし続ける
|
||||||
|
while(code)
|
||||||
|
{
|
||||||
|
// 末尾のビットが立っていたらcounter番目のエラーが発生している
|
||||||
|
if( code & 0x1 )
|
||||||
|
{
|
||||||
|
STD_TSNPrintf(buf, BUFSIZE, "err: %s\r\n", FatalErrorCode[counter]);
|
||||||
|
|
||||||
|
if( FS_WriteFile( dst, buf, STD_StrLen(buf) ) < 0 )
|
||||||
|
{
|
||||||
|
printConsoleErr( "Copy Failed." );
|
||||||
|
printConsoleErr( "func: FS_WriteFile" );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
counter++;
|
||||||
|
code >>= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
Name: VBlankIntr
|
Name: VBlankIntr
|
||||||
|
|
||||||
@ -358,6 +439,22 @@ VBlankIntr(void)
|
|||||||
OS_SetIrqCheckFlag(OS_IE_V_BLANK); // checking VBlank interrupt
|
OS_SetIrqCheckFlag(OS_IE_V_BLANK); // checking VBlank interrupt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void printConsole(char *text, ...)
|
||||||
|
{
|
||||||
|
va_list arglist;
|
||||||
|
|
||||||
|
va_start( arglist, text);
|
||||||
|
PrintString( 0, lineoffset++, CONSOLE_WHITE, text, arglist) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void printConsoleErr(char *text, ...)
|
||||||
|
{
|
||||||
|
va_list arglist;
|
||||||
|
|
||||||
|
va_start( arglist, text);
|
||||||
|
PrintString( 0, lineoffset++, CONSOLE_RED, text, arglist) ;
|
||||||
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
Name: InitAllocation
|
Name: InitAllocation
|
||||||
|
|
||||||
@ -455,3 +552,58 @@ void myInit(void)
|
|||||||
GX_DispOn();
|
GX_DispOn();
|
||||||
GXS_DispOn();
|
GXS_DispOn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char * FatalErrorCode[] = {
|
||||||
|
"FATAL_ERROR_UNDEFINED",
|
||||||
|
"FATAL_ERROR_NAND",
|
||||||
|
"FATAL_ERROR_HWINFO_NORMAL",
|
||||||
|
"FATAL_ERROR_HWINFO_SECURE",
|
||||||
|
"FATAL_ERROR_TWLSETTINGS",
|
||||||
|
"FATAL_ERROR_SHARED_FONT",
|
||||||
|
"FATAL_ERROR_WLANFIRM_AUTH",
|
||||||
|
"FATAL_ERROR_WLANFIRM_LOAD",
|
||||||
|
"FATAL_ERROR_TITLE_LOAD_FAILED",
|
||||||
|
"FATAL_ERROR_TITLE_POINTER_ERROR",
|
||||||
|
"FATAL_ERROR_AUTHENTICATE_FAILED",
|
||||||
|
"FATAL_ERROR_ENTRY_ADDRESS_ERROR",
|
||||||
|
"FATAL_ERROR_TITLE_BOOTTYPE_ERROR",
|
||||||
|
"FATAL_ERROR_SIGN_DECRYPTION_FAILED",
|
||||||
|
"FATAL_ERROR_SIGN_COMPARE_FAILED",
|
||||||
|
"FATAL_ERROR_HEADER_HASH_CALC_FAILED",
|
||||||
|
"FATAL_ERROR_TITLEID_COMPARE_FAILED",
|
||||||
|
"FATAL_ERROR_VALID_SIGN_FLAG_OFF",
|
||||||
|
"FATAL_ERROR_CHECK_TITLE_LAUNCH_RIGHTS_FAILED",
|
||||||
|
"FATAL_ERROR_MODULE_HASH_CHECK_FAILED",
|
||||||
|
"FATAL_ERROR_MODULE_HASH_CALC_FAILED",
|
||||||
|
"FATAL_ERROR_MEDIA_CHECK_FAILED",
|
||||||
|
"FATAL_ERROR_DL_MAGICCODE_CHECK_FAILED",
|
||||||
|
"FATAL_ERROR_DL_SIGN_DECRYPTION_FAILED",
|
||||||
|
"FATAL_ERROR_DL_HASH_CALC_FAILED",
|
||||||
|
"FATAL_ERROR_DL_SIGN_COMPARE_FAILED",
|
||||||
|
"FATAL_ERROR_WHITELIST_INITDB_FAILED",
|
||||||
|
"FATAL_ERROR_WHITELIST_NOTFOUND",
|
||||||
|
"FATAL_ERROR_DHT_PHASE1_FAILED",
|
||||||
|
"FATAL_ERROR_DHT_PHASE2_FAILED",
|
||||||
|
"FATAL_ERROR_LANDING_TMP_JUMP_FLAG_OFF",
|
||||||
|
"FATAL_ERROR_TWL_BOOTTYPE_UNKNOWN",
|
||||||
|
"FATAL_ERROR_NTR_BOOTTYPE_UNKNOWN",
|
||||||
|
"FATAL_ERROR_PLATFORM_UNKNOWN",
|
||||||
|
"FATAL_ERROR_LOAD_UNFINISHED",
|
||||||
|
"FATAL_ERROR_LOAD_OPENFILE_FAILED",
|
||||||
|
"FATAL_ERROR_LOAD_MEMALLOC_FAILED",
|
||||||
|
"FATAL_ERROR_LOAD_SEEKFILE_FAILED",
|
||||||
|
"FATAL_ERROR_LOAD_READHEADER_FAILED",
|
||||||
|
"FATAL_ERROR_LOAD_LOGOCRC_ERROR",
|
||||||
|
"FATAL_ERROR_LOAD_READDLSIGN_FAILED",
|
||||||
|
"FATAL_ERROR_LOAD_RELOCATEINFO_FAILED",
|
||||||
|
"FATAL_ERROR_LOAD_READMODULE_FAILED",
|
||||||
|
"FATAL_ERROR_NINTENDO_LOGO_CHECK_FAILED",
|
||||||
|
"FATAL_ERROR_SYSMENU_VERSION",
|
||||||
|
"FATAL_ERROR_DHT_PHASE1_CALC_FAILED",
|
||||||
|
"FATAL_ERROR_LOAD_UNKNOWN_BOOTTYPE",
|
||||||
|
"FATAL_ERROR_LOAD_AUTH_HEADER_FAILED",
|
||||||
|
"FATAL_ERROR_LOAD_NEVER_STARTED",
|
||||||
|
"FATAL_ERROR_EJECT_CARD_AFTER_LOAD_START",
|
||||||
|
"FATAL_ERROR_TITLEID_COMPARE_FAILED_NTR",
|
||||||
|
};
|
||||||
|
|
||||||
|
|||||||
@ -28,10 +28,11 @@ INSTALL_DIR = ./
|
|||||||
INSTALL_TARGETS = $(TARGETS)
|
INSTALL_TARGETS = $(TARGETS)
|
||||||
|
|
||||||
BANNER_ICON_NAME = $(basename $(BANNER_ICON))
|
BANNER_ICON_NAME = $(basename $(BANNER_ICON))
|
||||||
BANNER_ICON_MIDDLE = $(addprefix $(BANNER_ICON_NAME), .nbfs .nbfc .nbfp)
|
|
||||||
|
|
||||||
LDIRT_CLEAN = $(TARGETS) \
|
LDIRT_CLEAN = $(TARGETS) \
|
||||||
$(BANNER_ICON_MIDDLE) \
|
$(BANNER_ICON_NAME).nbfs \
|
||||||
|
$(BANNER_ICON_NAME).nbfc \
|
||||||
|
$(BANNER_ICON_NAME).nbfp \
|
||||||
$(TARGETS:.bnr=.srl)
|
$(TARGETS:.bnr=.srl)
|
||||||
|
|
||||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||||
@ -41,7 +42,6 @@ include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
do-build: $(TARGETS)
|
do-build: $(TARGETS)
|
||||||
|
|
||||||
$(TARGETS): $(BANNER_SPEC) $(BANNER_ICON) $(BANNER_ICON_MIDDLE)
|
$(TARGETS): $(BANNER_SPEC) $(BANNER_ICON)
|
||||||
|
$(NTEXCONV) -no -bg -bgb -bgnc $(BANNER_ICON) >/dev/null && \
|
||||||
$(MAKEBANNER) -N $(BANNER_ICON_NAME) $(BANNER_SPEC) $(TARGETS)
|
$(MAKEBANNER) -N $(BANNER_ICON_NAME) $(BANNER_SPEC) $(TARGETS)
|
||||||
|
|
||||||
#
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user