TwlIPL/include/sysmenu/sysmenu_work.h
yosiokat 8e85753fb1 ソース整理中。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@170 b08762b0-b915-fc4b-9d8c-17b2551a87ff
2007-11-14 04:36:26 +00:00

89 lines
2.6 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*---------------------------------------------------------------------------*
Project: TwlIPL
File: sysmenu_work.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$
*---------------------------------------------------------------------------*/
#ifndef __SYSMENU_WORK_H__
#define __SYSMENU_WORK_H__
#include <twl.h>
#ifdef __cplusplus
extern "C" {
#endif
// compile switch ---------------------------------
#ifndef SDK_FINALROM
//#define __SYSM_DEBUG
#endif // SDK_FINALROM
// define data ------------------------------------
#define SYSMENU_VER 0x071113 // SystemMenuバージョン
#define PAD_PRODUCTION_SKIP_INITIAL_SHORTCUT ( PAD_BUTTON_A | PAD_BUTTON_B \
| PAD_BUTTON_X | PAD_BUTTON_Y | PAD_BUTTON_R )
// 量産工程で使用する初回起動設定をキャンセルするショートカットキー
#define CLONE_BOOT_MODE 1
#define OTHER_BOOT_MODE 2
//----------------------------------------------------------------------
// データ型定義
//----------------------------------------------------------------------
// SYSM共有ワーク構造体
typedef struct SYSM_work {
BOOL isValidTSD; // NITRO設定データ無効フラグ
BOOL isOnDebugger; // デバッガ動作か?
BOOL isExistCard; // 有効なNTR/TWLカードが存在するか
u16 cardHeaderCrc16; // システムメニューで計算したROMヘッダCRC16
int cloneBootMode;
// NTR-IPL2のレガシー 最終的には消すと思う
u32 nCardID;
BOOL enableCardNormalOnly;
u8 rtcStatus;
}SYSM_work;
//----------------------------------------------------------------------
// SYSM共有ワーク領域のアドレス獲得
//----------------------------------------------------------------------
#if 1
#define SYSM_GetResetParam() ( (ResetParam *)HW_RED_RESERVED )
#define SYSM_GetWork() ( (SYSM_work *)( HW_RED_RESERVED + sizeof(ResetParam) ) )
#else
// SYSMリセットパラメータの取得
#define SYSM_GetResetParam() ( (ResetParam *)0x02000100 )
// SYSM共有ワークの取得
#define SYSM_GetWork() ( (SYSM_work *)HW_RED_RESERVED )
#endif
// カードROMヘッダワークの取得
#define SYSM_GetCardRomHeader() ( (ROM_Header_Short *)HW_TWL_ROM_HEADER_BUF )
#ifdef __cplusplus
}
#endif
#endif // __SYSMENU_WORK_H__