From 03c2cb96017c56821db1a15ddd9578429d1672be Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@b08762b0-b915-fc4b-9d8c-17b2551a87ff> Date: Tue, 29 Jul 2008 08:29:55 +0000 Subject: [PATCH] =?UTF-8?q?WiFi=20Icon=20=E7=A2=BA=E8=AA=8D=E7=94=A8?= =?UTF-8?q?=E3=81=AE=E3=82=A2=E3=83=97=E3=83=AA=E3=82=92=E3=82=B3=E3=83=9F?= =?UTF-8?q?=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@2021 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- debugSoft/Wireless/WifiIcon/Makefile | 101 +++++++++++++++++ debugSoft/Wireless/WifiIcon/banner/banner.bnr | Bin 0 -> 9152 bytes debugSoft/Wireless/WifiIcon/readme.txt | 6 + debugSoft/Wireless/WifiIcon/src/main.c | 103 ++++++++++++++++++ 4 files changed, 210 insertions(+) create mode 100644 debugSoft/Wireless/WifiIcon/Makefile create mode 100644 debugSoft/Wireless/WifiIcon/banner/banner.bnr create mode 100644 debugSoft/Wireless/WifiIcon/readme.txt create mode 100644 debugSoft/Wireless/WifiIcon/src/main.c diff --git a/debugSoft/Wireless/WifiIcon/Makefile b/debugSoft/Wireless/WifiIcon/Makefile new file mode 100644 index 00000000..a747fc0e --- /dev/null +++ b/debugSoft/Wireless/WifiIcon/Makefile @@ -0,0 +1,101 @@ +#! make -f +#---------------------------------------------------------------------------- +# Project: TwlSDK - tools - WiFiIcon +# 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$ +#---------------------------------------------------------------------------- + +override TARGET_PLATFORM = TWL +override TARGET_CODEGEN = ARM +override TWL_ARCHGEN = LIMITED + + +#---------------------------------------------------------------------------- +TARGET_PLATFORM := TWL +TWL_ARCHGEN := LIMITED +SRCS = main.c +TARGET_NAME := WiFiIcon +TARGET_BIN := main.tad +TWLNMENU_ROOT ?= . + +TWL_NANDAPP = TRUE + +#------------------------- +#-- バナーデータを生成します +BANNER = ./banner/banner.bnr +BANNERSRC := $(wildcard ./banner/data/Cell/*.nce) +MAKEBANNER = $(TWL_TOOLSDIR)/bin/makebanner.TWL.exe +BANNERCVTR = $(TWL_TOOLSDIR)/bin/bannercvtr.exe + + +#------------------------- +#-- NAND アプリではいくつかのパラメータの指定のために固有の RSF ファイルが必要です。 + +ROM_SPEC = $(TARGET_NAME).autogen.rsf +ROM_SPEC_TEMPLATE = $(ROOT)/include/twl/specfiles/ROM-TS_sys.rsf +ROM_SPEC_PARAM = MakerCode=01 \ + GameCode=4S02 \ + BannerFile=./banner/banner.bnr \ + TitleName=$(TARGET_NAME) \ + Media=NAND \ + WiFiConnectionIcon=TRUE \ + Secure=TRUE +# DSWirelessIcon=TRUE \ + + + +include $(TWLSDK_ROOT)/build/buildtools/commondefs + +#------------------------- +# セキュア用 +MAKEROM := $(TWL_TOOLSDIR)/bin/makerom.TWL.secure.exe +MAKETAD_OPTION := -s + + +#------------------------- +# ビルドパラメータ +INCDIR = $(TWLSYSTEM_ROOT)/include \ + ./include + +#------------------------- +# インストール指定 +#ifeq ($(TWL_BUILD_TYPE),FINALROM) +#INSTALL_DIR = $(TWL_INSTALL_ROOT)/bin/ARM9-TS/Rom +#INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN) +#endif + + +#------------------------- +# ビルド +do-build: $(TARGETS) + +#------------------------- +#-- SRL を作成する前にバナーが作成されるようにします。 + +#ifdef MAKE_BANNER +#$(BINDIR)/$(TARGET_NAME)$(ROM_SPEC_NAME_PART).srl: $(BANNER) +#endif + +#------------------------- +#-- バナー作成用ターゲット + +$(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 + +#===== End of Makefile ===== diff --git a/debugSoft/Wireless/WifiIcon/banner/banner.bnr b/debugSoft/Wireless/WifiIcon/banner/banner.bnr new file mode 100644 index 0000000000000000000000000000000000000000..2a5447a22144fa786a9401bf547b4558de81161d GIT binary patch literal 9152 zcmeHNy-ve05Oyg)QnsiI1HzRMBZI}t!cvJRU}Qk5#6lKk`Vc%oc>)F&o`8YJi7aJm za(w5+ZA?>Aep;k*uD;mux%%S!>?FNwxAS&*K6rk(J64Tlh>{UeW=K0|YchwP&2-PQ z9cHp*7}{t)T7pS4yq)4Ww&wH{!wBsZZEMl4>G1g-&tfEdsoFlz_c zxTJvf&?zwoqp84b@CkXDy8^xj{ux)r?XSbt*7Pb4O{tzIf;l$0LI%up1K_Hp4$tlD zEKbQmWA1fez|^;BHw7H!!f6-sozwCdx|H=LTKR*99_sK3Z6Ay?7!~^01@ql<> zkq0{xdvGq=I}r>C~OZpKAbpv zOMH;W$o`+MfhG5UPL$_V04vwO;$bf4#9^wk(|39{-w^!~uU|=iAfG^s2{f7fg8rZ8 z2bjZyIiWvL7SaE&@)Zg>e>tKDz{eSKG!BUGH zYalOvuD@4vzUKYU95uLg=SRx@e^vK?@8JdSf9^4j!y5EwjvDH(2QI%{VE;3M+%V^f ztNbvp5qban>ib`d{xkE+_dlro&jYT5!rHd!-}e82MR9{o=|59ZC)$d-(RQ>G?M8d+ Gp4U4^q}ql6 literal 0 HcmV?d00001 diff --git a/debugSoft/Wireless/WifiIcon/readme.txt b/debugSoft/Wireless/WifiIcon/readme.txt new file mode 100644 index 00000000..4f4ce4e8 --- /dev/null +++ b/debugSoft/Wireless/WifiIcon/readme.txt @@ -0,0 +1,6 @@ +WiFiIcon + +*概要 +  WiFiアイコン確認用のアプリ。 +  WiFiアイコンのフラグをオンにしてビルドされます。 +  アプリ自身の機能はありません。 diff --git a/debugSoft/Wireless/WifiIcon/src/main.c b/debugSoft/Wireless/WifiIcon/src/main.c new file mode 100644 index 00000000..5d509820 --- /dev/null +++ b/debugSoft/Wireless/WifiIcon/src/main.c @@ -0,0 +1,103 @@ +/*---------------------------------------------------------------------------* + Project: TwlSDK - tools - WiFiIcon + File: main.c + + 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$ + *---------------------------------------------------------------------------*/ +#include + +static void InitInterrupt(void) +{ + OS_EnableIrq(); + OS_EnableInterrupts(); +} + +static void InitAlloc(void) +{ + OSHeapHandle hHeap; + void* lo = OS_GetMainArenaLo(); + void* hi = OS_GetMainArenaHi(); + + lo = OS_InitAlloc(OS_ARENA_MAIN, lo, hi, 1); + OS_SetArenaLo(OS_ARENA_MAIN, lo); + + hHeap = OS_CreateHeap(OS_ARENA_MAIN, lo, hi); + SDK_ASSERT( hHeap >= 0 ); + + OS_SetCurrentHeap(OS_ARENA_MAIN, hHeap); +} + +static void InitInteruptSystem(); + + +void +TwlStartUp() +{ + OS_Init(); + InitAlloc(); +} + + +/*---------------------------------------------------------------------------* + Name: TwlMain + + Description: メイン関数です。 + + Arguments: なし。 + + Returns: なし。 + *---------------------------------------------------------------------------*/ +void TwlMain(void) +{ + InitInteruptSystem(); + + GX_DispOn(); + GXS_DispOn(); + + *(u16*)HW_PLTT = 0x001f << 10; + *(u16*)HW_DB_PLTT = 0x001f << 10; + // ランチャーに戻れるように、 終了しない + for (;;) + { + // フレーム更新。 + { + OS_WaitVBlankIntr(); + } + } + + OS_Terminate(); +} + + +/*---------------------------------------------------------------------------* + Name: InitInteruptSystem + + Description: 割り込みを初期化します。 + + Arguments: なし。 + + Returns: なし。 + *---------------------------------------------------------------------------*/ +static void InitInteruptSystem() +{ + // 個別割り込みフラグを全て不許可に + (void)OS_SetIrqMask(0); + + // マスター割り込みフラグを許可に + (void)OS_EnableIrq(); + + // IRQ 割り込みを許可します + (void)OS_EnableInterrupts(); + + (void)OS_EnableIrqMask(OS_IE_SPFIFO_RECV); +}