From 85b7759b3fb945a1033fd120211804604e1dde65 Mon Sep 17 00:00:00 2001 From: yoshida_teruhisa Date: Fri, 4 Jul 2008 06:08:45 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AB=E3=81=AA=E3=81=A3?= =?UTF-8?q?=E3=81=9F=E3=83=90=E3=83=8A=E3=83=BC=E9=96=A2=E4=BF=82=E3=83=A9?= =?UTF-8?q?=E3=82=A4=E3=83=96=E3=83=A9=E3=83=AA=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1785 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- build/libraries_sysmenu/Makefile | 1 - build/libraries_sysmenu/banner/ARM9/Makefile | 51 --- .../banner/ARM9/src/banner.c | 291 ------------------ build/libraries_sysmenu/banner/Makefile | 30 -- .../sysmenu/ARM9/src/title.c | 4 +- .../util/ARM9/src/util_menuAppManager.c | 3 +- build/systemMenu_RED/Launcher/ARM9/Makefile | 5 +- .../Launcher/ARM9/src/bannerCounter.c | 116 ------- .../Launcher/ARM9/src/bannerCounter.h | 80 ----- include/sysmenu.h | 1 - include/sysmenu/banner.h | 55 ---- include/sysmenu/util_menuAppManager.h | 2 + 12 files changed, 7 insertions(+), 632 deletions(-) delete mode 100644 build/libraries_sysmenu/banner/ARM9/Makefile delete mode 100644 build/libraries_sysmenu/banner/ARM9/src/banner.c delete mode 100644 build/libraries_sysmenu/banner/Makefile delete mode 100644 build/systemMenu_RED/Launcher/ARM9/src/bannerCounter.c delete mode 100644 build/systemMenu_RED/Launcher/ARM9/src/bannerCounter.h delete mode 100644 include/sysmenu/banner.h diff --git a/build/libraries_sysmenu/Makefile b/build/libraries_sysmenu/Makefile index fd541991..ddc27af0 100644 --- a/build/libraries_sysmenu/Makefile +++ b/build/libraries_sysmenu/Makefile @@ -31,7 +31,6 @@ SUBDIRS = reloc_info \ mcu \ ds \ sharedFont \ - banner \ util \ dht \ wds \ diff --git a/build/libraries_sysmenu/banner/ARM9/Makefile b/build/libraries_sysmenu/banner/ARM9/Makefile deleted file mode 100644 index ff411827..00000000 --- a/build/libraries_sysmenu/banner/ARM9/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -#! make -f -#---------------------------------------------------------------------------- -# Project: TwlIPL -# File: Makefile -# -# 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$ -#---------------------------------------------------------------------------- - -SUBDIRS = - -#---------------------------------------------------------------------------- -TARGET_FIRM = SYSTEMMENU -TARGET_PLATFORM = TWL -TWL_ARCHGEN = LIMITED -TWL_PROC = ARM9 - -#---------------------------------------------------------------------------- - -SRCDIR = ./src - -INCDIR = - -SRCS = banner.c - -TARGET_LIB = libbanner$(TWL_LIBSUFFIX).a - - -include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs - -INSTALL_TARGETS = $(TARGETS) -INSTALL_DIR = $(SYSMENU_INSTALL_LIBDIR) - -#---------------------------------------------------------------------------- - -do-build: $(TARGETS) - -include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules - - -#===== End of Makefile ===== - diff --git a/build/libraries_sysmenu/banner/ARM9/src/banner.c b/build/libraries_sysmenu/banner/ARM9/src/banner.c deleted file mode 100644 index 7324e7af..00000000 --- a/build/libraries_sysmenu/banner/ARM9/src/banner.c +++ /dev/null @@ -1,291 +0,0 @@ -/*---------------------------------------------------------------------------* - Project: TwlIPL - File: SYSM_lib.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 -#include -#include - -// define data----------------------------------------------------------------- -typedef struct BannerCheckParam { - u8 *pSrc; - u32 size; -}BannerCheckParam; - -#define MEASURE_BANNER_LOAD_TIME 0 - -// extern data----------------------------------------------------------------- -// function's prototype------------------------------------------------------- - -// global variable------------------------------------------------------------- -// static variable------------------------------------------------------------- - -// const data------------------------------------------------------------------ - -// ============================================================================ -// -// バナー -// -// ============================================================================ - - -// カードアプリバナーリード -BOOL BANNER_ReadBannerFromCARD( u32 bannerOffset, TWLBannerFile *pBanner ) -{ - BOOL isRead; - u16 id = (u16)OS_GetLockID(); - - // ROMカードからのバナーデータのリード - DC_FlushRange( pBanner, sizeof(TWLBannerFile) ); - CARD_LockRom( id ); - CARD_ReadRom( 4, (void *)bannerOffset, pBanner, sizeof(TWLBannerFile) ); - CARD_UnlockRom( id ); - OS_ReleaseLockID( id ); - - isRead = BANNER_CheckBanner( (TWLBannerFile *)pBanner ); - - if( !isRead ) { - MI_CpuClearFast( pBanner, sizeof(TWLBannerFile) ); - } - return isRead; -} - - -// NANDアプリバナーリード -BOOL BANNER_ReadBannerFromNAND( OSTitleId titleID, TWLBannerFile *pDst, TitleListMakerInfo *pTitleListMakerInfo ) -{ -#define PATH_LENGTH 1024 - -#if (MEASURE_BANNER_LOAD_TIME == 1) - OSTick start; -#endif - - FSFile file[1]; - BOOL bSuccess; - char path[PATH_LENGTH]; - s32 readLen; - u32 offset; - ROM_Header_Short hs; - - FS_InitFile(file); - -#if (MEASURE_BANNER_LOAD_TIME == 1) - start = OS_GetTick(); -#endif - - readLen = NAM_GetTitleBootContentPathFast( path, titleID ); - -#if (MEASURE_BANNER_LOAD_TIME == 1) - OS_TPrintf( "NAM_GetTitleBootContentPath : %dus\n", OS_TicksToMicroSeconds( OS_GetTick() - start ) ); -#endif - - // ファイルパスを取得 - if(readLen != NAM_OK){ - OS_TPrintf("NAM_GetTitleBootContentPath failed %lld,%d\n", titleID, readLen ); - return FALSE; - } - -#if (MEASURE_BANNER_LOAD_TIME == 1) - start = OS_GetTick(); -#endif - - // ファイルオープン - bSuccess = FS_OpenFileEx(file, path, FS_FILEMODE_R); - if( ! bSuccess ) - { - OS_TPrintf("BANNER_GetNandTitleList failed: cant open file %s\n",path); - return FALSE; - } - -#if (MEASURE_BANNER_LOAD_TIME == 1) - OS_TPrintf( "OpenFileEX : %dus\n", OS_TicksToMicroSeconds( OS_GetTick() - start ) ); - start = OS_GetTick(); -#endif - - readLen = FS_ReadFile(file, &hs, sizeof(hs)); - if( readLen != sizeof(hs) ) - { - OS_TPrintf("BANNER_GetNandTitleList failed: cant read file\n"); - FS_CloseFile(file); - return FALSE; - } - - offset = hs.banner_offset; - -#if (MEASURE_BANNER_LOAD_TIME == 1) - OS_TPrintf( "FS_ReadFile header : %dus\n", OS_TicksToMicroSeconds( OS_GetTick() - start ) ); -#endif - - // バナーが存在する場合のみリード - if( offset ) { - -#if (MEASURE_BANNER_LOAD_TIME == 1) - start = OS_GetTick(); -#endif - - bSuccess = FS_SeekFile(file, (s32)offset, FS_SEEK_SET); - if( ! bSuccess ) - { - OS_TPrintf("BANNER_GetNandTitleList failed: cant seek file(offset)\n"); - FS_CloseFile(file); - return FALSE; - } - -#if (MEASURE_BANNER_LOAD_TIME == 1) - OS_TPrintf( "FS_SeekFile banner: %dus\n", OS_TicksToMicroSeconds( OS_GetTick() - start ) ); - start = OS_GetTick(); -#endif - - readLen = FS_ReadFile( file, pDst, (s32)sizeof(TWLBannerFile) ); - if( readLen != (s32)sizeof(TWLBannerFile) ) - { - OS_TPrintf("BANNER_GetNandTitleList failed: cant read file2\n"); - FS_CloseFile(file); - return FALSE; - } - -#if (MEASURE_BANNER_LOAD_TIME == 1) - OS_TPrintf( "FS_ReadFile banner: %dus\n", OS_TicksToMicroSeconds( OS_GetTick() - start ) ); - start = OS_GetTick(); -#endif - - if( !BANNER_CheckBanner( pDst ) ) - { - // 正当性チェック失敗の場合はバッファクリア - MI_CpuClearFast( pDst, sizeof(TWLBannerFile) ); - } - -#if (MEASURE_BANNER_LOAD_TIME == 1) - OS_TPrintf( "check banner: %dus\n", OS_TicksToMicroSeconds( OS_GetTick() - start ) ); -#endif - - }else { - // バナーが存在しない場合はバッファクリア - MI_CpuClearFast( pDst, sizeof(TWLBannerFile) ); - } - -#if (MEASURE_BANNER_LOAD_TIME == 1) - start = OS_GetTick(); -#endif - - FS_CloseFile(file); - -#if (MEASURE_BANNER_LOAD_TIME == 1) - OS_TPrintf( "close file : %dus\n", OS_TicksToMicroSeconds( OS_GetTick() - start ) ); - start = OS_GetTick(); -#endif - - // サブバナーファイルを読み込んでみる - if(NAM_OK == NAM_GetTitleBannerFilePath( path, titleID )) - { - -#if (MEASURE_BANNER_LOAD_TIME == 1) - OS_TPrintf( "NAM_GetTitleBannerFilePath : %dus\n", OS_TicksToMicroSeconds( OS_GetTick() - start ) ); - start = OS_GetTick(); -#endif - if( FS_OpenFileEx(file, path, FS_FILEMODE_R) ) - { - TWLSubBannerFile subBanner; - readLen = FS_ReadFile(file, &subBanner, sizeof(TWLSubBannerFile)); - FS_CloseFile(file); - if( readLen == sizeof(TWLSubBannerFile) ) - { - // 読み込みには成功したので正当性チェック - if( BANNER_CheckSubBanner(&subBanner) ) - { - // 成功したのでコピーする - pDst->h = subBanner.h; - pDst->anime = subBanner.anime; -// OS_TPrintf("BANNER_ReadBanner_NAND : subbanner check succeed. id=%.16x\n", titleID); - }else - { -// OS_TPrintf("BANNER_ReadBanner_NAND : subbanner check failed. id=%.16x\n", titleID); - } - }else - { - OS_TPrintf("BANNER_ReadBanner_NAND : subbanner read failed. id=%.16x\n", titleID); - } - } - -#if (MEASURE_BANNER_LOAD_TIME == 1) - OS_TPrintf( "open-read-close-check subbanner : %dus\n", OS_TicksToMicroSeconds( OS_GetTick() - start ) ); -#endif - - } - - // タイトルリスト用情報の生成 - if(!SYSM_MakeTitleListMakerInfoFromHeader( pTitleListMakerInfo, &hs )) - { - return FALSE; - } - - return TRUE; -} - - - // バナーデータの正誤チェック -BOOL BANNER_CheckBanner( TWLBannerFile *pBanner ) -{ - int i; - BOOL retval = TRUE; - u16 calc_crc = 0xffff; - u16 *pHeaderCRC = (u16 *)&pBanner->h.crc16_v1; - BannerCheckParam bannerCheckList[ BANNER_VER_NTR_MAX ]; - BannerCheckParam *pChk = &bannerCheckList[ 0 ]; - - // NTR互換部分は標準でチェック - bannerCheckList[ 0 ].pSrc = (u8 *)&( pBanner->v1 ); - bannerCheckList[ 0 ].size = sizeof( BannerFileV1 ); - bannerCheckList[ 1 ].pSrc = (u8 *)&( pBanner->v2 ); - bannerCheckList[ 1 ].size = sizeof( BannerFileV2 ); - bannerCheckList[ 2 ].pSrc = (u8 *)&( pBanner->v3 ); - bannerCheckList[ 2 ].size = sizeof( BannerFileV3 ); - - for( i = 0; i < BANNER_VER_NTR_MAX; i++ ) { - if( i < pBanner->h.version ) { - calc_crc = SVC_GetCRC16( calc_crc, pChk->pSrc, pChk->size ); - if( calc_crc != *pHeaderCRC++ ) { - retval = FALSE; - break; - } - }else { - MI_CpuClear16( pChk->pSrc, pChk->size ); - } - pChk++; - } - - // TWLバナーなら、バナーアニメ部もチェック - if( pBanner->h.platform == BANNER_PLATFORM_TWL ) { - if( pBanner->h.crc16_anime != SVC_GetCRC16( 0xffff, &pBanner->anime, sizeof(BannerAnime) ) ) { - retval = FALSE; - } - } - return retval; -} - - -// サブバナーデータの正誤チェック -BOOL BANNER_CheckSubBanner( TWLSubBannerFile *pBanner ) -{ - BOOL retval = TRUE; - - // アニメ部チェック - if( pBanner->h.crc16_anime != SVC_GetCRC16( 0xffff, &pBanner->anime, sizeof(BannerAnime) ) ) { - retval = FALSE; - } - return retval; -} - diff --git a/build/libraries_sysmenu/banner/Makefile b/build/libraries_sysmenu/banner/Makefile deleted file mode 100644 index 49836b84..00000000 --- a/build/libraries_sysmenu/banner/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -#! make -f -#---------------------------------------------------------------------------- -# Project: TwlIPL -# File: Makefile -# -# 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$ -#---------------------------------------------------------------------------- - -TARGET_FIRM = SYSTEMMENU -SUBDIRS = ARM9 - -include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs - -#---------------------------------------------------------------------------- - -do-build: $(TARGETS) - -include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules - -#===== End of Makefile ===== diff --git a/build/libraries_sysmenu/sysmenu/ARM9/src/title.c b/build/libraries_sysmenu/sysmenu/ARM9/src/title.c index a0c05e36..e4e31d92 100644 --- a/build/libraries_sysmenu/sysmenu/ARM9/src/title.c +++ b/build/libraries_sysmenu/sysmenu/ARM9/src/title.c @@ -19,9 +19,9 @@ #include #include #include +#include #include "internal_api.h" #include "fs_wram.h" -#include // define data----------------------------------------------------------------- @@ -357,7 +357,7 @@ BOOL SYSMi_CopyCardBanner( void ) DC_InvalidateRange( (void *)SYSM_CARD_BANNER_BUF, 0x3000 ); MI_CpuCopyFast( (void *)SYSM_CARD_BANNER_BUF, pBanner, sizeof(TWLBannerFile) ); } - retval = BANNER_CheckBanner( pBanner ); + retval = AMN_checkBannerFile( pBanner ); if( !retval ) { MI_CpuClearFast( pBanner, sizeof(TWLBannerFile) ); diff --git a/build/libraries_sysmenu/util/ARM9/src/util_menuAppManager.c b/build/libraries_sysmenu/util/ARM9/src/util_menuAppManager.c index 1821ba4b..f5b9f467 100644 --- a/build/libraries_sysmenu/util/ARM9/src/util_menuAppManager.c +++ b/build/libraries_sysmenu/util/ARM9/src/util_menuAppManager.c @@ -37,7 +37,6 @@ static void AMN_initNandTitleList_(); static void AMN_lockSubBannerFileBuffer(); static void AMN_unlockSubBannerFileBuffer(); -static BOOL AMN_checkBannerFile(TWLBannerFile* pBanner); static u32 AMN_getBannerAnimeCRC(const BannerAnime* pAnime); static BOOL AMN_checkAndReplaceBannerAnime(s32 index); @@ -1020,7 +1019,7 @@ const u16* AMN_getBannerText(s32 index) // see also SYSMi_CheckBannerFile() // バナーデータの正誤チェック -static BOOL AMN_checkBannerFile(TWLBannerFile* pBanner) +BOOL AMN_checkBannerFile(TWLBannerFile* pBanner) { typedef struct BannerCheckParam { u8 *pSrc; diff --git a/build/systemMenu_RED/Launcher/ARM9/Makefile b/build/systemMenu_RED/Launcher/ARM9/Makefile index 5038e725..e3a29dd4 100644 --- a/build/systemMenu_RED/Launcher/ARM9/Makefile +++ b/build/systemMenu_RED/Launcher/ARM9/Makefile @@ -75,7 +75,7 @@ MISC_DIR = ../../misc BG_DIR = ../../data SRCS_LOGO = logoDemo.c logoData.c -SRCS = main.c launcher.c sound.c bannerCounter.c loadWlanFirm.c \ +SRCS = main.c launcher.c sound.c loadWlanFirm.c \ loadSharedFont.c scanWDS.c loadSysmVersion.c \ $(addprefix $(LOGO_DIR)/, $(SRCS_LOGO)) \ $(MISC_DIR)/src/misc.c $(MISC_DIR)/src/cmn.c \ @@ -89,10 +89,9 @@ LINCLUDES = $(MISC_DIR)/include \ SYSMENU_LIBS = \ liblcfg$(TWL_LIBSUFFIX).a \ + libsysmutil$(TWL_LIBSUFFIX).a \ libsysmenu$(TWL_LIBSUFFIX).a \ libsysmmcu$(TWL_LIBSUFFIX).a \ - libsysmutil$(TWL_LIBSUFFIX).a \ - libbanner$(TWL_LIBSUFFIX).a \ libboot$(TWL_LIBSUFFIX).a \ libds$(TWL_LIBSUFFIX).a \ libhotsw$(TWL_LIBSUFFIX).a \ diff --git a/build/systemMenu_RED/Launcher/ARM9/src/bannerCounter.c b/build/systemMenu_RED/Launcher/ARM9/src/bannerCounter.c deleted file mode 100644 index de96373c..00000000 --- a/build/systemMenu_RED/Launcher/ARM9/src/bannerCounter.c +++ /dev/null @@ -1,116 +0,0 @@ -/*---------------------------------------------------------------------------* - Project: TwlIPL - File: launcher.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 "bannerCounter.h" - -// define data------------------------------------------ - -// extern data------------------------------------------ - -// function's prototype declaration--------------------- - -// global variable ------------------------------------- - -// static variable ------------------------------------- - -// const data ----------------------------------------- - -//=============================================== -// bannerCounter.c -//=============================================== - -void BNC_incrementCount( BannerCounter *c ) -{ - // TWLのみカウントインクリメント - if( c->banner->h.platform == BANNER_PLATFORM_TWL ) - { - if( c->banner->anime.control[0].frameCount == 0 ) - { - // アニメに終端しか存在しない - //OS_TPrintf( "BNC_incrementCount:Only a Terminator!\n" ); - return; - } - - c->count++; - if( c->count >= c->banner->anime.control[c->control].frameCount ) - { - // カウント値がコントロールのフレームカウントを超えたので次のコントロールへ - c->control++; - c->count = 0; - - //ループ及び停止の処理 - if( c->control >= BANNER_ANIME_CONTROL_INFO_NUM ) - { - // コントロールが限界を超えたら無条件でループ - BNC_resetCount( c ); - } - else if( c->banner->anime.control[c->control].frameCount == 0 ) - { - // コントロールのフレームカウントが0なら終端到達 - if( c->banner->anime.control[c->control].animeType == 0 ) - { - // アニメタイプ0ならループ - BNC_resetCount( c ); - } - else if( c->banner->anime.control[c->control].animeType == 1 ) - { - // アニメタイプ1なら停止(一つ前のコントロールに戻す) - c->control--; - } - } - } - } -} - -FrameAnimeData BNC_getFAD( BannerCounter *c ) -{ - FrameAnimeData ret; - if( c->banner->h.platform == BANNER_PLATFORM_NTR ) - { - ret.image = c->banner->v1.image; - ret.pltt = c->banner->v1.pltt; - ret.hflip = FALSE; - ret.vflip = FALSE; - } - else - { - if( c->banner->anime.control[0].frameCount == 0 ) - { - // アニメに終端しか存在しない - //OS_TPrintf( "BNC_getFAD:Only a Terminator!\n" ); - ret.image = c->banner->v1.image; - ret.pltt = c->banner->v1.pltt; - ret.hflip = FALSE; - ret.vflip = FALSE; - return ret; - } - // コントロールデータを読んで、現在のフレームに該当するデータを返す - ret.image = c->banner->anime.image[ c->banner->anime.control[c->control].normal.cellNo ]; - ret.pltt = c->banner->anime.pltt[ c->banner->anime.control[c->control].normal.plttNo ]; - ret.hflip = c->banner->anime.control[c->control].normal.flipType & 0x1; - ret.vflip = (c->banner->anime.control[c->control].normal.flipType & 0x2) >> 1; - } - return ret; -} - -FrameAnimeData BNC_getFADAndIncCount( BannerCounter *c ) -{ - FrameAnimeData ret = BNC_getFAD( c ); - BNC_incrementCount( c ); - return ret; -} - diff --git a/build/systemMenu_RED/Launcher/ARM9/src/bannerCounter.h b/build/systemMenu_RED/Launcher/ARM9/src/bannerCounter.h deleted file mode 100644 index e2f44d86..00000000 --- a/build/systemMenu_RED/Launcher/ARM9/src/bannerCounter.h +++ /dev/null @@ -1,80 +0,0 @@ -/*---------------------------------------------------------------------------* - Project: TwlIPL - File: bannerCounter.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:: $ - $Rev$ - $Author$ - *---------------------------------------------------------------------------*/ - -#ifndef __BANNERCOUNTER_H__ -#define __BANNERCOUNTER_H__ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// define data------------------------------------------------------- - -typedef struct BannerCounter -{ - u32 control; - u8 count; - TWLBannerFile *banner; -} -BannerCounter; - -typedef struct FrameAnimeData{ - u8 *image; - u8 *pltt; - BOOL vflip; - BOOL hflip; -} -FrameAnimeData; - -// global variables-------------------------------------------------- - -// function---------------------------------------------------------- - -static inline void BNC_resetCount( BannerCounter *c ) -{ - c->count = 0; - c->control = 0; -} - -static inline void BNC_setBanner( BannerCounter *c, TWLBannerFile *b) -{ - c->banner = b; -} - -static inline void BNC_initCounter( BannerCounter *c, TWLBannerFile *b) -{ - BNC_setBanner( c, b ); - BNC_resetCount( c ); -} - -static inline TWLBannerFile* BNC_getBanner( BannerCounter *c ) -{ - return c->banner; -} - -void BNC_incrementCount( BannerCounter *c ); -FrameAnimeData BNC_getFAD( BannerCounter *c ); -FrameAnimeData BNC_getFADAndIncCount( BannerCounter *c ); - -#ifdef __cplusplus -} -#endif - -#endif // __BANNERCOUNTER_H__ diff --git a/include/sysmenu.h b/include/sysmenu.h index 80218c82..909e49df 100644 --- a/include/sysmenu.h +++ b/include/sysmenu.h @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/include/sysmenu/banner.h b/include/sysmenu/banner.h deleted file mode 100644 index ef5949f0..00000000 --- a/include/sysmenu/banner.h +++ /dev/null @@ -1,55 +0,0 @@ -/*---------------------------------------------------------------------------* - Project: TwlIPL - File: banner.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 SYSM_BANNER_H_ -#define SYSM_BANNER_H_ - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// define data---------------------------------------------------------- -// global variable------------------------------------------------------ -// function------------------------------------------------------------- - -#ifdef SDK_ARM9 - -// カードからのバナーリード -BOOL BANNER_ReadBannerFromCARD( u32 bannerOffset, TWLBannerFile *pDst ); - -// NANDからのバナーリード -BOOL BANNER_ReadBannerFromNAND( OSTitleId titleID, TWLBannerFile *pDst, TitleListMakerInfo *pTitleListMakerInfo ); - -// バナーのフォーマットが正しいかチェック(NTRバナー、TWLバナーのどちらでもOK) -BOOL BANNER_CheckBanner( TWLBannerFile *pBanner ); - -// サブバナーチェック -BOOL BANNER_CheckSubBanner( TWLSubBannerFile *pBanner ); - -#endif //SDK_ARM9 - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -/* SYSM_BANNER_H_ */ -#endif diff --git a/include/sysmenu/util_menuAppManager.h b/include/sysmenu/util_menuAppManager.h index 4474c40b..2e1a89be 100644 --- a/include/sysmenu/util_menuAppManager.h +++ b/include/sysmenu/util_menuAppManager.h @@ -85,6 +85,8 @@ BOOL AMN_isAgreeEULAFlag(s32 index); // info size is cParentalControlRatingInfoSize const u8* AMN_getParentalControlRatingInfo(s32 index); +BOOL AMN_checkBannerFile(TWLBannerFile* pBanner); + // 生データ(TitlePropertyのリスト、HeaderShortリスト)にアクセスできる抜け道関数 TitleProperty* AMN_getTitlePropertyList( void ); ROM_Header_Short* AMN_getRomHeaderList( void );