mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
WiFi Icon 確認用のアプリをコミット
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2021 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
1e8a33abc7
commit
03c2cb9601
101
debugSoft/Wireless/WifiIcon/Makefile
Normal file
101
debugSoft/Wireless/WifiIcon/Makefile
Normal file
@ -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 =====
|
||||
BIN
debugSoft/Wireless/WifiIcon/banner/banner.bnr
Normal file
BIN
debugSoft/Wireless/WifiIcon/banner/banner.bnr
Normal file
Binary file not shown.
6
debugSoft/Wireless/WifiIcon/readme.txt
Normal file
6
debugSoft/Wireless/WifiIcon/readme.txt
Normal file
@ -0,0 +1,6 @@
|
||||
WiFiIcon
|
||||
|
||||
*概要
|
||||
WiFiアイコン確認用のアプリ。
|
||||
WiFiアイコンのフラグをオンにしてビルドされます。
|
||||
アプリ自身の機能はありません。
|
||||
103
debugSoft/Wireless/WifiIcon/src/main.c
Normal file
103
debugSoft/Wireless/WifiIcon/src/main.c
Normal file
@ -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 <twl.h>
|
||||
|
||||
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);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user