mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
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:
parent
c4a7e200a2
commit
5bf7a9fd2e
@ -170,6 +170,8 @@ BOOL kamiImportTad(NAMTitleId* pTitleID)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
kamiFontPrintfMain( 4, 20, 1, "Import was failed! 0x%x", nam_result);
|
||||||
|
kamiFontLoadScreenData();
|
||||||
OS_Warning(" Fail! : NAM Result Code = 0x%x\n", nam_result);
|
OS_Warning(" Fail! : NAM Result Code = 0x%x\n", nam_result);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -197,7 +199,7 @@ BOOL kamiImportTad(NAMTitleId* pTitleID)
|
|||||||
// privateセーブデータFFクリア&フォーマット
|
// privateセーブデータFFクリア&フォーマット
|
||||||
if (GetImportJumpSetting()->clearPrivateSaveData && tadInfo.titleInfo.privateSaveSize > 0)
|
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");
|
OS_Warning(" Fail! NAMUTi_ClearSavedataPrivate\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,8 @@ SRCS = main.c \
|
|||||||
hw_info.c \
|
hw_info.c \
|
||||||
keypad.c \
|
keypad.c \
|
||||||
kami_copy_file.c \
|
kami_copy_file.c \
|
||||||
debugger_hw_reset_control.c
|
debugger_hw_reset_control.c \
|
||||||
|
debugger_card_rom.c
|
||||||
|
|
||||||
LINCLUDES = include \
|
LINCLUDES = include \
|
||||||
../common/include \
|
../common/include \
|
||||||
|
|||||||
@ -35,7 +35,6 @@ extern "C" {
|
|||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
s32 kamiImportTad(int no, int total, const char* path);
|
s32 kamiImportTad(int no, int total, const char* path);
|
||||||
void DrawResult(BOOL result);
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
|||||||
@ -192,43 +192,3 @@ void ProgressDraw(f32 ratio)
|
|||||||
// 3Dスワップ
|
// 3Dスワップ
|
||||||
G3_SwapBuffers(GX_SORTMODE_AUTO, GX_BUFFERMODE_W);
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
#include "hwi.h"
|
#include "hwi.h"
|
||||||
#include "keypad.h"
|
#include "keypad.h"
|
||||||
#include "debugger_hw_reset_control.h"
|
#include "debugger_hw_reset_control.h"
|
||||||
|
#include "debugger_card_rom.h"
|
||||||
|
|
||||||
extern const char *g_strIPLSvnRevision;
|
extern const char *g_strIPLSvnRevision;
|
||||||
extern const char *g_strSDKSvnRevision;
|
extern const char *g_strSDKSvnRevision;
|
||||||
@ -87,6 +88,7 @@ static NAMTitleId titleId;
|
|||||||
static s16 printLine;
|
static s16 printLine;
|
||||||
static vu8 sIsFormatFinish;
|
static vu8 sIsFormatFinish;
|
||||||
static u8 sFormatResult;
|
static u8 sFormatResult;
|
||||||
|
static s32 sLockId;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
内部関数定義
|
内部関数定義
|
||||||
@ -95,7 +97,9 @@ static void VBlankIntr(void);
|
|||||||
static void InitAllocation(void);
|
static void InitAllocation(void);
|
||||||
static BOOL IgnoreRemoval(void);
|
static BOOL IgnoreRemoval(void);
|
||||||
static void DrawWaitButtonA(void);
|
static void DrawWaitButtonA(void);
|
||||||
|
static void DrawCancel(void);
|
||||||
static void DrawAlready(SystemUpdaterLog* log);
|
static void DrawAlready(SystemUpdaterLog* log);
|
||||||
|
static void DrawResult(BOOL result);
|
||||||
static void FormatCallback(KAMIResult result, void* arg);
|
static void FormatCallback(KAMIResult result, void* arg);
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
@ -159,6 +163,9 @@ TwlMain()
|
|||||||
InitGraphics();
|
InitGraphics();
|
||||||
kamiFontInit();
|
kamiFontInit();
|
||||||
|
|
||||||
|
// メインスレッドのカードロックID取得
|
||||||
|
sLockId = OS_GetLockID();
|
||||||
|
|
||||||
/* always preload FS table for faster directory access. */
|
/* always preload FS table for faster directory access. */
|
||||||
{
|
{
|
||||||
u32 need_size = FS_GetTableSize();
|
u32 need_size = FS_GetTableSize();
|
||||||
@ -212,10 +219,14 @@ TwlMain()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Aボタン待ち
|
// Aボタン待ち
|
||||||
DrawWaitButtonA();
|
DrawWaitButtonA();
|
||||||
|
|
||||||
|
// TWLの更新処理を実行中です
|
||||||
|
CARD_LockRom((u16)sLockId);
|
||||||
|
(void)CARDi_ReadRomIDCoreEx(DEBUGGER_COMMAND_NOW_UPDATE);
|
||||||
|
CARD_UnlockRom((u16)sLockId);
|
||||||
|
|
||||||
// ISデバッガのハードウェアリセットを禁止する
|
// ISデバッガのハードウェアリセットを禁止する
|
||||||
DEBUGGER_HwResetDisable();
|
DEBUGGER_HwResetDisable();
|
||||||
|
|
||||||
@ -376,6 +387,11 @@ TwlMain()
|
|||||||
// ISデバッガのハードウェアリセットを許可する
|
// ISデバッガのハードウェアリセットを許可する
|
||||||
DEBUGGER_HwResetEnable();
|
DEBUGGER_HwResetEnable();
|
||||||
|
|
||||||
|
// TWLの更新処理が完了しました
|
||||||
|
CARD_LockRom((u16)sLockId);
|
||||||
|
(void)CARDi_ReadRomIDCoreEx(DEBUGGER_COMMAND_FINISHED);
|
||||||
|
CARD_UnlockRom((u16)sLockId);
|
||||||
|
|
||||||
// 結果表示
|
// 結果表示
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
@ -434,14 +450,20 @@ static void InitAllocation(void)
|
|||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
static void DrawWaitButtonA(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( 5, 3, 8, " System Updater ");
|
||||||
kamiFontPrintfMain( 4, 5, 8, " --- ver %s %s ---", g_strSDKSvnRevision, g_strIPLSvnRevision );
|
kamiFontPrintfMain( 4, 5, 8, " --- ver %s %s ---", g_strSDKSvnRevision, g_strIPLSvnRevision );
|
||||||
|
|
||||||
kamiFontPrintfMain( 5, 8, 3, "<Push A: Start Update>");
|
kamiFontPrintfMain( 5, 9, 3, " A Button: Start Update ");
|
||||||
kamiFontPrintfMain( 3, 10, 1, "--------------------------");
|
kamiFontPrintfMain( 5, 10, 3, " B Button: Cancel Update ");
|
||||||
kamiFontPrintfMain( 3, 11, 1, "Do not turn off power");
|
|
||||||
kamiFontPrintfMain( 3, 12, 1, "while update is processing");
|
kamiFontPrintfMain( 3, 13, 1, "Do not turn off power");
|
||||||
kamiFontPrintfMain( 3, 13, 1, "--------------------------");
|
kamiFontPrintfMain( 3, 14, 1, "while update is processing");
|
||||||
|
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
@ -449,7 +471,7 @@ static void DrawWaitButtonA(void)
|
|||||||
G3_Identity();
|
G3_Identity();
|
||||||
G3_PolygonAttr(GX_LIGHTMASK_NONE, GX_POLYGONMODE_DECAL, GX_CULL_NONE, 0, 31, 0);
|
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);
|
G3_SwapBuffers(GX_SORTMODE_AUTO, GX_BUFFERMODE_W);
|
||||||
|
|
||||||
@ -459,6 +481,12 @@ static void DrawWaitButtonA(void)
|
|||||||
kamiFontClearMain();
|
kamiFontClearMain();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else if (kamiPadIsTrigger(PAD_BUTTON_B))
|
||||||
|
{
|
||||||
|
kamiFontClearMain();
|
||||||
|
DrawCancel();
|
||||||
|
}
|
||||||
|
|
||||||
OS_WaitVBlankIntr();
|
OS_WaitVBlankIntr();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -467,6 +495,41 @@ static void DrawWaitButtonA(void)
|
|||||||
OS_WaitVBlankIntr();
|
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
|
Name: DrawAlready
|
||||||
|
|
||||||
@ -478,6 +541,11 @@ static void DrawWaitButtonA(void)
|
|||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
static void DrawAlready(SystemUpdaterLog* log)
|
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, 8, 1, "--------------------------");
|
||||||
kamiFontPrintfMain( 3, 9, 1, "This machine has already");
|
kamiFontPrintfMain( 3, 9, 1, "This machine has already");
|
||||||
kamiFontPrintfMain( 3, 10, 1, "been updated.");
|
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
|
Name: FormatCallback
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
vu8 sHwResetEnable = TRUE;
|
vu8 sHwResetEnable = TRUE;
|
||||||
OSThread sThread;
|
OSThread sThread;
|
||||||
u32 sStack[1024];
|
u32 sStack[1024];
|
||||||
s32 sLockId;
|
static s32 sLockId;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
ŠÖ<EFBFBD>”<EFBFBD>錾
|
ŠÖ<EFBFBD>”<EFBFBD>錾
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user