NANDの擬似フォーマット処理に対応。シーン切り替えにフェード効果を追加。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@626 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
kamikawa 2008-02-08 08:56:10 +00:00
parent ee629a8448
commit 196826e6af
16 changed files with 421 additions and 153 deletions

View File

@ -23,7 +23,7 @@ Static $(TARGET_NAME)
Address $(ADDRESS_STATIC)
Object $(OBJS_STATIC)
Library $(LLIBS) $(GLIBS) $(CW_LIBS)
StackSize 2048 2048
StackSize 4096 4096
}
Autoload ITCM

View File

@ -58,7 +58,9 @@ SRCS = main.c \
process_import.c \
process_nandfirm.c \
process_norfirm.c \
process_auto.c
process_auto.c \
process_fade.c \
sd_event.c
LINCLUDES = ../common/include \
$(ROOT)/build/libraries/lcfg/ARM9.TWL/include
@ -86,7 +88,8 @@ endif
LLIBRARIES += libes$(TWL_LIBSUFFIX).a \
libboc$(TWL_LIBSUFFIX).a \
libnam$(TWL_LIBSUFFIX).a \
libacsign_enc$(TWL_LIBSUFFIX).a
libacsign_enc$(TWL_LIBSUFFIX).a \
libnamut$(TWL_LIBSUFFIX).a
#include $(TWLSDK_ROOT)/build/buildtools/commondefs

View File

