4NA*として開発中のUIGランチャーへの暫定対応

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1557 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
yoshida_teruhisa 2008-06-02 05:55:37 +00:00
parent ddab607722
commit 0acd75c66d
4 changed files with 25 additions and 4 deletions

View File

@ -104,7 +104,12 @@ void SYSMi_SetAESKeysForSignJPEG( ROM_Header *pROMH, BOOL *pIsClearSlotB, BOOL *
{
void *pAESKey;
if( ( pROMH->s.titleID_Hi & TITLE_ID_HI_SECURE_FLAG_MASK ) &&
( 0 == STD_CompareNString( (const char *)&pROMH->s.titleID_Lo[ 1 ], "ANH", 3 ) ) ) {
( ( 0 == STD_CompareNString( (const char *)&pROMH->s.titleID_Lo[ 1 ], "ANH", 3 ) )
#ifdef DEV_UIG_LAUNCHER
|| ( ( 0 == STD_CompareNString( (const char *)&pROMH->s.titleID_Lo[ 1 ], "AN4", 3 ) ) && ( SCFG_GetBondingOption() != 0 ) )
#endif
)
) {
// for Launcher
pAESKey = ( SCFG_GetBondingOption() == SCFG_OP_PRODUCT ) ?
&( OSi_GetFromFirmAddr()->rsa_pubkey[ 3 ][ 0x30 ] ) : (void *)dev_jpegEncodeKeyForLauncher;

View File

@ -513,6 +513,8 @@ static OSTitleId SYSMi_getTitleIdOfMachineSettings( void )
int getNum;
int validNum = 0;
NAMTitleId *pTitleIDList = NULL;
char machine_setting_code[4];
ROM_Header_Short *header = ( ROM_Header_Short *)HW_TWL_ROM_HEADER_BUF;
// インストールされているタイトルの取得
getNum = NAM_GetNumTitles();
@ -523,10 +525,13 @@ static OSTitleId SYSMi_getTitleIdOfMachineSettings( void )
}
(void)NAM_GetTitleList( pTitleIDList, (u32)getNum );
// 本体情報のTitleIDの4バイト目はランチャーのTitleIDの4バイト目と同じ
STD_TSNPrintf( machine_setting_code, 4, "BN%c", header->titleID_Lo[3]);
// 取得したタイトルに本体情報のIDがあるかチェック
for( l = 0; l < getNum; l++ ) {
char *code = ((char *)&pTitleIDList[l]) + 1;
if( 0 == STD_CompareNString( code, "BNH", 3 ) )
if( 0 == STD_CompareNString( code, machine_setting_code, 3 ) )
{
ret = (OSTitleId)pTitleIDList[l];
break;

View File

@ -960,7 +960,11 @@ static AuthResult SYSMi_AuthenticateHeaderWithSign( TitleProperty *pBootTitle, R
prev = OS_GetTick();
hi = head->s.titleID_Hi;
// Launcherは専用の鍵を使う
if( 0 == STD_CompareNString( &gamecode[1], "ANH", 3 ) )
if( ( 0 == STD_CompareNString( &gamecode[1], "ANH", 3 ) )
#ifdef DEV_UIG_LAUNCHER
|| ( ( 0 == STD_CompareNString( &gamecode[1], "AN4", 3 ) ) && ( SCFG_GetBondingOption() != 0 ) )
#endif
)
{
keynum = LAUNCHER_KEY_INDEX;
}else
@ -1705,7 +1709,11 @@ static void SYSMi_makeTitleIdList( void )
// ランチャーはリストに入れない
gamecode = (char *)&(pe_hs->titleID);
if( 0 == STD_CompareNString( &gamecode[1], "ANH", 3 ) )
if( ( 0 == STD_CompareNString( &gamecode[1], "ANH", 3 ) )
#ifdef DEV_UIG_LAUNCHER
|| ( ( 0 == STD_CompareNString( &gamecode[1], "AN4", 3 ) ) && ( SCFG_GetBondingOption() != 0 ) )
#endif
)
{
continue;
}

View File

@ -52,6 +52,9 @@ void SYSMi_SetBootAppMountInfo( TitleProperty *pBootTitle );
#endif // SDK_ARM9
// UIGランチャーの開発版4NA*を開発用CPUに乗ったREDランチャーから
// 起動するためのスイッチ
#define DEV_UIG_LAUNCHER
#ifdef SDK_ARM9
//-------------------------------------------------------