From 31733c245805e26eb6d9ba241994bba8275a9cf9 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@b08762b0-b915-fc4b-9d8c-17b2551a87ff> Date: Tue, 5 Aug 2008 05:22:35 +0000 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E4=B8=80=E3=83=A1=E3=83=BC=E3=82=AB?= =?UTF-8?q?=E3=83=BC=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB=E4=B8=80=E8=A6=A7?= =?UTF-8?q?=E3=81=AE=E3=83=86=E3=82=B9=E3=83=88=E3=82=A2=E3=83=97=E3=83=AA?= =?UTF-8?q?=E3=82=92=E3=82=B3=E3=83=9F=E3=83=83=E3=83=88?= 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@2099 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- build/debugsoft/MakerTitle/TitleList/Makefile | 271 +++++++++ .../MakerTitle/TitleList/ROMセット.xls | Bin 0 -> 18944 bytes .../MakerTitle/TitleList/banner/banner_A.bsf | Bin 0 -> 600 bytes .../MakerTitle/TitleList/banner/banner_B.bsf | Bin 0 -> 600 bytes .../MakerTitle/TitleList/banner/banner_C.bsf | Bin 0 -> 600 bytes .../MakerTitle/TitleList/banner/banner_D.bsf | Bin 0 -> 600 bytes .../MakerTitle/TitleList/banner/banner_E.bsf | Bin 0 -> 600 bytes .../MakerTitle/TitleList/banner/banner_F.bsf | Bin 0 -> 600 bytes .../MakerTitle/TitleList/banner/banner_G.bsf | Bin 0 -> 600 bytes .../MakerTitle/TitleList/banner/banner_H.bsf | Bin 0 -> 600 bytes .../MakerTitle/TitleList/banner/banner_I.bsf | Bin 0 -> 600 bytes .../MakerTitle/TitleList/banner/banner_J.bsf | Bin 0 -> 600 bytes .../TitleList/banner/data/Cell/Cell_A.nce | Bin 0 -> 920 bytes .../TitleList/banner/data/Cell/Cell_B.nce | Bin 0 -> 920 bytes .../TitleList/banner/data/Cell/Cell_C.nce | Bin 0 -> 920 bytes .../TitleList/banner/data/Cell/Cell_D.nce | Bin 0 -> 920 bytes .../TitleList/banner/data/Cell/Cell_E.nce | Bin 0 -> 920 bytes .../TitleList/banner/data/Cell/Cell_F.nce | Bin 0 -> 920 bytes .../TitleList/banner/data/Cell/Cell_G.nce | Bin 0 -> 920 bytes .../TitleList/banner/data/Cell/Cell_H.nce | Bin 0 -> 920 bytes .../TitleList/banner/data/Cell/Cell_I.nce | Bin 0 -> 920 bytes .../TitleList/banner/data/Cell/Cell_J.nce | Bin 0 -> 920 bytes .../MakerTitle/TitleList/include/appmain.h | 42 ++ .../MakerTitle/TitleList/include/font.h | 42 ++ .../MakerTitle/TitleList/include/screen.h | 45 ++ .../debugsoft/MakerTitle/TitleList/readme.txt | 36 ++ .../MakerTitle/TitleList/src/appmain.c | 250 ++++++++ .../debugsoft/MakerTitle/TitleList/src/font.c | 574 ++++++++++++++++++ .../debugsoft/MakerTitle/TitleList/src/main.c | 267 ++++++++ .../MakerTitle/TitleList/src/screen.c | 124 ++++ 30 files changed, 1651 insertions(+) create mode 100644 build/debugsoft/MakerTitle/TitleList/Makefile create mode 100644 build/debugsoft/MakerTitle/TitleList/ROMセット.xls create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/banner_A.bsf create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/banner_B.bsf create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/banner_C.bsf create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/banner_D.bsf create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/banner_E.bsf create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/banner_F.bsf create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/banner_G.bsf create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/banner_H.bsf create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/banner_I.bsf create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/banner_J.bsf create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_A.nce create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_B.nce create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_C.nce create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_D.nce create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_E.nce create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_F.nce create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_G.nce create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_H.nce create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_I.nce create mode 100644 build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_J.nce create mode 100644 build/debugsoft/MakerTitle/TitleList/include/appmain.h create mode 100644 build/debugsoft/MakerTitle/TitleList/include/font.h create mode 100644 build/debugsoft/MakerTitle/TitleList/include/screen.h create mode 100644 build/debugsoft/MakerTitle/TitleList/readme.txt create mode 100644 build/debugsoft/MakerTitle/TitleList/src/appmain.c create mode 100644 build/debugsoft/MakerTitle/TitleList/src/font.c create mode 100644 build/debugsoft/MakerTitle/TitleList/src/main.c create mode 100644 build/debugsoft/MakerTitle/TitleList/src/screen.c diff --git a/build/debugsoft/MakerTitle/TitleList/Makefile b/build/debugsoft/MakerTitle/TitleList/Makefile new file mode 100644 index 00000000..8a54173f --- /dev/null +++ b/build/debugsoft/MakerTitle/TitleList/Makefile @@ -0,0 +1,271 @@ +#! make -f +#---------------------------------------------------------------------------- +# Project: TwlSDK - save_data - DisplayVersion +# 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$ +#---------------------------------------------------------------------------- + + +override TARGET_PLATFORM = TWL +override TARGET_CODEGEN = ARM +override TWL_ARCHGEN = LIMITED + + + +ifeq ($(ROM_NAME),) + +include $(TWLSDK_ROOT)/build/buildtools/commondefs + +do-build: do-something-build +clean: do-something +clobber: do-something +install: do-something +do-build: MY_GOAL= +clean: MY_GOAL=clean +clobber: MY_GOAL=clobber +install: MY_GOAL=install + +do-something-build: + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=A SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=B SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=C SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=D SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=E SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=F SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=G SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=H SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=I SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=J SKIP_SUBDIR=FALSE $(MY_GOAL) + +do-something: + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=A SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=B SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=C SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=D SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=E SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=F SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=G SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=H SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=I SKIP_SUBDIR=FALSE $(MY_GOAL) + +$(REMAKE) TWLSDK_PLATFORM=TWL ROM_NAME=J SKIP_SUBDIR=FALSE $(MY_GOAL) + +include $(TWLSDK_ROOT)/build/buildtools/modulerules + + +else + +SUBDIRS = +MACRO_FLAGS := + +#---------------------------------------------------------------------------- +TWL_NANDAPP := TRUE +MASTER_NAME := TitleList +APP_NAME = $(MASTER_NAME)_$(ROM_NAME) + +SRCS = main.c font.c screen.c appmain.c + +LLIBRARIES = libnam$(TWL_LIBSUFFIX).a libes$(TWL_LIBSUFFIX).a \ + libsea$(TWL_LIBSUFFIX).a libboc$(TWL_LIBSUFFIX).a \ + libsfs$(TWL_LIBSUFFIX).a + +#------------------------- +#-- ROM A ` J܂ł̃p[^ݒ + +# ftHg̃p[^ +PUB_SAVE := 16K +PRV_SAVE := 16K +MAKER_CODE := 01 +SEQURE := FALSE +APP_TYPE := User + +ifeq ($(ROM_NAME),A) +APP_TYPE := System +SEQURE := TRUE +endif + +ifeq ($(ROM_NAME),B) +APP_TYPE := System +endif + +ifeq ($(ROM_NAME),C) +endif + +ifeq ($(ROM_NAME),D) +PRV_SAVE := 0K +endif + +ifeq ($(ROM_NAME),E) +PUB_SAVE := 0K +endif + +ifeq ($(ROM_NAME),F) +PRV_SAVE := 0K +PUB_SAVE := 0K +endif + +ifeq ($(ROM_NAME),G) +MAKER_CODE := 02 +endif + +ifeq ($(ROM_NAME),H) +MAKER_CODE := 02 +PRV_SAVE := 0K +endif + +ifeq ($(ROM_NAME),I) +MAKER_CODE := 02 +PUB_SAVE := 0K +endif + +ifeq ($(ROM_NAME),J) +MAKER_CODE := 02 +PRV_SAVE := 0K +PUB_SAVE := 0K +endif + + + +ENABLE_PUB := TRUE +ENABLE_PRV := TRUE + +ifeq ($(ENABLE_PUB),0K) +ENABLE_PUB := FALSE +endif + +ifeq ($(ENABLE_PRV),0K) +ENABLE_PRV := FALSE +endif + + +GAME_CODE = 4K$(ROM_NAME)A +TARGET_BIN = $(APP_NAME).tad + + + +#------------------------- +#-- NAND Avł͂‚̃p[^̎ŵ߂ɌŗL RSF t@CKvłB + +ROM_SPEC = $(MASTER_NAME).$(ROM_NAME).autogen.rsf +ROM_SPEC_TEMPLATE = $(ROOT)/include/twl/specfiles/ROM-TS_sys.rsf +ROM_SPEC_PARAM = MakerCode=$(MAKER_CODE) \ + TitleName=TITLE_LIST_$(ROM_NAME) \ + GameCode=$(GAME_CODE) \ + BannerFile=./banner/banner_$(ROM_NAME).bnr \ + PublicSaveDataSize=$(PUB_SAVE) \ + PrivateSaveDataSize=$(PRV_SAVE) \ + WramMapping=MAP_TS_SCR \ + AppType=$(APP_TYPE) \ + Media=NAND \ + Secure=$(SEQURE) \ + + + +#------------------------- +#-- NAMg߂secure componentg + +COMPONENT_NAME = armadillo +MAKEROM_ARM7_BASE = $(TWL_COMPONENTSDIR)/$(COMPONENT_NAME)/$(TWL_BUILDTYPE_ARM7)/$(COMPONENT_NAME) +MAKEROM_ARM7 = $(MAKEROM_ARM7_BASE).$(TWL_ELF_EXT) + +#------------------------- +# CXg[w + +ifneq ($(TWL_IPL_RED_ROOT),) +INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/$(MASTER_NAME) +INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN) +endif + +#------------------------- +#-- J[hAvƓl ROM-FS Ƀt@C܂B + +#MAKEROM_ROMROOT = ./rom_data +#MAKEROM_ROMFILES = *.* + +#------------------------- +#-- oi[f[^𐶐܂ +BANNER = ./banner/banner_$(ROM_NAME).bnr +BANNERSRC := ./banner/data/Cell/Cell_$(ROM_NAME).nce +#BANNERSRC := $(wildcard ./banner/data/Cell/*.nce) +MAKEBANNER = $(TWL_TOOLSDIR)/bin/makebanner.TWL.exe +BANNERCVTR = $(TWL_TOOLSDIR)/bin/bannercvtr.exe + +#------------------------- +# rom ̃t@C͑SĎȂ̂ clean ō폜悤ɂ܂ +LDIRT_CLEAN = $(MAKEROM_ROMROOT) + +include $(TWLSDK_ROOT)/build/buildtools/commondefs + +ifeq ($(SEQURE),TRUE) +MAKEROM := $(TWL_TOOLSDIR)/bin/makerom.TWL.secure.exe # commondefs include łȂ΂ȂȂ +MAKETAD_OPTION := -s # modulerules include OłȂ΂ȂȂ +else +ifeq ($(APP_TYPE),System) +MAKEROM := $(TWL_TOOLSDIR)/bin/makerom.TWL.sys.exe # commondefs include łȂ΂ȂȂ +MAKETAD_OPTION := -s # modulerules include OłȂ΂ȂȂ +else +MAKEROM := $(TWL_TOOLSDIR)/bin/makerom.TWL.exe # commondefs include łȂ΂ȂȂ +endif +endif +#---------------------------------------------------------------------------- + +#MACRO_FLAGS += -DMYCODE=\"$(GAME_CODE)\" +#MACRO_FLAGS += -DMYNAME=\"$(ROM_NAME)\" +#MACRO_FLAGS += -DENABLEPUB=$(ENABLE_PUB) +#MACRO_FLAGS += -DENABLEPRV=$(ENABLE_PRV) + + +do-build: rmlcf mycode $(TARGETS) +#do-build: rmlcf $(TARGETS) + +.PHONY: mycode rmlcf + +mycode: + echo -e "#ifndef MYCODE_\n#define MYCODE_\n#define MYCODE \"$(GAME_CODE)\"\n#define MYNAME \"$(ROM_NAME)\"\n#define ENABLEPUB $(ENABLE_PUB)\n#define ENABLEPRV $(ENABLE_PRV)\n\n#endif" > ./include/mycode.h + +#mycode: +# echo -e "#ifndef MYCODE_\n#define MYCODE_\n#define MYCODE \"$(GAME_CODE)\"\n#define MYNAME \"$(ROM_NAME)\"\n#define ENABLEPUB $(ENABLE_PUB)\n#define ENABLEPRV $(ENABLE_PRV)\n\n#endif" > ./include/mycode.h + + +rmlcf: + rm -rf $(BINDIR)/*.lcf + +#------------------------- +#-- SRL 쐬OɃoi[쐬悤ɂ܂B + +$(BINDIR)/$(TARGET_BIN_BASENAME).$(TWL_ELF_EXT): $(BANNER) make_dir + +#------------------------- +#-- rom_data/build_time.txt 쐬܂B + +make_dir: + $(INSTALL) -d $(MAKEROM_ROMROOT) +#build_time: +# $(INSTALL) -d $(MAKEROM_ROMROOT) +# echo -n "build at `date \"+%Y/%m/%d %H:%M:%S\"` on \"`hostname`\"" > $(MAKEROM_ROMROOT)/build_time.txt + +#------------------------- +#-- oi[쐬p^[Qbg + +$(BANNER): $(BANNER:.bnr=.bin) $(BANNER:.bnr=.bsf) + $(MAKEBANNER) -A $(BANNER:.bnr=.bin) $(BANNER:.bnr=.bsf) $@ + +$(BANNER:.bnr=.bin): $(BANNERSRC) + $(BANNERCVTR) -o $@ $< + + +include $(TWLSDK_ROOT)/build/buildtools/modulerules + +endif + +#===== End of Makefile ===== diff --git a/build/debugsoft/MakerTitle/TitleList/ROMセット.xls b/build/debugsoft/MakerTitle/TitleList/ROMセット.xls new file mode 100644 index 0000000000000000000000000000000000000000..c8ca8de31d33dd3337181f6ad7e2967dac5290a0 GIT binary patch literal 18944 zcmeHPdyEy;9sbR|b6L)%CVxdoMy` zZ6$LyXJ&rC^ZL$re&;!J_xHamAARiUNpDKb&6Tu#R4Yg}qIdAzW8{(`yjG)V?%jBX zDsi771`2sJWHuw6-pjd{4&gB^@}{KZr|w}~Mc#rRl-r~rvUSzgRU0>~*s;y~6x@7; zVUr9%eu=7oh`B-3S9q)-#LUT&y}rJN*Z$ar*~vvnnVFCCl~JP-DE zxl_USq-dxj%ZlQG@yYclEGLo&L}qgiGVx+@?3`4@qcRTmA@a`}dVAd+@~EeoEB!xA zz=`$jk&WUv(=*pb@lR*HBV&2aU<_3}yvv%?X`VB3ZWH~qCi-j>eZHZdB`G{!xjf(v zc&6OCer2F{rzv|FtDkP`y;4~k<`d}0sQ> zZK7Y@grBO`yD=VC8hspRpby%&&ZoD!+5~^K3H~PWtBv(51N`m;o41vQ|G3_?dt7ho z71sy&$L6o`kI|Pk&N2D`{}?@)qC4c>pK_%%nyK+#9?hzIWi+ksoufH*A2;f%yNpV0 zrNhzZ4y+4qYiABwS-O5`Xk->O3#t*#Y-+yH9ns9WTU=R!zr#)*9y8c49r-|tnI{qH zZ1|jH*qPt-Kk)a#KLh`g??@{Oxsdt5?f0`f(&PSX{@ebG{$AYeD974eahcDJTZgvT zL4>P<7H?aze3e@dq53H@m~* zSl2%9AMmeSa#`(~B@UKyBrOFtU3tqt;{V)#62!THnL>!eUU4px?OAku<&FN`{$2j! z+aI~bk?tT_7WZTR3;q-S(^xX^LsCJ)G?t(#X^{+8J}8lWio{vAsWEWac|4#v@H7wfm(v3Y}D?nCS1OueVE4UxTfcaQa zXfmt;FY;Z@wz7pJJnE;b>o=8V6mg6@2eXJsyR!=+hh3IMNV`?+Z>j4- zX~#jwApX|MkZgtDA|sHlmYc>tSIGtF5nv?pv`K~$Q-{I)+=0b!h@a`K?aI*v zA1+>yU#l8-2IeP6W;is>E0E78@6Zm&Tl+@24=nyh)zoHK*2p&0X-GDsmRoT5APq~j zHoB&EPK)x7b`BKsUeRH#a;iKXgU@*u|FJHg&r8$`I7xvV_|w1{3R0gF|ZN?wQ0OqK=C0cj))U+7!NEL)Nzy}kUldpCni?3QxZ5zyXZ?PCtlhq zWs^ic4H@uzRy3F}tdP{hon0-X*Oj{`+qN7!*4=d`$v!$Q0a z_M5nlGjTjEamIC=?&G?)20GR^9FFyLA+cX zXO7WvT^fz|Ar`A_oGI!&M@w8A=b+P4N~WrnhL+Nh$hVeUNMu?|8A#+0Gjwl(S;yEvaC|Y{A)p$%TxZ14KH{43M2$$HEQIc@ZgX zNiL)?my8vbwZd{%Sl$XNSYa(PO^rOPA8oM%)~k`x7N>w;BSkHl`-Q1kUz@O~C6n!` z*hiQ!S~7bhOK5?0OjW1LTB0R$b*&{@GObZdQA=jZ(306Ns`XyQjnYJHj&!=B)wV@g zK-khnAd5v=2g{;*=){0&e zmcXN<5Lv52W~`tUqe(O@YIUvPEVMd~7uEV`(`F&#zAr4VO(8RUwpqy9EM#pKvNj7@ zn}w`Rab{4rS;#nc_15jB9mx9Xt-?2M(<4&al3YjzXFHHZV`d?l^4ftcD&;MyU`Z`_ z31rf79PO>!Zij`8b9Y!?2RMsLL}n}tn{`MAX9qY7v2<9-Fr!;xQDhz9EJVhcvA5oj zxH1SiD_O`&7P1mrGelOhI4db+24~4a#yxb1x`ft@N>OAS6RNN#-5blw&J3U2kB8P; zR(2MKv2TV_blfdlc2-t)W^k63of)pnR^KdJcE%B@w?4j96lbP9z8MZ{R8gFTVdN~7 z*qWgfZOw|}%wVY~&J50q;w%h{a>miIw?1okTFCgeIxMf#Le{BT(_raTtr<#DWSthW zPKC^1=~T!J&Q8nDxMJ$BuORsLZ)UyjnC_zvDk4C5MxVO$%{!m0tsQOJ7)6U$ylHW~YwK!tKk1VEbaWD+VbJ;7EfK2SO#54jdGfQ~BZP)M>zX z0{=T26!!l*4Vt3Q$n_(9!Ii=3WZbcZkKXZvzrT0=`qIAdVy-yv8J-5qkKnocVfX+% zSG_#z;%Vz3JjdkQ;JI$v1J6~;1MnOXABAU0dtpWF=ZsVTs0h!^bnHkAH>}w*ymffp zh__(-nxRdqY`O5NXEz-`;tU{M_FT8~7ymkf)5OFj3?vLB3?vLB3?vLB3?vLB3?vLB z3?vLB3?vN18934YKlSR%uRbz!a_Ro>VgEnly`OOZe+-^)mAL<349^qwo8ftS$9+HF z{`Bi(e5wedW*^-IY9s`iAxwr z7)TgM7)TgM7)TgM7)TgM7)TgM7&y%s;69$)VeWeQE}!4B@&g#|qxnvsdwu=2xZbmK z%gpclxbNqFonMFX|G#jb&u@$Pof!A}JP+VEJp5LN;rx7tU!L+?RBpZbWse76g=hGO z@VqDP(`DcW{O)TQzXJ1QLGWv^9cYo0cN6gSh(Sy{!p|C1;zK%%tM$#kvYn0QCiM%t zjj~$d*l5%zeaClx_40}1WD_p!(J?c!6u*VL6@RPnOSm0!Em&BmFi|ri8}PjO1es1l p`RqgNKPOv0zmZX$2e%Az-@qbW%ej{hf|2J^*mJa{` literal 0 HcmV?d00001 diff --git a/build/debugsoft/MakerTitle/TitleList/banner/banner_A.bsf b/build/debugsoft/MakerTitle/TitleList/banner/banner_A.bsf new file mode 100644 index 0000000000000000000000000000000000000000..9fe5011a8a82283c2c265f806d8e3bb24610c860 GIT binary patch literal 600 zcmbu5O9}!(34;|~#;@dhFyh=QN%tM5&2FrgQnCaLO2e&3!mCq6uN z&ne89GGWVMcvX&Ed2>^Dr|PA;u%Hf8MYT_*Q~#p=gS$A>G10P5cua?9sUMtfTprWm iSU)zLOz1_YNvish-?!(?i4RZR za|$!2OxSW5UX>$P-rUsPsd}j{EU3d&QSDRd)W4|z;4aQ|OtkD19@F7j>IbJAm&bH? iRF{i{m+^T_ho?{N*>rfC)SgX;XPxqx4$mLiAW!K4 literal 0 HcmV?d00001 diff --git a/build/debugsoft/MakerTitle/TitleList/banner/banner_C.bsf b/build/debugsoft/MakerTitle/TitleList/banner/banner_C.bsf new file mode 100644 index 0000000000000000000000000000000000000000..59013f900c6f480528b8753d3d0312a74b872b58 GIT binary patch literal 600 zcmbu5OA5k35Cv;3c!y!G;LdG`KSadj20=s+1wYqU-%H;h%`B#e?y7n8@7r-^;KNh* zlEQ*HGj<%uSEc95o140ORWH?rhB{6a)jpMz`WN*d+{KxWiIzjcV>&!5{or)d@|X_K inl|Av9iFZBGChy!@N}s?n+{Kt+Oz5KY*HT6;rRpNP*3py literal 0 HcmV?d00001 diff --git a/build/debugsoft/MakerTitle/TitleList/banner/banner_D.bsf b/build/debugsoft/MakerTitle/TitleList/banner/banner_D.bsf new file mode 100644 index 0000000000000000000000000000000000000000..1c3d997312168e4f0b5113b77bbc897518c3e753 GIT binary patch literal 600 zcmbu5O9}!(3_w6}z;=@z- zoWhJL6Sf?NSLMi+H#c>6s$QxK4Rx3*s(mV*`WN*d+{KxWiI#oBV>&!b{or)t@|X_K iiZb;#EB;+F#X3oiFe$&8}3twKk zS0oyiEZB3LUzsx_AMWZNRJ~OvTJk)VRQqI3>fh9V@(^b_CR+LmkLmDi^n=rtrf;ReLrao?Vs4ba?*suuuU2 literal 0 HcmV?d00001 diff --git a/build/debugsoft/MakerTitle/TitleList/banner/banner_F.bsf b/build/debugsoft/MakerTitle/TitleList/banner/banner_F.bsf new file mode 100644 index 0000000000000000000000000000000000000000..a0ee3ccdbdc02a3dd2afdf5cb9d58e28cdb6f21a GIT binary patch literal 600 zcmbu5OA5k35Cv;3c!y!G;Lfcieh?9p8w3$S6#QIYeJ_23G_#lR;4ns`oZa@ns`oZa@ns`oZa@8w3$S6#QIYeJ_23G_#lBb5M7kgL^iRoI|^&!`UlLho=V(13^@}E8iM$d0GALg?ED%2Bufixe*%zP zaviR3_I6=GDkph2v-4)>&21);?WX>zR^E3RtFe71Bc+ZQV-<_Jo@<1q?UYU?H}L^N zS3_BO8Fp&mDaYXNVTIPZ;G7pa$TvYeXf5dDEXcVDgIqgaBqcd(v?1)K!r`i+8=fR|V_c9v2o;1e&2lfkUD8H-# literal 0 HcmV?d00001 diff --git a/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_B.nce b/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_B.nce new file mode 100644 index 0000000000000000000000000000000000000000..4a31775b621b56bb5d3710b1982ae4263754865a GIT binary patch literal 920 zcmbV~zfQw25XN2Th(s(gu(<a@&vz4p4zSip9finKmpjMXY%n1w-F+Ey7OAZQ(5c1{Z()Torr?|xM&!SpbjU{1$C=2vO+{{;Zm?HY&gCkv^bGw=7d+3T zks0SQTk&uPG!>ZXJ4VuIM_!N8aAFGZ)`fDD6d-^rz=8h9u_^Oe1^Vq7(CngxgF_dP zW1!{CXES5{6HAfja5@L(S)Ho0uhNk&xy19=lsnF*Xzy;0X+FaboV}= z^t0||!+#_6EW)H6A0pZ}LIqfvyUNQkW8|fUD%JZ{kLw^k?wmw{SJz=n>uRlrqft0{ z7!L{b4^wfH?o|7fic|Lw^v21e4YgC${BycqrCZva^W*)EMb~N9&DQPYqJeqMW>4Ms Vr~Sd>aN4_h8jqiknv=mD`vI%*zfS-F literal 0 HcmV?d00001 diff --git a/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_C.nce b/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_C.nce new file mode 100644 index 0000000000000000000000000000000000000000..5327b48037b72b8217ab55a1fddb8b7ad072b489 GIT binary patch literal 920 zcmbV~zfQw25XN2Tz<@+8F|fGT08Q(mzEP#fVVCbhok@jTmcUBKZZj|m6f4Bp8>_r=WuZ7 z0t^}!oHVtcu=E34VGNAsK)+o7LY9=2f(n;-)jh?Iv&rXoM@`lYor!JJl=PB8oMjoY z3BBp=kzUR~`dM_@tiBO?7GBs5j^Oh*LJ6!Qt`{3NZ?oKrt*2srP}Z!@%-ccl#BWsc z+Usat?$u~K_NEV$5rO`(R1n6y(BF_dMXoxht5v$A-JI`lugt%WBiCDZ e!;2<3tyW*%4`zem<7n2ud74a~k6Y8>9s2=Jalldl literal 0 HcmV?d00001 diff --git a/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_D.nce b/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_D.nce new file mode 100644 index 0000000000000000000000000000000000000000..a44c31bf54c74cc8b0cfdf55d4f13337e4dcfae5 GIT binary patch literal 920 zcmbV~y-ve05XW8Uh(s+hu(<Ou^KyMD%ARfF;>a7ge73;Y|l9r-$q9m z`kDib)m6}~VV?FF`UkWO05Z;b2EuHL@|XrmA8*2N8wvwH4|rDQ;j`&A3M3#`AP4hX!b549m0`V|0gJu2aOBVh z7;IQ@7IOfSFa||)V82y<{sS=ow$&>x@iyo1oL%1C-2%I8$+B(Uf(TZKxU}4L_hmli zFS|GO@*AON5yb826uo^Tw1MX0s#~yGlUccCpb~wY*A!=F&8Tx8)=K+2Xlb3V)o?Tl zCePy`f&O7CiW7RzWJ*Pe{|7%|xMS}E_sVnnTBTds&-wNF!NR+w>wD{Vd|gLIqtR1O W{b_&jGMx7AU&rIOv&Llb$o>Gq8o%BE literal 0 HcmV?d00001 diff --git a/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_E.nce b/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_E.nce new file mode 100644 index 0000000000000000000000000000000000000000..a89d8f72c748296077459c9917d6384e10cf2b4a GIT binary patch literal 920 zcmbVKO-sW-5Z!8zf?e?7ZF}%sT>n5x*Qmu!DkXx4UZmC!Xd5Vc@YbK)-&P zt7#xM7hb;so^t~J9+nbODy2+GC4a#@Xwv*~rV^QjDj~-cdUXM*%edfU)UTjq5^K`2 zlsYc;umg%x%&Y<bu4<*I&vrnu^O-nw_yQ6P zEOizOB8Ey5fcL<>6~Fif3&2*otXDmA>~yyI{O+-Y^#lw~=d zf8M`pR^JFe3oq;j$MD%3;RGy?>-j;<+ag1L^h{(Ai<+`$-VS=FKEFB6F|60IwusGW zJoctflMxI3!%PrHdqtlyLFE3yZRl^wogr7<)72W=v2M@Lk9XnUM142gcEigibXu)} XdAyz74xdM}!QIPb@_N#m4j;rXF$BQG literal 0 HcmV?d00001 diff --git a/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_F.nce b/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_F.nce new file mode 100644 index 0000000000000000000000000000000000000000..b1c01841f576665910956f2434e3b643e1dfb0ea GIT binary patch literal 920 zcmbVKy-or_5MGqhL^iRoTMBF9`U2!wPbKahhMb874MF@#fJ=xLc07iUWNBgTBLK-I z*Wvoj-tBQ9m6Loo|MSgFHdLLK`Keak_Zh3PL#BMKPZ(pB980q_Ff-Z9lnQTyBbcs+ zY<1;zYsgcKK|erJV@%39PmM^nL3yN&q>mGkaBGUhxV%BH%)#Z_&hs(q3kaUX(#V)| z8L#=U1Bz12ECVBHv}4}X(s1Gw;M+`OO;UgXyaGJP{{fofGFOUvy90`yw&dWU10)z& z@GRzYLjZpQ&>omq`%yKaw~Vh74! zc5mwCH$uvniu2T!BXQ&0VA UfABJ#_U>QDRrYn|v-LV60LJuuJeD>N-&nt~FSc;%d8$JyoS+a(yZwuG3LZ4$j8ofrkj zdY6+YeVbR#Nx$sf)XQ&#o`oNFf>U_=MyP<3$JIPx^Cq*Fr@o97y)F07^6I=9bkEzh zQeF8irHWjR#$$i_JQ)$_A4djZbWq%rGKk!Na2vLF)Gkmf@9BD_YALtp*XIXo-$gw) gTXn+gIyj9+Up@_HgW=0)*1vz9Oy15K)8Qlg0Tpz=egFUf literal 0 HcmV?d00001 diff --git a/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_H.nce b/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_H.nce new file mode 100644 index 0000000000000000000000000000000000000000..4fbd9ea51b9e55adca37d9e9b9d7bcbfe4e0b14c GIT binary patch literal 920 zcmbV~y-or_5XTp#G?7g#EKH8Vns~kdIo4B&dxs%sVnIU?KN8>)qJ;c%{&(+2R-tl}KQp`Y@f-FwR-G1oRVy#sLe#{rP@&d`LWoMKB`pbVv9=1M;;U#6 zF6SJ;SLZ>uhPXKsu(wz_5#>_KoV@I>OdMhI%?~dxlh*Yz;y9t!FD3nzU&d49|HzYB z>XV;J>8C3mWe>ytE054_)jqR96^0M`Qt@in0+by+#`?F>j}YvJIS z3&_yWauy#%EbueP%z=J3KK~?Qxm?3@_r_<=CTs6*F`tu_%d}J2yJwDTizxB8S!41H zrvF*@vhKbS^DKh69UZ~iH)0O33cp%x#H=Z-ify10ySw@z8+&u~ZZ%J7t|xQNsU$Ck!{7o#M=$lXI1BX`b`_?Nx-=Ntb);c6?C>r_t!C W`~I{)cpOf9H&5g7^KoM`xD($g*}yIU literal 0 HcmV?d00001 diff --git a/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_I.nce b/build/debugsoft/MakerTitle/TitleList/banner/data/Cell/Cell_I.nce new file mode 100644 index 0000000000000000000000000000000000000000..6889928737915dfd67e02418931db44eaaa916ca GIT binary patch literal 920 zcmbVKJx{|h5Otv=61Bv@<_^pi<`1CM1gLOQR0WBlOI6B;)HYHD16zLvKZ%innV(Q9 zMaovpyToo?+KH21?sD($-ozN5Va?0ypsBTeSA*d&7(a~$ zB=iqcQJn1AKBc0>eM8me!Y#RTdb#u6yL%VQq3X2EceV1e%~*}?GUaQ1z!%}`{{T&KSt|wK?f|m$RvbEX z0SN}K>(EIg2|#;bo~_TnjBx;ArAvC{GsRA4lP~TT%*6*V|HR}u1<2UDcRJ34Wgu^D z)7_)6+JWk)-HUqpjnK33!gg>7Z{G+dU|C$v4s6zB7TM8Lk>1ZaMbE4mbdLR6DX+bj z*7;ctM + +void DrawScreen(void); +void DoWritingTest(void); +void DoReadingTest(void); +void DeleteSaveDatas(void); +/*===========================================================================*/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* SCREEN_H_ */ + +/*---------------------------------------------------------------------------* + End of file + *---------------------------------------------------------------------------*/ diff --git a/build/debugsoft/MakerTitle/TitleList/include/font.h b/build/debugsoft/MakerTitle/TitleList/include/font.h new file mode 100644 index 00000000..a323d9e1 --- /dev/null +++ b/build/debugsoft/MakerTitle/TitleList/include/font.h @@ -0,0 +1,42 @@ +/*---------------------------------------------------------------------------* + Project: TwlSDK - demos - os - reset-1 + File: font.h + + Copyright 2003 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 FONT_H_ +#define FONT_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/*===========================================================================*/ + +#include + +extern const u32 d_CharData[8 * 256]; +extern const u32 d_PaletteData[8 * 16]; + +/*===========================================================================*/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* FONT_H_ */ + +/*---------------------------------------------------------------------------* + End of file + *---------------------------------------------------------------------------*/ diff --git a/build/debugsoft/MakerTitle/TitleList/include/screen.h b/build/debugsoft/MakerTitle/TitleList/include/screen.h new file mode 100644 index 00000000..0387a9ae --- /dev/null +++ b/build/debugsoft/MakerTitle/TitleList/include/screen.h @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------* + Project: TwlSDK - demos - os - reset-1 + File: screen.h + + Copyright 2003 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 SCREEN_H_ +#define SCREEN_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/*===========================================================================*/ +#include + +extern u16 gScreen[2][32 * 32]; + +void ClearScreen(void); +void ClearSubScreen(void); +void PrintString(s16 x, s16 y, u8 palette, char *text, ...); +void ColorString(s16 x, s16 y, s16 length, u8 palette); + +/*===========================================================================*/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* SCREEN_H_ */ + +/*---------------------------------------------------------------------------* + End of file + *---------------------------------------------------------------------------*/ diff --git a/build/debugsoft/MakerTitle/TitleList/readme.txt b/build/debugsoft/MakerTitle/TitleList/readme.txt new file mode 100644 index 00000000..14200d4a --- /dev/null +++ b/build/debugsoft/MakerTitle/TitleList/readme.txt @@ -0,0 +1,36 @@ +TitleList + +Tv +@[J[R[hAvʁAZ[uf[^̗̈LȂǂقȂAvԂ +@Z[uf[^ANZXɍs邩ǂmFAvZbgłB + + +eXg@ +@@/debugsoft/TitleList ȉTitleList_A.tad`TitleList_J.tadSăC|[g܂iȉtad܂Ƃ߂āAZbgƕ\L܂j +@AeNāA +@@@`{^@|@Zbgւ̏݃eXg +@@@a{^@|@g̃Z[uf[^̓ǂݍ݃eXg + +@sƂł܂B + +Av̎dl +@݃eXgF +@@`{^ƁAgZbg̃Z[uf[^ɑ΂ď݂s܂B +@@ʂɊeɑ΂Ă̎sʂ\܂Bʂ̕\̎Ӗ͉L̒ʂłB + +@@cɏ݂sꂽ +@@~c߂Ȃ +@@|cZ[uf[^̈悪݂ȂA܂͎gł + +@@ރf[^́A"Written by [X]" ŁAXɂ͎g̃iA`Jj܂B + +@ǂݍ݃eXgF +@@a{^ƁAg̃Z[uf[^̓e\邱Ƃł܂B +@@ɂāA݃eXgŎۂɃf[^܂ꂽǂmF邱Ƃł܂B + +@Z[uf[^NAF +@@ROM Â݁Aw{^ƁAZbg̃Z[uf[^SăNA܂B + +Zbg̓e +@@ROMZbg.xlsQƂĂB + diff --git a/build/debugsoft/MakerTitle/TitleList/src/appmain.c b/build/debugsoft/MakerTitle/TitleList/src/appmain.c new file mode 100644 index 00000000..407a4c76 --- /dev/null +++ b/build/debugsoft/MakerTitle/TitleList/src/appmain.c @@ -0,0 +1,250 @@ +/*---------------------------------------------------------------------------* + Project: TwlSDK_IPL - debugsoft - MakerTitle - TitleList + File: appmain.c + + Copyright 2003 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 "appmain.h" +#include "screen.h" +#include "mycode.h" +#include "title.h" +#include +#include +#include +#include + +BOOL TestWriting(const char* code, BOOL out_results[2]); +BOOL WriteFile(const char* arc_name, const char* file_name); +BOOL ReadFile(const char* arc_name, const char* file_name, char* out, int len); +void PrintResult(int x, int y, char* text); + +const char* ARC_NAME[2] = { + "otherPub:/", + "otherPrv:/", +}; + + +const char* SAV_NAME[2] = { + "dataPub:/", + "dataPrv:/", +}; + +const char* FILE_NAME = "save.dat"; + +BOOL TestWriting(const char* code, BOOL out_results[2]) +{ + const NATitleArchive arc[2] = { + NA_TITLE_ARCHIVE_DATAPUB, + NA_TITLE_ARCHIVE_DATAPRV, + }; + s32 i = 0; + for(i = 0; i < 2; ++i) + { + FSResult res = NA_LoadOtherTitleArchive(code, arc[i]); + out_results[i] = (res != FS_RESULT_SUCCESS) ? FALSE : TRUE; + if(res != FS_RESULT_SUCCESS) + { + OS_TPrintf("Mount Failed:%s\n", code); + OS_TPrintf("ErrorCode:%d\n", res); + continue; + } + + WriteFile(ARC_NAME[i], FILE_NAME); + + NA_UnloadOtherTitleArchive(); + } + + return out_results[0] | out_results[1]; +} + +BOOL WriteFile(const char* arc_name, const char* file_name) +{ + FSFile fp; + char buf[256]; + s32 len = 0; + + STD_TSPrintf(buf, "%s%s", arc_name, file_name); + + FS_InitFile(&fp); + FS_CreateFile(buf, FS_PERMIT_W | FS_PERMIT_R); + + if(!FS_OpenFileEx(&fp, buf, FS_FILEMODE_RW)) + { + OS_TPrintf("Open Fail:%s\n", buf); + return FALSE; + } + + FS_SeekFileToEnd(&fp); + len = STD_TSPrintf(buf, "Written by [%s]\n", MYNAME); + FS_WriteFile(&fp, buf, len); + FS_CloseFile(&fp); + + return TRUE; +} + +void DrawScreen(void) +{ + PrintString(0, 0, 15, "GameCode:%s", MYCODE); + PrintString(0, 2, 15, "A - Writing test to other apps"); + PrintString(0, 3, 15, "B - Show my save data"); + if(STD_StrCmp("4KAA", MYCODE) == 0) + { + PrintString(0, 4, 15, "X - Clear save datas"); + } +} + +void DoWritingTest(void) +{ + BOOL results[TITLE_COUNT][2]; + s16 i = 0; + char* result_char[3] = {"O", "X", "-"}; + + MI_CpuClear8(results, sizeof(results)); + + ClearSubScreen(); + PrintString(0, 24, 15, "APP : PUB PRV WRITE"); + PrintString(0, 25, 15, "---------------------"); + for(i = 0; i < TITLE_COUNT; ++i) + { + char buf[256]; + char format[] = "ROM %c: %s %s %s"; + // g̓`FbNȂ +// OS_TPrintf("%s %s\n", GAMECODE_LIST[i], MYCODE); + if(STD_StrCmp(GAMECODE_LIST[i], MYCODE) == 0){ + STD_TSPrintf(buf, format, 'A' + i, "-", "-", "-"); + } + else + { + s32 result_code[3] = {0, 0, 0}; + TestWriting(GAMECODE_LIST[i], results[i]); + result_code[0] = (!DATA_EXIST[i][0]) ? 2 : (results[i][0] ? 0 : 1); + result_code[1] = (!DATA_EXIST[i][1]) ? 2 : (results[i][1] ? 0 : 1); + result_code[2] = (result_code[0] == 2 && result_code[1] == 2) ? 2 : (result_code[0] != 1 && result_code[1] != 1) ? 0 : 1; + STD_TSPrintf(buf, format, 'A' + i, + result_char[result_code[0]], + result_char[result_code[1]], + result_char[result_code[2]] + ); + } + OS_TPrintf("%s\n", buf); + PrintString(0, (s16)(26 + i), 15, buf); + } +} + +void DoReadingTest(void) +{ + char read_buf[2048]; + + ClearSubScreen(); + + { + s32 i = 0; + BOOL result[2] = {FALSE, FALSE}; + + PrintString(0, 24, 15, "Public"); + PrintString(16, 24, 15, "Private"); + for(i = 0; i < 2; ++i) + { + MI_CpuClear8(read_buf, sizeof(read_buf)); + result[i] = ReadFile(SAV_NAME[i], FILE_NAME, read_buf, sizeof(read_buf)); +/* if(!result[i]) + { + continue; + }*/ + OS_TPrintf("%s%s\n", SAV_NAME[i], FILE_NAME); + OS_TPrintf("%s\n", read_buf); + OS_TPrintfEx("% 256.16b\n", read_buf); + + PrintResult(i * 16, 25, read_buf); + } + } +} + +BOOL ReadFile(const char* arc_name, const char* file_name, char* out, int len) +{ + FSFile fp; + char buf[256]; + + STD_TSPrintf(buf, "%s%s", arc_name, file_name); + + FS_InitFile(&fp); + + if(!FS_OpenFileEx(&fp, buf, FS_FILEMODE_R)) + { + FSResult res; + + res = FS_GetArchiveResultCode(buf); + OS_TPrintf("Code:%d\n", res); + OS_TPrintf("Open Fail:%s\n", buf); + STD_TSPrintf(out,"Error:%d\n%s Open Failed\n", res, buf); + return FALSE; + } + + FS_ReadFile(&fp, out, len); + FS_CloseFile(&fp); + + return TRUE; +} + +void PrintResult(int x, int y, char* text) +{ + int len = 0, i = 0; + char *p = text, *next = NULL; + char buf[2048]; + while(*p != '\0') + { + next = STD_StrChr(p, '\n'); + STD_CopyLStringZeroFill(buf, p, next - p + 1); + OS_TPrintf("str:%s\n", buf); + PrintString((short)x, (short)y, 15, buf); + y++; + p = next + 1; + } +} + +void DeleteSaveDatas(void) +{ + const NATitleArchive arc[2] = { + NA_TITLE_ARCHIVE_DATAPUB, + NA_TITLE_ARCHIVE_DATAPRV, + }; + int i = 0, j = 0, k = 0; + ClearSubScreen(); + for(i = 0; i < TITLE_COUNT; ++i) + { + for(j = 0; j < 2; ++j) + { + char path[256]; + FSResult res = NA_LoadOtherTitleArchive(GAMECODE_LIST[i], arc[j]); + if(res != FS_RESULT_SUCCESS) + { + OS_TPrintf("Mount Failed:%s\n", GAMECODE_LIST[i]); + OS_TPrintf("ErrorCode:%d\n", res); + continue; + } + + STD_TSPrintf(path, "%s%s", ARC_NAME[j], FILE_NAME); + if(!FS_DeleteFile(path)) + { + OS_TPrintf("Delete Fail:%s\n", path); + } + else + { + OS_TPrintf("Deleted:%s %s\n", GAMECODE_LIST[i], path); + PrintString(0,(short) (24 + k++), 15, "Deleted:%s %s", GAMECODE_LIST[i], path); + } + NA_UnloadOtherTitleArchive(); + } + } +} diff --git a/build/debugsoft/MakerTitle/TitleList/src/font.c b/build/debugsoft/MakerTitle/TitleList/src/font.c new file mode 100644 index 00000000..30670436 --- /dev/null +++ b/build/debugsoft/MakerTitle/TitleList/src/font.c @@ -0,0 +1,574 @@ +/*---------------------------------------------------------------------------* + Project: TwlSDK - demos - os - reset-1 + File: font.c + + Copyright 2003 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 "font.h" + +//---------------------------------------------------------------- +// Character data +// +const u32 d_CharData[8 * 256] = { + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0000h + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x01010010, 0x01010010, 0x00000110, // 0001h + 0x00011010, 0x01100010, 0x00000010, 0x00000010, + 0x00000000, 0x01011010, 0x01010010, 0x00010010, // 0002h + 0x00100010, 0x00100010, 0x00100001, 0x00100001, + 0x00000000, 0x01010001, 0x01010001, 0x01111111, // 0003h + 0x00000001, 0x00000001, 0x00000001, 0x01111110, + 0x00000000, 0x01010000, 0x01111111, 0x00100000, // 0004h + 0x00100000, 0x00010000, 0x00001000, 0x00000110, + 0x00000000, 0x01010000, 0x01010100, 0x00001010, // 0005h + 0x00010001, 0x00100001, 0x01000000, 0x00000000, + 0x00000000, 0x01011000, 0x01011000, 0x01111111, // 0006h + 0x00001000, 0x00101010, 0x01001010, 0x01001001, + 0x00000000, 0x01010010, 0x01101111, 0x01010010, // 0007h + 0x00010010, 0x00010010, 0x00010010, 0x00001001, + 0x00000000, 0x01010010, 0x01011111, 0x00000100, // 0008h + 0x00011111, 0x00001000, 0x00000001, 0x00011110, + 0x00000000, 0x01010000, 0x01011000, 0x00000110, // 0009h + 0x00000001, 0x00000110, 0x00011000, 0x00100000, + 0x00000000, 0x01010000, 0x01111101, 0x00010001, // 000ah + 0x00010001, 0x00010001, 0x00010001, 0x00001010, + 0x00000000, 0x01010000, 0x01011110, 0x00100000, // 000bh + 0x00000000, 0x00000001, 0x00000001, 0x00111110, + 0x00000000, 0x01010100, 0x01011111, 0x00001000, // 000ch + 0x00010000, 0x00000001, 0x00000001, 0x00011110, + 0x00000000, 0x01010001, 0x01010001, 0x00000001, // 000dh + 0x01000001, 0x01000001, 0x00100010, 0x00011100, + 0x00000000, 0x01010000, 0x01111111, 0x00011000, // 000eh + 0x00010100, 0x00010100, 0x00011000, 0x00001100, + 0x00000000, 0x01010010, 0x01111111, 0x00010010, // 000fh + 0x00010010, 0x00000010, 0x00000010, 0x00111100, + 0x00000000, 0x00001110, 0x01010100, 0x01010010, // 0010h + 0x00111111, 0x00000100, 0x00000100, 0x00011000, + 0x00000000, 0x01010100, 0x01011111, 0x00000100, // 0011h + 0x01110100, 0x00000010, 0x00001010, 0x01110010, + 0x00000000, 0x01010100, 0x01011111, 0x00000010, // 0012h + 0x00011110, 0x00100001, 0x00100000, 0x00011110, + 0x00000000, 0x01010000, 0x01011100, 0x00100011, // 0013h + 0x01000000, 0x01000000, 0x00100000, 0x00011100, + 0x00000000, 0x01010000, 0x01111111, 0x00010000, // 0014h + 0x00001000, 0x00001000, 0x00001000, 0x00110000, + 0x00000000, 0x01010010, 0x01010010, 0x00001100, // 0015h + 0x00000010, 0x00000001, 0x00000001, 0x00111110, + 0x00000000, 0x01010001, 0x01111101, 0x00010001, // 0016h + 0x00010001, 0x00111001, 0x01010101, 0x00011001, + 0x00000000, 0x01010100, 0x01010011, 0x01110010, // 0017h + 0x00010001, 0x00010001, 0x00001010, 0x00000100, + 0x00000000, 0x01011110, 0x01011000, 0x00000100, // 0018h + 0x00101001, 0x01010001, 0x01010001, 0x00001100, + 0x00000000, 0x01010000, 0x01011100, 0x00010010, // 0019h + 0x00010010, 0x00100001, 0x01000000, 0x00000000, + 0x00000000, 0x01011101, 0x01010001, 0x00111101, // 001ah + 0x00010001, 0x00011001, 0x00110101, 0x00001001, + 0x00000000, 0x01110001, 0x01011101, 0x00110001, // 001bh + 0x00010001, 0x00111001, 0x01010101, 0x00011001, + 0x00000000, 0x01110100, 0x01010011, 0x00110010, // 001ch + 0x00010001, 0x00010001, 0x00001010, 0x00000100, + 0x00000000, 0x01101110, 0x01011000, 0x00100100, // 001dh + 0x00101001, 0x01010001, 0x01010001, 0x00001100, + 0x00000000, 0x01110000, 0x01011100, 0x00110010, // 001eh + 0x00010010, 0x00100001, 0x01000000, 0x00000000, + 0x00000000, 0x01111101, 0x01010001, 0x00111101, // 001fh + 0x00010001, 0x00011001, 0x00110101, 0x00001001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0020h + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00001000, 0x00001000, 0x00001000, // 0021h + 0x00001000, 0x00001000, 0x00000000, 0x00001000, + 0x00000000, 0x01101100, 0x01001000, 0x00100100, // 0022h + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00100100, 0x01111111, 0x00100100, // 0023h + 0x00100100, 0x01111111, 0x00010010, 0x00010010, + 0x00000000, 0x00001000, 0x01111110, 0x00001001, // 0024h + 0x00111110, 0x01001000, 0x00111111, 0x00001000, + 0x00000000, 0x01000010, 0x00100101, 0x00010010, // 0025h + 0x00001000, 0x00100100, 0x01010010, 0x00100001, + 0x00000000, 0x00001110, 0x00010001, 0x00001001, // 0026h + 0x01000110, 0x00101001, 0x00110001, 0x01001110, + 0x00000000, 0x00011000, 0x00010000, 0x00001000, // 0027h + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x01110000, 0x00001000, 0x00000100, // 0028h + 0x00000100, 0x00000100, 0x00001000, 0x01110000, + 0x00000000, 0x00000111, 0x00001000, 0x00010000, // 0029h + 0x00010000, 0x00010000, 0x00001000, 0x00000111, + 0x00000000, 0x00001000, 0x01001001, 0x00101010, // 002ah + 0x00011100, 0x00101010, 0x01001001, 0x00001000, + 0x00000000, 0x00001000, 0x00001000, 0x00001000, // 002bh + 0x01111111, 0x00001000, 0x00001000, 0x00001000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002ch + 0x00000000, 0x00001100, 0x00001000, 0x00000100, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002dh + 0x01111111, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002eh + 0x00000000, 0x00000000, 0x00000000, 0x00001100, + 0x00000000, 0x01000000, 0x00100000, 0x00010000, // 002fh + 0x00001000, 0x00000100, 0x00000010, 0x00000001, + 0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0030h + 0x01000001, 0x01000001, 0x01000001, 0x00111110, + 0x00000000, 0x00011100, 0x00010000, 0x00010000, // 0031h + 0x00010000, 0x00010000, 0x00010000, 0x00010000, + 0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0032h + 0x00111110, 0x00000001, 0x00000001, 0x01111111, + 0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0033h + 0x00111110, 0x01000000, 0x01000001, 0x00111110, + 0x00000000, 0x00100000, 0x00110000, 0x00101000, // 0034h + 0x00100100, 0x00100010, 0x01111111, 0x00100000, + 0x00000000, 0x01111111, 0x00000001, 0x00111111, // 0035h + 0x01000000, 0x01000000, 0x01000001, 0x00111110, + 0x00000000, 0x00111110, 0x00000001, 0x00111111, // 0036h + 0x01000001, 0x01000001, 0x01000001, 0x00111110, + 0x00000000, 0x01111111, 0x00100000, 0x00100000, // 0037h + 0x00010000, 0x00010000, 0x00001000, 0x00001000, + 0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0038h + 0x00111110, 0x01000001, 0x01000001, 0x00111110, + 0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0039h + 0x01000001, 0x01111110, 0x01000000, 0x00111110, + 0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003ah + 0x00000000, 0x00000000, 0x00001100, 0x00000000, + 0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003bh + 0x00000000, 0x00001100, 0x00001000, 0x00000100, + 0x00000000, 0x01100000, 0x00011000, 0x00000110, // 003ch + 0x00000001, 0x00000110, 0x00011000, 0x01100000, + 0x00000000, 0x00000000, 0x01111111, 0x00000000, // 003dh + 0x00000000, 0x00000000, 0x01111111, 0x00000000, + 0x00000000, 0x00000011, 0x00001100, 0x00110000, // 003eh + 0x01000000, 0x00110000, 0x00001100, 0x00000011, + 0x00000000, 0x00111110, 0x01000001, 0x01000001, // 003fh + 0x00110000, 0x00001000, 0x00000000, 0x00001000, + 0x00000000, 0x00011100, 0x00100010, 0x01001001, // 0040h + 0x01010101, 0x01010101, 0x01010101, 0x00111010, + 0x00000000, 0x00001000, 0x00010100, 0x00010100, // 0041h + 0x00100010, 0x00111110, 0x01000001, 0x01000001, + 0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0042h + 0x00111111, 0x01000001, 0x01000001, 0x00111111, + 0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0043h + 0x00000001, 0x00000001, 0x01000010, 0x00111100, + 0x00000000, 0x00011111, 0x00100001, 0x01000001, // 0044h + 0x01000001, 0x01000001, 0x00100001, 0x00011111, + 0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0045h + 0x01111111, 0x00000001, 0x00000001, 0x01111111, + 0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0046h + 0x00111111, 0x00000001, 0x00000001, 0x00000001, + 0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0047h + 0x01111001, 0x01000001, 0x01000010, 0x00111100, + 0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0048h + 0x01111111, 0x01000001, 0x01000001, 0x01000001, + 0x00000000, 0x00111110, 0x00001000, 0x00001000, // 0049h + 0x00001000, 0x00001000, 0x00001000, 0x00111110, + 0x00000000, 0x01000000, 0x01000000, 0x01000000, // 004ah + 0x01000001, 0x01000001, 0x00100010, 0x00011100, + 0x00000000, 0x01100001, 0x00011001, 0x00000101, // 004bh + 0x00000011, 0x00000101, 0x00011001, 0x01100001, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, // 004ch + 0x00000001, 0x00000001, 0x00000001, 0x01111111, + 0x00000000, 0x01000001, 0x01100011, 0x01010101, // 004dh + 0x01001001, 0x01000001, 0x01000001, 0x01000001, + 0x00000000, 0x01000001, 0x01000011, 0x01000101, // 004eh + 0x01001001, 0x01010001, 0x01100001, 0x01000001, + 0x00000000, 0x00011100, 0x00100010, 0x01000001, // 004fh + 0x01000001, 0x01000001, 0x00100010, 0x00011100, + 0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0050h + 0x00111111, 0x00000001, 0x00000001, 0x00000001, + 0x00000000, 0x00011100, 0x00100010, 0x01000001, // 0051h + 0x01000001, 0x01011001, 0x00100010, 0x01011100, + 0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0052h + 0x00111111, 0x01000001, 0x01000001, 0x01000001, + 0x00000000, 0x00111110, 0x01000001, 0x00000001, // 0053h + 0x00111110, 0x01000000, 0x01000001, 0x00111110, + 0x00000000, 0x01111111, 0x00001000, 0x00001000, // 0054h + 0x00001000, 0x00001000, 0x00001000, 0x00001000, + 0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0055h + 0x01000001, 0x01000001, 0x00100010, 0x00011100, + 0x00000000, 0x01000001, 0x01000001, 0x00100010, // 0056h + 0x00100010, 0x00010100, 0x00010100, 0x00001000, + 0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0057h + 0x01001001, 0x01010101, 0x01100011, 0x01000001, + 0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0058h + 0x00001000, 0x00010100, 0x00100010, 0x01000001, + 0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0059h + 0x00001000, 0x00001000, 0x00001000, 0x00001000, + 0x00000000, 0x01111111, 0x00100000, 0x00010000, // 005ah + 0x00001000, 0x00000100, 0x00000010, 0x01111111, + 0x00000000, 0x01111100, 0x00000100, 0x00000100, // 005bh + 0x00000100, 0x00000100, 0x00000100, 0x01111100, + 0x00000000, 0x00100010, 0x00010100, 0x00111110, // 005ch + 0x00001000, 0x00111110, 0x00001000, 0x00001000, + 0x00000000, 0x00011111, 0x00010000, 0x00010000, // 005dh + 0x00010000, 0x00010000, 0x00010000, 0x00011111, + 0x00000000, 0x00001000, 0x00010100, 0x00100010, // 005eh + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 005fh + 0x00000000, 0x00000000, 0x00000000, 0x01111111, + 0x00000000, 0x00010000, 0x00001000, 0x00011000, // 0060h + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00011110, 0x00100001, // 0061h + 0x00111110, 0x00100001, 0x00100001, 0x01011110, + 0x00000000, 0x00000001, 0x00000001, 0x00111111, // 0062h + 0x01000001, 0x01000001, 0x01000001, 0x00111111, + 0x00000000, 0x00000000, 0x00111100, 0x01000010, // 0063h + 0x00000001, 0x00000001, 0x01000010, 0x00111100, + 0x00000000, 0x01000000, 0x01000000, 0x01111110, // 0064h + 0x01000001, 0x01000001, 0x01000001, 0x01111110, + 0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0065h + 0x01111111, 0x00000001, 0x01000001, 0x00111110, + 0x00000000, 0x00110000, 0x00001000, 0x00001000, // 0066h + 0x01111111, 0x00001000, 0x00001000, 0x00001000, + 0x00000000, 0x00000000, 0x01111110, 0x01000001, // 0067h + 0x01000001, 0x01111110, 0x01000000, 0x00111110, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0068h + 0x00111111, 0x01000001, 0x01000001, 0x01000001, + 0x00000000, 0x00001000, 0x00000000, 0x00001000, // 0069h + 0x00001000, 0x00001000, 0x00001000, 0x00001000, + 0x00000000, 0x00100000, 0x00000000, 0x00100000, // 006ah + 0x00100000, 0x00100001, 0x00100001, 0x00011110, + 0x00000000, 0x00000001, 0x00000001, 0x01100001, // 006bh + 0x00011001, 0x00000111, 0x00011001, 0x01100001, + 0x00000000, 0x00001000, 0x00001000, 0x00001000, // 006ch + 0x00001000, 0x00001000, 0x00001000, 0x00001000, + 0x00000000, 0x00000000, 0x00110111, 0x01001001, // 006dh + 0x01001001, 0x01001001, 0x01001001, 0x01001001, + 0x00000000, 0x00000000, 0x00111111, 0x01000001, // 006eh + 0x01000001, 0x01000001, 0x01000001, 0x01000001, + 0x00000000, 0x00000000, 0x00011100, 0x00100010, // 006fh + 0x01000001, 0x01000001, 0x00100010, 0x00011100, + 0x00000000, 0x00000000, 0x00111101, 0x01000011, // 0070h + 0x01000001, 0x01000011, 0x00111101, 0x00000001, + 0x00000000, 0x00000000, 0x01011110, 0x01100001, // 0071h + 0x01000001, 0x01100001, 0x01011110, 0x01000000, + 0x00000000, 0x00000000, 0x00110001, 0x00001101, // 0072h + 0x00000011, 0x00000001, 0x00000001, 0x00000001, + 0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0073h + 0x00001110, 0x00110000, 0x01000001, 0x00111110, + 0x00000000, 0x00000100, 0x00000100, 0x01111111, // 0074h + 0x00000100, 0x00000100, 0x00000100, 0x01111000, + 0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0075h + 0x01000001, 0x01000001, 0x01000001, 0x01111110, + 0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0076h + 0x00100010, 0x00100010, 0x00010100, 0x00001000, + 0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0077h + 0x01001001, 0x00101010, 0x00101010, 0x00010100, + 0x00000000, 0x00000000, 0x00100001, 0x00010010, // 0078h + 0x00001100, 0x00001100, 0x00010010, 0x00100001, + 0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0079h + 0x00100010, 0x00011100, 0x00001000, 0x00000110, + 0x00000000, 0x00000000, 0x00111111, 0x00010000, // 007ah + 0x00001000, 0x00000100, 0x00000010, 0x00111111, + 0x00000000, 0x00001000, 0x00011110, 0x01100100, // 007bh + 0x00011000, 0x00100100, 0x00000100, 0x01111000, + 0x00000000, 0x00000000, 0x00011110, 0x00000100, // 007ch + 0x00011110, 0x00110101, 0x00101101, 0x00010010, + 0x00000000, 0x00000000, 0x00000000, 0x00010001, // 007dh + 0x00100001, 0x00100001, 0x00000001, 0x00000010, + 0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007eh + 0x00011110, 0x00100000, 0x00100000, 0x00011100, + 0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007fh + 0x00111110, 0x00010000, 0x00001100, 0x00110010, + 0x00000000, 0x00000000, 0x00000100, 0x00101111, // 0080h + 0x01000100, 0x00011110, 0x00100101, 0x00010110, + 0x00000000, 0x00000000, 0x00001010, 0x00011110, // 0081h + 0x00101011, 0x00100010, 0x00010100, 0x00000100, + 0x00000000, 0x00000000, 0x00001000, 0x00011101, // 0082h + 0x00101011, 0x00101001, 0x00011001, 0x00000100, + 0x00000000, 0x00000000, 0x00001000, 0x00111000, // 0083h + 0x00001000, 0x00011110, 0x00101001, 0x00000110, + 0x00000000, 0x00000000, 0x00000000, 0x00011100, // 0084h + 0x00100011, 0x00100000, 0x00100000, 0x00011100, + 0x00000000, 0x00000110, 0x01001001, 0x00110000, // 0085h + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000100, 0x00111111, 0x00000100, // 0086h + 0x00111110, 0x01010101, 0x01001101, 0x00100110, + 0x00000000, 0x00000000, 0x00100001, 0x01000001, // 0087h + 0x01000001, 0x01000001, 0x00000001, 0x00000010, + 0x00000000, 0x00111100, 0x00000000, 0x00111110, // 0088h + 0x01000000, 0x01000000, 0x00100000, 0x00011100, + 0x00000000, 0x00011100, 0x00000000, 0x00111110, // 0089h + 0x00010000, 0x00001000, 0x00010100, 0x01100010, + 0x00000000, 0x00100100, 0x01011111, 0x00000100, // 008ah + 0x00111110, 0x01000101, 0x01000101, 0x00100010, + 0x00000000, 0x00100010, 0x01001111, 0x01010010, // 008bh + 0x01010010, 0x00010010, 0x00010010, 0x00001001, + 0x00000000, 0x00000100, 0x00111110, 0x00001000, // 008ch + 0x00111110, 0x00010000, 0x00000010, 0x00111100, + 0x00000000, 0x00100000, 0x00011000, 0x00000110, // 008dh + 0x00000001, 0x00000110, 0x00011000, 0x00100000, + 0x00000000, 0x00100000, 0x01111101, 0x00100001, // 008eh + 0x00100001, 0x00100001, 0x00100001, 0x00010010, + 0x00000000, 0x00011110, 0x00100000, 0x00000000, // 008fh + 0x00000000, 0x00000001, 0x00000001, 0x00111110, + 0x00000000, 0x00001000, 0x01111111, 0x00010000, // 0090h + 0x00100000, 0x00000010, 0x00000010, 0x00111100, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0091h + 0x01000001, 0x01000001, 0x00100010, 0x00011100, + 0x00000000, 0x00010000, 0x01111111, 0x00011000, // 0092h + 0x00010100, 0x00010100, 0x00011000, 0x00001100, + 0x00000000, 0x00100010, 0x01111111, 0x00100010, // 0093h + 0x00100010, 0x00000010, 0x00000010, 0x01111100, + 0x00000000, 0x00111100, 0x00010000, 0x00001100, // 0094h + 0x01111111, 0x00001000, 0x00001000, 0x00110000, + 0x00000000, 0x00000100, 0x00011111, 0x00000100, // 0095h + 0x01110100, 0x00000010, 0x00001010, 0x01110010, + 0x00000000, 0x00001000, 0x01111111, 0x00000100, // 0096h + 0x00111100, 0x01000010, 0x01000000, 0x00111100, + 0x00000000, 0x00000000, 0x00011100, 0x00100011, // 0097h + 0x01000000, 0x01000000, 0x00100000, 0x00011100, + 0x00000000, 0x01111111, 0x00010000, 0x00001000, // 0098h + 0x00001000, 0x00001000, 0x00001000, 0x00110000, + 0x00000000, 0x00000010, 0x00110010, 0x00001100, // 0099h + 0x00000010, 0x00000001, 0x00000001, 0x00111110, + 0x00000000, 0x00100100, 0x01001111, 0x01000010, // 009ah + 0x00010001, 0x00111100, 0x00010010, 0x00001100, + 0x00000000, 0x00000010, 0x01111010, 0x01000010, // 009bh + 0x00000010, 0x00000010, 0x00001010, 0x01110010, + 0x00000000, 0x00100010, 0x00111110, 0x01010010, // 009ch + 0x01001011, 0x01101101, 0x01010101, 0x00110010, + 0x00000000, 0x00110010, 0x01001011, 0x01000110, // 009dh + 0x01000110, 0x01110010, 0x01001011, 0x00110010, + 0x00000000, 0x00011100, 0x00101010, 0x01001001, // 009eh + 0x01001001, 0x01000101, 0x01000101, 0x00110010, + 0x00000000, 0x00100001, 0x01111101, 0x00100001, // 009fh + 0x00100001, 0x00111001, 0x01100101, 0x00011001, + 0x00000000, 0x00000100, 0x00100011, 0x01100010, // 00a0h + 0x00100001, 0x00100001, 0x00010010, 0x00001100, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a1h + 0x00000000, 0x00000100, 0x00001010, 0x00000100, + 0x00000000, 0x01110000, 0x00010000, 0x00010000, // 00a2h + 0x00010000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a3h + 0x00001000, 0x00001000, 0x00001000, 0x00001110, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a4h + 0x00000000, 0x00000010, 0x00000100, 0x00000100, + 0x00000000, 0x00000000, 0x00000000, 0x00011000, // 00a5h + 0x00011000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x01111111, 0x01000000, 0x01111111, // 00a6h + 0x01000000, 0x01000000, 0x00100000, 0x00011100, + 0x00000000, 0x00000000, 0x00111111, 0x00100000, // 00a7h + 0x00010100, 0x00001100, 0x00000100, 0x00000010, + 0x00000000, 0x00000000, 0x00100000, 0x00100000, // 00a8h + 0x00010000, 0x00001111, 0x00001000, 0x00001000, + 0x00000000, 0x00000000, 0x00000100, 0x00111111, // 00a9h + 0x00100001, 0x00100000, 0x00010000, 0x00001100, + 0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00aah + 0x00001000, 0x00001000, 0x00001000, 0x01111111, + 0x00000000, 0x00000000, 0x00010000, 0x00111111, // 00abh + 0x00011000, 0x00010100, 0x00010010, 0x00011001, + 0x00000000, 0x00000000, 0x00000010, 0x00111111, // 00ach + 0x00100010, 0x00010010, 0x00000100, 0x00000100, + 0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00adh + 0x00100000, 0x00100000, 0x00100000, 0x01111111, + 0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00aeh + 0x00111110, 0x00100000, 0x00100000, 0x00111110, + 0x00000000, 0x00000000, 0x00100101, 0x00101010, // 00afh + 0x00101010, 0x00100000, 0x00010000, 0x00001110, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00b0h + 0x01111111, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x01111111, 0x01000000, 0x00101000, // 00b1h + 0x00011000, 0x00001000, 0x00001000, 0x00000100, + 0x00000000, 0x01000000, 0x00100000, 0x00011000, // 00b2h + 0x00010111, 0x00010000, 0x00010000, 0x00010000, + 0x00000000, 0x00001000, 0x01111111, 0x01000001, // 00b3h + 0x01000001, 0x01000000, 0x00100000, 0x00011000, + 0x00000000, 0x00000000, 0x00111110, 0x00001000, // 00b4h + 0x00001000, 0x00001000, 0x00001000, 0x01111111, + 0x00000000, 0x00100000, 0x01111111, 0x00110000, // 00b5h + 0x00101000, 0x00100100, 0x00100010, 0x00110001, + 0x00000000, 0x00000100, 0x01111111, 0x01000100, // 00b6h + 0x01000100, 0x01000100, 0x01000010, 0x00100001, + 0x00000000, 0x00000100, 0x00111111, 0x00001000, // 00b7h + 0x01111111, 0x00010000, 0x00010000, 0x00010000, + 0x00000000, 0x01111100, 0x01000100, 0x01000100, // 00b8h + 0x01000010, 0x01000000, 0x00100000, 0x00011000, + 0x00000000, 0x00000010, 0x01111110, 0x00100010, // 00b9h + 0x00100001, 0x00100000, 0x00010000, 0x00001100, + 0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00bah + 0x01000000, 0x01000000, 0x01000000, 0x01111110, + 0x00000000, 0x00100010, 0x01111111, 0x00100010, // 00bbh + 0x00100010, 0x00100000, 0x00010000, 0x00001100, + 0x00000000, 0x00000011, 0x00000100, 0x01000011, // 00bch + 0x01000100, 0x00100000, 0x00011000, 0x00000111, + 0x00000000, 0x01111111, 0x01000000, 0x00100000, // 00bdh + 0x00010000, 0x00011000, 0x00100100, 0x01000011, + 0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00beh + 0x00100010, 0x00000010, 0x00000010, 0x01111100, + 0x00000000, 0x01000001, 0x01000010, 0x01000000, // 00bfh + 0x00100000, 0x00100000, 0x00011000, 0x00000110, + 0x00000000, 0x01111110, 0x01000010, 0x01001110, // 00c0h + 0x01110001, 0x01000000, 0x00100000, 0x00011000, + 0x00000000, 0x01100000, 0x00011110, 0x00010000, // 00c1h + 0x01111111, 0x00010000, 0x00010000, 0x00001100, + 0x00000000, 0x01000101, 0x01001010, 0x01001010, // 00c2h + 0x01000000, 0x00100000, 0x00010000, 0x00001110, + 0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00c3h + 0x00010000, 0x00010000, 0x00001000, 0x00000110, + 0x00000000, 0x00000010, 0x00000010, 0x00000110, // 00c4h + 0x00011010, 0x01100010, 0x00000010, 0x00000010, + 0x00000000, 0x00010000, 0x00010000, 0x01111111, // 00c5h + 0x00010000, 0x00010000, 0x00001000, 0x00000110, + 0x00000000, 0x00000000, 0x00111110, 0x00000000, // 00c6h + 0x00000000, 0x00000000, 0x00000000, 0x01111111, + 0x00000000, 0x01111110, 0x01000000, 0x01000100, // 00c7h + 0x00101000, 0x00010000, 0x00101000, 0x01000110, + 0x00000000, 0x00001000, 0x01111111, 0x00100000, // 00c8h + 0x00010000, 0x00011100, 0x01101011, 0x00001000, + 0x00000000, 0x01000000, 0x01000000, 0x01000000, // 00c9h + 0x00100000, 0x00100000, 0x00011000, 0x00000111, + 0x00000000, 0x00010010, 0x00100010, 0x00100010, // 00cah + 0x01000010, 0x01000010, 0x01000001, 0x01000001, + 0x00000000, 0x00000001, 0x00000001, 0x01111111, // 00cbh + 0x00000001, 0x00000001, 0x00000001, 0x01111110, + 0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cch + 0x01000000, 0x00100000, 0x00010000, 0x00001110, + 0x00000000, 0x00000000, 0x00000100, 0x00001010, // 00cdh + 0x00010001, 0x00100001, 0x01000000, 0x00000000, + 0x00000000, 0x00001000, 0x00001000, 0x01111111, // 00ceh + 0x00001000, 0x00101010, 0x01001010, 0x01001001, + 0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cfh + 0x00100010, 0x00010100, 0x00001000, 0x00010000, + 0x00000000, 0x00001110, 0x01110000, 0x00001110, // 00d0h + 0x01110000, 0x00000110, 0x00011000, 0x01100000, + 0x00000000, 0x00001000, 0x00001000, 0x00000100, // 00d1h + 0x00000100, 0x00100010, 0x01000010, 0x01111111, + 0x00000000, 0x01000000, 0x01000000, 0x00100100, // 00d2h + 0x00101000, 0x00010000, 0x00101100, 0x01000011, + 0x00000000, 0x01111111, 0x00000100, 0x01111111, // 00d3h + 0x00000100, 0x00000100, 0x00000100, 0x01111000, + 0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00d4h + 0x00100010, 0x00010100, 0x00000100, 0x00000100, + 0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00d5h + 0x00100000, 0x00100000, 0x00100000, 0x01111111, + 0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00d6h + 0x01111110, 0x01000000, 0x01000000, 0x01111110, + 0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00d7h + 0x01000000, 0x01000000, 0x00100000, 0x00011100, + 0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00d8h + 0x01000010, 0x01000000, 0x00100000, 0x00011000, + 0x00000000, 0x00001010, 0x00001010, 0x00001010, // 00d9h + 0x01001010, 0x01001010, 0x00101010, 0x00011001, + 0x00000000, 0x00000010, 0x00000010, 0x01000010, // 00dah + 0x01000010, 0x00100010, 0x00010010, 0x00001110, + 0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dbh + 0x01000001, 0x01000001, 0x01000001, 0x01111111, + 0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dch + 0x01000000, 0x01000000, 0x00100000, 0x00011100, + 0x00000000, 0x01000011, 0x01000100, 0x01000000, // 00ddh + 0x01000000, 0x00100000, 0x00010000, 0x00001111, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00deh + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00dfh + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00011110, 0x00001000, 0x00000100, // 00e0h + 0x00101001, 0x01010001, 0x01010001, 0x00001100, + 0x00000000, 0x00000000, 0x00001100, 0x00010010, // 00e1h + 0x00010010, 0x00100001, 0x01000000, 0x00000000, + 0x00000000, 0x01111101, 0x00100001, 0x01111101, // 00e2h + 0x00100001, 0x00111001, 0x01100101, 0x00011001, + 0x00000000, 0x00111100, 0x00010000, 0x00111100, // 00e3h + 0x00010000, 0x00011100, 0x00110010, 0x00001100, + 0x00000000, 0x00001110, 0x00101000, 0x00101000, // 00e4h + 0x00111110, 0x01100101, 0x00100101, 0x00010010, + 0x00000000, 0x00000100, 0x00101111, 0x01000100, // 00e5h + 0x00000110, 0x01000101, 0x01000101, 0x00111110, + 0x00000000, 0x00100010, 0x00100010, 0x00111110, // 00e6h + 0x01010010, 0x01010101, 0x01001101, 0x00100110, + 0x00000000, 0x00000100, 0x00011111, 0x00000010, // 00e7h + 0x00011111, 0x01000010, 0x01000010, 0x00111100, + 0x00000000, 0x00010010, 0x00111110, 0x01010011, // 00e8h + 0x01000010, 0x00100100, 0x00000100, 0x00000100, + 0x00000000, 0x00001000, 0x00111101, 0x01001011, // 00e9h + 0x01001001, 0x01001001, 0x00111000, 0x00000100, + 0x00000000, 0x00001000, 0x00111000, 0x00001000, // 00eah + 0x00001000, 0x00011110, 0x00101001, 0x00000110, + 0x00000000, 0x00011000, 0x00100000, 0x00000100, // 00ebh + 0x00111010, 0x01000110, 0x01000000, 0x00111000, + 0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00ech + 0x01000110, 0x01000000, 0x00100000, 0x00011000, + 0x00000000, 0x00111110, 0x00010000, 0x00111100, // 00edh + 0x01000011, 0x01001100, 0x01010010, 0x00111100, + 0x00000000, 0x00100010, 0x00110011, 0x00101010, // 00eeh + 0x00100110, 0x00100010, 0x00100011, 0x01000010, + 0x00000000, 0x00111110, 0x00010000, 0x00111100, // 00efh + 0x01000011, 0x01000000, 0x01000010, 0x00111100, + 0x00000000, 0x00000010, 0x00111011, 0x01000110, // 00f0h + 0x01000010, 0x01000011, 0x01000010, 0x00110010, + 0x00000000, 0x00000100, 0x00000100, 0x00000010, // 00f1h + 0x01000110, 0x01000101, 0x01000101, 0x00111001, + 0x00000000, 0x01010100, 0x01111111, 0x00100100, // 00f2h + 0x00100100, 0x00100100, 0x00100010, 0x00010001, + 0x00000000, 0x01010100, 0x01011111, 0x00000100, // 00f3h + 0x00111111, 0x00001000, 0x00001000, 0x00001000, + 0x00000000, 0x01011110, 0x01100010, 0x00100010, // 00f4h + 0x00100001, 0x00100000, 0x00010000, 0x00001100, + 0x00000000, 0x01010010, 0x01111110, 0x00100010, // 00f5h + 0x00100001, 0x00100000, 0x00010000, 0x00001100, + 0x00000000, 0x01010000, 0x01111111, 0x00100000, // 00f6h + 0x00100000, 0x00100000, 0x00100000, 0x00111111, + 0x00000000, 0x01010010, 0x01010010, 0x00111111, // 00f7h + 0x00010010, 0x00010000, 0x00010000, 0x00001100, + 0x00000000, 0x01010011, 0x01010100, 0x00100011, // 00f8h + 0x00100100, 0x00010000, 0x00001000, 0x00000111, + 0x00000000, 0x01010000, 0x01011111, 0x00010000, // 00f9h + 0x00001000, 0x00001100, 0x00010010, 0x00100001, + 0x00000000, 0x01010010, 0x01111111, 0x00100010, // 00fah + 0x00010010, 0x00000010, 0x00000010, 0x00111100, + 0x00000000, 0x01010001, 0x01010010, 0x00100000, // 00fbh + 0x00100000, 0x00010000, 0x00001000, 0x00000110, + 0x00000000, 0x01011110, 0x01010010, 0x00100110, // 00fch + 0x00111001, 0x00100000, 0x00010000, 0x00001100, + 0x00000000, 0x01010000, 0x01011110, 0x00010000, // 00fdh + 0x01111111, 0x00010000, 0x00010000, 0x00001100, + 0x00000000, 0x00100101, 0x01001010, 0x00101010, // 00feh + 0x00100000, 0x00010000, 0x00001000, 0x00000111, + 0x00000000, 0x01011110, 0x01010000, 0x00111111, // 00ffh + 0x00001000, 0x00001000, 0x00001000, 0x00000110 +}; + + +//---------------------------------------------------------------- +// Palette data +// +const u32 d_PaletteData[8 * 16] = { + 0x00000000, 0x00000000, 0x00000000, 0x00000000, // black + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x001f0000, 0x00000000, 0x00000000, 0x00000000, // red + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x03e00000, 0x00000000, 0x00000000, 0x00000000, // green + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x7c000000, 0x00000000, 0x00000000, 0x00000000, // blue + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x03ff0000, 0x00000000, 0x00000000, 0x00000000, // yellow + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x7c1f0000, 0x00000000, 0x00000000, 0x00000000, // purple + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x7fe00000, 0x00000000, 0x00000000, 0x00000000, // light blue + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00180000, 0x00000000, 0x00000000, 0x00000000, // dark red + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x03000000, 0x00000000, 0x00000000, 0x00000000, // dark green + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x60000000, 0x00000000, 0x00000000, 0x00000000, // dark blue + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x03180000, 0x00000000, 0x00000000, 0x00000000, // dark yellow + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x60180000, 0x00000000, 0x00000000, 0x00000000, // dark purple + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x63000000, 0x00000000, 0x00000000, 0x00000000, // dark light blue + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x56b50000, 0x00000000, 0x00000000, 0x00000000, // gray + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x2d6b0000, 0x00000000, 0x00000000, 0x00000000, // dark gray + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x7fff0000, 0x00000000, 0x00000000, 0x00000000, // white + 0x00000000, 0x00000000, 0x00000000, 0x00000000 +}; diff --git a/build/debugsoft/MakerTitle/TitleList/src/main.c b/build/debugsoft/MakerTitle/TitleList/src/main.c new file mode 100644 index 00000000..0ce708a2 --- /dev/null +++ b/build/debugsoft/MakerTitle/TitleList/src/main.c @@ -0,0 +1,267 @@ +/*---------------------------------------------------------------------------* + Project: TwlSDK - demos - yasuda - MenuTest + File: main.c + + Copyright 2003 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$ + *---------------------------------------------------------------------------*/ +#ifdef SDK_TWL +#include +#else +#include +#endif +#include +#include +#include "font.h" +#include "screen.h" +#include "appmain.h" +#include "mycode.h" // MakeŎ͂̃t@C. + +static void myInit(void); +static void myVBlankIntr(void); +static void InitializeAllocateSystem(void); +static void PrintBootType(void); + +extern BOOL PubDataAccessTest(void); + +/*---------------------------------------------------------------------------* + Name: NitroMain + + Description: main + + Arguments: None. + + Returns: None. + *---------------------------------------------------------------------------*/ +#ifdef SDK_TWL +void TwlMain(void) +#else +void NitroMain(void) +#endif +{ + u16 trigger; + u16 preButton = PAD_Read(); + u16 button; + + //---------------- initialize + myInit(); + PrintBootType(); + + ClearSubScreen(); + + //---------------- main loop + while (TRUE) + { + button = PAD_Read(); + trigger = (u16)((button ^ preButton) & button); + preButton = button; + + //---- clear screen buffer + ClearScreen(); + + if(trigger & PAD_BUTTON_A) + { + DoWritingTest(); + } + if(trigger & PAD_BUTTON_B) + { + DoReadingTest(); + } + + if((trigger & PAD_BUTTON_X) && STD_StrCmp("4KAA", MYCODE) == 0) + { + DeleteSaveDatas(); + } + + + //---- display menus + // DisplayMenuSet(); + + //---- press UP key (toggle menu) +/* if(trigger & PAD_KEY_UP) + { + ChangeMenuItem(MENU_ITEM_UP); + } + + if(trigger & PAD_KEY_DOWN) + { + ChangeMenuItem(MENU_ITEM_DOWN); + } + if(trigger & PAD_KEY_RIGHT) + { + ExecMenuItemRight(); + } + if(trigger & PAD_KEY_LEFT) + { + ExecMenuItemLeft(); + } + + //---- push A + if (trigger & PAD_BUTTON_A) + { + ExecMenuItem(); + } + //---- push B + if (trigger & PAD_BUTTON_B) + { + ExecMenuItemB(); + } + //---- push X + if (trigger & PAD_BUTTON_X) + { + ExecMenuItemX(); + }*/ + + DrawScreen(); + + OS_WaitVBlankIntr(); + } +} + +//---------------------------------------------------------------- +// myInit +// +void myInit(void) +{ + //---- init + OS_Init(); + OS_InitTick(); + OS_InitAlarm(); + RTC_Init(); + FX_Init(); + GX_Init(); + GX_DispOff(); + GXS_DispOff(); + InitializeAllocateSystem(); + + //---- init displaying + GX_SetBankForLCDC(GX_VRAM_LCDC_ALL); + MI_CpuClearFast((void *)HW_LCDC_VRAM, HW_LCDC_VRAM_SIZE); + (void)GX_DisableBankForLCDC(); + + MI_CpuFillFast((void *)HW_OAM, 192, HW_OAM_SIZE); + MI_CpuClearFast((void *)HW_PLTT, HW_PLTT_SIZE); + MI_CpuFillFast((void *)HW_DB_OAM, 192, HW_DB_OAM_SIZE); + MI_CpuClearFast((void *)HW_DB_PLTT, HW_DB_PLTT_SIZE); + + //---- setting 2D for top screen + GX_SetBankForBG(GX_VRAM_BG_128_A); + + G2_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256, + GX_BG_COLORMODE_16, + GX_BG_SCRBASE_0xf800, GX_BG_CHARBASE_0x00000, GX_BG_EXTPLTT_01); + G2_SetBG0Priority(0); + G2_BG0Mosaic(FALSE); + GX_SetGraphicsMode(GX_DISPMODE_GRAPHICS, GX_BGMODE_0, GX_BG0_AS_2D); + GX_SetVisiblePlane(GX_PLANEMASK_BG0); + + GX_LoadBG0Char(d_CharData, 0, sizeof(d_CharData)); + GX_LoadBGPltt(d_PaletteData, 0, sizeof(d_PaletteData)); + + + + //---- setting 2D for bottom screen + GX_SetBankForSubBG(GX_VRAM_SUB_BG_128_C); + + G2S_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256, + GX_BG_COLORMODE_16, + GX_BG_SCRBASE_0xf800, GX_BG_CHARBASE_0x00000, GX_BG_EXTPLTT_01); + G2S_SetBG0Priority(0); + G2S_BG0Mosaic(FALSE); + GXS_SetGraphicsMode(GX_BGMODE_0); + GXS_SetVisiblePlane(GX_PLANEMASK_BG0); + + GXS_LoadBG0Char(d_CharData, 0, sizeof(d_CharData)); + GXS_LoadBGPltt(d_PaletteData, 0, sizeof(d_PaletteData)); + + + //---- screen + MI_CpuFillFast((void *)gScreen, 0, sizeof(gScreen)); + DC_FlushRange(gScreen, sizeof(gScreen)); + /* DMAIOWX^փANZX̂ŃLbV Wait ͕sv */ + // DC_WaitWriteBufferEmpty(); + GX_LoadBG0Scr(&gScreen[0], 0, sizeof(gScreen) / 2); + GXS_LoadBG0Scr(&gScreen[1], 0, sizeof(gScreen) / 2); + + //---- init interrupt + OS_SetIrqFunction(OS_IE_V_BLANK, myVBlankIntr); + (void)OS_EnableIrqMask(OS_IE_V_BLANK); + (void)GX_VBlankIntr(TRUE); + (void)OS_EnableIrq(); + (void)OS_EnableInterrupts(); + + //---- FileSystemInit + (void)OS_EnableIrqMask(OS_IE_SPFIFO_RECV); + FS_Init( FS_DMA_NOT_USE ); + + //---- start displaying + GX_DispOn(); + GXS_DispOn(); +} + +//---------------------------------------------------------------- +// myVBlankIntr +// vblank interrupt handler +// +static void myVBlankIntr(void) +{ + //---- upload pseudo screen to VRAM + DC_FlushRange(gScreen, sizeof(gScreen)); + /* DMAIOWX^փANZX̂ŃLbV Wait ͕sv */ + // DC_WaitWriteBufferEmpty(); + GX_LoadBG0Scr(&gScreen[0], 0, sizeof(gScreen) / 2); + GXS_LoadBG0Scr(&gScreen[1], 0, sizeof(gScreen) / 2); + + + OS_SetIrqCheckFlag(OS_IE_V_BLANK); +} + +/*---------------------------------------------------------------------------* + Name: InitializeAllocateSystem + + Description: C̃A[iɂăăVXeB + + Arguments: None. + + Returns: None. + *---------------------------------------------------------------------------*/ +static void InitializeAllocateSystem(void) +{ + void *tempLo; + OSHeapHandle hh; + + tempLo = OS_InitAlloc(OS_ARENA_MAIN, OS_GetMainArenaLo(), OS_GetMainArenaHi(), 1); + OS_SetArenaLo(OS_ARENA_MAIN, tempLo); + hh = OS_CreateHeap(OS_ARENA_MAIN, OS_GetMainArenaLo(), OS_GetMainArenaHi()); + if (hh < 0) + { + OS_Panic("ARM9: Fail to create heap...\n"); + } + hh = OS_SetCurrentHeap(OS_ARENA_MAIN, hh); +} + +static void PrintBootType(void) +{ + const OSBootType btype = OS_GetBootType(); + + switch( btype ) + { + case OS_BOOTTYPE_ROM: OS_TPrintf("OS_GetBootType = OS_BOOTTYPE_ROM\n"); break; + case OS_BOOTTYPE_NAND: OS_TPrintf("OS_GetBootType = OS_BOOTTYPE_NAND\n"); break; + default: + { + OS_Warning("unknown BootType(=%d)", btype); + } + break; + } +} + diff --git a/build/debugsoft/MakerTitle/TitleList/src/screen.c b/build/debugsoft/MakerTitle/TitleList/src/screen.c new file mode 100644 index 00000000..562bfe5a --- /dev/null +++ b/build/debugsoft/MakerTitle/TitleList/src/screen.c @@ -0,0 +1,124 @@ +/*---------------------------------------------------------------------------* + Project: TwlSDK - demos - os - reset-1 + File: font.c + + Copyright 2003 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$ + *---------------------------------------------------------------------------*/ +#ifdef SDK_TWL +#include +#else +#include +#endif +#include "screen.h" + +u16 gScreen[2][32 * 32]; + +// ** these code are refer to rtc sample. thanks. +/*---------------------------------------------------------------------------* + Name: ClearScreen + + Description: clear screen buffer + + Arguments: None. + + Returns: None. + *---------------------------------------------------------------------------*/ +void ClearScreen(void) +{ + MI_CpuClearFast((void *)gScreen[0], sizeof(gScreen) / 2); +} + +void ClearSubScreen(void) +{ + MI_CpuClearFast((void *)gScreen[1], sizeof(gScreen) / 2); +} + +/*---------------------------------------------------------------------------* + Name: PrintString + + Description: enter string into screen buffer + string must be within 32 chars + + Arguments: x : x + y : y + palette : color (0-15) + text : string. end mark is NULL + + Returns: None. + *---------------------------------------------------------------------------*/ +void PrintString(s16 x, s16 y, u8 palette, char *text, ...) +{ + va_list vlist; + char temp[32 + 2], *tempPtr; + s32 i; + u16 *p, *pLimit; + u32 index = (u32)(y / 24); + y = (s16)(y % 24); + + va_start(vlist, text); + (void)vsnprintf(temp, 33, text, vlist); + va_end(vlist); + + *(u16 *)(&temp[32]) = 0; + + p = &gScreen[index][((y * 32) + x) % (32 * 32)]; + pLimit = &gScreen[index][32 * 32]; + + tempPtr = &temp[0]; + + for (i = 0; *tempPtr; i++, tempPtr++) + { + *p = (u16)((palette << 12) | *tempPtr); + if (++p >= pLimit) + { + p = &gScreen[index][0]; + } + } +} + +/*---------------------------------------------------------------------------* + Name: ColorString + + Description: change string color which is put in screen buffer + + Arguments: x : x + y : y + length : number of characters to change color + palette : color (0-15) + + Returns: None. + *---------------------------------------------------------------------------*/ +void ColorString(s16 x, s16 y, s16 length, u8 palette) +{ + s32 i; + u16 *p, *pLimit; + u32 index = (u32)(y / 24); + y = (s16)(y % 24); + if (length < 0) + return; + p = &gScreen[index][((y * 32) + x) % (32 * 32)]; + pLimit = &gScreen[index][32 * 32]; + + for (i = 0; i < length; i++) + { + u16 temp = *p; + temp &= 0x0fff; + temp |= (palette << 12); + *p = temp; + + if (++p >= pLimit) + { + p = &gScreen[index][0]; + } + } +}