@ -11,8 +11,8 @@
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#ifndef PROCESS_ETICKET_H_
@ -29,8 +29,8 @@ extern "C" {
/*---------------------------------------------------------------------------*
è<EFBFBD>è`
*---------------------------------------------------------------------------*/
#define E_TICKET_FILE_PATH_IN_ROM "data/cert.sys"
#define E_TICKET_FILE_PATH_IN_NAND "F:sys/cert.sys"
#define E_TICKET_FILE_PATH_IN_ROM "rom:/data/cert.sys"
#define E_TICKET_FILE_PATH_IN_NAND "nand:sys/cert.sys"
/*---------------------------------------------------------------------------*
ŠÖ<EFBFBD>è`

View File

@ -0,0 +1,59 @@
/*---------------------------------------------------------------------------*
Project: TwlSDK - NandInitializer
File: process_fade.h
Copyright 2008 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
*---------------------------------------------------------------------------*/
#ifndef PROCESS_FADE_H_
#define PROCESS_FADE_H_
#ifdef __cplusplus
extern "C" {
#endif
/*===========================================================================*/
#include <twl.h>
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
typedef void* (*Process)(void);
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
#define FADE_IN_RETURN(P) SetNextProcess(P);return fadeInProcess;
#define FADE_OUT_RETURN(P) SetNextProcess(P);return fadeOutProcess;
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
void* fadeInProcess(void);
void* fadeOutProcess(void);
void SetNextProcess(Process process);
/*===========================================================================*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* PROCESS_FADE_H_ */
/*---------------------------------------------------------------------------*
End of file
*---------------------------------------------------------------------------*/

View File

@ -0,0 +1,45 @@
/*---------------------------------------------------------------------------*
Project: TwlSDK - NandInitializer
File: sd_event.h
Copyright 2008 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
*---------------------------------------------------------------------------*/
#ifndef SD_EVENT_H_
#define SD_EVENT_H_
#ifdef __cplusplus
extern "C" {
#endif
/*===========================================================================*/
#include <nitro.h>
/*---------------------------------------------------------------------------*
ŠÖ<EFBFBD>è`
*---------------------------------------------------------------------------*/
void SDEvents(void *userdata, FSEvent event, void *arg);
/*===========================================================================*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* SD_EVENT_H_ */
/*---------------------------------------------------------------------------*
End of file
*---------------------------------------------------------------------------*/

View File

@ -11,31 +11,31 @@
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#include <twl.h>
#include <nitro/snd.h>
#include <twl/fatfs.h>
#include <nitro/card.h>
#include <twl/nam.h>
#include "kami_font.h"
#include "process_format.h"
#include "process_topmenu.h"
#include "graphics.h"
#include "keypad.h"
#include "kami_pxi.h"
#include <twl/fatfs.h>
#include <nitro/card.h>
#include <twl/nam.h>
#include "sd_event.h"
#include "process_fade.h"
extern void HWInfoWriterInit( void );
typedef void* (*Process)(void);
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
static Process sProcess;
static FSEventHook sSDHook;
/*---------------------------------------------------------------------------*
@ -84,8 +84,10 @@ TwlMain()
(void)OS_EnableIrq();
(void)GX_VBlankIntr(TRUE);
/* initialize file-system */
// initialize file-system
FS_Init(FS_DMA_NOT_USE);
// SDカードの挿抜イベント監視コールバック設定
FS_RegisterEventHook("sdmc", &sSDHook, SDEvents, NULL);
// SD起動などあらゆるマウント状態に対応する
FATFS_UnmountDrive("F:");

View File

@ -11,8 +11,8 @@
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#include <twl.h>
@ -25,6 +25,7 @@
#include "process_nandfirm.h"
#include "process_norfirm.h"
#include "process_auto.h"
#include "process_fade.h"
#include "cursor.h"
#include "keypad.h"
@ -183,10 +184,13 @@ void* AutoProcess2(void)
kamiFontFillChar(18, bg_color, bg_color );
kamiFontFillChar(19, bg_color, BG_COLOR_TRANS );
// カーソル消去
SetCursorPos((u16)200, (u16)200);
// ƒI<C692>[ƒgƒtƒ‰ƒOƒNƒŠƒA
gAutoFlag = FALSE;
return AutoProcess3;
FADE_IN_RETURN( AutoProcess3 );
}
/*---------------------------------------------------------------------------*
@ -203,7 +207,7 @@ void* AutoProcess3(void)
{
if (kamiPadIsTrigger(PAD_BUTTON_B))
{
return TopmenuProcess0;
FADE_OUT_RETURN( TopmenuProcess0 );
}
return AutoProcess3;

View File

@ -11,8 +11,8 @@
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#include <twl.h>
@ -24,6 +24,7 @@
#include "process_topmenu.h"
#include "process_eticket.h"
#include "process_auto.h"
#include "process_fade.h"
#include "cursor.h"
#include "keypad.h"
@ -98,7 +99,10 @@ void* eTicketProcess0(void)
kamiFontFillChar( 1, BG_COLOR_GRAY, BG_COLOR_GRAY );
kamiFontFillChar( 2, BG_COLOR_GRAY, BG_COLOR_TRANS );
return eTicketProcess1;
// カーソル消去
SetCursorPos((u16)200, (u16)200);
FADE_IN_RETURN( eTicketProcess1 );
}
/*---------------------------------------------------------------------------*
@ -141,7 +145,7 @@ void* eTicketProcess1(void)
// トップメニューへ戻る
else if (kamiPadIsTrigger(PAD_BUTTON_B))
{
return TopmenuProcess0;
FADE_OUT_RETURN( TopmenuProcess0 );
}
return eTicketProcess1;
@ -175,34 +179,19 @@ void* eTicketProcess2(void)
}
break;
case 1:
return TopmenuProcess0;
FADE_OUT_RETURN( TopmenuProcess0 );
}
// Auto用
if (gAutoFlag)
{
if (result) return AutoProcess1;
else return AutoProcess2;
if (result) { FADE_OUT_RETURN( AutoProcess1 ); }
else { FADE_OUT_RETURN( AutoProcess2); }
}
return eTicketProcess1;
}
/*---------------------------------------------------------------------------*
Name: eTicket ƒ<EFBFBD>ƒZƒXR
Description:
Arguments: None.
Returns: next sequence
*---------------------------------------------------------------------------*/
void* eTicketProcess3(void)
{
return eTicketProcess3;
}
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/

View File

@ -0,0 +1,109 @@
/*---------------------------------------------------------------------------*
Project: TwlSDK - NandInitializer
File: process_fade.c
Copyright 2008 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
*---------------------------------------------------------------------------*/
#include <twl.h>
#include "process_fade.h"
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
static Process sNextProcess;
static int brightness = 16;
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
static BOOL MakeETicketFile(void);
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*
Name: fadeInProcess
Description: sNextProcessに遷移します
Arguments: None.
Returns: next sequence
*---------------------------------------------------------------------------*/
void* fadeInProcess(void)
{
if (--brightness < 0)
{
brightness = 0;
return sNextProcess;
}
else
{
GXS_SetMasterBrightness(brightness);
return fadeInProcess;
}
}
/*---------------------------------------------------------------------------*
Name: fadeOutProcess
Description: sNextProcessに遷移します
Arguments: None.
Returns: next sequence
*---------------------------------------------------------------------------*/
void* fadeOutProcess(void)
{
if (++brightness > 16)
{
brightness = 16;
return sNextProcess;
}
else
{
GXS_SetMasterBrightness(brightness);
return fadeOutProcess;
}
}
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*
Name: SetNextProcess
Description: 使使
Arguments: processフェード完了後のプロセス
Returns: None.
*---------------------------------------------------------------------------*/
void SetNextProcess(Process process)
{
sNextProcess = process;
}

View File

@ -11,8 +11,8 @@
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#include <twl.h>
@ -24,9 +24,12 @@
#include "process_topmenu.h"
#include "process_format.h"
#include "process_auto.h"
#include "process_fade.h"
#include "cursor.h"
#include "keypad.h"
#include <sysmenu/namut.h>
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
@ -35,10 +38,11 @@
*---------------------------------------------------------------------------*/
#define NUM_OF_MENU_SELECT 4
#define NUM_OF_MENU_SELECT 5
#define DOT_OF_MENU_SPACE 16
#define CURSOR_ORIGIN_X 32
#define CURSOR_ORIGIN_Y 56
#define CHAR_OF_MENU_SPACE 2
/*---------------------------------------------------------------------------*
@ -81,14 +85,16 @@ void* FormatProcess0(void)
// メニュー一覧
kamiFontPrintf(3, 6, FONT_COLOR_BLACK, "+-------------------+-----+");
kamiFontPrintf(3, 7, FONT_COLOR_BLACK, "l QUICK FORMAT l l");
kamiFontPrintf(3, 7, FONT_COLOR_BLACK, "l FORMAT <Easy> l l");
kamiFontPrintf(3, 8, FONT_COLOR_BLACK, "+-------------------+-----+");
kamiFontPrintf(3, 9, FONT_COLOR_BLACK, "l FULL FORMAT l l");
kamiFontPrintf(3, 9, FONT_COLOR_BLACK, "l FORMAT <Normal> l l");
kamiFontPrintf(3, 10, FONT_COLOR_BLACK, "+-------------------+-----+");
kamiFontPrintf(3, 11, FONT_COLOR_BLACK, "l CHECK DISK l l");
kamiFontPrintf(3, 11, FONT_COLOR_BLACK, "l FORMAT <Fill ff> l l");
kamiFontPrintf(3, 12, FONT_COLOR_BLACK, "+-------------------+-----+");
kamiFontPrintf(3, 13, FONT_COLOR_BLACK, "l RETURN l l");
kamiFontPrintf(3, 13, FONT_COLOR_BLACK, "l CHECK DISK l l");
kamiFontPrintf(3, 14, FONT_COLOR_BLACK, "+-------------------+-----+");
kamiFontPrintf(3, 15, FONT_COLOR_BLACK, "l RETURN l l");
kamiFontPrintf(3, 16, FONT_COLOR_BLACK, "+-------------------+-----+");
// 背景全クリア
for (i=0;i<24;i++)
@ -101,7 +107,10 @@ void* FormatProcess0(void)
kamiFontFillChar( 1, BG_COLOR_BLUE, BG_COLOR_BLUE );
kamiFontFillChar( 2, BG_COLOR_BLUE, BG_COLOR_TRANS );
return FormatProcess1;
// ƒJ<C692>[ƒ\ƒ<C692>œŠO
SetCursorPos((u16)200, (u16)200);
FADE_IN_RETURN( FormatProcess1 );
}
/*---------------------------------------------------------------------------*
@ -119,7 +128,7 @@ void* FormatProcess1(void)
// オート実行用
if (gAutoFlag)
{
sMenuSelectNo = 0;
sMenuSelectNo = 1;
return FormatProcess2;
}
@ -144,7 +153,7 @@ void* FormatProcess1(void)
// トップメニューへ戻る
else if (kamiPadIsTrigger(PAD_BUTTON_B))
{
return TopmenuProcess0;
FADE_OUT_RETURN( TopmenuProcess0 );
}
return FormatProcess1;
@ -164,24 +173,38 @@ void* FormatProcess2(void)
{
if (sLock == FALSE)
{
s16 y_pos = (s16)(7 + sMenuSelectNo * CHAR_OF_MENU_SPACE);
switch( sMenuSelectNo )
{
case 0:
sLock = TRUE;
ExeFormatAsync(FORMAT_MODE_QUICK, FormatCallback);
kamiFontPrintf(24, 7, FONT_COLOR_BLACK, " ");
return FormatProcess3;
// NAMUT_DrawNandTree();
if (NAMUT_Format())
{
kamiFontPrintf(24, y_pos, FONT_COLOR_GREEN, " OK ");
}
else
{
kamiFontPrintf(24, y_pos, FONT_COLOR_RED, " NG ");
}
// NAMUT_DrawNandTree();
return FormatProcess1;
case 1:
sLock = TRUE;
ExeFormatAsync(FORMAT_MODE_FULL, FormatCallback);
kamiFontPrintf(24, 9, FONT_COLOR_BLACK, " ");
ExeFormatAsync(FORMAT_MODE_QUICK, FormatCallback);
kamiFontPrintf(24, y_pos, FONT_COLOR_BLACK, " ");
return FormatProcess3;
case 2:
sLock = TRUE;
ExeFormatAsync(FORMAT_MODE_FULL, FormatCallback);
kamiFontPrintf(24, y_pos, FONT_COLOR_BLACK, " ");
return FormatProcess3;
case 3:
{
FATFSDiskInfo info;
BOOL result = FALSE;
kamiFontPrintf(24, 11, FONT_COLOR_BLACK, " ");
kamiFontPrintf(24, y_pos, FONT_COLOR_BLACK, " ");
kamiFontLoadScreenData();
FATFS_UnmountDrive("F:");
@ -208,13 +231,13 @@ void* FormatProcess2(void)
FATFS_UnmountDrive("G:");
FATFS_MountDrive("G", FATFS_MEDIA_TYPE_SD, 0);
if (result == TRUE) { kamiFontPrintf(24, 11, FONT_COLOR_GREEN, " OK "); }
else { kamiFontPrintf(24, 11, FONT_COLOR_RED, " NG "); }
if (result == TRUE) { kamiFontPrintf(24, y_pos, FONT_COLOR_GREEN, " OK "); }
else { kamiFontPrintf(24, y_pos, FONT_COLOR_RED, " NG "); }
return FormatProcess1;
}
case 3:
return TopmenuProcess0;
case 4:
FADE_OUT_RETURN( TopmenuProcess0 );
}
}
@ -223,10 +246,7 @@ void* FormatProcess2(void)
static void FormatCallback(KAMIResult result, void* /*arg*/)
{
s16 y_pos;
if ( sMenuSelectNo == 0 ) y_pos = 7;
else y_pos = 9;
s16 y_pos = (s16)(7 + sMenuSelectNo * CHAR_OF_MENU_SPACE);
if ( result == KAMI_RESULT_SUCCESS_TRUE )
{
@ -266,8 +286,8 @@ void* FormatProcess3(void)
// Auto用
if (gAutoFlag)
{
if (sFormatResult == TRUE) return AutoProcess1;
else return AutoProcess2;
if (sFormatResult == TRUE) { FADE_OUT_RETURN( AutoProcess1 ); }
else { FADE_OUT_RETURN( AutoProcess2 ); }
}
return FormatProcess1;
@ -287,8 +307,3 @@ void* FormatProcess3(void)
return FormatProcess3;
}
/*---------------------------------------------------------------------------*
<EFBFBD>ˆ<EFBFBD>ŠÖ<EFBFBD>è`
*---------------------------------------------------------------------------*/

View File

@ -11,8 +11,8 @@
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#include <twl.h>
@ -25,6 +25,7 @@
#include "process_topmenu.h"
#include "process_hw_info.h"
#include "process_auto.h"
#include "process_fade.h"
#include "cursor.h"
#include "keypad.h"
@ -173,10 +174,13 @@ void* HWInfoProcess0(void)
kamiFontFillChar( 1, BG_COLOR_PURPLE, BG_COLOR_PURPLE );
kamiFontFillChar( 2, BG_COLOR_PURPLE, BG_COLOR_TRANS );
// カーソル除外
SetCursorPos((u16)200, (u16)200);
// 前準備
HWInfoWriterInit();
return HWInfoProcess1;
FADE_IN_RETURN( HWInfoProcess1 );
}
/*---------------------------------------------------------------------------*
@ -219,7 +223,7 @@ void* HWInfoProcess1(void)
// トップメニューへ戻る
else if (kamiPadIsTrigger(PAD_BUTTON_B))
{
return TopmenuProcess0;
FADE_OUT_RETURN( TopmenuProcess0 );
}
return HWInfoProcess1;
@ -256,7 +260,7 @@ void* HWInfoProcess2(void)
result = DeleteHWInfoFile();
break;
case 7:
return TopmenuProcess0;
FADE_OUT_RETURN( TopmenuProcess0 );
}
// 全結果をクリア
@ -277,28 +281,13 @@ void* HWInfoProcess2(void)
// Auto用
if (gAutoFlag)
{
if (result) return AutoProcess1;
else return AutoProcess2;
if (result) { FADE_OUT_RETURN( AutoProcess1 ); }
else { FADE_OUT_RETURN( AutoProcess2 ); }
}
return HWInfoProcess1;
}
/*---------------------------------------------------------------------------*
Name: HWInfo ƒ<EFBFBD>ƒZƒXR
Description:
Arguments: None.
Returns: next sequence
*---------------------------------------------------------------------------*/
void* HWInfoProcess3(void)
{
return HWInfoProcess3;
}
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/

View File

@ -11,8 +11,8 @@
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#include <twl.h>
@ -26,6 +26,7 @@
#include "process_import.h"
#include "process_eticket.h"
#include "process_auto.h"
#include "process_fade.h"
#include "cursor.h"
#include "keypad.h"
@ -229,7 +230,10 @@ void* ImportProcess0(void)
// DumpTadInfo();
}
return ImportProcess1;
// カーソル消去
SetCursorPos((u16)200, (u16)200);
FADE_IN_RETURN( ImportProcess1 );
}
/*---------------------------------------------------------------------------*
@ -272,7 +276,7 @@ void* ImportProcess1(void)
// トップメニューへ戻る
else if (kamiPadIsTrigger(PAD_BUTTON_B))
{
return TopmenuProcess0;
FADE_OUT_RETURN( TopmenuProcess0 );
}
return ImportProcess1;
@ -299,9 +303,9 @@ void* ImportProcess2(void)
return ImportAllNonexistentProcess0;
break;
case 2:
return ImportIndividuallyProcess0;
FADE_OUT_RETURN( ImportIndividuallyProcess0 );
case 3:
return TopmenuProcess0;
FADE_OUT_RETURN( TopmenuProcess0 );
}
return ImportProcess1;
@ -355,7 +359,7 @@ void* ImportProcessReturn(void)
if (kamiPadIsTrigger(PAD_BUTTON_B)) { break; }
}
return TopmenuProcess0;
FADE_OUT_RETURN( TopmenuProcess0 );
}
/*---------------------------------------------------------------------------*
@ -394,15 +398,15 @@ static void* ImportAllOverwriteProcess0(void)
// Auto用
if (gAutoFlag)
{
if (result && sFileNum > 0) return AutoProcess1;
else return AutoProcess2;
if (result && sFileNum > 0) { FADE_OUT_RETURN( AutoProcess1 ); }
else { FADE_OUT_RETURN( AutoProcess2 ); }
}
return ImportProcess1;
}
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*
@ -482,7 +486,10 @@ static void* ImportIndividuallyProcess0(void)
DumpTadInfo();
return ImportIndividuallyProcess1;
// カーソル消去
SetCursorPos((u16)200, (u16)200);
FADE_IN_RETURN( ImportIndividuallyProcess1 );
}
/*---------------------------------------------------------------------------*
@ -520,7 +527,7 @@ void* ImportIndividuallyProcess1(void)
// ひとつ前のメニューへ戻る
else if (kamiPadIsTrigger(PAD_BUTTON_B))
{
return ImportProcess0;
FADE_IN_RETURN( ImportProcess0 );
}
return ImportIndividuallyProcess1;

View File

@ -11,8 +11,8 @@
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#include <twl.h>
@ -26,6 +26,7 @@
#include "process_nandfirm.h"
#include "process_import.h"
#include "process_auto.h"
#include "process_fade.h"
#include "cursor.h"
#include "keypad.h"
@ -176,7 +177,10 @@ void* NandfirmProcess0(void)
// 最後にリターンを追加
kamiFontPrintf((s16)3, (s16)(5+CHAR_OF_MENU_SPACE*sFileNum), FONT_COLOR_BLACK, "l RETURN l l");
return NandfirmProcess1;
// カーソル消去
SetCursorPos((u16)200, (u16)200);
FADE_IN_RETURN( NandfirmProcess1 );
}
/*---------------------------------------------------------------------------*
@ -219,7 +223,7 @@ void* NandfirmProcess1(void)
// トップメニューへ戻る
else if (kamiPadIsTrigger(PAD_BUTTON_B))
{
return TopmenuProcess0;
FADE_OUT_RETURN( TopmenuProcess0 );
}
return NandfirmProcess1;
@ -245,8 +249,8 @@ void* NandfirmProcess2(void)
}
else
{
if (gAutoFlag) { return AutoProcess2; }
else { return TopmenuProcess0; }
if (gAutoFlag) { FADE_OUT_RETURN( AutoProcess2 ); }
else { FADE_OUT_RETURN( TopmenuProcess0 ); }
}
// 今回の結果を表示
@ -262,8 +266,8 @@ void* NandfirmProcess2(void)
// Auto用
if (gAutoFlag)
{
if (ret) return AutoProcess1;
else return AutoProcess2;
if (ret) { FADE_OUT_RETURN( AutoProcess1 ); }
else { FADE_OUT_RETURN( AutoProcess2 ); }
}
return NandfirmProcess1;

View File

@ -11,8 +11,8 @@
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#include <twl.h>
@ -26,6 +26,7 @@
#include "process_topmenu.h"
#include "process_import.h"
#include "process_norfirm.h"
#include "process_fade.h"
#include "cursor.h"
#include "keypad.h"
@ -175,7 +176,10 @@ void* NorfirmProcess0(void)
// 最後にリターンを追加
kamiFontPrintf((s16)3, (s16)(5+CHAR_OF_MENU_SPACE*sFileNum), FONT_COLOR_BLACK, "l RETURN l l");
return NorfirmProcess1;
// カーソル消去
SetCursorPos((u16)200, (u16)200);
FADE_IN_RETURN( NorfirmProcess1 );
}
/*---------------------------------------------------------------------------*
@ -211,7 +215,7 @@ void* NorfirmProcess1(void)
// トップメニューへ戻る
else if (kamiPadIsTrigger(PAD_BUTTON_B))
{
return TopmenuProcess0;
FADE_OUT_RETURN( TopmenuProcess0 );
}
return NorfirmProcess1;
@ -238,7 +242,7 @@ void* NorfirmProcess2(void)
else
{
// リターン
return TopmenuProcess0;
FADE_OUT_RETURN( TopmenuProcess0 );
}
// 今回の結果を表示

View File

@ -11,8 +11,8 @@
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#include <twl.h>
@ -25,6 +25,7 @@
#include "process_nandfirm.h"
#include "process_norfirm.h"
#include "process_auto.h"
#include "process_fade.h"
#include "cursor.h"
#include "keypad.h"
@ -114,10 +115,10 @@ void* TopmenuProcess0(void)
kamiFontFillChar(17, BG_COLOR_VIOLET, BG_COLOR_VIOLET );
kamiFontFillChar(18, BG_COLOR_VIOLET, BG_COLOR_TRANS );
// カーソル配置
SetCursorPos((u16)CURSOR_ORIGIN_X, (u16)(CURSOR_ORIGIN_Y + sMenuSelectNo * DOT_OF_MENU_SPACE));
// カーソル消去
SetCursorPos((u16)200, (u16)200);
return TopmenuProcess1;
FADE_IN_RETURN(TopmenuProcess1);
}
/*---------------------------------------------------------------------------*
@ -154,7 +155,7 @@ void* TopmenuProcess1(void)
// L&R同時押しでオート実行
if (kamiPadIsPress(PAD_BUTTON_L) && kamiPadIsPress(PAD_BUTTON_R))
{
return AutoProcess0;
FADE_OUT_RETURN( AutoProcess0 );
}
return TopmenuProcess1;
@ -175,42 +176,22 @@ void* TopmenuProcess2(void)
switch ( sMenuSelectNo )
{
case 0:
return FormatProcess0;
FADE_OUT_RETURN( FormatProcess0 );
case 1:
return HWInfoProcess0;
break;
FADE_OUT_RETURN( HWInfoProcess0 );
case 2:
return eTicketProcess0;
break;
FADE_OUT_RETURN( eTicketProcess0 );
case 3:
return ImportProcess0;
break;
FADE_OUT_RETURN( ImportProcess0 );
case 4:
return NandfirmProcess0;
break;
FADE_OUT_RETURN( NandfirmProcess0 );
case 5:
return NorfirmProcess0;
break;
FADE_OUT_RETURN( NorfirmProcess0 );
}
return TopmenuProcess1;
}
/*---------------------------------------------------------------------------*
Name: Top Menu
Description:
Arguments: None.
Returns: next sequence
*---------------------------------------------------------------------------*/
void* TopmenuProcess3(void)
{
return TopmenuProcess3;
}
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/

View File

@ -0,0 +1,57 @@
/*---------------------------------------------------------------------------*
Project: TwlSDK - NandInitializer
File: sd_event.c
Copyright 2008 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev:$
$Author:$
*---------------------------------------------------------------------------*/
#include <twl.h>
#include "kami_font.h"
#include <twl/fatfs.h>
#include <nitro/card.h>
#include "sd_event.h"
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
static void VBlankIntr(void);
/*---------------------------------------------------------------------------*
Name: SDEvents
Description: SDカードの挿抜イベント監視コールバック
Arguments: userdata :
event :
arg :
Returns: None.
*---------------------------------------------------------------------------*/
void SDEvents(void *userdata, FSEvent event, void *arg)
{
(void)userdata;
(void)arg;
if (event == FS_EVENT_MEDIA_REMOVED)
{
OS_TPrintf("sdmc:removed!\n");
}
else if (event == FS_EVENT_MEDIA_INSERTED)
{
OS_TPrintf("sdmc:inserted!\n");
}
}