From 9aaf8a64985344338fa47e9c4a07817cda0dc3d9 Mon Sep 17 00:00:00 2001 From: aoki_ryoma Date: Fri, 26 Dec 2008 00:33:27 +0000 Subject: [PATCH] =?UTF-8?q?DisplayInfo=E3=81=AE=E3=82=B5=E3=83=96=E3=82=BB?= =?UTF-8?q?=E3=83=83=E3=83=88=E3=81=AB=E3=81=82=E3=81=9F=E3=82=8BAppVersio?= =?UTF-8?q?nViewer=E3=82=92=E4=BD=9C=E6=88=90?= 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@2724 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- build/tests/AppVersionViewer/ARM9/Makefile | 150 +++++++++++ build/tests/AppVersionViewer/ARM9/main.rsf | 248 ++++++++++++++++++ build/tests/AppVersionViewer/banner/Makefile | 49 ++++ .../AppVersionViewer/banner/banner_v3.bsf | Bin 0 -> 884 bytes .../AppVersionViewer/banner/icon/icon.bmp | Bin 0 -> 630 bytes .../ARM9/src/drawFunc.c | 16 +- .../ARM9/src/getInformation.h | 27 +- .../ARM9/src/strResource.c | 42 ++- .../ARM9/src/strResource.h | 60 +++-- .../ARM9/src/viewSystemInfo.c | 25 +- 10 files changed, 570 insertions(+), 47 deletions(-) create mode 100644 build/tests/AppVersionViewer/ARM9/Makefile create mode 100644 build/tests/AppVersionViewer/ARM9/main.rsf create mode 100644 build/tests/AppVersionViewer/banner/Makefile create mode 100644 build/tests/AppVersionViewer/banner/banner_v3.bsf create mode 100644 build/tests/AppVersionViewer/banner/icon/icon.bmp diff --git a/build/tests/AppVersionViewer/ARM9/Makefile b/build/tests/AppVersionViewer/ARM9/Makefile new file mode 100644 index 00000000..5e20a362 --- /dev/null +++ b/build/tests/AppVersionViewer/ARM9/Makefile @@ -0,0 +1,150 @@ +#/*---------------------------------------------------------------------------* +# Project: TwlIPL - tests - DisplaySystemInformation +# File: makefile +# +# Copyright **** 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 +TARGET_PLATFORM = TWL +TWL_ARCHGEN = LIMITED + +###################################### +FILE_IDX = 0 +IS_SECURE_APP = TRUE +IS_NAND_APP = FALSE +NAND_ACCESS = TRUE +AES_SLOT = FALSE +INVISIBLE_SCFG = TRUE +GAMECODE = 0BZA +###################################### + +ROM_HEADER_TEMPLATE = $(SYSMENU_ROM_HEADER_DIR)/$(GAMECODE)/rom_header_$(call toLower,$(GAMECODE)).template.sbin +LIBSYSCALL = $(SYSMENU_ROM_HEADER_DIR)/$(GAMECODE)/libsyscall.a + + +MACRO_FLAGS += -DNAM_ENABLE=$(IS_SECURE_APP) -DDISPINFO_BIN_IDX=N -DVERSION_VIEWER=TRUE +TWL_NANDAPP = $(IS_NAND_APP) + +DISP_INFO = $(call eupath,$(TWL_IPL_RED_ROOT)/build/tests/DisplaySystemInformation) + +SUBDIRS = + +MISC_DIR = ../../../systemMenu_RED/misc + +SRCDIR = $(DISP_INFO)/ARM9/src + +SRCS = main.c viewSystemInfo.c drawFunc.c control.c\ + strResource.c misc.c util.c\ + get_versionData.c \ + $(MISC_DIR)/src/cmn.c + +LINCLUDES += $(MISC_DIR)/include \ + $(DISP_INFO)/common/include \ + $(ES_ROOT)/twl/include + +TARGET_NAME = AppVersionViewer +TARGET_BIN = $(TARGET_NAME).$(FILE_SUFFIX) + +SYSMENU_LIBS = \ + liblcfg$(TWL_LIBSUFFIX).a \ + libsysmenu$(TWL_LIBSUFFIX).a \ + libsysmmcu$(TWL_LIBSUFFIX).a \ + libsysmutil$(TWL_LIBSUFFIX).a \ + libboot$(TWL_LIBSUFFIX).a \ + libds$(TWL_LIBSUFFIX).a \ + liberrorlog$(TWL_LIBSUFFIX).a \ + libhotsw$(TWL_LIBSUFFIX).a \ + libdht$(TWL_LIBSUFFIX).a \ + libreloc_info$(TWL_LIBSUFFIX).a \ + libnamut$(TWL_LIBSUFFIX).a \ + libsharedfont_launcher$(TWL_LIBSUFFIX).a \ + WDS$(TWL_LIBSUFFIX).a + +SDK_APPEND_LIBS = \ + libes$(TWL_LIBSUFFIX).a \ + libboc$(TWL_LIBSUFFIX).a \ + libsfs$(TWL_LIBSUFFIX).a \ + libnam$(TWL_LIBSUFFIX).a \ + libsea$(TWL_LIBSUFFIX).a \ + libreboot$(TWL_LIBSUFFIX).a \ + libna$(TWL_LIBSUFFIX).a + +LLIBRARIES += $(SYSMENU_LIBS) $(SDK_APPEND_LIBS) + + + +#============================================================================= + +include $(TWLSDK_ROOT)/add-ins/es/commondefs.es +include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs + + +ifeq ($(IS_SECURE_APP),TRUE) + DEFAULT_COMP_ARM7 = armadillo + WRAM_MAP = MAP_TS_SCR + APPTYPE = SYSTEM + MAKEROM = $(TWL_TOOLSDIR)/bin/makerom.TWL.secure.exe + ROM_SPEC = main.rsf + MAKETAD_OPTION += -s +else + WRAM_MAP = $(MAKEROM_WRAM_MAPPING) + DEFAULT_COMP_ARM7 = racoon + APPTYPE = USER + ROM_SPEC = main_normal.rsf +endif + +ifeq ($(IS_NAND_APP),TRUE) + MEDIA = NAND + FILE_SUFFIX = tad +else + MEDIA = GAMECARD + FILE_SUFFIX = srl +endif + +ifeq ($(INVISIBLE_SCFG),TRUE) + SCFG_SUFFIX = LockSCFG +else + SCFG_SUFFIX = UnlockSCFG +endif + +BINDIR = ./bin/$(TWL_BUILDTYPE) +OBJDIR = ./obj/$(TWL_BUILDTYPE) + + +MAKEROM_FLAGS += -DDISPINFO_WRAM_MAP=$(WRAM_MAP) \ + -DDISPINFO_APPTYPE=$(APPTYPE) \ + -DDISPINFO_SECURE=$(IS_SECURE_APP) \ + -DDISPINFO_MEDIA=$(MEDIA) \ + -DDISPINFO_NANDACCESS=$(NAND_ACCESS) \ + -DDISPINFO_LOCKSCFG=$(INVISIBLE_SCFG) \ + -DDISPINFO_AES=$(AES_SLOT) \ + -DDISPINFO_GAMECODE=$(GAMECODE) \ + -DROM_HEADER_TEMPLATE='$(call empath,$(ROM_HEADER_TEMPLATE))' + + +DEFAULT_MAKEROM_ARM7_BASE = $(DISP_INFO)/ARM7_$(DEFAULT_COMP_ARM7)/bin/$(TWL_BUILDTYPE_ARM7)/$(DEFAULT_COMP_ARM7) +DEFAULT_MAKEROM_ARM7 = $(DEFAULT_MAKEROM_ARM7_BASE).$(TWL_ELF_EXT) + + +#---------------------------------------------------------------------------- +do-build: $(TARGETS) + +#---------------------------------------------------------------------------- + + +include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules +#include $(TWLSDK_ROOT)/build/buildtools/modulerules +#include $(TWL_IPL_RED_ROOT)/build/tests/RelocateChecker/buildtools/modulerules + + +#===== End of Makefile ===== diff --git a/build/tests/AppVersionViewer/ARM9/main.rsf b/build/tests/AppVersionViewer/ARM9/main.rsf new file mode 100644 index 00000000..36a4c3fe --- /dev/null +++ b/build/tests/AppVersionViewer/ARM9/main.rsf @@ -0,0 +1,248 @@ +#---------------------------------------------------------------------------- +# Project: TwlSDK - include +# File: ROM-TS.rsf +# +# Copyright 2007 Nintendo. All rights reserved. +# +# These coded insructions, 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$ +#---------------------------------------------------------------------------- +# +# TWL ROM SPEC FILE +# + +Arm9 +{ + Static "$(MAKEROM_ARM9:r).TWL.FLX.sbin$(COMPSUFFIX9)" + OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.FLX.sbin$(COMPSUFFIX9)" + OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.FLX.sbin$(COMPSUFFIX9)" + Elf "$(MAKEROM_ARM9:r).tef" +} + +Arm7 +{ + Static "$(MAKEROM_ARM7_BASE:r).TWL.FLX.sbin$(COMPSUFFIX7)" + OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.FLX.sbin$(COMPSUFFIX7)" + OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.FLX.sbin$(COMPSUFFIX7)" + Elf "$(MAKEROM_ARM7_BASE:r).tef" +} + +Arm9.Ltd +{ + Static "$(MAKEROM_ARM9:r).TWL.LTD.sbin$(COMPSUFFIX9)" + OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.LTD.sbin$(COMPSUFFIX9)" + OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.LTD.sbin$(COMPSUFFIX9)" +} + +Arm7.Ltd +{ + Static "$(MAKEROM_ARM7_BASE:r).TWL.LTD.sbin$(COMPSUFFIX7)" + OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.LTD.sbin$(COMPSUFFIX7)" + OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.LTD.sbin$(COMPSUFFIX7)" +} + +Property +{ + ### + ### Settings for FinalROM + ### + #### BEGIN + # + + # TITLE NAME: Your product name within 12bytes + # + TitleName "DispInfo" + + # + # MAKER CODE: Your company ID# in 2 ascii words + # issued by NINTENDO + # + MakerCode 01 + + # + # REMASTER VERSION: Mastering version + # + #RomVersion 0 + + # + # ROM SPEED TYPE: [MROM/1TROM/UNDEFINED] + # + RomSpeedType $(MAKEROM_ROMSPEED) + + # + # ROM SIZE: in bit [64M/128M/256M/512M/1G/2G] + # + #RomSize 128M + #RomSize 256M + + # + # ROM PADDING: TRUE if finalrom + # + #RomFootPadding TRUE + + # + # ROM HEADER TEMPLATE: Provided to every product by NINTENDO + # + RomHeaderTemplate $(ROM_HEADER_TEMPLATE) + + # + # BANNER FILE: generated from Banner Spec File + # + #BannerFile ./etc/myGameBanner.bnr + BannerFile ../banner/banner.bnr + + # + # Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE] + # + #PermitLandingNormalJump FALSE + + # + # Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE] + # + #PermitLandingTmpJump FALSE + + ### + ### Setting for TWL + ### + + # + # ROM HEADER Ltd: Provided to every product by NINTENDO + # + RomHeaderLtd $(TWLSDK_ROOT)/tools/bin/rom_header.LTD.sbin + + # + # Digest parameters: + # + DigestParam 1024 32 + + # + # WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD + # MAP2_BB_HYB/MAP2_BB_LTD/MAP2_TS_HYB/MAP2_TS_LTD] + # don't have to edit + # + WramMapping MAP_TS_SCR + + # + # CardRegion: card region [Japan/America/Europe/Australia/China/Korea] + # + CardRegion ALL + + # + # CommonClientKey: launcher deliver common client Key [TRUE/FALSE] + # + #CommonClientKey FALSE + + # + # HwAESSlotB: launcher deliver HW AES slot B setting [TRUE/FALSE] + # + #HwAESSlotB FALSE + + # + # HwAESSlotC: launcher deliver HW AES slot C setting [TRUE/FALSE] + # + #HwAESSlotC FALSE + + # + # SDCardAccess: sd card access control [TRUE/FALSE] + # + #SDCardAccess $(DISPINFO_SDACCESS) + + # + # NANDAccess: NAND access control [TRUE/FALSE] + # + #NANDAccess FALSE + NANDAccess $(DISPINFO_NANDACCESS) + + # + # Codec mode: + # don't have to edit + # + CodecMode $(MAKEROM_CODEC_MODE) + + # + # Disp WiFiConnection Icon for Launcher [TRUE/FALSE] + # + #WiFiConnectionIcon FALSE + + # + # Disp DSWireless Icon for Launcher [TRUE/FALSE] + # + #DSWirelessIcon FALSE + + LockSCFG $(DISPINFO_LOCKSCFG) + HwAESSlotA_SSLClientCert $(DISPINFO_AES) + DisableDebug TRUE + + ### + #### END +} + +AppendProperty +{ + # + # Publisher : "Nintendo" + # don't have to edit + #Publisher Nintendo + + # + # Application type : [USER/SYSTEM] + # don't have to edit + AppType $(DISPINFO_APPTYPE) +# AppType SYSTEM + # + # launch title on the launcher : [TRUE/FALSE] + # don't have to edit + Launch TRUE + + # + # Boot allowed Media: [GameCard] + # + Media $(DISPINFO_MEDIA) +# Media NAND + # + # Data only title : [TRUE/FALSE] + # don't have to edit + ##DataOnly FALSE + + # + # Secure title : [TRUE/FALSE] + # don't have to edit + Secure $(DISPINFO_SECURE) +# Secure TRUE + # + # GameCode for TitleID : Your GameCode in 4 ascii words + # + GameCode $(DISPINFO_GAMECODE) + + # + # Public save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M] + # + #PublicSaveDataSize 0K + + # + # Private save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M] + # + #PrivateSaveDataSize 0K + + # + # Enable SubBannerFile + #SubBannerFile FALSE + +} + +RomSpec +{ + Offset 0x00000000 + Segment ALL + HostRoot ../../../systemMenu_RED/data + Root /data + File NTR_IPL_font_m.NFTR + +} diff --git a/build/tests/AppVersionViewer/banner/Makefile b/build/tests/AppVersionViewer/banner/Makefile new file mode 100644 index 00000000..a6a3b396 --- /dev/null +++ b/build/tests/AppVersionViewer/banner/Makefile @@ -0,0 +1,49 @@ +#! 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$ +#---------------------------------------------------------------------------- + +include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs + +ICON_DIR = ./icon + +BANNER_ICON = $(ICON_DIR)/icon.bmp +BANNER_SPEC = banner_v3.bsf + +TARGETS = banner.bnr +INSTALL_DIR = ./ +INSTALL_TARGETS = $(TARGETS) + +BANNER_ICON_NAME = $(basename $(BANNER_ICON)) + +LDIRT_CLEAN = $(TARGETS) \ + $(BANNER_ICON_NAME).nbfs \ + $(BANNER_ICON_NAME).nbfc \ + $(BANNER_ICON_NAME).nbfp \ + $(TARGETS:.bnr=.srl) + +include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules + +#---------------------------------------------------------------------------- +# build +#---------------------------------------------------------------------------- +do-build: $(TARGETS) + +$(TARGETS): $(BANNER_SPEC) $(BANNER_ICON) + $(NTEXCONV) -no -bg -bgb -bgnc $(BANNER_ICON) >/dev/null && \ + $(MAKEBANNER) -N $(BANNER_ICON_NAME) $(BANNER_SPEC) $(TARGETS) + +# diff --git a/build/tests/AppVersionViewer/banner/banner_v3.bsf b/build/tests/AppVersionViewer/banner/banner_v3.bsf new file mode 100644 index 0000000000000000000000000000000000000000..d3ede19aac9fe1d430c0c3ab0defd20898766412 GIT binary patch literal 884 zcmc(eO>4qH5Qg8Y1^>fB&b1W5gSS>pwMdbsdS9brz%P>6;Gb8Y-Sy-txwH%n^YPB) zoy_d@66sxuVi`SqG5A({WTl*Fq9ay{6)V#gyR9chcXX)v8y&uD^rH<-3K*^LjEr_V z5h;l+U}#jqJ;N{Y_V}6CDV3H?LDXSq^op6}RXt5K{MX6cbaQw)c9{<69eav1Y(>td4zvke-|Hfn$k*A=wkI&%LC v3NGIID_XLRh0f>=e#s8{dO<37m4jNU19D5o>X&`EYqZ2t@;h*@W9WVZ-vxd7 literal 0 HcmV?d00001 diff --git a/build/tests/AppVersionViewer/banner/icon/icon.bmp b/build/tests/AppVersionViewer/banner/icon/icon.bmp new file mode 100644 index 0000000000000000000000000000000000000000..b2ddda22a01af1e882ca8bc549e33043518ca915 GIT binary patch literal 630 zcmb`D!41PO2t{et0XjmDoul`zle0(j07xu^L?5Jz?OQ8_7|hQH^Tq4EU8QUzKJmxb zFLEPW?Y_V!!jabYi%5z$>Agcl9f`;c=gVIN{nt!Q!;LE}dp&caJA~q9773&H!q8Rc z#jA#bts1K(-#N<=!T9kS`jB_v)HCym)nn#U-e@?OpObwNqkP5TY;T@d3mo$hmx`wL LrM`BTi$2LdA||>E literal 0 HcmV?d00001 diff --git a/build/tests/DisplaySystemInformation/ARM9/src/drawFunc.c b/build/tests/DisplaySystemInformation/ARM9/src/drawFunc.c index 7385f9c8..ea3c8eba 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/drawFunc.c +++ b/build/tests/DisplaySystemInformation/ARM9/src/drawFunc.c @@ -103,8 +103,11 @@ void drawHeader( int menu, int line) { u16 buf[256]; - PrintfSJISSub( HEADER_LEFT, HEADER_UP, TXT_COLOR_RED, "%s %d $Rev:$" , "DisplaySystemInfo", DISPINFO_BIN_IDX ); - +#ifdef VERSION_VIEWER + PrintfSJISSub( HEADER_LEFT, HEADER_UP, TXT_COLOR_RED, "%s $Rev$" , "AppVesionViewer" ); +#else + PrintfSJISSub( HEADER_LEFT, HEADER_UP, TXT_COLOR_RED, "%s %d $Rev$" , "DisplaySystemInfo", DISPINFO_BIN_IDX ); +#endif if( menu != MENU_ROOT ) { @@ -121,6 +124,7 @@ void drawHeader( int menu, int line) PutStringUTF16Sub( FOOTER_LEFT, FOOTER_UP + FOOTER_LINES * LINE_OFFSET, TXT_COLOR_BLUE, buf ); } +#ifndef VERSION_VIEWER PutStringUTF16Sub( FOOTER_LEFT, FOOTER_UP + FOOTER_CONTROL1 * LINE_OFFSET, TXT_COLOR_BLUE, (const u16 *)L" A: Decide B: Back "); if( menu == MENU_SCFG_ARM7 ) @@ -128,6 +132,7 @@ void drawHeader( int menu, int line) PrintfSJISSub( FOOTER_LEFT, FOOTER_UP + FOOTER_REGIST * LINE_OFFSET, TXT_COLOR_RED, s_strSCFGViewMode[ gSelectedARM7SCFGReg ] ); PutStringUTF16Sub( FOOTER_LEFT, FOOTER_UP + FOOTER_CONTROL2 * LINE_OFFSET, TXT_COLOR_BLUE, (const u16 *)L" Select: Switch Viewing Area" ); } +#endif } void printData( int x, int y, int color, DispInfoEntry *entry ) @@ -316,6 +321,7 @@ void printValue( int menu,int entryLine, int drawOffset, DispInfoEntry *entry ) void drawRegister( int menu, int selected ) { +#ifndef VERSION_VIEWER // SCFGレジスタのバイナリをサブ画面に描画する int selectRegSize = 1; int selectBitNum; @@ -415,6 +421,7 @@ void drawRegister( int menu, int selected ) printBinary32( REGISTER_DATA_LEFT, REGISTER_DATA_UP + 3*LINE_OFFSET, regExt, selectBitNum - 48, selectRegSize ); } +#endif // ifndef VERSION_VIEWER } void printBinary32( int x, int y, u32 value, int selected, int selectSize ) @@ -522,6 +529,7 @@ void drawChangeMode( DispInfoEntry *entry, int changeLine ) void drawExecuteMode( const char *command, int changeLine, u8 mode ) { +#ifndef VERSION_VIEWER int i; // 項目名 @@ -544,6 +552,7 @@ void drawExecuteMode( const char *command, int changeLine, u8 mode ) { PrintfSJIS( RESULT_LEFT, RESULT_UP, TXT_COLOR_BLACK, s_strResult[ (mode & MODE_RESULT_MASK) >> MODE_RESULT_SHIFT ] ); } +#endif // VERSION_VIEWER } @@ -583,6 +592,7 @@ void drawVersion( int idx, int drawLine ,int selected ) void drawFontInfo( int idx, int drawLine, int selected ) { +#ifndef VERSION_VIEWER int color = TXT_COLOR_BLACK; int fontIdx = idx / NUM_FONT_INFO; int dataType = idx % NUM_FONT_INFO; @@ -626,8 +636,8 @@ void drawFontInfo( int idx, int drawLine, int selected ) PrintfSJIS( VALUE_LEFT, VALUE_UP + LINE_OFFSET*drawLine , color, s_strCorrect[ gFontInfo[fontIdx].isHashOK ] ); break; } +#endif // ifdef VERSION_VIEWER } - void drawMenu( int menu, int line, int changeLine, u8 mode ) // 情報一覧を描画する { diff --git a/build/tests/DisplaySystemInformation/ARM9/src/getInformation.h b/build/tests/DisplaySystemInformation/ARM9/src/getInformation.h index 8311dbd1..e861e041 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/getInformation.h +++ b/build/tests/DisplaySystemInformation/ARM9/src/getInformation.h @@ -5,6 +5,16 @@ #define __DISPLAY_INFO_GETINFORMATION__ +// 初回読み込みか否か +static BOOL firstRead; + +// NANDアプリ情報 +extern s32 gNumContents; +extern OSTitleId *gContentsTitle; +extern u16 *gContentsVersion; + +#ifndef VERSION_VIEWER + #define TWL_SYSMENU_VER_STR_LEN 28 // システムメニューバージョン文字列MAX bytes #define TWL_EULA_URL_LEN 128 #define TWL_NUP_HOSTNAME_LEN 64 @@ -19,13 +29,7 @@ typedef struct FontInfo{ BOOL isHashOK; // ハッシュ値が既知のものと一致するか } FontInfo; -// 初回読み込みか否か -static BOOL firstRead; -// NANDアプリ情報 -extern s32 gNumContents; -extern OSTitleId *gContentsTitle; -extern u16 *gContentsVersion; // 共有フォント情報 extern FontInfo gFontInfo[ OS_SHARED_FONT_MAX ]; @@ -33,9 +37,13 @@ extern FontInfo gFontInfo[ OS_SHARED_FONT_MAX ]; // LCFGデータを読み込むためのバッファ extern u8 *bufLCFG; +#endif // ifndef VERSION_VIEWER -void getSysmenuInfo( void ); void getVersions( void ); +void getContentsVersion( void ); + +#ifndef VERSION_VIEWER +void getSysmenuInfo( void ); void getSCFGInfo( void ); void getOwnerInfo( void ); void getHWInfo( void ); @@ -45,6 +53,7 @@ void getSecureUserInfo( void ); void getFontInfo( void ); void getWLInfo( void ); void getWhiteListInfo( void ); -void getContentsVersion( void ); -#endif \ No newline at end of file +#endif // ifndef VERSION_VIEWER + +#endif // ifdef __DISPLAY_INFO_GETINFORMATION__ \ No newline at end of file diff --git a/build/tests/DisplaySystemInformation/ARM9/src/strResource.c b/build/tests/DisplaySystemInformation/ARM9/src/strResource.c index 0f6a2ce5..9e70045d 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/strResource.c +++ b/build/tests/DisplaySystemInformation/ARM9/src/strResource.c @@ -19,6 +19,26 @@ // VERSION_MENU_SIZE、FONTMENU_SIZEだけコンテンツ数に応じて可変なのでconstではない + +#ifdef VERSION_VIEWER + +int s_numMenu[] = { + VERSIONMENU_SIZE, + ROOTMENU_SIZE +}; + +const char *s_strRootMenu[] = { + "<Installed Content Version>" +}; + + +const char **s_strMetaMenu[] = { + NULL, + s_strRootMenu +}; + +#else + int s_numMenu[] = { OWNERMENU_SIZE, PARENTALMENU_SIZE, @@ -364,10 +384,6 @@ char *s_strResult[] = { }; -char *s_strCorrect[] = { - "Incorrect", - "Correct" -}; char *s_strSysMenuKey[] = { "Incorrect", @@ -380,10 +396,6 @@ char *s_strBool[] = { "TRUE" }; -char *s_strOK[] = { - "CANCEL", - "OK" -}; char *s_strRatingOrg[] = { "CERO", @@ -696,7 +708,19 @@ char *s_strCountry[] = { "UNKNOWN ", }; + +#endif // else VERSION_VIEWER + +char *s_strOK[] = { + "CANCEL", + "OK" +}; + +char *s_strCorrect[] = { + "Incorrect", + "Correct" +}; + char s_strNA[] = { "N/A" }; - diff --git a/build/tests/DisplaySystemInformation/ARM9/src/strResource.h b/build/tests/DisplaySystemInformation/ARM9/src/strResource.h index c8a9794f..97c8928f 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/strResource.h +++ b/build/tests/DisplaySystemInformation/ARM9/src/strResource.h @@ -19,25 +19,47 @@ #define __DISPLAY_INFO_RESOURCE__ // メニューID -#define ROOTMENU_SIZE 16 +#ifdef VERSION_VIEWER + #define ROOTMENU_SIZE 1 + #define MENU_ROOT 1 + #define MENU_VERSION 0 + #define MENU_OWNER 10 + #define MENU_PARENTAL 11 + #define MENU_SECURE_USER 12 + #define MENU_OTHER 13 + #define MENU_NORMAL_HW 14 + #define MENU_SECURE_HW 15 + #define MENU_SCFG_ARM7 16 + #define MENU_SCFG_ARM9 17 + #define MENU_SYSMENU 18 + #define MENU_FONT 19 + #define MENU_WL 20 + #define MENU_WHITE 21 + #define MENU_RESET_INFO 22 + #define MENU_BREAK_DATA 23 + #define MENU_RTC_RESET 24 -#define MENU_ROOT 16 -#define MENU_OWNER 0 -#define MENU_PARENTAL 1 -#define MENU_SECURE_USER 2 -#define MENU_OTHER 3 -#define MENU_NORMAL_HW 4 -#define MENU_SECURE_HW 5 -#define MENU_SCFG_ARM7 6 -#define MENU_SCFG_ARM9 7 -#define MENU_SYSMENU 8 -#define MENU_FONT 9 -#define MENU_WL 10 -#define MENU_WHITE 11 -#define MENU_VERSION 12 -#define MENU_RESET_INFO 13 -#define MENU_BREAK_DATA 14 -#define MENU_RTC_RESET 15 +#else + #define ROOTMENU_SIZE 16 + + #define MENU_ROOT 16 + #define MENU_OWNER 0 + #define MENU_PARENTAL 1 + #define MENU_SECURE_USER 2 + #define MENU_OTHER 3 + #define MENU_NORMAL_HW 4 + #define MENU_SECURE_HW 5 + #define MENU_SCFG_ARM7 6 + #define MENU_SCFG_ARM9 7 + #define MENU_SYSMENU 8 + #define MENU_FONT 9 + #define MENU_WL 10 + #define MENU_WHITE 11 + #define MENU_VERSION 12 + #define MENU_RESET_INFO 13 + #define MENU_BREAK_DATA 14 + #define MENU_RTC_RESET 15 +#endif // else VERSION_VIEWER #define OWNERMENU_SIZE 6 @@ -268,4 +290,4 @@ extern char *s_strLanguage[]; extern char *s_strCountry[]; extern char s_strNA[]; -#endif \ No newline at end of file +#endif // ifndef __DISPLAY_INFO_RESOURCE__ \ No newline at end of file diff --git a/build/tests/DisplaySystemInformation/ARM9/src/viewSystemInfo.c b/build/tests/DisplaySystemInformation/ARM9/src/viewSystemInfo.c index 56a629a6..88f1d520 100644 --- a/build/tests/DisplaySystemInformation/ARM9/src/viewSystemInfo.c +++ b/build/tests/DisplaySystemInformation/ARM9/src/viewSystemInfo.c @@ -115,6 +115,8 @@ void displayInfoMain( void ) void initInfo( void ) // 固定文字列で対応できない項目に文字列領域を割り当てる { + +#ifndef VERSION_VIEWER OS_TPrintf("buffer initialize\n"); // sjis (char) @@ -145,6 +147,7 @@ void initInfo( void ) infoAlloc( gAllInfo[MENU_SYSMENU], SYSMENU_VERSION_STR, TWL_SYSMENU_VER_STR_LEN + 1, FALSE ); OS_TPrintf( "information alloc succeeded\n" ); +#endif } @@ -173,7 +176,8 @@ void getAllInfo( void ) static BOOL firstRead = TRUE; OS_TPrintf("reflesh Information\n"); - + +#ifndef VERSION_VIEWER getOwnerInfo(); getParentalInfo(); getSecureUserInfo(); @@ -181,16 +185,21 @@ void getAllInfo( void ) getHWInfo(); getSCFGInfo(); getSysmenuInfo(); - + getFontInfo(); + if( firstRead ){ getWLInfo(); getWhiteListInfo(); -#if NAM_ENABLE - getContentsVersion(); -#endif } +#endif + +#if NAM_ENABLE + if( firstRead ){ + getContentsVersion(); + } +#endif + - getFontInfo(); printAllInfo(); firstRead = FALSE; OS_TPrintf("reflesh information finished\n"); @@ -261,6 +270,7 @@ void printAllInfo ( void ) continue; } +#ifndef VERSION_VIEWER if( loop1 == MENU_FONT && FONT_INFO <= loop2 ) { int infoType = (loop2 - FONT_INFO) % NUM_FONT_INFO; @@ -283,7 +293,8 @@ void printAllInfo ( void ) continue; } - +#endif // ifndef VERSION_VIEWER + entry = &gAllInfo[loop1][loop2]; if( entry->isNumData )