UIGランチャーと終了処理を合わせるため、DSPとカメラの初期化のみ行う。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1578 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
nakasima 2008-06-05 02:59:37 +00:00
parent 9f862f9683
commit cd8bbc646d

View File

@ -16,6 +16,9 @@
*---------------------------------------------------------------------------*/
#include <twl.h>
#include <twl/dsp.h>
#include <twl/dsp/ARM9/dsp_jpeg_dec.h>
#include <twl/camera.h>
#include "launcher.h"
#include "misc.h"
#include "logoDemo.h"
@ -27,6 +30,8 @@
// define data-----------------------------------------------------------------
#define INIT_DEVICES_LIKE_UIG_LAUNCHER
// function's prototype-------------------------------------------------------
static void INTR_VBlank( void );
static void deleteTmp();
@ -95,6 +100,23 @@ static void debugWriteToSD( void )
}
#endif
#ifdef INIT_DEVICES_LIKE_UIG_LAUNCHER
static int CreateDspSlotBitmap(int slot_num)
{
int i, bitmap;
bitmap = 0;
for (i=0; i<slot_num; i++)
{
bitmap += (1 << i);
}
return bitmap;
}
#endif // INIT_DEVICES_LIKE_UIG_LAUNCHER
// メイン
void TwlMain( void )
{
@ -163,7 +185,31 @@ void TwlMain( void )
// システムの初期化----------------
InitAllocator(); // ※SYSM_Init以外のSYSMライブラリ関数を呼ぶ前に
// Alloc, Freeで登録したメモリアロケータを初期化してください。
#ifdef INIT_DEVICES_LIKE_UIG_LAUNCHER
// カメラ初期化
CAMERA_Init();
// DSP初期化
{
FSFile file[1];
MIWramSize sizeB = MI_WRAM_SIZE_128KB;
MIWramSize sizeC = MI_WRAM_SIZE_128KB;
int slotB = CreateDspSlotBitmap( DSP_SLOT_B_COMPONENT_JPEGDECODER ); // 2スロット
int slotC = CreateDspSlotBitmap( DSP_SLOT_C_COMPONENT_JPEGDECODER ); // 4スロット
FS_InitFile( file );
DSP_OpenStaticComponentJpegDecoder( file );
MI_FreeWramSlot_B( 0, sizeB, MI_WRAM_ARM9 );
MI_FreeWramSlot_C( 0, sizeC, MI_WRAM_ARM9 );
MI_CancelWramSlot_B( 0, sizeB, MI_WRAM_ARM9 );
MI_CancelWramSlot_C( 0, sizeC, MI_WRAM_ARM9 );
if ( ! DSP_LoadJpegDecoder( file, slotB, slotC ) )
{
OS_TPanic("failed to load JpegDecoder DSP-component! (lack of WRAM-B/C)");
}
DSP_UnloadJpegDecoder();
}
#endif // INIT_DEVICES_LIKE_UIG_LAUNCHER
// 各種パラメータの取得------------
pBootTitle = SYSM_ReadParameters(); // 本体設定データ、リセットパラメータのリード、検査用オート起動カード判定、量産ライン用キーショートカット起動判定等のリード