ImportJump : 「Privateセーブデータファイルをクリアする」がチェックされていた場合にpublicをクリアしていた不具合を修正。

SystemUpdater : IS-TWL-DEBUGGERでの実行中にメッセージ表示を制御する仕組みを追加。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1843 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
kamikawa 2008-07-10 10:17:03 +00:00
parent c4a7e200a2
commit 5bf7a9fd2e
6 changed files with 119 additions and 51 deletions

View File

@ -170,6 +170,8 @@ BOOL kamiImportTad(NAMTitleId* pTitleID)
}
else
{
kamiFontPrintfMain( 4, 20, 1, "Import was failed! 0x%x", nam_result);
kamiFontLoadScreenData();
OS_Warning(" Fail! : NAM Result Code = 0x%x\n", nam_result);
return FALSE;
}
@ -197,7 +199,7 @@ BOOL kamiImportTad(NAMTitleId* pTitleID)
// privateセーブデータFFクリアフォーマット
if (GetImportJumpSetting()->clearPrivateSaveData && tadInfo.titleInfo.privateSaveSize > 0)
{
if (NAMUTi_ClearSavedataPublic(savePrivatePath, tadInfo.titleInfo.titleId) == FALSE)
if (NAMUTi_ClearSavedataPrivate(savePrivatePath, tadInfo.titleInfo.titleId) == FALSE)
{
OS_Warning(" Fail! NAMUTi_ClearSavedataPrivate\n");
}

View File

@ -53,7 +53,8 @@ SRCS = main.c \
hw_info.c \
keypad.c \
kami_copy_file.c \
debugger_hw_reset_control.c
debugger_hw_reset_control.c \
debugger_card_rom.c
LINCLUDES = include \
../common/include \

View File

@ -35,7 +35,6 @@ extern "C" {
*---------------------------------------------------------------------------*/
s32 kamiImportTad(int no, int total, const char* path);
void DrawResult(BOOL result);
/*===========================================================================*/

View File

@ -192,43 +192,3 @@ void ProgressDraw(f32 ratio)
// 3Dスワップ
G3_SwapBuffers(GX_SORTMODE_AUTO, GX_BUFFERMODE_W);
}
/*---------------------------------------------------------------------------*
Name: DrawResult
Description:
Arguments:
Returns: None.
*---------------------------------------------------------------------------*/
void DrawResult(BOOL result)
{
// 3D初期化
G3X_Reset();
G3_Identity();
G3_PolygonAttr(GX_LIGHTMASK_NONE, GX_POLYGONMODE_DECAL, GX_CULL_NONE, 0, 31, 0);
// "Now Updating.." を消去
kamiFontPrintfMain( 0, 9, 7, " ");
if (result)
{
kamiFontPrintfMain( 9, 10, 7, "Update Success!");
// グリーンダイアログ
DrawQuad( 50, 50, 206, 120, GX_RGB(12, 25, 12));
}
else
{
kamiFontPrintfMain( 9, 10, 7, "Update Failure!");
// レッドダイアログ
DrawQuad( 50, 50, 206, 120, GX_RGB(31, 0, 0));
}
kamiFontLoadScreenData();
// 3Dスワップ
G3_SwapBuffers(GX_SORTMODE_AUTO, GX_BUFFERMODE_W);
}

View File

@ -31,6 +31,7 @@
#include "hwi.h"
#include "keypad.h"
#include "debugger_hw_reset_control.h"
#include "debugger_card_rom.h"
extern const char *g_strIPLSvnRevision;
extern const char *g_strSDKSvnRevision;
@ -87,6 +88,7 @@ static NAMTitleId titleId;
static s16 printLine;
static vu8 sIsFormatFinish;
static u8 sFormatResult;
static s32 sLockId;
/*---------------------------------------------------------------------------*
@ -95,7 +97,9 @@ static void VBlankIntr(void);
static void InitAllocation(void);
static BOOL IgnoreRemoval(void);
static void DrawWaitButtonA(void);
static void DrawCancel(void);
static void DrawAlready(SystemUpdaterLog* log);
static void DrawResult(BOOL result);
static void FormatCallback(KAMIResult result, void* arg);
/*---------------------------------------------------------------------------*
@ -159,6 +163,9 @@ TwlMain()
InitGraphics();
kamiFontInit();
// メインスレッドのカードロックID取得
sLockId = OS_GetLockID();
/* always preload FS table for faster directory access. */
{
u32 need_size = FS_GetTableSize();
@ -212,10 +219,14 @@ TwlMain()
}
}
// Aボタン待ち
DrawWaitButtonA();
// TWLの更新処理を実行中です
CARD_LockRom((u16)sLockId);
(void)CARDi_ReadRomIDCoreEx(DEBUGGER_COMMAND_NOW_UPDATE);
CARD_UnlockRom((u16)sLockId);
// ISデバッガのハードウェアリセットを禁止する
DEBUGGER_HwResetDisable();
@ -376,6 +387,11 @@ TwlMain()
// ISデバッガのハードウェアリセットを許可する
DEBUGGER_HwResetEnable();
// TWLの更新処理が完了しました
CARD_LockRom((u16)sLockId);
(void)CARDi_ReadRomIDCoreEx(DEBUGGER_COMMAND_FINISHED);
CARD_UnlockRom((u16)sLockId);
// 結果表示
while(1)
{
@ -434,14 +450,20 @@ static void InitAllocation(void)
*---------------------------------------------------------------------------*/
static void DrawWaitButtonA(void)
{
// 液晶を見てください。
CARD_LockRom((u16)sLockId);
(void)CARDi_ReadRomIDCoreEx(DEBUGGER_COMMAND_LOOK_SCREEN);
CARD_UnlockRom((u16)sLockId);
kamiFontPrintfMain( 5, 3, 8, " System Updater ");
kamiFontPrintfMain( 4, 5, 8, " --- ver %s %s ---", g_strSDKSvnRevision, g_strIPLSvnRevision );
kamiFontPrintfMain( 5, 8, 3, "<Push A: Start Update>");
kamiFontPrintfMain( 3, 10, 1, "--------------------------");
kamiFontPrintfMain( 3, 11, 1, "Do not turn off power");
kamiFontPrintfMain( 3, 12, 1, "while update is processing");
kamiFontPrintfMain( 3, 13, 1, "--------------------------");
kamiFontPrintfMain( 5, 9, 3, " A Button: Start Update ");
kamiFontPrintfMain( 5, 10, 3, " B Button: Cancel Update ");
kamiFontPrintfMain( 3, 13, 1, "Do not turn off power");
kamiFontPrintfMain( 3, 14, 1, "while update is processing");
while(1)
{
@ -449,7 +471,7 @@ static void DrawWaitButtonA(void)
G3_Identity();
G3_PolygonAttr(GX_LIGHTMASK_NONE, GX_POLYGONMODE_DECAL, GX_CULL_NONE, 0, 31, 0);
DrawQuad( 10, 54, 246, 120, GX_RGB(28, 28, 28));
DrawQuad( 10, 54, 246, 150, GX_RGB(28, 28, 28));
G3_SwapBuffers(GX_SORTMODE_AUTO, GX_BUFFERMODE_W);
@ -459,6 +481,12 @@ static void DrawWaitButtonA(void)
kamiFontClearMain();
break;
}
else if (kamiPadIsTrigger(PAD_BUTTON_B))
{
kamiFontClearMain();
DrawCancel();
}
OS_WaitVBlankIntr();
}
@ -467,6 +495,41 @@ static void DrawWaitButtonA(void)
OS_WaitVBlankIntr();
}
/*---------------------------------------------------------------------------*
Name: DrawCancel
Description: Cancelを表示します
Arguments:
Returns: None.
*---------------------------------------------------------------------------*/
static void DrawCancel(void)
{
// キャンセルされました
CARD_LockRom((u16)sLockId);
(void)CARDi_ReadRomIDCoreEx(DEBUGGER_COMMAND_CANCELED);
CARD_UnlockRom((u16)sLockId);
kamiFontPrintfMain( 3, 9, 1, "--------------------------");
kamiFontPrintfMain( 3, 10, 1, " Update was Canceld.");
kamiFontPrintfMain( 3, 11, 1, "--------------------------");
while(1)
{
G3X_Reset();
G3_Identity();
G3_PolygonAttr(GX_LIGHTMASK_NONE, GX_POLYGONMODE_DECAL, GX_CULL_NONE, 0, 31, 0);
DrawQuad( 10, 50, 246, 128, GX_RGB(28, 28, 28));
G3_SwapBuffers(GX_SORTMODE_AUTO, GX_BUFFERMODE_W);
OS_WaitVBlankIntr();
}
}
/*---------------------------------------------------------------------------*
Name: DrawAlready
@ -478,6 +541,11 @@ static void DrawWaitButtonA(void)
*---------------------------------------------------------------------------*/
static void DrawAlready(SystemUpdaterLog* log)
{
// 既にアップデート済み
CARD_LockRom((u16)sLockId);
(void)CARDi_ReadRomIDCoreEx(DEBUGGER_COMMAND_ALREADY);
CARD_UnlockRom((u16)sLockId);
kamiFontPrintfMain( 3, 8, 1, "--------------------------");
kamiFontPrintfMain( 3, 9, 1, "This machine has already");
kamiFontPrintfMain( 3, 10, 1, "been updated.");
@ -498,6 +566,44 @@ static void DrawAlready(SystemUpdaterLog* log)
}
}
/*---------------------------------------------------------------------------*
Name: DrawResult
Description:
Arguments:
Returns: None.
*---------------------------------------------------------------------------*/
static void DrawResult(BOOL result)
{
// 3D初期化
G3X_Reset();
G3_Identity();
G3_PolygonAttr(GX_LIGHTMASK_NONE, GX_POLYGONMODE_DECAL, GX_CULL_NONE, 0, 31, 0);
// "Now Updating.." を消去
kamiFontPrintfMain( 0, 9, 7, " ");
if (result)
{
kamiFontPrintfMain( 9, 10, 7, "Update Success!");
// グリーンダイアログ
DrawQuad( 50, 50, 206, 120, GX_RGB(12, 25, 12));
}
else
{
kamiFontPrintfMain( 9, 10, 7, "Update Failure!");
// レッドダイアログ
DrawQuad( 50, 50, 206, 120, GX_RGB(31, 0, 0));
}
kamiFontLoadScreenData();
// 3Dスワップ
G3_SwapBuffers(GX_SORTMODE_AUTO, GX_BUFFERMODE_W);
}
/*---------------------------------------------------------------------------*
Name: FormatCallback

View File

@ -35,7 +35,7 @@
vu8 sHwResetEnable = TRUE;
OSThread sThread;
u32 sStack[1024];
s32 sLockId;
static s32 sLockId;
/*---------------------------------------------------------------------------*
ŠÖ<EFBFBD><EFBFBD>錾