mirror of
https://github.com/rvtr/TwlToolsRED.git
synced 2025-10-31 06:41:18 -04:00
ロゴが正規のデータかどうかのチェックを追加。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@531 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
parent
ec31d03a1e
commit
20c5ded43c
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -17,6 +17,20 @@ using namespace MasterEditorTWL;
|
||||
|
||||
extern u16 calcCRC( const u16 start, const u8 *data, const int allsize );
|
||||
|
||||
const u8 s_NintendoLogo[ NINTENDO_LOGO_DATA_LENGTH ] =
|
||||
{
|
||||
0x24, 0xFF, 0xAE, 0x51, 0x69, 0x9A, 0xA2, 0x21, 0x3D, 0x84, 0x82, 0x0A, 0x84, 0xE4, 0x09, 0xAD,
|
||||
0x11, 0x24, 0x8B, 0x98, 0xC0, 0x81, 0x7F, 0x21, 0xA3, 0x52, 0xBE, 0x19, 0x93, 0x09, 0xCE, 0x20,
|
||||
0x10, 0x46, 0x4A, 0x4A, 0xF8, 0x27, 0x31, 0xEC, 0x58, 0xC7, 0xE8, 0x33, 0x82, 0xE3, 0xCE, 0xBF,
|
||||
0x85, 0xF4, 0xDF, 0x94, 0xCE, 0x4B, 0x09, 0xC1, 0x94, 0x56, 0x8A, 0xC0, 0x13, 0x72, 0xA7, 0xFC,
|
||||
0x9F, 0x84, 0x4D, 0x73, 0xA3, 0xCA, 0x9A, 0x61, 0x58, 0x97, 0xA3, 0x27, 0xFC, 0x03, 0x98, 0x76,
|
||||
0x23, 0x1D, 0xC7, 0x61, 0x03, 0x04, 0xAE, 0x56, 0xBF, 0x38, 0x84, 0x00, 0x40, 0xA7, 0x0E, 0xFD,
|
||||
0xFF, 0x52, 0xFE, 0x03, 0x6F, 0x95, 0x30, 0xF1, 0x97, 0xFB, 0xC0, 0x85, 0x60, 0xD6, 0x80, 0x25,
|
||||
0xA9, 0x63, 0xBE, 0x03, 0x01, 0x4E, 0x38, 0xE2, 0xF9, 0xA2, 0x34, 0xFF, 0xBB, 0x3E, 0x03, 0x44,
|
||||
0x78, 0x00, 0x90, 0xCB, 0x88, 0x11, 0x3A, 0x94, 0x65, 0xC0, 0x7C, 0x63, 0x87, 0xF0, 0x3C, 0xAF,
|
||||
0xD6, 0x25, 0xE4, 0x8B, 0x38, 0x0A, 0xAC, 0x72, 0x21, 0xD4, 0xF8, 0x07,
|
||||
};
|
||||
|
||||
// ****************************************************************
|
||||
// RCSrl クラスの MRC 機能を別ファイルに独立させた
|
||||
// ****************************************************************
|
||||
@ -195,6 +209,10 @@ ECSrlResult RCSrl::mrcNTR( FILE *fp )
|
||||
{
|
||||
this->hErrorList->Add( this->makeMrcError("LogoCRC") );
|
||||
}
|
||||
if( memcmp( this->pRomHeader->s.nintendo_logo, &s_NintendoLogo, NINTENDO_LOGO_DATA_LENGTH ) != 0 )
|
||||
{
|
||||
this->hErrorList->Add( this->makeMrcError("LogoCRC") );
|
||||
}
|
||||
|
||||
// ヘッダCRC
|
||||
crc = calcCRC( CRC16_INIT_VALUE, (u8*)this->pRomHeader, CALC_CRC16_SIZE );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user