mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
不要になったバナー関係ライブラリを削除
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1785 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
4fda239acf
commit
85b7759b3f
@ -31,7 +31,6 @@ SUBDIRS = reloc_info \
|
|||||||
mcu \
|
mcu \
|
||||||
ds \
|
ds \
|
||||||
sharedFont \
|
sharedFont \
|
||||||
banner \
|
|
||||||
util \
|
util \
|
||||||
dht \
|
dht \
|
||||||
wds \
|
wds \
|
||||||
|
|||||||
@ -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 =====
|
|
||||||
|
|
||||||
@ -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 <twl.h>
|
|
||||||
#include <twl/nam.h>
|
|
||||||
#include <sysmenu/banner.h>
|
|
||||||
|
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -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 =====
|
|
||||||
@ -19,9 +19,9 @@
|
|||||||
#include <sysmenu.h>
|
#include <sysmenu.h>
|
||||||
#include <firm/format/from_firm.h>
|
#include <firm/format/from_firm.h>
|
||||||
#include <firm/hw/ARM9/mmap_firm.h>
|
#include <firm/hw/ARM9/mmap_firm.h>
|
||||||
|
#include <sysmenu/util_menuAppManager.h>
|
||||||
#include "internal_api.h"
|
#include "internal_api.h"
|
||||||
#include "fs_wram.h"
|
#include "fs_wram.h"
|
||||||
#include <sysmenu/util_menuAppManager.h>
|
|
||||||
|
|
||||||
// define data-----------------------------------------------------------------
|
// define data-----------------------------------------------------------------
|
||||||
|
|
||||||
@ -357,7 +357,7 @@ BOOL SYSMi_CopyCardBanner( void )
|
|||||||
DC_InvalidateRange( (void *)SYSM_CARD_BANNER_BUF, 0x3000 );
|
DC_InvalidateRange( (void *)SYSM_CARD_BANNER_BUF, 0x3000 );
|
||||||
MI_CpuCopyFast( (void *)SYSM_CARD_BANNER_BUF, pBanner, sizeof(TWLBannerFile) );
|
MI_CpuCopyFast( (void *)SYSM_CARD_BANNER_BUF, pBanner, sizeof(TWLBannerFile) );
|
||||||
}
|
}
|
||||||
retval = BANNER_CheckBanner( pBanner );
|
retval = AMN_checkBannerFile( pBanner );
|
||||||
|
|
||||||
if( !retval ) {
|
if( !retval ) {
|
||||||
MI_CpuClearFast( pBanner, sizeof(TWLBannerFile) );
|
MI_CpuClearFast( pBanner, sizeof(TWLBannerFile) );
|
||||||
|
|||||||
@ -37,7 +37,6 @@ static void AMN_initNandTitleList_();
|
|||||||
static void AMN_lockSubBannerFileBuffer();
|
static void AMN_lockSubBannerFileBuffer();
|
||||||
static void AMN_unlockSubBannerFileBuffer();
|
static void AMN_unlockSubBannerFileBuffer();
|
||||||
|
|
||||||
static BOOL AMN_checkBannerFile(TWLBannerFile* pBanner);
|
|
||||||
static u32 AMN_getBannerAnimeCRC(const BannerAnime* pAnime);
|
static u32 AMN_getBannerAnimeCRC(const BannerAnime* pAnime);
|
||||||
static BOOL AMN_checkAndReplaceBannerAnime(s32 index);
|
static BOOL AMN_checkAndReplaceBannerAnime(s32 index);
|
||||||
|
|
||||||
@ -1020,7 +1019,7 @@ const u16* AMN_getBannerText(s32 index)
|
|||||||
|
|
||||||
// see also SYSMi_CheckBannerFile()
|
// see also SYSMi_CheckBannerFile()
|
||||||
// バナーデータの正誤チェック
|
// バナーデータの正誤チェック
|
||||||
static BOOL AMN_checkBannerFile(TWLBannerFile* pBanner)
|
BOOL AMN_checkBannerFile(TWLBannerFile* pBanner)
|
||||||
{
|
{
|
||||||
typedef struct BannerCheckParam {
|
typedef struct BannerCheckParam {
|
||||||
u8 *pSrc;
|
u8 *pSrc;
|
||||||
|
|||||||
@ -75,7 +75,7 @@ MISC_DIR = ../../misc
|
|||||||
BG_DIR = ../../data
|
BG_DIR = ../../data
|
||||||
|
|
||||||
SRCS_LOGO = logoDemo.c logoData.c
|
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 \
|
loadSharedFont.c scanWDS.c loadSysmVersion.c \
|
||||||
$(addprefix $(LOGO_DIR)/, $(SRCS_LOGO)) \
|
$(addprefix $(LOGO_DIR)/, $(SRCS_LOGO)) \
|
||||||
$(MISC_DIR)/src/misc.c $(MISC_DIR)/src/cmn.c \
|
$(MISC_DIR)/src/misc.c $(MISC_DIR)/src/cmn.c \
|
||||||
@ -89,10 +89,9 @@ LINCLUDES = $(MISC_DIR)/include \
|
|||||||
|
|
||||||
SYSMENU_LIBS = \
|
SYSMENU_LIBS = \
|
||||||
liblcfg$(TWL_LIBSUFFIX).a \
|
liblcfg$(TWL_LIBSUFFIX).a \
|
||||||
|
libsysmutil$(TWL_LIBSUFFIX).a \
|
||||||
libsysmenu$(TWL_LIBSUFFIX).a \
|
libsysmenu$(TWL_LIBSUFFIX).a \
|
||||||
libsysmmcu$(TWL_LIBSUFFIX).a \
|
libsysmmcu$(TWL_LIBSUFFIX).a \
|
||||||
libsysmutil$(TWL_LIBSUFFIX).a \
|
|
||||||
libbanner$(TWL_LIBSUFFIX).a \
|
|
||||||
libboot$(TWL_LIBSUFFIX).a \
|
libboot$(TWL_LIBSUFFIX).a \
|
||||||
libds$(TWL_LIBSUFFIX).a \
|
libds$(TWL_LIBSUFFIX).a \
|
||||||
libhotsw$(TWL_LIBSUFFIX).a \
|
libhotsw$(TWL_LIBSUFFIX).a \
|
||||||
|
|||||||
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -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 <twl.h>
|
|
||||||
#include <sysmenu.h>
|
|
||||||
|
|
||||||
#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__
|
|
||||||
@ -33,7 +33,6 @@
|
|||||||
#include <sysmenu/memorymap.h>
|
#include <sysmenu/memorymap.h>
|
||||||
#include <sysmenu/hotsw.h>
|
#include <sysmenu/hotsw.h>
|
||||||
#include <sysmenu/sharedFont.h>
|
#include <sysmenu/sharedFont.h>
|
||||||
#include <sysmenu/banner.h>
|
|
||||||
#include <sysmenu/util.h>
|
#include <sysmenu/util.h>
|
||||||
#include <sysmenu/WDSWrapper.h>
|
#include <sysmenu/WDSWrapper.h>
|
||||||
#include <sysmenu/types.h>
|
#include <sysmenu/types.h>
|
||||||
|
|||||||
@ -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 <twl/types.h>
|
|
||||||
#include <twl/os/common/banner.h>
|
|
||||||
#include <sysmenu.h>
|
|
||||||
|
|
||||||
#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
|
|
||||||
@ -85,6 +85,8 @@ BOOL AMN_isAgreeEULAFlag(s32 index);
|
|||||||
// info size is cParentalControlRatingInfoSize
|
// info size is cParentalControlRatingInfoSize
|
||||||
const u8* AMN_getParentalControlRatingInfo(s32 index);
|
const u8* AMN_getParentalControlRatingInfo(s32 index);
|
||||||
|
|
||||||
|
BOOL AMN_checkBannerFile(TWLBannerFile* pBanner);
|
||||||
|
|
||||||
// 生データ(TitlePropertyのリスト、HeaderShortリスト)にアクセスできる抜け道関数
|
// 生データ(TitlePropertyのリスト、HeaderShortリスト)にアクセスできる抜け道関数
|
||||||
TitleProperty* AMN_getTitlePropertyList( void );
|
TitleProperty* AMN_getTitlePropertyList( void );
|
||||||
ROM_Header_Short* AMN_getRomHeaderList( void );
|
ROM_Header_Short* AMN_getRomHeaderList( void );
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user