SystemMenuResionSelectのバージョン 1.0b->1.0c

写真帳とDSiサウンドの追加に対応。
データを2重持ちしないようにdataフォルダの構成を変更。合わせてreadmeも修正。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2671 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
kamikawa 2008-11-12 11:33:49 +00:00
parent 6c7b3db537
commit 482ba07434
6 changed files with 99 additions and 32 deletions

View File

@ -47,7 +47,7 @@ typedef enum
è<EFBFBD>è`
*---------------------------------------------------------------------------*/
#define SYSTEM_UPDATER_NAME L"SystemUpdater ver.1.0b"
#define SYSTEM_UPDATER_NAME L"SystemUpdater ver.1.0c"
#define SYSTEM_UPDATER_LOG_PATH "nand:/sys/log/updater.log"
#define SYSTEM_UPDATER_MAGIC_CODE 44001111
@ -60,8 +60,6 @@ extern const char *g_strSDKSvnRevision;
extern s32 gLockId;
extern const u16* sRegionStringArray[4];
extern OSTWLRegion gRegion;
extern const char* gDirectoryNameConsole[];
extern const char* gDirectoryNameRegion[];
/*---------------------------------------------------------------------------*
ŠÖ<EFBFBD><EFBFBD>錾

View File

@ -74,6 +74,22 @@ static const u64 sTitleIdListHNL[TITLE_ID_LIST_NUM] =
0x0003000f484e4c55, // Australia HNLU
};
static const u64 sTitleIdListHNI[TITLE_ID_LIST_NUM] =
{
0x00030005484e494A, // Japan HNIJ
0x00030005484e4945, // America HNIE
0x00030005484e4950, // Europe HNIP
0x00030005484e4955, // Australia HNIU
};
static const u64 sTitleIdListHNK[TITLE_ID_LIST_NUM] =
{
0x00030005484e4B4A, // Japan HNKJ
0x00030005484e4B45, // America HNKE
0x00030005484e4B50, // Europe HNKP
0x00030005484e4B55, // Australia HNKU
};
/*---------------------------------------------------------------------------*
àŠÖ<EFBFBD><EFBFBD>錾
*---------------------------------------------------------------------------*/
@ -131,6 +147,24 @@ BOOL ProcessDeleteOtherResionSysmenu(void)
}
}
// 選択リージョンと異なる写真帳は消去する
for (i=0;i<TITLE_ID_LIST_NUM;i++)
{
if (i != gRegion)
{
ret = DeleteTitle( sTitleIdListHNI[i] );
}
}
// 選択リージョンと異なるDSiサウンドは消去する
for (i=0;i<TITLE_ID_LIST_NUM;i++)
{
if (i != gRegion)
{
ret = DeleteTitle( sTitleIdListHNK[i] );
}
}
return ret;
}

View File

@ -39,7 +39,7 @@
#define THREAD_STACK_SIZE (16*1024)
const char* gDirectoryNameRegion[] =
static const char* sDirectoryNameRegion[] =
{
"japan",
"america",
@ -47,7 +47,7 @@ const char* gDirectoryNameRegion[] =
"australia"
};
const char* gDirectoryNameConsole[] =
static const char* sDirectoryNameConsole[] =
{
"debugger", // IS_TWL_DEBUGGER
"standalone", // IS_TWL_CAPTURE
@ -72,6 +72,7 @@ static s32 kamiImportTad(const char* path, BOOL erase);
static void ProgressThread(void* arg);
static void Destructor(void* arg);
void ProgressDraw(f32 ratio);
BOOL ImportDirectoryTad(char* directory);
/*---------------------------------------------------------------------------*
@ -88,11 +89,9 @@ void ProgressDraw(f32 ratio);
*---------------------------------------------------------------------------*/
BOOL ProcessImport(void)
{
FSFile dir;
FSDirectoryEntryInfo info[1];
const s32 MAX_RETRY_COUNT = 2;
BOOL result = TRUE;
char full_path[FS_ENTRY_LONGNAME_MAX+6];
char directory[FS_ENTRY_LONGNAME_MAX+6];
s32 i=0;
s32 j=0;
@ -113,11 +112,44 @@ BOOL ProcessImport(void)
OS_WaitVBlankIntr();
}
// 適切なディレクトリを開く
STD_TSNPrintf(full_path, sizeof(full_path), "rom:/data/%s/%s/", gDirectoryNameConsole[GetConsole()], gDirectoryNameRegion[gRegion]);
STD_TSNPrintf(directory, sizeof(directory), "rom:/data/%s/%s/", sDirectoryNameConsole[GetConsole()], sDirectoryNameRegion[gRegion]);
result &= ImportDirectoryTad(directory);
STD_TSNPrintf(directory, sizeof(directory), "rom:/data/common/%s/", sDirectoryNameRegion[gRegion]);
result &= ImportDirectoryTad(directory);
STD_TSNPrintf(directory, sizeof(directory), "rom:/data/common/");
result &= ImportDirectoryTad(directory);
while (!FadeOutTick())
{
OS_WaitVBlankIntr();
}
return result;
}
/*---------------------------------------------------------------------------*
Name: ImportDirectoryTad
Description: TADを無条件にImportします
Arguments: path
Returns:
*---------------------------------------------------------------------------*/
BOOL ImportDirectoryTad(char* directory)
{
FSFile dir;
FSDirectoryEntryInfo info[1];
const s32 MAX_RETRY_COUNT = 2;
BOOL result = TRUE;
char full_path[FS_ENTRY_LONGNAME_MAX+6];
static s32 listNo=0;
s32 j=0;
FS_InitFile(&dir);
if (!FS_OpenDirectory(&dir, full_path, FS_FILEMODE_R))
if (!FS_OpenDirectory(&dir, directory, FS_FILEMODE_R))
{
kamiFontPrintfConsole(CONSOLE_RED, "Error FS_OpenDirectory()\n");
return FALSE;
@ -143,7 +175,7 @@ BOOL ProcessImport(void)
if (!STD_CompareString( pExtension, ".tad") || !STD_CompareString( pExtension, ".TAD") )
{
STD_TSPrintf(string1, "List %d ", ++i);
STD_TSPrintf(string1, "List %d ", ++listNo);
STD_ConvertStringSjisToUnicode(string2, NULL, string1, NULL, NULL);
NNS_G2dCharCanvasClearArea(&gCanvas, TXT_COLOR_WHITE, 0, 60, 256, 20);
@ -152,7 +184,7 @@ BOOL ProcessImport(void)
NNS_G2dTextCanvasDrawText(&gTextCanvas, 135, 60,
TXT_COLOR_WHITE_BASE, TXT_DRAWTEXT_FLAG_DEFAULT, (const char*)string2);
STD_TSNPrintf(full_path, sizeof(full_path), "rom:/data/%s/%s/%s", gDirectoryNameConsole[GetConsole()], gDirectoryNameRegion[gRegion], info->longname);
STD_TSNPrintf(full_path, sizeof(full_path), "%s/%s", directory, info->longname);
// kamiFontPrintfConsole(CONSOLE_GREEN, " %s\n", full_path);
// MAX_RETRY_COUNTまでリトライする
@ -165,17 +197,17 @@ BOOL ProcessImport(void)
}
else
{
kamiFontPrintfConsole(CONSOLE_GREEN, "Import %d Retry!\n", i);
kamiFontPrintfConsole(CONSOLE_GREEN, "Import %d Retry!\n", listNo);
}
}
if ( nam_result == NAM_OK)
{
kamiFontPrintfConsole(FONT_COLOR_GREEN, "List : %d Import Success.\n", i);
kamiFontPrintfConsole(FONT_COLOR_GREEN, "List : %d Import Success.\n", listNo);
}
else
{
kamiFontPrintfConsole(FONT_COLOR_RED, "Error: %d : RetCode = %d\n", i, nam_result );
kamiFontPrintfConsole(FONT_COLOR_RED, "Error: %d : RetCode = %d\n", listNo, nam_result );
result = FALSE;
}
@ -185,11 +217,6 @@ BOOL ProcessImport(void)
}
}
while (!FadeOutTick())
{
OS_WaitVBlankIntr();
}
return result;
}

View File

@ -69,7 +69,7 @@ BOOL ProcessNandfirm(void)
int i;
// 適切なディレクトリを開く
STD_TSNPrintf(full_path, sizeof(full_path), "rom:/data/%s/%s/", gDirectoryNameConsole[GetConsole()], gDirectoryNameRegion[gRegion]);
STD_TSNPrintf(full_path, sizeof(full_path), "rom:/data/common/");
FS_InitFile(&dir);
if (!FS_OpenDirectory(&dir, full_path, FS_FILEMODE_R))
@ -91,7 +91,7 @@ BOOL ProcessNandfirm(void)
{
if (!STD_CompareString( pExtension, ".nand") || !STD_CompareString( pExtension, ".NAND") )
{
STD_TSNPrintf(full_path, sizeof(full_path), "rom:/data/%s/%s/%s", gDirectoryNameConsole[GetConsole()], gDirectoryNameRegion[gRegion], info->longname);
STD_TSNPrintf(full_path, sizeof(full_path), "rom:/data/common/%s", info->longname);
find = TRUE;
break;
}

View File

@ -88,7 +88,7 @@ BOOL ProcessWriteFont(void)
*/
// 適切なディレクトリを開く
STD_TSNPrintf(full_path, sizeof(full_path), "rom:/data/%s/%s/", gDirectoryNameConsole[GetConsole()], gDirectoryNameRegion[gRegion]);
STD_TSNPrintf(full_path, sizeof(full_path), "rom:/data/common/");
FS_InitFile(&dir);
if (!FS_OpenDirectory(&dir, full_path, FS_FILEMODE_R))
@ -110,7 +110,7 @@ BOOL ProcessWriteFont(void)
{
if (!STD_CompareString( pExtension, ".dat") || !STD_CompareString( pExtension, ".DAT") )
{
STD_TSNPrintf(full_path, sizeof(full_path), "rom:/data/%s/%s/%s", gDirectoryNameConsole[GetConsole()], gDirectoryNameRegion[gRegion], info->longname);
STD_TSNPrintf(full_path, sizeof(full_path), "rom:/data/common/%s", info->longname);
find = TRUE;
break;
}

View File

@ -6,19 +6,27 @@
ARM9/Makefileの UPDATER_HOST_ROOT_DIR変数で指定してください。
xxxxx
+debugger
+common
l +$
l +america/*
l +australia/*
l +europe/*
l +japan/*
+debugger
l +america/#
l +australia/#
l +europe/#
l +japan/#
l
+standalone
+america/*
+australia/*
+europe/*
+japan/*
+america/#
+australia/#
+europe/#
+japan/#
上記の*には、
全tadとnandファームとフォントデータを置いてください。
配置図:
# -> ランチャーと本体設定のtad (開発機用とデバッガ用で内容が異なるもの)
* -> 上記以外でALLリージョンでないtad
$ -> 上記以外のtad 及び nandファーム 及び フォントデータ