TwlIPL/include/sysmenu/reset_param/ARM9/reset_param.h
yosiokat 2e49f54eb1 ・SDKリビジョン3243に対応。(多分大丈夫のはず)
esライブラリをeseではなくBroadOnの正式版を使用するようにする。
・ドキュメント更新。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@396 b08762b0-b915-fc4b-9d8c-17b2551a87ff
2007-12-25 06:28:03 +00:00

86 lines
2.4 KiB
C

/*---------------------------------------------------------------------------*
Project: TwlIPL
File: reset_param.h
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:: 2007-10-29#$
$Rev: 72 $
$Author: yosiokat $
*---------------------------------------------------------------------------*/
#ifndef _RESET_PARAM_H_
#define _RESET_PARAM_H_
#include <twl.h>
#include <twl/nam.h>
#include <spi.h>
#ifdef __cplusplus
extern "C" {
#endif
// define data-------------------------------------------
// BootFlagsで使用するmedia情報
typedef enum TitleMedia {
TITLE_MEDIA_NAND = 0,
TITLE_MEDIA_CARD = 1,
TITLE_MEDIA_MAX = 2
}TitleMedia;
// タイトル&リセットパラメータ フラグ
typedef struct BootFlags {
u16 isValid : 1; // TRUE:valid, FALSE:invalid
u16 media : 3; // 0:nand, 1:card, 2-7:rsv;
u16 isLogoSkip : 1; // ロゴデモスキップ要求
u16 isInitialShortcutSkip : 1; // 初回起動シーケンススキップ要求
u16 isAppLoadCompleted : 1; // アプリロード済みを示す
u16 isAppRelocate : 1; // アプリ再配置要求
u16 rsv : 9;
}BootFlags;
// リセットパラメータ ヘッダ
typedef struct LauncherParameterHeader {
u32 magicCode; // SYSM_RESET_PARAM_MAGIC_CODEが入る
u8 type; // タイプによってBodyを判別する。
u8 bodyLength; // bodyの長さ
u16 crc16; // bodyのCRC16
}LauncherParamHeader;
// リセットパラメータ ボディ
typedef union LauncherParamBody {
struct { // ※とりあえず最初はTitlePropertyとフォーマットを合わせておく
NAMTitleId bootTitleID; // リセット後にダイレクト起動するタイトルID
BootFlags flags; // リセット時のランチャー動作フラグ
u8 rsv[ 4 ]; // 予約
}v1;
}LauncherParamBody;
// リセットパラメータ
typedef struct LauncherParam {
LauncherParamHeader header;
LauncherParamBody body;
}LauncherParam;
// function's prototype------------------------------------
void RP_Reset( u8 type, NAMTitleId id, BootFlags *flag );
#ifdef __cplusplus
} // extern "C"
#endif
#endif // _RESET_PARAM_H_