mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
ソースの整理2
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2874 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
abea12209c
commit
809f19f081
@ -39,7 +39,6 @@ SRCS = main.c \
|
||||
common.c \
|
||||
font.c \
|
||||
screen.c \
|
||||
hwi.c \
|
||||
kami_pxi.c \
|
||||
kami_write_nandfirm.c \
|
||||
|
||||
@ -48,7 +47,6 @@ LINCLUDES = ../common/include \
|
||||
../../common/ARM9/include
|
||||
|
||||
SRCDIR = src \
|
||||
../../HWInfoWriter/ARM9/src \
|
||||
../../common/ARM9/src
|
||||
|
||||
#LCFILE = # using default
|
||||
|
||||
@ -19,14 +19,12 @@
|
||||
#include <nitro/snd.h>
|
||||
#include <twl/fatfs.h>
|
||||
#include <nitro/card.h>
|
||||
#include <twl/nam.h>
|
||||
#include <twl/os/common/format_rom.h>
|
||||
#include <sysmenu/namut.h>
|
||||
#include <twl/lcfg.h>
|
||||
#include "kami_pxi.h"
|
||||
#include "common.h"
|
||||
#include "screen.h"
|
||||
#include "kami_write_nandfirm.h"
|
||||
#include "hwi.h"
|
||||
|
||||
#define SCRAMBLE_MASK 0x00406000
|
||||
|
||||
@ -48,6 +46,7 @@ static BOOL gResult;
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void VBlankIntr(void);
|
||||
static void InitAllocation(void);
|
||||
static BOOL ReadTWLSettings( void );
|
||||
static void DrawScene(void);
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
@ -141,27 +140,8 @@ TwlMain()
|
||||
// 仮に未フォーマットであったとしてもBadFormat扱いとなる。2009/03/05
|
||||
#endif
|
||||
|
||||
// NAMライブラリ初期化
|
||||
NAM_Init( OS_AllocFromMain, OS_FreeToMain);
|
||||
NAMUT_Init( OS_AllocFromMain, OS_FreeToMain);
|
||||
|
||||
#ifndef TWL_CAPTURE_VERSION
|
||||
// HWInfo関連の前準備
|
||||
switch (HWI_Init( OS_AllocFromMain, OS_FreeToMain ))
|
||||
{
|
||||
case HWI_INIT_FAILURE:
|
||||
OS_PutString("HWI_INIT() Failure!\n");
|
||||
break;
|
||||
case HWI_INIT_SUCCESS_PRO_SIGNATURE_MODE:
|
||||
OS_PutString("[PRO Signature MODE]\n");
|
||||
break;
|
||||
case HWI_INIT_SUCCESS_DEV_SIGNATURE_MODE:
|
||||
OS_PutString("[DEV Signature MODE]\n");
|
||||
break;
|
||||
case HWI_INIT_SUCCESS_NO_SIGNATRUE_MODE:
|
||||
OS_PutString("[No Signature MODE]\n");
|
||||
break;
|
||||
}
|
||||
ReadTWLSettings();
|
||||
#endif
|
||||
|
||||
gResult = FALSE;
|
||||
@ -204,6 +184,31 @@ TwlMain()
|
||||
}
|
||||
|
||||
|
||||
// TWL設定データのリード
|
||||
static BOOL ReadTWLSettings( void )
|
||||
{
|
||||
u8 *pBuffer = OS_AllocFromMain( LCFG_READ_TEMP );
|
||||
BOOL result;
|
||||
if( pBuffer ) {
|
||||
result = LCFG_ReadTWLSettings( (u8 (*)[ LCFG_READ_TEMP ] )pBuffer );
|
||||
// Readに失敗した場合ファイルのリカバリ生成を試みる
|
||||
if (!result)
|
||||
{
|
||||
OS_TPrintf( "TSD read failed. Retry onece more.\n" );
|
||||
result = LCFG_RecoveryTWLSettings();
|
||||
}
|
||||
OS_FreeToMain( pBuffer );
|
||||
}
|
||||
if( result ) {
|
||||
OS_TPrintf( "TSD read succeeded.\n" );
|
||||
}else {
|
||||
OS_TPrintf( "TSD read failed.\n" );
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static void DrawScene(void)
|
||||
{
|
||||
PutMainScreen( 5, 2, 0xf8, " ------------------- ");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user