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 \
|
common.c \
|
||||||
font.c \
|
font.c \
|
||||||
screen.c \
|
screen.c \
|
||||||
hwi.c \
|
|
||||||
kami_pxi.c \
|
kami_pxi.c \
|
||||||
kami_write_nandfirm.c \
|
kami_write_nandfirm.c \
|
||||||
|
|
||||||
@ -48,7 +47,6 @@ LINCLUDES = ../common/include \
|
|||||||
../../common/ARM9/include
|
../../common/ARM9/include
|
||||||
|
|
||||||
SRCDIR = src \
|
SRCDIR = src \
|
||||||
../../HWInfoWriter/ARM9/src \
|
|
||||||
../../common/ARM9/src
|
../../common/ARM9/src
|
||||||
|
|
||||||
#LCFILE = # using default
|
#LCFILE = # using default
|
||||||
@ -57,31 +55,31 @@ SRCDIR = src \
|
|||||||
|
|
||||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||||
|
|
||||||
MAKEROM_FLAGS += -DTITLEID_LO='$(TITLEID_LO)' \
|
MAKEROM_FLAGS += -DTITLEID_LO='$(TITLEID_LO)' \
|
||||||
-DDISABLE_DEBUG='$(SYSM_DISABLE_DEBUG)'
|
-DDISABLE_DEBUG='$(SYSM_DISABLE_DEBUG)'
|
||||||
|
|
||||||
MAKETAD_FLAGS += -s
|
MAKETAD_FLAGS += -s
|
||||||
|
|
||||||
SYSMENU_LIBS = \
|
SYSMENU_LIBS = \
|
||||||
libnamut$(TWL_LIBSUFFIX).a
|
libnamut$(TWL_LIBSUFFIX).a
|
||||||
|
|
||||||
SDK_APPEND_LIBS = \
|
SDK_APPEND_LIBS = \
|
||||||
libes$(TWL_LIBSUFFIX).a \
|
libes$(TWL_LIBSUFFIX).a \
|
||||||
libboc$(TWL_LIBSUFFIX).a \
|
libboc$(TWL_LIBSUFFIX).a \
|
||||||
libsfs$(TWL_LIBSUFFIX).a \
|
libsfs$(TWL_LIBSUFFIX).a \
|
||||||
libnam$(TWL_LIBSUFFIX).a \
|
libnam$(TWL_LIBSUFFIX).a \
|
||||||
libsea$(TWL_LIBSUFFIX).a \
|
libsea$(TWL_LIBSUFFIX).a \
|
||||||
liblcfg$(TWL_LIBSUFFIX).a \
|
liblcfg$(TWL_LIBSUFFIX).a \
|
||||||
libna$(TWL_LIBSUFFIX).a \
|
libna$(TWL_LIBSUFFIX).a \
|
||||||
liberrorlog$(TWL_LIBSUFFIX).a
|
liberrorlog$(TWL_LIBSUFFIX).a
|
||||||
|
|
||||||
LLIBRARIES += $(SYSMENU_LIBS) $(SDK_APPEND_LIBS)
|
LLIBRARIES += $(SYSMENU_LIBS) $(SDK_APPEND_LIBS)
|
||||||
|
|
||||||
MAKEROM = $(TWL_TOOLSDIR)/bin/makerom.TWL.secure.exe
|
MAKEROM = $(TWL_TOOLSDIR)/bin/makerom.TWL.secure.exe
|
||||||
|
|
||||||
#LDIRT_CLEAN =
|
#LDIRT_CLEAN =
|
||||||
#INSTALL_TARGETS =
|
#INSTALL_TARGETS =
|
||||||
INSTALL_DIR = $(SDK_NMENU_DATADIR)
|
INSTALL_DIR = $(SDK_NMENU_DATADIR)
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@ -19,14 +19,12 @@
|
|||||||
#include <nitro/snd.h>
|
#include <nitro/snd.h>
|
||||||
#include <twl/fatfs.h>
|
#include <twl/fatfs.h>
|
||||||
#include <nitro/card.h>
|
#include <nitro/card.h>
|
||||||
#include <twl/nam.h>
|
|
||||||
#include <twl/os/common/format_rom.h>
|
#include <twl/os/common/format_rom.h>
|
||||||
#include <sysmenu/namut.h>
|
#include <twl/lcfg.h>
|
||||||
#include "kami_pxi.h"
|
#include "kami_pxi.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "kami_write_nandfirm.h"
|
#include "kami_write_nandfirm.h"
|
||||||
#include "hwi.h"
|
|
||||||
|
|
||||||
#define SCRAMBLE_MASK 0x00406000
|
#define SCRAMBLE_MASK 0x00406000
|
||||||
|
|
||||||
@ -48,6 +46,7 @@ static BOOL gResult;
|
|||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
static void VBlankIntr(void);
|
static void VBlankIntr(void);
|
||||||
static void InitAllocation(void);
|
static void InitAllocation(void);
|
||||||
|
static BOOL ReadTWLSettings( void );
|
||||||
static void DrawScene(void);
|
static void DrawScene(void);
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
@ -141,27 +140,8 @@ TwlMain()
|
|||||||
// 仮に未フォーマットであったとしてもBadFormat扱いとなる。2009/03/05
|
// 仮に未フォーマットであったとしてもBadFormat扱いとなる。2009/03/05
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// NAMライブラリ初期化
|
|
||||||
NAM_Init( OS_AllocFromMain, OS_FreeToMain);
|
|
||||||
NAMUT_Init( OS_AllocFromMain, OS_FreeToMain);
|
|
||||||
|
|
||||||
#ifndef TWL_CAPTURE_VERSION
|
#ifndef TWL_CAPTURE_VERSION
|
||||||
// HWInfo関連の前準備
|
ReadTWLSettings();
|
||||||
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;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gResult = FALSE;
|
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)
|
static void DrawScene(void)
|
||||||
{
|
{
|
||||||
PutMainScreen( 5, 2, 0xf8, " ------------------- ");
|
PutMainScreen( 5, 2, 0xf8, " ------------------- ");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user