diff --git a/build/debugsoft/CardRomHeaderChecker/Nand/Makefile b/build/debugsoft/CardRomHeaderChecker/Nand/Makefile index c1d65027..6b1cd5d0 100644 --- a/build/debugsoft/CardRomHeaderChecker/Nand/Makefile +++ b/build/debugsoft/CardRomHeaderChecker/Nand/Makefile @@ -16,37 +16,14 @@ # $Author$ #---------------------------------------------------------------------------- -TARGET_PLATFORM := TWL -TWL_NANDAPP := TRUE - -SUBDIRS = ../common/banner \ - $(ROOT)/build/demos/gx/UnitTours/DEMOLib - -TARGET_BIN = CardRomHeaderChecker.tad -#INCDIR = ../common/include -SRCDIR = ../common/src -SRCS = main.c - -ROM_SPEC = ./ROM-TS_nand.rsf +SUBMAKES = ./Makefile.HYB ./Makefile.LTD #---------------------------------------------------------------------------- include $(TWLSDK_ROOT)/build/buildtools/commondefs -include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib - -# インストール指定 -ifneq ($(TWL_IPL_RED_ROOT),) -INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/CardRomHeaderChecker -INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN) -endif - - -do-build: $(TARGETS) #---------------------------------------------------------------------------- -LIBSYSCALL = ../common/0CZA/libsyscall.a - include $(TWLSDK_ROOT)/build/buildtools/modulerules #===== End of Makefile ===== diff --git a/build/debugsoft/CardRomHeaderChecker/Nand/Makefile.HYB b/build/debugsoft/CardRomHeaderChecker/Nand/Makefile.HYB new file mode 100644 index 00000000..f0168cf3 --- /dev/null +++ b/build/debugsoft/CardRomHeaderChecker/Nand/Makefile.HYB @@ -0,0 +1,53 @@ +#! make -f +#---------------------------------------------------------------------------- +# Project: TwlSDK - tests - appjumpTest - Card +# File: Makefile +# +# Copyright 2008 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_PLATFORM := TWL +TWL_NANDAPP := TRUE +override TWL_ARCHGEN = HYBRID + +SUBDIRS = ../common/banner \ + $(ROOT)/build/demos/gx/UnitTours/DEMOLib + +TARGET_BIN = CardRomHeaderChecker.tad +#INCDIR = ../common/include +SRCDIR = ../common/src +SRCS = main.c + +ROM_SPEC = ./ROM-TS_nand.HYB.rsf + +#---------------------------------------------------------------------------- + +include $(TWLSDK_ROOT)/build/buildtools/commondefs +include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib + +# インストール指定 +ifneq ($(TWL_IPL_RED_ROOT),) +INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/CardRomHeaderChecker +INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN) +endif + + +do-build: $(TARGETS) + +#---------------------------------------------------------------------------- + +LIBSYSCALL = ../common/0CZA/libsyscall.a + +include $(TWLSDK_ROOT)/build/buildtools/modulerules + +#===== End of Makefile ===== diff --git a/build/debugsoft/CardRomHeaderChecker/Nand/Makefile.LTD b/build/debugsoft/CardRomHeaderChecker/Nand/Makefile.LTD new file mode 100644 index 00000000..b666973f --- /dev/null +++ b/build/debugsoft/CardRomHeaderChecker/Nand/Makefile.LTD @@ -0,0 +1,53 @@ +#! make -f +#---------------------------------------------------------------------------- +# Project: TwlSDK - tests - appjumpTest - Card +# File: Makefile +# +# Copyright 2008 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_PLATFORM := TWL +TWL_NANDAPP := TRUE +override TWL_ARCHGEN = LIMITED + +SUBDIRS = ../common/banner2 \ + $(ROOT)/build/demos/gx/UnitTours/DEMOLib + +TARGET_BIN = CardRomHeaderChecker.tad +#INCDIR = ../common/include +SRCDIR = ../common/src +SRCS = main.c + +ROM_SPEC = ./ROM-TS_nand.LTD.rsf + +#---------------------------------------------------------------------------- + +include $(TWLSDK_ROOT)/build/buildtools/commondefs +include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib + +# インストール指定 +ifneq ($(TWL_IPL_RED_ROOT),) +INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/CardRomHeaderChecker +INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN) +endif + + +do-build: $(TARGETS) + +#---------------------------------------------------------------------------- + +LIBSYSCALL = ../common/0CYA/libsyscall.a + +include $(TWLSDK_ROOT)/build/buildtools/modulerules + +#===== End of Makefile ===== diff --git a/build/debugsoft/CardRomHeaderChecker/Nand/ROM-TS_nand.rsf b/build/debugsoft/CardRomHeaderChecker/Nand/ROM-TS_nand.HYB.rsf similarity index 94% rename from build/debugsoft/CardRomHeaderChecker/Nand/ROM-TS_nand.rsf rename to build/debugsoft/CardRomHeaderChecker/Nand/ROM-TS_nand.HYB.rsf index fc19a2c2..14f382f1 100644 --- a/build/debugsoft/CardRomHeaderChecker/Nand/ROM-TS_nand.rsf +++ b/build/debugsoft/CardRomHeaderChecker/Nand/ROM-TS_nand.HYB.rsf @@ -98,12 +98,12 @@ Property # # Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE] # - #PermitLandingNormalJump FALSE + PermitLandingNormalJump TRUE # # Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE] # - #PermitLandingTmpJump FALSE + PermitLandingTmpJump TRUE ### ### Setting for TWL diff --git a/build/debugsoft/CardRomHeaderChecker/Nand/ROM-TS_nand.LTD.rsf b/build/debugsoft/CardRomHeaderChecker/Nand/ROM-TS_nand.LTD.rsf new file mode 100644 index 00000000..ef72b3f6 --- /dev/null +++ b/build/debugsoft/CardRomHeaderChecker/Nand/ROM-TS_nand.LTD.rsf @@ -0,0 +1,243 @@ +#---------------------------------------------------------------------------- +# 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 "CardRH Check" + + # + # MAKER CODE: Your company ID# in 2 ascii words + # issued by NINTENDO + # + #MakerCode "00" + + # + # 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/4G] + # + #RomSize 256M + + # + # ROM PADDING: TRUE if finalrom + # + #RomFootPadding TRUE + + # + # ROM HEADER TEMPLATE: Provided to every product by NINTENDO + # + RomHeaderTemplate ../common/0CYA/rom_header_0cya.template.sbin + + # + # BANNER FILE: generated from Banner Spec File + # + BannerFile ../common/banner2/banner.bnr + + # + # Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE] + # + PermitLandingNormalJump TRUE + + # + # Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE] + # + PermitLandingTmpJump TRUE + + ### + ### 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 $(MAKEROM_WRAM_MAPPING) + + # + # CardRegion: card region [Japan/America/Europe/Australia/China/Korea] + # + CardRegion ALL + + # + # 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 + + # + # Agree EULA [TRUE/FALSE] + # + #AgreeEULA FALSE + + # + # Agree EULA version [1 - 255] + # + #AgreeEULAVersion 1 + + ### + #### END +} + +AppendProperty +{ + # + # Boot allowed Media: [GameCard] + # + Media NAND + + # + # GameCode for TitleID : Your GameCode in 4 ascii words + # + #GameCode ABCJ + + # + # 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 TRUE + + # + # Game card power on: [TRUE/FALSE] + # + #GameCardOn FALSE + + # + # Game card transferd to nitro mode: [TRUE/FALSE] + # + #GameCardNitroMode FALSE +} + +RomSpec +{ + Offset 0x00000000 + Segment ALL + HostRoot $(MAKEROM_ROMROOT) + Root / + File $(MAKEROM_ROMFILES) +} + +Rating +{ + # + # Permited age to play for each rating organization + # + # Supported organization + # - CERO (OGN0) : for Japan + # - ESRB (OGN1) : for North America + # - BBFC (OGN2) : obsolete organization + # - USK (OGN3) : for German + # - PEGI_GEN (OGN4) : for Europe + # - PEGI_FINLAND (OGN5) : obsolete organization + # - PEGI_PRT (OGN6) : for Portugal + # - PEGI_BBFC (OGN7) : for UK + # - OFLC (OGN8) : for Australia and NewZealand + # - GRB (OGN9) : for Korea + # - OGN10 : reserved + # - OGN11 : reserved + # - OGN12 : reserved + # - OGN13 : reserved + # - OGN14 : reserved + # - OGN15 : reserved + # + # Available age [ 0 - 31 / PENDING / FREE ] + + CERO FREE +# ESRB FREE +# USK FREE +# PEGI_GEN FREE +# PEGI_PRT FREE +# PEGI_BBFC FREE +# OFLC FREE +# GRB FREE +} diff --git a/build/debugsoft/CardRomHeaderChecker/TmpJump/Makefile b/build/debugsoft/CardRomHeaderChecker/TmpJump/Makefile new file mode 100644 index 00000000..6b1cd5d0 --- /dev/null +++ b/build/debugsoft/CardRomHeaderChecker/TmpJump/Makefile @@ -0,0 +1,29 @@ +#! make -f +#---------------------------------------------------------------------------- +# Project: TwlSDK - tests - appjumpTest - Card +# File: Makefile +# +# Copyright 2008 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$ +#---------------------------------------------------------------------------- + +SUBMAKES = ./Makefile.HYB ./Makefile.LTD + +#---------------------------------------------------------------------------- + +include $(TWLSDK_ROOT)/build/buildtools/commondefs + +#---------------------------------------------------------------------------- + +include $(TWLSDK_ROOT)/build/buildtools/modulerules + +#===== End of Makefile ===== diff --git a/build/debugsoft/CardRomHeaderChecker/TmpJump/Makefile.HYB b/build/debugsoft/CardRomHeaderChecker/TmpJump/Makefile.HYB new file mode 100644 index 00000000..a2de77ad --- /dev/null +++ b/build/debugsoft/CardRomHeaderChecker/TmpJump/Makefile.HYB @@ -0,0 +1,71 @@ +#! make -f +#---------------------------------------------------------------------------- +# Project: TwlSDK - demos.TWL - nandApp - ExecTmpApp +# File: Makefile +# +# Copyright 2007-2008 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$ +#---------------------------------------------------------------------------- + +MISC_DIR = $(ROOT)/build/demos.TWL/nandApp/launcher_param/misc +DATA_DIR = $(ROOT)/build/demos.TWL/nandApp/launcher_param/data + +SUBDIRS = banner + +#------------------------- +#-- NAND アプリのビルドを指定します。 + +TWL_NANDAPP = TRUE + + +#---------------------------------------------------------------------------- + +TARGET_PLATFORM = TWL +override TWL_ARCHGEN = HYBRID + +LINCLUDES = $(MISC_DIR) \ + $(DATA_DIR) + +SRCS = main.c ExecTmpApp.c \ + $(MISC_DIR)/misc_simple.c \ + $(DATA_DIR)/data.c + +TARGET_BIN = ExecTmpCardRomHeaderChecker.tad + + +#------------------------- +#-- NAND アプリではいくつかのパラメータの指定のために固有の RSF ファイルが必要です。 + +ROM_SPEC = demo.autogen.hyb.rsf +ROM_SPEC_TEMPLATE = $(ROOT)/include/twl/specfiles/ROM-TS_nand.rsf +ROM_SPEC_PARAM = MakerCode=01 \ + InitialCode=0CXA \ + BannerFile="banner/banner.bnr" \ + RomHeaderTemplate="../common/0CXA/rom_header_0cxa.template.sbin" + +MAKEROM_ROMROOT = ./../Nand/bin/$(TWL_BUILDTYPE_ARM9) +MAKEROM_ROMFILES = CardRomHeaderChecker.nand.srl + +include $(TWLSDK_ROOT)/build/buildtools/commondefs +include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib + +#---------------------------------------------------------------------------- + +do-build : $(TARGETS) + +LIBSYSCALL = ../common/0CXA/libsyscall.a + +include $(TWLSDK_ROOT)/build/buildtools/modulerules + +#---------------------------------------------------------------------------- + +#===== End of Makefile ===== diff --git a/build/debugsoft/CardRomHeaderChecker/TmpJump/Makefile.LTD b/build/debugsoft/CardRomHeaderChecker/TmpJump/Makefile.LTD new file mode 100644 index 00000000..e45ea2cb --- /dev/null +++ b/build/debugsoft/CardRomHeaderChecker/TmpJump/Makefile.LTD @@ -0,0 +1,72 @@ +#! make -f +#---------------------------------------------------------------------------- +# Project: TwlSDK - demos.TWL - nandApp - ExecTmpApp +# File: Makefile +# +# Copyright 2007-2008 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$ +#---------------------------------------------------------------------------- + +MISC_DIR = $(ROOT)/build/demos.TWL/nandApp/launcher_param/misc +DATA_DIR = $(ROOT)/build/demos.TWL/nandApp/launcher_param/data + +SUBDIRS = banner2 + +#------------------------- +#-- NAND アプリのビルドを指定します。 + +TWL_NANDAPP = TRUE + + +#---------------------------------------------------------------------------- + +TARGET_PLATFORM = TWL +override TWL_ARCHGEN = LIMITED + +LINCLUDES = $(MISC_DIR) \ + $(DATA_DIR) + +SRCS = main.c ExecTmpApp.c \ + $(MISC_DIR)/misc_simple.c \ + $(DATA_DIR)/data.c + +TARGET_BIN = ExecTmpCardRomHeaderChecker.tad + + +#------------------------- +#-- NAND アプリではいくつかのパラメータの指定のために固有の RSF ファイルが必要です。 + +ROM_SPEC = demo.autogen.ltd.rsf +ROM_SPEC_TEMPLATE = $(ROOT)/include/twl/specfiles/ROM-TS_nand.rsf +ROM_SPEC_PARAM = MakerCode=01 \ + InitialCode=0CWA \ + BannerFile="banner2/banner.bnr" \ + RomHeaderTemplate="../common/0CWA/rom_header_0cwa.template.sbin" + +MAKEROM_ROMROOT = ./../Nand/bin/$(TWL_BUILDTYPE_ARM9) +MAKEROM_ROMFILES = CardRomHeaderChecker.nand.srl + +include $(TWLSDK_ROOT)/build/buildtools/commondefs +include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib + +#---------------------------------------------------------------------------- + +do-build : $(TARGETS) + + +LIBSYSCALL = ../common/0CWA/libsyscall.a + +include $(TWLSDK_ROOT)/build/buildtools/modulerules + +#---------------------------------------------------------------------------- + +#===== End of Makefile ===== diff --git a/build/debugsoft/CardRomHeaderChecker/TmpJump/banner/Makefile b/build/debugsoft/CardRomHeaderChecker/TmpJump/banner/Makefile new file mode 100644 index 00000000..1054d389 --- /dev/null +++ b/build/debugsoft/CardRomHeaderChecker/TmpJump/banner/Makefile @@ -0,0 +1,49 @@ +#! make -f +#---------------------------------------------------------------------------- +# Project: TwlSDK - nandApp - demos - launcher_param - ExecTmpApp +# File: Makefile +# +# Copyright 2007-2008 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_PLATFORM = TWL + +include $(TWLSDK_ROOT)/build/buildtools/commondefs +MAKEBANNER = $(TWL_TOOLSDIR)/bin/makebanner.TWL.exe + +ICON_DIR = ./icon + +BANNER_ICON = $(ICON_DIR)/gameIcon.bmp +BANNER_SPEC = banner_v3.bsf + +TARGETS = banner.bnr +INSTALL_DIR = ./ +INSTALL_TARGETS = $(TARGETS) + +BANNER_ICON_NAME = $(basename $(BANNER_ICON)) +BANNER_ICON_MIDDLE = $(addprefix $(BANNER_ICON_NAME), .nbfs .nbfc .nbfp) + +LDIRT_CLEAN = $(TARGETS) \ + $(BANNER_ICON_MIDDLE) \ + $(TARGETS:.bnr=.srl) + +include $(TWLSDK_ROOT)/build/buildtools/modulerules + +#---------------------------------------------------------------------------- +# build +#---------------------------------------------------------------------------- +do-build: $(TARGETS) + +$(TARGETS): $(BANNER_SPEC) $(BANNER_ICON) $(BANNER_ICON_MIDDLE) + $(MAKEBANNER) -N $(BANNER_ICON_NAME) $(BANNER_SPEC) $(TARGETS) + +# diff --git a/build/debugsoft/CardRomHeaderChecker/TmpJump/banner/banner_v3.bsf b/build/debugsoft/CardRomHeaderChecker/TmpJump/banner/banner_v3.bsf new file mode 100644 index 00000000..71aae09c Binary files /dev/null and b/build/debugsoft/CardRomHeaderChecker/TmpJump/banner/banner_v3.bsf differ diff --git a/build/debugsoft/CardRomHeaderChecker/TmpJump/banner/icon/gameIcon.bmp b/build/debugsoft/CardRomHeaderChecker/TmpJump/banner/icon/gameIcon.bmp new file mode 100644 index 00000000..588fc8cd Binary files /dev/null and b/build/debugsoft/CardRomHeaderChecker/TmpJump/banner/icon/gameIcon.bmp differ diff --git a/build/debugsoft/CardRomHeaderChecker/TmpJump/banner2/Makefile b/build/debugsoft/CardRomHeaderChecker/TmpJump/banner2/Makefile new file mode 100644 index 00000000..1054d389 --- /dev/null +++ b/build/debugsoft/CardRomHeaderChecker/TmpJump/banner2/Makefile @@ -0,0 +1,49 @@ +#! make -f +#---------------------------------------------------------------------------- +# Project: TwlSDK - nandApp - demos - launcher_param - ExecTmpApp +# File: Makefile +# +# Copyright 2007-2008 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_PLATFORM = TWL + +include $(TWLSDK_ROOT)/build/buildtools/commondefs +MAKEBANNER = $(TWL_TOOLSDIR)/bin/makebanner.TWL.exe + +ICON_DIR = ./icon + +BANNER_ICON = $(ICON_DIR)/gameIcon.bmp +BANNER_SPEC = banner_v3.bsf + +TARGETS = banner.bnr +INSTALL_DIR = ./ +INSTALL_TARGETS = $(TARGETS) + +BANNER_ICON_NAME = $(basename $(BANNER_ICON)) +BANNER_ICON_MIDDLE = $(addprefix $(BANNER_ICON_NAME), .nbfs .nbfc .nbfp) + +LDIRT_CLEAN = $(TARGETS) \ + $(BANNER_ICON_MIDDLE) \ + $(TARGETS:.bnr=.srl) + +include $(TWLSDK_ROOT)/build/buildtools/modulerules + +#---------------------------------------------------------------------------- +# build +#---------------------------------------------------------------------------- +do-build: $(TARGETS) + +$(TARGETS): $(BANNER_SPEC) $(BANNER_ICON) $(BANNER_ICON_MIDDLE) + $(MAKEBANNER) -N $(BANNER_ICON_NAME) $(BANNER_SPEC) $(TARGETS) + +# diff --git a/build/debugsoft/CardRomHeaderChecker/TmpJump/banner2/banner_v3.bsf b/build/debugsoft/CardRomHeaderChecker/TmpJump/banner2/banner_v3.bsf new file mode 100644 index 00000000..42d0860b Binary files /dev/null and b/build/debugsoft/CardRomHeaderChecker/TmpJump/banner2/banner_v3.bsf differ diff --git a/build/debugsoft/CardRomHeaderChecker/TmpJump/banner2/icon/gameIcon.bmp b/build/debugsoft/CardRomHeaderChecker/TmpJump/banner2/icon/gameIcon.bmp new file mode 100644 index 00000000..588fc8cd Binary files /dev/null and b/build/debugsoft/CardRomHeaderChecker/TmpJump/banner2/icon/gameIcon.bmp differ diff --git a/build/debugsoft/CardRomHeaderChecker/TmpJump/src/ExecTmpApp.c b/build/debugsoft/CardRomHeaderChecker/TmpJump/src/ExecTmpApp.c new file mode 100644 index 00000000..2d6b2ec4 --- /dev/null +++ b/build/debugsoft/CardRomHeaderChecker/TmpJump/src/ExecTmpApp.c @@ -0,0 +1,169 @@ +/*---------------------------------------------------------------------------* + Project: TwlSDK - nandApp - demos - launcher_param - ExecTmpApp + File: ExecTmpApp.c + + Copyright 2007-2008 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 +#include "misc_simple.h" +#include "ExecTmpApp.h" + +// define data------------------------------------------ + +#define COPB_MENU_ELEMENT_NUM 2 // メニューの項目数 + +// extern data------------------------------------------ + +// function's prototype declaration--------------------- + +static void MenuScene( void ); + +// global variable ------------------------------------- + +// static variable ------------------------------------- +static u16 s_csr = 0; +static void(*s_pNowProcess)(void); + +// const data ----------------------------------------- +static const char *s_pStrMenu[ COPB_MENU_ELEMENT_NUM ] = +{ + "save app to tmp and restart", + "return to launcher", +}; + +static MenuPos s_menuPos[] = { + { TRUE, 3, 6 }, + { TRUE, 3, 8 }, +}; + +static const MenuParam s_menuParam = { + COPB_MENU_ELEMENT_NUM, + TXT_COLOR_BLACK, + TXT_COLOR_GREEN, + TXT_COLOR_RED, + &s_menuPos[ 0 ], + (const char **)&s_pStrMenu, +}; + +//====================================================== +// アプリ連携テストプログラムB +//====================================================== + +static void DrawMenuScene( void ) +{ + myDp_Printf( 1, 0, TXT_COLOR_BLUE, MAIN_SCREEN, "ExecTmpCardRomHeaderChecker"); + // メニュー項目 + myDp_DrawMenu( s_csr, MAIN_SCREEN, &s_menuParam ); +} + +static void MenuInit( void ) +{ + FS_Init(3); + GX_DispOff(); + GXS_DispOff(); + + myDp_Printf( 1, 0, TXT_COLOR_BLUE, MAIN_SCREEN, "ExecTmpCardRomHeaderChecker"); + + s_pNowProcess = MenuScene; + + DrawMenuScene(); + + GX_DispOn(); + GXS_DispOn(); +} + +static void MenuScene(void) +{ + //-------------------------------------- + // キー入力処理 + //-------------------------------------- + if( MYPAD_IS_TRIG(PAD_KEY_DOWN) ){ // カーソルの移動 + if( ++s_csr == COPB_MENU_ELEMENT_NUM ) { + s_csr=0; + } + } + if( MYPAD_IS_TRIG(PAD_KEY_UP) ){ + if( --s_csr & 0x80 ) { + s_csr=COPB_MENU_ELEMENT_NUM - 1; + } + } + + DrawMenuScene(); + + if( MYPAD_IS_TRIG(PAD_BUTTON_A) ) { // メニュー項目への分岐 + if( s_menuPos[ s_csr ].enable ) { + u64 targetApp = 0x00030004534d504c;// SMPL + s32 len = 0; + s32 llen; + BOOL success = TRUE; + FSFile src,dest; + void *buf; + switch( s_csr ) { + case 0: + + // tmpに保存 + FS_DeleteFile(OS_TMP_APP_PATH); + FS_CreateFile(OS_TMP_APP_PATH, FS_PERMIT_R | FS_PERMIT_W); + FS_InitFile( &src ); + FS_InitFile( &dest ); + if ( !FS_OpenFileEx( &src, "rom:/CardRomHeaderChecker.nand.srl", FS_FILEMODE_R ) ) success = FALSE; + len = (int)FS_GetFileLength( &src ); + + buf = (void *)0x2400000; + for(llen = 0; llen < len; ) + { + int rd; + rd = FS_ReadFile( &src, buf, len ); + if(rd == -1) + { + success = FALSE; + break; + } + buf = (void *)((u32)buf + rd); + llen += rd; + } + buf = (void *)0x2400000; + if ( !FS_CloseFile( &src ) ) success = FALSE; + if (len != llen) success = FALSE; + + if ( !FS_OpenFileEx( &dest, OS_TMP_APP_PATH, FS_FILEMODE_W ) ) success = FALSE; + llen = FS_WriteFile( &dest, buf, len ); + if ( !FS_CloseFile( &dest ) ) success = FALSE; + if (len != llen) success = FALSE; + + if( !success ) break; + + //アプリ起動 + OS_DoApplicationJump( targetApp, OS_APP_JUMP_TMP ); + break; + case 1: + OS_DoApplicationJump( NULL, OS_APP_JUMP_NORMAL ); + //再起動 + break; + } + } + } +} + +// 初期化 +void ExecTmpAppInit( void ) +{ + MenuInit(); +} + +// メインループ +void ExecTmpAppMain(void) +{ + s_pNowProcess(); +} diff --git a/build/debugsoft/CardRomHeaderChecker/TmpJump/src/ExecTmpApp.h b/build/debugsoft/CardRomHeaderChecker/TmpJump/src/ExecTmpApp.h new file mode 100644 index 00000000..5610ade2 --- /dev/null +++ b/build/debugsoft/CardRomHeaderChecker/TmpJump/src/ExecTmpApp.h @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------* + Project: TwlSDK - nandApp - demos - launcher_param - ExecTmpApp + File: ExecTmpApp.h + + Copyright 2007-2008 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 __COOPERATION_B_H__ +#define __COOPERATION_B_H__ + +#ifdef __cplusplus +extern "C" { +#endif + + +#include + +// define data---------------------------------------------------------- + +void ExecTmpAppInit( void ); +void ExecTmpAppMain( void ); + +#ifdef __cplusplus +} +#endif + +#endif // __COOPERATION_B_H__ diff --git a/build/debugsoft/CardRomHeaderChecker/TmpJump/src/main.c b/build/debugsoft/CardRomHeaderChecker/TmpJump/src/main.c new file mode 100644 index 00000000..6c62624d --- /dev/null +++ b/build/debugsoft/CardRomHeaderChecker/TmpJump/src/main.c @@ -0,0 +1,68 @@ +/*---------------------------------------------------------------------------* + Project: TwlSDK - nandApp - demos - launcher_param - ExecTmpApp + File: main.c + + Copyright 2007-2008 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 +#include "misc_simple.h" +#include "ExecTmpApp.h" + +// extern data----------------------------------------------------------------- + +// define data----------------------------------------------------------------- + +// function's prototype------------------------------------------------------- +static void INTR_VBlank( void ); + +// global variable------------------------------------------------------------- + +// static variable------------------------------------------------------------- +BOOL g_isValidTSD; + +// const data------------------------------------------------------------------ + + +// ============================================================================ +// function's description +// ============================================================================ +void TwlMain(void) +{ + myInit(); + + ExecTmpAppInit(); + // メインループ---------------------------- + while(1){ + + myPreMain(); + + ExecTmpAppMain(); + + myProMain(); + + OS_WaitIrq(1, OS_IE_V_BLANK); // Vブランク割り込み待ち + } +} + + +// ============================================================================ +// 割り込み処理 +// ============================================================================ + +// Vブランク割り込み +static void INTR_VBlank(void) +{ + OS_SetIrqCheckFlag(OS_IE_V_BLANK); // Vブランク割込チェックのセット +} + diff --git a/build/debugsoft/CardRomHeaderChecker/common/0CWA/libsyscall.a b/build/debugsoft/CardRomHeaderChecker/common/0CWA/libsyscall.a new file mode 100644 index 00000000..3498a72f Binary files /dev/null and b/build/debugsoft/CardRomHeaderChecker/common/0CWA/libsyscall.a differ diff --git a/build/debugsoft/CardRomHeaderChecker/common/0CWA/rom_header_0cwa.template.sbin b/build/debugsoft/CardRomHeaderChecker/common/0CWA/rom_header_0cwa.template.sbin new file mode 100644 index 00000000..487804e8 Binary files /dev/null and b/build/debugsoft/CardRomHeaderChecker/common/0CWA/rom_header_0cwa.template.sbin differ diff --git a/build/debugsoft/CardRomHeaderChecker/common/0CXA/libsyscall.a b/build/debugsoft/CardRomHeaderChecker/common/0CXA/libsyscall.a new file mode 100644 index 00000000..58bb57ef Binary files /dev/null and b/build/debugsoft/CardRomHeaderChecker/common/0CXA/libsyscall.a differ diff --git a/build/debugsoft/CardRomHeaderChecker/common/0CXA/rom_header_0cxa.template.sbin b/build/debugsoft/CardRomHeaderChecker/common/0CXA/rom_header_0cxa.template.sbin new file mode 100644 index 00000000..264ba8f9 Binary files /dev/null and b/build/debugsoft/CardRomHeaderChecker/common/0CXA/rom_header_0cxa.template.sbin differ diff --git a/build/debugsoft/CardRomHeaderChecker/common/0CYA/libsyscall.a b/build/debugsoft/CardRomHeaderChecker/common/0CYA/libsyscall.a new file mode 100644 index 00000000..4c38cdc4 Binary files /dev/null and b/build/debugsoft/CardRomHeaderChecker/common/0CYA/libsyscall.a differ diff --git a/build/debugsoft/CardRomHeaderChecker/common/0CYA/rom_header_0cya.template.sbin b/build/debugsoft/CardRomHeaderChecker/common/0CYA/rom_header_0cya.template.sbin new file mode 100644 index 00000000..073f58b1 Binary files /dev/null and b/build/debugsoft/CardRomHeaderChecker/common/0CYA/rom_header_0cya.template.sbin differ diff --git a/build/debugsoft/CardRomHeaderChecker/common/banner/banner_v3.bsf b/build/debugsoft/CardRomHeaderChecker/common/banner/banner_v3.bsf index 427fb48c..03b7b035 100644 Binary files a/build/debugsoft/CardRomHeaderChecker/common/banner/banner_v3.bsf and b/build/debugsoft/CardRomHeaderChecker/common/banner/banner_v3.bsf differ diff --git a/build/debugsoft/CardRomHeaderChecker/common/banner2/Makefile b/build/debugsoft/CardRomHeaderChecker/common/banner2/Makefile new file mode 100644 index 00000000..1f8aa1d4 --- /dev/null +++ b/build/debugsoft/CardRomHeaderChecker/common/banner2/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)/gameIcon.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/debugsoft/CardRomHeaderChecker/common/banner2/banner_v3.bsf b/build/debugsoft/CardRomHeaderChecker/common/banner2/banner_v3.bsf new file mode 100644 index 00000000..3977e385 Binary files /dev/null and b/build/debugsoft/CardRomHeaderChecker/common/banner2/banner_v3.bsf differ diff --git a/build/debugsoft/CardRomHeaderChecker/common/banner2/icon/gameIcon.bmp b/build/debugsoft/CardRomHeaderChecker/common/banner2/icon/gameIcon.bmp new file mode 100644 index 00000000..3ea06fe9 Binary files /dev/null and b/build/debugsoft/CardRomHeaderChecker/common/banner2/icon/gameIcon.bmp differ diff --git a/build/debugsoft/CardRomHeaderChecker/common/src/main.c b/build/debugsoft/CardRomHeaderChecker/common/src/main.c index 48279f1e..30a7ade9 100644 --- a/build/debugsoft/CardRomHeaderChecker/common/src/main.c +++ b/build/debugsoft/CardRomHeaderChecker/common/src/main.c @@ -160,11 +160,15 @@ void TwlMain(void) DEMOSetBitmapTextColor(GX_RGBA(31, 31, 31, 1)); DEMODrawText( 8, row, "End." ); + row += 2 * shift; + DEMODrawText( 8, row, "Press A to check Self-Jump." ); while (1) { + DEMOReadKey(); DEMO_DrawFlip(); OS_WaitVBlankIntr(); + if(DEMO_IS_TRIG(PAD_BUTTON_A)) OS_RebootSystem(); } }