TwlIPL/build/systemMenu_RED/PictoChat/ARM9/src/main.c
yosiokat fd9112d120 ・カードレジスタのスワップとカードIDのシステム領域へのセットを、カードブートの時
のみ行うよう修正。
・アプリブート時のマウント情報設定への対応。
 ・ランチャーは、自身の起動時にマウント情報を自分でセットするようにする。
 ・暫定対策:全ドライブをRW可能にしている。
 ・暫定対策:FS不具合回避のため、"nand:"を'F'ドライブに設定。
 ・MachineSettingsとPictoChatでのnand_app_hack.hを使用したFSの暫定
  NAND対応を削除。
  これに伴い、nand_app_hack.hも削除。
・NANDアプリ読み込み時のリストバグ修正。


git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@272 b08762b0-b915-fc4b-9d8c-17b2551a87ff
2007-11-27 13:06:08 +00:00

87 lines
2.5 KiB
C

/*---------------------------------------------------------------------------*
Project: TwlIPL
File: main.c
Copyright 2007 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 "misc.h"
#include "PictoChat.h"
// extern data-----------------------------------------------------------------
// define data-----------------------------------------------------------------
// function's prototype-------------------------------------------------------
static void INTR_VBlank( void );
// global variable-------------------------------------------------------------
// static variable-------------------------------------------------------------
// const data------------------------------------------------------------------
// ============================================================================
// function's description
// ============================================================================
void TwlMain(void)
{
// 初期化----------------------------------
OS_Init();
(void)OS_EnableIrq();
(void)OS_EnableInterrupts();
GX_Init();
GX_SetPower(GX_POWER_ALL); // 各ロジック パワーON
// 割り込み許可----------------------------
(void)OS_SetIrqFunction(OS_IE_V_BLANK, INTR_VBlank);
(void)OS_EnableIrqMask(OS_IE_V_BLANK);
(void)GX_VBlankIntr(TRUE);
// デバイス初期化-------------------------------
TP_Init();
(void)RTC_Init();
// システムの初期化------------------
InitAllocator();
InitBG();
PictoChatInit();
// メインループ----------------------------
while(1){
OS_WaitIrq(1, OS_IE_V_BLANK); // Vブランク割り込み待ち
ReadKeyPad(); // キー入力の取得
ReadTP(); // TP入力の取得
PictoChatMain();
}
}
// ============================================================================
// 割り込み処理
// ============================================================================
// Vブランク割り込み
static void INTR_VBlank(void)
{
OS_SetIrqCheckFlag(OS_IE_V_BLANK); // Vブランク割込チェックのセット
}