TwlIPL/include/sysmenu/namut.h
kamikawa 085e06a113 NAMUT_Format に全Shareデータ(0000~0005)の初期化を行う処理を追加。
ファイルクリア処理の高速化のためにクリアバッファサイズを256Byte->4096Byteへ

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1872 b08762b0-b915-fc4b-9d8c-17b2551a87ff
2008-07-14 07:42:09 +00:00

161 lines
5.2 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

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 - NAMUT
File: namut.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 NAM_UTILITY_H_
#define NAM_UTILITY_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef SDK_ARM9
typedef void* (*NAMUTAlloc)(u32 size);
typedef void (*NAMUTFree)(void* ptr);
/*---------------------------------------------------------------------------*
Name: NAMUT_Init
Description: NAMUT ライブラリの初期化を行います。
Arguments: allocFunc: メモリ確保関数へのポインタ。(要32byteアライメント
freeFunc: メモリ解放関数へのポインタ。
Returns: なし。
*---------------------------------------------------------------------------*/
void NAMUT_Init(NAMUTAlloc allocFunc, NAMUTFree freeFunc);
/*---------------------------------------------------------------------------*
Name: NAMUT_Format
Description: NANDの擬似フォーマット
(システム系の必要なファイルのみを残し他を消去します)
Arguments: None
Returns: None
*---------------------------------------------------------------------------*/
BOOL NAMUT_Format(void);
/*---------------------------------------------------------------------------*
Name: NAMUT_GetSoftBoxCount
Description: NANDの installedカウント、freeカウントを調べて
指定された変数に格納します。
Arguments: installed : installedカウント格納変数
free : freeカウント格納変数
Returns: 成功ならTRUE
*---------------------------------------------------------------------------*/
BOOL NAMUT_GetSoftBoxCount( u8* installed, u8* free );
/*---------------------------------------------------------------------------*
Name: NAMUT_UpdateSoftBoxCount
Description: InstalledSoftBoxCount, FreeSoftBoxCount の値を
現在のNANDの状態に合わせて更新します。
Arguments: None.
Returns: 成功ならTRUE
*---------------------------------------------------------------------------*/
BOOL NAMUT_UpdateSoftBoxCount( void );
/*---------------------------------------------------------------------------*
Name: NAMUT_DrawNandTree
Description: NANDのツリー情報をプリント出力します
Arguments: ...
Returns: None.
*---------------------------------------------------------------------------*/
void NAMUT_DrawNandTree(void);
/*---------------------------------------------------------------------------*
Name: NAMUTi_ClearSavedataPublic
Description: 指定したセーブデータファイルに対して
FFクリア&フォーマットを行います。
Arguments: None
Returns: None
*---------------------------------------------------------------------------*/
BOOL NAMUTi_ClearSavedataPublic(const char* path, u64 titleID);
/*---------------------------------------------------------------------------*
Name: NAMUTi_ClearSavedataPrivate
Description: 指定したセーブデータファイルに対して
FFクリア&フォーマットを行います。
Arguments: None
Returns: None
*---------------------------------------------------------------------------*/
BOOL NAMUTi_ClearSavedataPrivate(const char* path, u64 titleID);
/*---------------------------------------------------------------------------*
Name: NAMUTi_DestroySubBanner
Description: 指定したサブバナーのCRC破壊を試みます。
指定したサブバナーが存在しない可能性もありますが
その場合でもTRUEを返します。コードはOS_DeleteSubBannerFileのパクリ
Arguments: None
Returns: None
*---------------------------------------------------------------------------*/
BOOL NAMUTi_DestroySubBanner(const char* path);
/*---------------------------------------------------------------------------*
Name: NAMUT_DeleteNandDirectory
Description: 指定ディレクトリ以下を消去します。
指定ディレクトリ自体は残ります。
Arguments: path : 絶対パス(スラッシュを含めない)
Returns: None
*---------------------------------------------------------------------------*/
BOOL NAMUT_DeleteNandDirectory(const char *path);
/*---------------------------------------------------------------------------*
Name: NAMUT_ClearTWLSettings
Description: TWL本体設定データのクリアを行います。
Arguments: TRUE : クリアした値をNANDにライトバックします。
FALSE: NANDへのライトバックは行いません。
Returns: 成功ならTRUE
*---------------------------------------------------------------------------*/
BOOL NAMUT_ClearTWLSettings( BOOL doWriteback );
#endif // SDK_ARM9
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* NAM_UTILITY_H_ */