From cd690ffbafdad134ddef7d182909501e2df7a9bb Mon Sep 17 00:00:00 2001 From: aoki_ryoma Date: Tue, 9 Sep 2008 06:22:57 +0000 Subject: [PATCH] =?UTF-8?q?WLfirm=E3=81=AE=E5=80=A4=E3=81=8C=E5=8F=96?= =?UTF-8?q?=E5=BE=97=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=8F=E3=81=AA=E3=81=A3?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=80=82=20OtherInfo=E3=81=ABRTCOffset=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E3=80=81=E3=82=BF=E3=83=83=E3=83=81=E3=83=91=E3=83=8D=E3=83=AB?= =?UTF-8?q?=E3=82=AD=E3=83=A3=E3=83=AA=E3=83=96=E3=83=AC=E3=83=BC=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E6=83=85=E5=A0=B1=E3=82=92=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=E3=80=82=EF=BC=88RSV=E3=81=AE=E3=81=BF=E6=9C=AA=E5=AE=9F?= =?UTF-8?q?=E8=A3=85=EF=BC=89=20RTC=E3=81=AE=E3=83=AA=E3=82=BB=E3=83=83?= =?UTF-8?q?=E3=83=88=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0=E3=80=82?= 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@2452 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- .../DisplaySystemInformation/ARM9/Makefile | 4 +- .../DisplaySystemInformation/ARM9/filemove.rb | 6 +- .../ARM9/main_normal.rsf | 2 +- .../ARM9/main_secure.rsf | 2 +- .../ARM9/makeFooter.txt | 3 - .../ARM9/src/control.c | 42 +++++++++- .../ARM9/src/drawFunc.c | 4 +- .../ARM9/src/getInformation.h | 2 + .../ARM9/src/get_font.c | 40 ++++----- .../ARM9/src/get_hw.c | 4 +- .../ARM9/src/get_other.c | 49 ++++++++++- .../ARM9/src/get_whitelist.c | 4 + .../ARM9/src/get_wl.c | 3 + .../ARM9/src/strResource.c | 19 ++++- .../ARM9/src/strResource.h | 78 +++++++++++++----- .../ARM9/src/viewSystemInfo.c | 18 ++-- .../banner/icon/0B0A.bmp | Bin 0 -> 630 bytes .../banner/icon/0B1A.bmp | Bin 0 -> 630 bytes .../banner/icon/0B2A.bmp | Bin 0 -> 630 bytes .../banner/icon/0B3A.bmp | Bin 0 -> 630 bytes .../banner/icon/0B4A.bmp | Bin 0 -> 630 bytes .../banner/icon/0B5A.bmp | Bin 0 -> 630 bytes .../banner/icon/0B6A.bmp | Bin 0 -> 630 bytes .../banner/icon/0B7A.bmp | Bin 0 -> 630 bytes .../banner/icon/0B8A.bmp | Bin 0 -> 630 bytes .../banner/icon/0B9A.bmp | Bin 0 -> 630 bytes .../banner/icon/0BAA.bmp | Bin 0 -> 630 bytes .../banner/icon/0BBA.bmp | Bin 0 -> 630 bytes 28 files changed, 210 insertions(+), 70 deletions(-) create mode 100644 build/tests/DisplaySystemInformation/banner/icon/0B0A.bmp create mode 100644 build/tests/DisplaySystemInformation/banner/icon/0B1A.bmp create mode 100644 build/tests/DisplaySystemInformation/banner/icon/0B2A.bmp create mode 100644 build/tests/DisplaySystemInformation/banner/icon/0B3A.bmp create mode 100644 build/tests/DisplaySystemInformation/banner/icon/0B4A.bmp create mode 100644 build/tests/DisplaySystemInformation/banner/icon/0B5A.bmp create mode 100644 build/tests/DisplaySystemInformation/banner/icon/0B6A.bmp create mode 100644 build/tests/DisplaySystemInformation/banner/icon/0B7A.bmp create mode 100644 build/tests/DisplaySystemInformation/banner/icon/0B8A.bmp create mode 100644 build/tests/DisplaySystemInformation/banner/icon/0B9A.bmp create mode 100644 build/tests/DisplaySystemInformation/banner/icon/0BAA.bmp create mode 100644 build/tests/DisplaySystemInformation/banner/icon/0BBA.bmp diff --git a/build/tests/DisplaySystemInformation/ARM9/Makefile b/build/tests/DisplaySystemInformation/ARM9/Makefile index 901b15b9..e9e4bbbd 100644 --- a/build/tests/DisplaySystemInformation/ARM9/Makefile +++ b/build/tests/DisplaySystemInformation/ARM9/Makefile @@ -26,7 +26,7 @@ SUBMAKES = Makefile.0 Makefile.1 Makefile.2 Makefile.3\ -include $(TWL_IPL_RED_ROOT)/build/tests/RelocateChecker/buildtools/commondefs +include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs #---------------------------------------------------------------------------- @@ -37,7 +37,7 @@ do-build : $(TARGETS) -include $(TWL_IPL_RED_ROOT)/build/tests/RelocateChecker/buildtools/modulerules +include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules #---------------------------------------------------------------------------- diff --git a/build/tests/DisplaySystemInformation/ARM9/filemove.rb b/build/tests/DisplaySystemInformation/ARM9/filemove.rb index cc2bf5ad..1f6b6dc2 100755 --- a/build/tests/DisplaySystemInformation/ARM9/filemove.rb +++ b/build/tests/DisplaySystemInformation/ARM9/filemove.rb @@ -1,8 +1,8 @@ #! ruby -Ks -startDir = "/cygdrive/c/home/TWL_IPL/build/tests/DisplaySystemInformation/ARM9/bin/ARM9-TS.LTD.thumb/Rom" -dstDir = "/cygdrive/c/home/TWL_IPL/build/tests/DisplaySystemInformation/ARM9/bin/ARM9-TS.LTD.thumb/roms" +startDir = "$TWL_IPL_RED_ROOT/build/tests/DisplaySystemInformation/ARM9/bin/ARM9-TS.LTD.thumb/Rom" +dstDir = "/build/tests/DisplaySystemInformation/ARM9/bin/ARM9-TS.LTD.thumb/roms" -Dir::chdir startDir +Dir::chdir "./bin/ARM9-TS.LTD.thumb/Rom" dirList = Dir::entries "." `mkdir #{dstDir}` diff --git a/build/tests/DisplaySystemInformation/ARM9/main_normal.rsf b/build/tests/DisplaySystemInformation/ARM9/main_normal.rsf index c3e38c96..10ed7d54 100644 --- a/build/tests/DisplaySystemInformation/ARM9/main_normal.rsf +++ b/build/tests/DisplaySystemInformation/ARM9/main_normal.rsf @@ -97,7 +97,7 @@ Property # #BannerFile ./etc/myGameBanner.bnr #BannerFile $(TWLSDK_ROOT)/include/twl/specfiles/default.bnr - BannerFile $(DISPINFO_BANNERPATH) + BannerFile ../banner/$(DISPINFO_GAMECODE).bnr # # Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE] diff --git a/build/tests/DisplaySystemInformation/ARM9/main_secure.rsf b/build/tests/DisplaySystemInformation/ARM9/main_secure.rsf index d6adc470..3f2e6385 100644 --- a/build/tests/DisplaySystemInformation/ARM9/main_secure.rsf +++ b/build/tests/DisplaySystemInformation/ARM9/main_secure.rsf @@ -96,7 +96,7 @@ Property # BANNER FILE: generated from Banner Spec File # #BannerFile ./etc/myGameBanner.bnr - BannerFile $(DISPINFO_BANNERPATH) + BannerFile ../banner/$(DISPINFO_GAMECODE).bnr # # Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE] diff --git a/build/tests/DisplaySystemInformation/ARM9/makeFooter.txt b/build/tests/DisplaySystemInformation/ARM9/makeFooter.txt index 47e6bc69..a0f02db8 100644 --- a/build/tests/DisplaySystemInformation/ARM9/makeFooter.txt +++ b/build/tests/DisplaySystemInformation/ARM9/makeFooter.txt @@ -76,11 +76,9 @@ endif ifeq ($(IS_NAND_APP),TRUE) MEDIA = NAND FILE_SUFFIX = tad - BANNARPATH = ../banner/$(GAMECODE).bnr else MEDIA = GAMECARD FILE_SUFFIX = srl - BANNARPATH = $(TWLSDK_ROOT)/include/twl/specfiles/default.bnr endif ifeq ($(INVISIBLE_SCFG),TRUE) @@ -101,7 +99,6 @@ MAKEROM_FLAGS += -DDISPINFO_WRAM_MAP=$(WRAM_MAP) \ -DDISPINFO_LOCKSCFG=$(INVISIBLE_SCFG) \ -DDISPINFO_AES=$(AES_SLOT) \ -DDISPINFO_GAMECODE=$(GAMECODE) \ - -DDISPINFO_BANNERPATH=$(BANNARPATH) \ -DROM_HEADER_TEMPLATE='$(call empath,$(ROM_HEADER_TEMPLATE))' diff --git a/build/tests/DisplaySystemInformation/ARM9/src/control.c b/build/tests/DisplaySystemInformation/ARM9/src/control.c index 8e0968a7..d74e83d5 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/control.c +++ b/build/tests/DisplaySystemInformation/ARM9/src/control.c @@ -48,6 +48,7 @@ static const char *s_TSDPath[] = { static int selectLine[ROOTMENU_SIZE+1]; BOOL resetUserData( void ); BOOL breakUserData( u8 idx ); +BOOL resetRTC( void ); static void TSDi_ClearSettingsDirect( LCFGTWLSettingsData *pTSD ); static BOOL LCFGi_TSD_WriteSettingsDirectForRecovery( const LCFGTWLSettingsData *pSrcInfo, int index ); static BOOL LCFGi_TSF_WriteFile( char *pPath, TSFHeader *pHeader, const void *pSrcBody, u8 *pSaveCount ); @@ -82,6 +83,10 @@ BOOL executeControl( int *line, int *changeLine, u8 *mode ) result &= breakUserData(0); result &= breakUserData(1); break; + + case MENU_RTC_RESET: + result = resetRTC(); + break; } *mode = (u8) ((*mode & ~MODE_RESULT_MASK ) | ( result << MODE_RESULT_SHIFT) ); @@ -199,7 +204,7 @@ ChangeCotnrolResult changeControl( int *menu, int *line, int *changeLine, u8 *mo BOOL control( int *menu, int *line, int *changeLine, u8 *mode ) { int linemax = s_numMenu[*menu]; // 選択中ページの項目数 - BOOL controlFlag = FALSE; // 何か操作があったらTRUEになる + BOOL controlFlag = FALSE; // 何か操作があったらTRUEになる // 上下で項目変更 if( pad.trg & PAD_KEY_UP ) @@ -278,6 +283,7 @@ BOOL control( int *menu, int *line, int *changeLine, u8 *mode ) case MENU_RESET_INFO: case MENU_BREAK_DATA: + case MENU_RTC_RESET: *mode |= MODE_EXECUTE_MASK; *changeLine = 0; // デフォルト位置をcancelにしておく break; @@ -383,3 +389,37 @@ BOOL breakUserData( u8 idx ) OS_TPrintf("Breaking UserData Succeeded. path: %s\n", s_TSDPath[idx]); return TRUE; } + + +BOOL resetRTC( void ) +{ + RTCResult result; + RTCDate date; + RTCTime time; + + date.year = 0; + date.month = 1; + date.day = 1; + date.week = RTC_WEEK_SUNDAY; + + time.hour = 0; + time.minute = 0; + time.second = 0; + + // resultは成功したらゼロが返る + result = RTC_SetDate( &date ); + if( result != RTC_RESULT_SUCCESS ) + { + OS_TPrintf("RTC Date Reset Failed. err: %d", result ); + return FALSE; + } + + result |= RTC_SetTime( &time ); + if( result != RTC_RESULT_SUCCESS ) + { + OS_TPrintf("RTC Time Reset Failed. err: %d", result ); + return FALSE; + } + + return TRUE; +} \ No newline at end of file diff --git a/build/tests/DisplaySystemInformation/ARM9/src/drawFunc.c b/build/tests/DisplaySystemInformation/ARM9/src/drawFunc.c index 84d77cb9..27b09bb2 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/drawFunc.c +++ b/build/tests/DisplaySystemInformation/ARM9/src/drawFunc.c @@ -252,7 +252,9 @@ void printValue( int menu,int entryLine, int drawOffset, DispInfoEntry *entry ) return; } - if( menu == MENU_SECURE_HW && entryLine == SECURE_HW_FUSE ) + if( ( menu == MENU_SECURE_HW && entryLine == SECURE_HW_FUSE ) || + ( menu == MENU_OTHER && entryLine == OTHER_RTC_OFFSET ) || + ( menu == MENU_OTHER && entryLine == OTHER_TP_RSV ) ) { // 16文字を8文字の二段組みに変更 char buf[9] = {0}; diff --git a/build/tests/DisplaySystemInformation/ARM9/src/getInformation.h b/build/tests/DisplaySystemInformation/ARM9/src/getInformation.h index da70f69c..8311dbd1 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/getInformation.h +++ b/build/tests/DisplaySystemInformation/ARM9/src/getInformation.h @@ -19,6 +19,8 @@ typedef struct FontInfo{ BOOL isHashOK; // ハッシュ値が既知のものと一致するか } FontInfo; +// 初回読み込みか否か +static BOOL firstRead; // NANDアプリ情報 extern s32 gNumContents; diff --git a/build/tests/DisplaySystemInformation/ARM9/src/get_font.c b/build/tests/DisplaySystemInformation/ARM9/src/get_font.c index fa270f84..843b8679 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/get_font.c +++ b/build/tests/DisplaySystemInformation/ARM9/src/get_font.c @@ -19,6 +19,7 @@ FontInfo gFontInfo[ OS_SHARED_FONT_MAX ]; void loadFontName( OSSharedFontIndex idx ); void loadFont( OSSharedFontIndex idx ); +void releaseFont( OSSharedFontIndex idx ); BOOL checkFontHash( OSSharedFontIndex idx ); @@ -34,6 +35,7 @@ void getFontInfo( void ) // フォントテーブルバッファの確保 tableSize = OS_GetSharedFontTableSize(); tableBuf = (u8*) Alloc ( (u32)tableSize ); + SDK_ASSERT( tableBuf ); time = OS_GetSharedFontTimestamp(); OS_TPrintf("SharedFont Time Stamp %08lx\n", time ); @@ -43,6 +45,7 @@ void getFontInfo( void ) if( ! OS_LoadSharedFontTable( (void*)tableBuf ) ) { OS_TPrintf("Loading shared font table failed.\n"); + Free(tableBuf); return; } @@ -54,8 +57,8 @@ void getFontInfo( void ) gFontInfo[fontIdx].size = (u32) OS_GetSharedFontSize( (OSSharedFontIndex)fontIdx ); loadFont( fontIdx ); - gFontInfo[fontIdx].isHashOK = checkFontHash( fontIdx ); + releaseFont( fontIdx ); } Free(tableBuf); @@ -67,18 +70,10 @@ void loadFontName( OSSharedFontIndex idx ) // 名前取得 const u8* fontName = OS_GetSharedFontName( (OSSharedFontIndex)idx ); int fontNameLength = STD_StrLen( (char*)fontName ); - - if( gFontInfo[idx].name == NULL || - ( sizeof( gFontInfo[idx].name ) <= fontNameLength )) - { - // 名前のところにメモリが割り当てられてなかったり、 - // 小さかったりした場合は割り当てなおす。 - - // NsysのFreeはNULLを渡すと落ちる仕様・・・ - if( gFontInfo[idx].name != NULL ) - { - Free( gFontInfo[idx].name ); - } + + OS_TPrintf("fontname length: %d\n", fontNameLength ); + if( gFontInfo[idx].name == NULL ){ + // 名前のところにメモリが割り当てられてなかったりしたら gFontInfo[idx].name = (u8*) Alloc ( sizeof(u8) * (fontNameLength + 1) ); } @@ -91,18 +86,11 @@ void loadFont( OSSharedFontIndex idx ) { // でも別に普段必要なわけじゃないからメモリ確保のためにも // ハッシュ値取り終わったら開放するようにするかな? - if( gFontInfo[idx].data == NULL || - ( sizeof( gFontInfo[idx].data ) <= gFontInfo[idx].size )) + if( gFontInfo[idx].data == NULL ) { // データバッファにメモリが割り当てられてなかったり、 // 小さかったりした場合は割り当てなおす。 - - if( gFontInfo[idx].data != NULL ) - { - Free( gFontInfo[idx].data ); - } - - + gFontInfo[idx].data = (u8*) Alloc ( gFontInfo[idx].size ); } @@ -110,6 +98,14 @@ void loadFont( OSSharedFontIndex idx ) OS_LoadSharedFont( idx, (void*)gFontInfo[idx].data ); } +void releaseFont( OSSharedFontIndex idx ) +{ + if( gFontInfo[idx].data != NULL ) + { + Free( gFontInfo[idx].data ); + } +} + BOOL checkFontHash( OSSharedFontIndex idx ) { u8 digestBuf[MATH_SHA1_DIGEST_SIZE], cmpBuf[MATH_SHA1_DIGEST_SIZE]; diff --git a/build/tests/DisplaySystemInformation/ARM9/src/get_hw.c b/build/tests/DisplaySystemInformation/ARM9/src/get_hw.c index 25c8896a..80ebb4fb 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/get_hw.c +++ b/build/tests/DisplaySystemInformation/ARM9/src/get_hw.c @@ -23,8 +23,8 @@ void getNormalHWInfo( void ) int value; value = (int) OS_GetOwnerRtcOffset(); - gAllInfo[MENU_NORMAL_HW][NORMAL_HW_RTC_OFFSET].iValue = (int) value; - gAllInfo[MENU_NORMAL_HW][NORMAL_HW_RTC_OFFSET].isNumData = TRUE; + gAllInfo[MENU_NORMAL_HW][NORMAL_HW_RTC_ADJUST].iValue = (int) value; + gAllInfo[MENU_NORMAL_HW][NORMAL_HW_RTC_ADJUST].isNumData = TRUE; { int i; diff --git a/build/tests/DisplaySystemInformation/ARM9/src/get_other.c b/build/tests/DisplaySystemInformation/ARM9/src/get_other.c index 785520a9..4fa91786 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/get_other.c +++ b/build/tests/DisplaySystemInformation/ARM9/src/get_other.c @@ -1,4 +1,5 @@ #include +#include #include "viewSystemInfo.h" #include "strResource.h" @@ -7,8 +8,9 @@ void getOtherInfo( void ) { // この辺からマクロで生成した分 - + s64 rtcoffset; int value; + LCFGTWLTPCalibData tpdata; value = OS_IsAgreeEULA(); gAllInfo[MENU_OTHER][OTHER_AGREE_EULA].iValue = value; @@ -21,8 +23,49 @@ void getOtherInfo( void ) gAllInfo[MENU_OTHER][OTHER_WIRELESS].iValue = value; gAllInfo[MENU_OTHER][OTHER_WIRELESS].str.sjis = s_strEnable[value]; - - + rtcoffset = LCFG_TSD_GetRTCOffset(); + snprintf( gAllInfo[MENU_OTHER][OTHER_RTC_OFFSET].str.sjis, + DISPINFO_BUFSIZE-1, "%016llx", rtcoffset ); + gAllInfo[MENU_OTHER][OTHER_RTC_OFFSET].numLines = 2; + gAllInfo[MENU_OTHER][OTHER_RTC_OFFSET].fromLCFG = TRUE; + + LCFG_TSD_GetTPCalibration( &tpdata ); + gAllInfo[MENU_OTHER][OTHER_TP_RAWX1].iValue = tpdata.data.raw_x1; + gAllInfo[MENU_OTHER][OTHER_TP_RAWX1].isNumData = TRUE; + gAllInfo[MENU_OTHER][OTHER_TP_RAWX1].fromLCFG = TRUE; + gAllInfo[MENU_OTHER][OTHER_TP_RAWX2].iValue = tpdata.data.raw_x2; + gAllInfo[MENU_OTHER][OTHER_TP_RAWX2].isNumData = TRUE; + gAllInfo[MENU_OTHER][OTHER_TP_RAWX2].fromLCFG = TRUE; + gAllInfo[MENU_OTHER][OTHER_TP_DX1].iValue = tpdata.data.dx1; + gAllInfo[MENU_OTHER][OTHER_TP_DX1].isNumData = TRUE; + gAllInfo[MENU_OTHER][OTHER_TP_DX1].fromLCFG = TRUE; + + gAllInfo[MENU_OTHER][OTHER_TP_DY1].iValue = tpdata.data.dy1; + gAllInfo[MENU_OTHER][OTHER_TP_DY1].isNumData = TRUE; + gAllInfo[MENU_OTHER][OTHER_TP_DY1].fromLCFG = TRUE; + + gAllInfo[MENU_OTHER][OTHER_TP_RAWY1].iValue = tpdata.data.raw_y1; + gAllInfo[MENU_OTHER][OTHER_TP_RAWY1].isNumData = TRUE; + gAllInfo[MENU_OTHER][OTHER_TP_RAWY1].fromLCFG = TRUE; + + gAllInfo[MENU_OTHER][OTHER_TP_RAWY2].iValue = tpdata.data.raw_y2; + gAllInfo[MENU_OTHER][OTHER_TP_RAWY2].isNumData = TRUE; + gAllInfo[MENU_OTHER][OTHER_TP_RAWY2].fromLCFG = TRUE; + + gAllInfo[MENU_OTHER][OTHER_TP_DX2].iValue = tpdata.data.dx2; + gAllInfo[MENU_OTHER][OTHER_TP_DX2].isNumData = TRUE; + gAllInfo[MENU_OTHER][OTHER_TP_DX2].fromLCFG = TRUE; + + gAllInfo[MENU_OTHER][OTHER_TP_DY2].iValue = tpdata.data.dy2; + gAllInfo[MENU_OTHER][OTHER_TP_DY2].isNumData = TRUE; + gAllInfo[MENU_OTHER][OTHER_TP_DY2].fromLCFG = TRUE; +/* + snprintf( gAllInfo[MENU_OTHER][OTHER_TP_RSV].str.sjis, + DISPINFO_BUFSIZE, "%016llx", MI_LoadLE64( tpdata.rsv ) ); + gAllInfo[MENU_OTHER][OTHER_TP_RSV].fromLCFG = TRUE; +*/ + + } diff --git a/build/tests/DisplaySystemInformation/ARM9/src/get_whitelist.c b/build/tests/DisplaySystemInformation/ARM9/src/get_whitelist.c index 10583a15..3cf5acc2 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/get_whitelist.c +++ b/build/tests/DisplaySystemInformation/ARM9/src/get_whitelist.c @@ -95,6 +95,7 @@ void getWhitelistHash( void ) gAllInfo[MENU_WHITE][WHITE_HASH].str.sjis = s_strCorrect [ cmpHash( digestBuf, &tmd->contents[0].hash ) ]; + FS_CloseFile( &file ); Free( tmd ); Free( fileBuf ); @@ -107,6 +108,8 @@ void getNumDHTEntry( void ) char filePath[NAM_PATH_LEN+1]; dht = (DHTFile*) Alloc (DS_HASH_TABLE_SIZE); + SDK_ASSERT(dht); + FS_InitFile( &file ); NAM_GetTitleBootContentPathFast( filePath , WHITELIST_TITLEID ); @@ -133,6 +136,7 @@ void getNumDHTEntry( void ) DC_FlushRange( dht, DHT_GetDatabaseLength( dht )); OS_TPrintf(" dht.header.nums : %d\n", dht->header.nums); + FS_CloseFile( &file ); gAllInfo[MENU_WHITE][WHITE_NUM].iValue = (int)dht->header.nums; gAllInfo[MENU_WHITE][WHITE_NUM].isNumData = TRUE; diff --git a/build/tests/DisplaySystemInformation/ARM9/src/get_wl.c b/build/tests/DisplaySystemInformation/ARM9/src/get_wl.c index d241860c..3115df56 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/get_wl.c +++ b/build/tests/DisplaySystemInformation/ARM9/src/get_wl.c @@ -18,6 +18,7 @@ #define WL_FW_TYPE_SIZE 0x4 + void getWLInfo( void ) { FSFile file; @@ -80,6 +81,8 @@ void getWLInfo( void ) gAllInfo[MENU_WL][WL_FW_TYPE].iValue = value; gAllInfo[MENU_WL][WL_FW_TYPE].str.sjis = s_strWLFWType[ value ]; } + + FS_CloseFile( &file ); } else { diff --git a/build/tests/DisplaySystemInformation/ARM9/src/strResource.c b/build/tests/DisplaySystemInformation/ARM9/src/strResource.c index 376fbbfe..a6e4663d 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/strResource.c +++ b/build/tests/DisplaySystemInformation/ARM9/src/strResource.c @@ -35,6 +35,7 @@ int s_numMenu[] = { VERSIONMENU_SIZE, 0, 0, + 0, ROOTMENU_SIZE }; @@ -76,7 +77,8 @@ const char *s_strRootMenu[] = { "<Whitelist>", "<Installed Content Version>", "Reset HW Setting to Default", - "break HW Setting" + "break HW Setting", + "Reset RTC Data" }; const char *s_strOwnerMenu[] = { @@ -117,11 +119,21 @@ const char *s_strSecureUserMenu[] = { const char *s_strOtherMenu[] = { "Agree EULA", "EULA Version", - "Wireless" + "Wireless", + "RTC Offset", + "TP Calib raw x1", + "TP Calib raw y1", + "TP Calib dx1", + "TP Calib dy1", + "TP Calib raw x2", + "TP Calib raw y2", + "TP Calib dx2", + "TP Calib dy2", + "TP Calib RSV" }; const char *s_strNormalHWMenu[] = { - "RTC Offset", + "RTC Adjustment", "Unique ID" }; @@ -276,6 +288,7 @@ const char **s_strMetaMenu[] = { NULL, NULL, NULL, + NULL, s_strRootMenu }; diff --git a/build/tests/DisplaySystemInformation/ARM9/src/strResource.h b/build/tests/DisplaySystemInformation/ARM9/src/strResource.h index 4f072d5d..b620b294 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/strResource.h +++ b/build/tests/DisplaySystemInformation/ARM9/src/strResource.h @@ -19,7 +19,9 @@ #define __DISPLAY_INFO_RESOURCE__ // メニューID -#define MENU_ROOT 15 +#define ROOTMENU_SIZE 16 + +#define MENU_ROOT 16 #define MENU_OWNER 0 #define MENU_PARENTAL 1 #define MENU_SECURE_USER 2 @@ -35,9 +37,10 @@ #define MENU_VERSION 12 #define MENU_RESET_INFO 13 #define MENU_BREAK_DATA 14 +#define MENU_RTC_RESET 15 +#define OWNERMENU_SIZE 6 -// 行番号 #define OWNER_LANGUAGE 0 #define OWNER_COLOR 1 #define OWNER_BIRTHDAY 2 @@ -45,6 +48,8 @@ #define OWNER_NICKNAME 4 #define OWNER_COMMENT 5 +#define PARENTALMENU_SIZE 12 + #define PARENTAL_FLAG 0 #define PARENTAL_PICTOCHAT 1 #define PARENTAL_DOWNLOAD 2 @@ -58,6 +63,8 @@ #define PARENTAL_QUESTION_ID 10 #define PARENTAL_ANSWER 11 +#define SECURE_USER_MENU_SIZE 8 + #define SECURE_USER_INITIAL_SETTINGS 0 #define SECURE_USER_INITIAL_LAUNCHER 1 #define SECURE_USER_BROKEN_SETTINGS 2 @@ -67,13 +74,29 @@ #define SECURE_USER_LASTBOOT_PLATFORM 6 #define SECURE_USER_LASTBOOT_ID 7 -#define OTHER_AGREE_EULA 0 -#define OTHER_EULA_VERSION 1 -#define OTHER_WIRELESS 2 +#define OTHERMENU_SIZE 13 -#define NORMAL_HW_RTC_OFFSET 0 +#define OTHER_AGREE_EULA 0 +#define OTHER_EULA_VERSION 1 +#define OTHER_WIRELESS 2 +#define OTHER_RTC_OFFSET 3 +#define OTHER_TP_RAWX1 4 +#define OTHER_TP_RAWY1 5 +#define OTHER_TP_DX1 6 +#define OTHER_TP_DY1 7 +#define OTHER_TP_RAWX2 8 +#define OTHER_TP_RAWY2 9 +#define OTHER_TP_DX2 10 +#define OTHER_TP_DY2 11 +#define OTHER_TP_RSV 12 + +#define NORMAL_HW_MENU_SIZE 2 + +#define NORMAL_HW_RTC_ADJUST 0 #define NORMAL_HW_UNIQUE_ID 1 +#define SECURE_HW_MENU_SIZE 6 + #define SECURE_HW_FORCE_DISABLE 0 #define SECURE_HW_REGION 1 #define SECURE_HW_SERIAL 2 @@ -81,6 +104,8 @@ #define SECURE_HW_FUSE 4 #define SECURE_HW_LAUNCHER_ID 5 +#define SCFG_ARM9_MENU_SIZE 27 + #define SCFG_ARM9_ROM_SEC 0 #define SCFG_ARM9_ROM_STATE 1 #define SCFG_ARM9_CLK_CPU 2 @@ -109,6 +134,8 @@ #define SCFG_ARM9_CHECK_ERROR7 25 #define SCFG_ARM9_CHECK_ERROR9 26 +#define SCFG_ARM7_MENU_SIZE 47 + #define SCFG_ARM7_ROM_ARM9_SEC 0 #define SCFG_ARM7_ROM_ARM9_RSEL 1 #define SCFG_ARM7_ROM_ARM7_SEC 2 @@ -159,6 +186,8 @@ #define SCFG_ARM7_SHARED_OFFSET 47 +#define SYSMENU_MENU_SIZE 10 + #define SYSMENU_TIMESTAMP 0 #define SYSMENU_VERSION_NUM 1 #define SYSMENU_VERSION_STR 2 @@ -173,33 +202,40 @@ #define SYSMENU_HASH_IDX 5 +#define FONTMENU_SIZE 1 + #define FONT_TIMESTAMP 0 #define FONT_INFO 1 +#define WLMENU_SIZE 3 + #define WL_VERSION 0 #define WL_NUM_FW 1 #define WL_FW_TYPE 2 +#define WHITEMENU_SIZE 2 + #define WHITE_NUM 0 #define WHITE_HASH 1 +#define VERSIONMENU_SIZE 0 + #define VERSION_OTHER 0 -// 各メニューサイズ -#define ROOTMENU_SIZE 15 -#define OWNERMENU_SIZE 6 -#define PARENTALMENU_SIZE 12 -#define SECURE_USER_MENU_SIZE 8 -#define OTHERMENU_SIZE 3 -#define NORMAL_HW_MENU_SIZE 2 -#define SECURE_HW_MENU_SIZE 6 -#define SCFG_ARM7_MENU_SIZE 47 -#define SCFG_ARM9_MENU_SIZE 27 -#define SYSMENU_MENU_SIZE 10 -#define FONTMENU_SIZE 1 -#define WLMENU_SIZE 3 -#define WHITEMENU_SIZE 2 -#define VERSIONMENU_SIZE 0 + + + + + + + + + + + + + + extern int s_numMenu[]; extern const char *s_strRootMenu[]; diff --git a/build/tests/DisplaySystemInformation/ARM9/src/viewSystemInfo.c b/build/tests/DisplaySystemInformation/ARM9/src/viewSystemInfo.c index 9b59892a..5f027b1f 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/viewSystemInfo.c +++ b/build/tests/DisplaySystemInformation/ARM9/src/viewSystemInfo.c @@ -130,6 +130,8 @@ void initInfo( void ) infoAlloc( gAllInfo[MENU_SCFG_ARM9], SCFG_ARM9_CHECK_ERROR7, DISPINFO_BUFSIZE, TRUE ); infoAlloc( gAllInfo[MENU_SCFG_ARM9], SCFG_ARM9_CHECK_ERROR9, DISPINFO_BUFSIZE, TRUE ); infoAlloc( gAllInfo[MENU_WL], WL_VERSION, DISPINFO_BUFSIZE, TRUE ); + infoAlloc( gAllInfo[MENU_OTHER], OTHER_RTC_OFFSET, DISPINFO_BUFSIZE, TRUE); + infoAlloc( gAllInfo[MENU_OTHER], OTHER_TP_RSV, DISPINFO_BUFSIZE, TRUE); // utf(u16) @@ -166,8 +168,7 @@ void infoAlloc( DispInfoEntry *p, u8 index, u8 size, BOOL isSjis ) void getAllInfo( void ) // { - BOOL SCFGAccessable = FALSE; - BOOL fuseRomAccessable = FALSE; + static BOOL firstRead = TRUE; OS_TPrintf("reflesh Information\n"); @@ -178,15 +179,18 @@ void getAllInfo( void ) getHWInfo(); getSCFGInfo(); getSysmenuInfo(); - getFontInfo(); - getWhiteListInfo(); - getWLInfo(); - + + if( firstRead ){ + getWLInfo(); + getWhiteListInfo(); #if NAM_ENABLE getContentsVersion(); #endif - + } + + getFontInfo(); printAllInfo(); + firstRead = FALSE; OS_TPrintf("reflesh information finished\n"); } diff --git a/build/tests/DisplaySystemInformation/banner/icon/0B0A.bmp b/build/tests/DisplaySystemInformation/banner/icon/0B0A.bmp new file mode 100644 index 0000000000000000000000000000000000000000..3c3291e21d867ecd66887b4f35b493aeb974f429 GIT binary patch literal 630 zcmb7=#-a8T&i_F}E;`0y;|0!a^DlA%k0App~44Wc4^TtcR$LBN_ ztHQ7Q-Z080M!!I<0>O^=^KrDWIpraa;UDS)RXeE8(rEaRUrs;SOoN{0or90RSz!eo fU`s||=T~yp<9yB^FtOL;(TZ`*N3!q literal 0 HcmV?d00001 diff --git a/build/tests/DisplaySystemInformation/banner/icon/0B2A.bmp b/build/tests/DisplaySystemInformation/banner/icon/0B2A.bmp new file mode 100644 index 0000000000000000000000000000000000000000..454a960e86aa3d65ffa97f7f61630b5d58e6ce2d GIT binary patch literal 630 zcmb7B%MHUY2&GjA=mu)~Bl>b>K_Vv(6!P<-yf#(#>KunLP-9zd?)IK!s!&U@n}-~F>1 zi&fy)b5F>yiIFc*D@U;7y+2wDn^R744EqotsM0}ohDO4V{6_VY!_?_vipe1OsQO5< lzJd-~isc}{&RZ&eA@A8Az-blscuyF;qCTFd@Ck*Z>jOTOy9xjR literal 0 HcmV?d00001 diff --git a/build/tests/DisplaySystemInformation/banner/icon/0B3A.bmp b/build/tests/DisplaySystemInformation/banner/icon/0B3A.bmp new file mode 100644 index 0000000000000000000000000000000000000000..fcd2a5293cb6550835a762d404d9d475487d630c GIT binary patch literal 630 zcmb7B!41PO2&7d9=m>pwj{dt&-X6^ZAhD1odVnFZ6jd!THb)M8B(L{&CASUx6aJWf zp&O#r?h9;0Skzh^*b%}T_1^J9eUYj~a6Fd6#($cq@DP@fbpWwu;tcCRw%#i*^_H)0 zESkix=Ux!B!l)OxX2R9+em|}jR+AiN81aGcD9a(Ws9x}+zS;fc&|wnMG!(cV$SZ8& guo>b*K%Mh3Lfp^x158$8<5xSIB=|YtiG*Y710|5U-2eap literal 0 HcmV?d00001 diff --git a/build/tests/DisplaySystemInformation/banner/icon/0B4A.bmp b/build/tests/DisplaySystemInformation/banner/icon/0B4A.bmp new file mode 100644 index 0000000000000000000000000000000000000000..f7224baed7881eed0dac60f1c173dcb71393e0ec GIT binary patch literal 630 zcmb7B!41PO2&7d9=m>pwj{dt&-X6^ZAh8eY__9y<> z{317^+3pi8A}lE-4|YPl$hxjvSS&H~2)K$c}r{iSPN* zO{?|7ujfw4vVq}O+Ha=XS2dTM=9u_UAE?ujI!c4^qrR>C$zjbU(lix>9^?(| gVe=XCN1!gpX(iG*Y714|{lY5)KL literal 0 HcmV?d00001 diff --git a/build/tests/DisplaySystemInformation/banner/icon/0B6A.bmp b/build/tests/DisplaySystemInformation/banner/icon/0B6A.bmp new file mode 100644 index 0000000000000000000000000000000000000000..2d92ad53c9765198d43586e594ceb6264884f81c GIT binary patch literal 630 zcmb7B%MHUY2&GjA=m8Vx`48`DoNQ>O?9xpeSRfWito h4lF5wov-6t<@@YE0Q4sIde05YF&`TiKA~_7eE_+wydeMp literal 0 HcmV?d00001 diff --git a/build/tests/DisplaySystemInformation/banner/icon/0B7A.bmp b/build/tests/DisplaySystemInformation/banner/icon/0B7A.bmp new file mode 100644 index 0000000000000000000000000000000000000000..400f5e2ed2c290a2a49dafdd456d0174fe23a49a GIT binary patch literal 630 zcmb7x&XTqe@Az%= zlU%sXcAa1mVM{6PAaccvtm{g_bBlZ2a8{%U`lp$jR#U5;2WWds9AU3yN8NSeM}ACG z^WOON+zG91VEBf6Poz5C-{)yl56R5}bARhk)aghatx5P%-!}c=@ERj(F3PE=p?uRS jaw=(Wl28}@*%s3%P=^qz6G#6T7e9&bLmpqqzE9x=i4nXT literal 0 HcmV?d00001 diff --git a/build/tests/DisplaySystemInformation/banner/icon/0B8A.bmp b/build/tests/DisplaySystemInformation/banner/icon/0B8A.bmp new file mode 100644 index 0000000000000000000000000000000000000000..b2e14b09b92fbacdc6b7f1d9ae9c6d7231787de3 GIT binary patch literal 630 zcmb7=!41PO2t{et0XjmDoul`zle0(j07xu^L_c7hScVwEJ5@*^J*|~4L^m~4u z#$r|Yb=@1XY-;oi+$s@tyx)(jh0T%ETq8czhpKj<&eCZ3k#C%SvY0v|2=dXvqY$MP cI4&%aK$rDS2?KoYPd)1EAJ+M$PY{l&56gYLfdBvi literal 0 HcmV?d00001 diff --git a/build/tests/DisplaySystemInformation/banner/icon/0B9A.bmp b/build/tests/DisplaySystemInformation/banner/icon/0B9A.bmp new file mode 100644 index 0000000000000000000000000000000000000000..342bc36da28a5898482ef611c319d9ed0655fb76 GIT binary patch literal 630 zcmb79!41PO2&7d9=m>pwj{dt&-X6^ZAh8e5Djgcw6$hxjPKrR6yqw|XrgPt^lshgU29zk8LaD?Hkj&tb5kNTLV zhTiyd-w3sBVDgQQUPyJi-OsB{5t6F~X1?oB)ajHuT9fdnzBc_}gL8yaQGImk3DB`q fjsvlRO?COCkeyib2PCcH=#N=Va?ao3WPJ}G!X3OJ literal 0 HcmV?d00001 diff --git a/build/tests/DisplaySystemInformation/banner/icon/0BBA.bmp b/build/tests/DisplaySystemInformation/banner/icon/0BBA.bmp new file mode 100644 index 0000000000000000000000000000000000000000..70f2589dee6209c3559ac82e4627934edabd80be GIT binary patch literal 630 zcmb7A!41PO2&7d9=m>pwj{dt&-X6^ZAhD38>jAbCOHtJlV{@3pM_%vkDq$P-4|FyxTKUkxHF^|skQO~u>|ml&d*ca^iMOGHdAYZN06&0&M+FY^B%hJJwLmt zVHAEncS4p;Ouo@E5}{7__xZFbTymOY#)tYqgHEZlGzdTH>)lTdw2;Slv!Cmsyoo(@ ejQkN)m*cdQMDcOYnuXun`6O9C20W2)Onm@(@Vm_b literal 0 HcmV?d00001