mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
nishimoto @ PSEG1
デバッグ用 ApplicationJump テストに異常系チェック用アプリを追加 git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2336 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
8057b1c4df
commit
4185610505
49
build/debugsoft/ApplicationJump/Card-anotherID/Makefile
Normal file
49
build/debugsoft/ApplicationJump/Card-anotherID/Makefile
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#! 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
|
||||||
|
|
||||||
|
TARGET_BIN = appjumpTestForCard_AID.srl
|
||||||
|
INCDIR = ../include
|
||||||
|
SRCDIR = ./src ../src
|
||||||
|
SRCS = main.c screen.c font.c common.c
|
||||||
|
|
||||||
|
ROM_SPEC = appjumptest_card.rsf
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||||
|
|
||||||
|
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||||
|
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||||
|
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/ApplicationJumpTest
|
||||||
|
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
do-build: $(TARGETS)
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
LIBSYSCALL = ./461A/libsyscall.a
|
||||||
|
|
||||||
|
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||||
|
|
||||||
|
#===== End of Makefile =====
|
||||||
@ -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 "AppJmpTestC"
|
||||||
|
|
||||||
|
#
|
||||||
|
# MAKER CODE: Your company ID# in 2 ascii words
|
||||||
|
# issued by NINTENDO
|
||||||
|
#
|
||||||
|
MakerCode 01
|
||||||
|
|
||||||
|
#
|
||||||
|
# REMASTER VERSION: Mastering version
|
||||||
|
#
|
||||||
|
RomVersion 0
|
||||||
|
|
||||||
|
#
|
||||||
|
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||||
|
#
|
||||||
|
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||||
|
|
||||||
|
#
|
||||||
|
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||||
|
#
|
||||||
|
#RomSize 256M
|
||||||
|
|
||||||
|
#
|
||||||
|
# ROM PADDING: TRUE if finalrom
|
||||||
|
#
|
||||||
|
#RomFootPadding TRUE
|
||||||
|
|
||||||
|
#
|
||||||
|
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||||
|
#
|
||||||
|
RomHeaderTemplate ./461A/rom_header_430a.template.sbin
|
||||||
|
|
||||||
|
#
|
||||||
|
# BANNER FILE: generated from Banner Spec File
|
||||||
|
#
|
||||||
|
BannerFile $(TWLSDK_ROOT)/include/twl/specfiles/default.bnr
|
||||||
|
|
||||||
|
#
|
||||||
|
# Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||||
|
#
|
||||||
|
PermitLandingNormalJump TRUE
|
||||||
|
|
||||||
|
#
|
||||||
|
# Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||||
|
#
|
||||||
|
#PermitLandingTmpJump FALSE
|
||||||
|
|
||||||
|
###
|
||||||
|
### Setting for TWL
|
||||||
|
###
|
||||||
|
|
||||||
|
#
|
||||||
|
# ROM HEADER Ltd: Provided to every product by NINTENDO
|
||||||
|
#
|
||||||
|
RomHeaderLtd $(TWLSDK_ROOT)/tools/bin/rom_header.LTD.sbin
|
||||||
|
|
||||||
|
#
|
||||||
|
# Digest parameters:
|
||||||
|
#
|
||||||
|
DigestParam 1024 32
|
||||||
|
|
||||||
|
#
|
||||||
|
# WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD
|
||||||
|
# MAP2_BB_HYB/MAP2_BB_LTD/MAP2_TS_HYB/MAP2_TS_LTD]
|
||||||
|
# don't have to edit
|
||||||
|
#
|
||||||
|
WramMapping $(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 GameCard
|
||||||
|
|
||||||
|
#
|
||||||
|
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||||
|
#
|
||||||
|
GameCode 461A
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
}
|
||||||
BIN
build/debugsoft/ApplicationJump/Card-anotherID/banner/banner.bnr
Normal file
BIN
build/debugsoft/ApplicationJump/Card-anotherID/banner/banner.bnr
Normal file
Binary file not shown.
313
build/debugsoft/ApplicationJump/Card-anotherID/src/main.c
Normal file
313
build/debugsoft/ApplicationJump/Card-anotherID/src/main.c
Normal file
@ -0,0 +1,313 @@
|
|||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Project: TwlSDK - tests - appjumpTest - Card
|
||||||
|
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 "common.h"
|
||||||
|
#include "screen.h"
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
変数 定義
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
// キー入力
|
||||||
|
static KeyInfo gKey;
|
||||||
|
|
||||||
|
// アプリ間パラメータ
|
||||||
|
static AppParam gAppParam;
|
||||||
|
// アプリ間パラメータとして文字列をセットするかどうか
|
||||||
|
static BOOL gIsSetDelArg = TRUE;
|
||||||
|
// アプリ間パラメータとして引き渡された文字列を格納するバッファ(6つまで)
|
||||||
|
static char gStrAppParam[6][APPJUMP_STRING_LENGTH + 1] ATTRIBUTE_ALIGN(32);
|
||||||
|
// アプリ間パラメータとして引き渡された文字列の個数
|
||||||
|
static int gArgc;
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Prototype
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn);
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
void TwlMain(void)
|
||||||
|
{
|
||||||
|
OSDeliverArgInfo argInfo;
|
||||||
|
|
||||||
|
int result;
|
||||||
|
int argSize =sizeof(u32);
|
||||||
|
|
||||||
|
InitCommon();
|
||||||
|
InitScreen();
|
||||||
|
|
||||||
|
GX_DispOn();
|
||||||
|
GXS_DispOn();
|
||||||
|
|
||||||
|
ClearScreen();
|
||||||
|
|
||||||
|
// キー入力情報取得の空呼び出し(IPL での A ボタン押下対策)
|
||||||
|
ReadKey(&gKey);
|
||||||
|
|
||||||
|
OS_InitDeliverArgInfo(&argInfo, sizeof(AppParam));
|
||||||
|
OS_DecodeDeliverArg();
|
||||||
|
|
||||||
|
/* アプリ間パラメータ(バイナリデータの取得) */
|
||||||
|
if ( OS_DELIVER_ARG_SUCCESS != (result = OS_GetBinaryFromDeliverArg( &gAppParam, &argSize, sizeof(AppParam))) )
|
||||||
|
{
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: READ_ERROR (%d)", result);
|
||||||
|
|
||||||
|
OS_WaitVBlankIntr();
|
||||||
|
OS_Terminate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* アプリ間パラメータ(文字列)の取得 */
|
||||||
|
if ((gArgc = OS_GetDeliverArgc()) > 0)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
OS_TPrintf("argc = %d\n", gArgc);
|
||||||
|
|
||||||
|
for (i=0; i < gArgc && i < 6; i++)
|
||||||
|
{
|
||||||
|
STD_StrLCpy(gStrAppParam[i], (const char*)OS_GetDeliverArgv(i + 1), APPJUMP_STRING_LENGTH);
|
||||||
|
gStrAppParam[i][APPJUMP_STRING_LENGTH] = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
while(TRUE)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
// 自動テスト中に、ユーザのキー入力による終了指示を受け付けるためにウエイトを入れる
|
||||||
|
if (gAppParam.isAutoJump == 1)
|
||||||
|
{
|
||||||
|
OSTick tick = OS_GetTick();
|
||||||
|
|
||||||
|
PutMainScreen(1, 9, 0xf8, "executing auto app jump...");
|
||||||
|
PutMainScreen(1, 11, 0xff, "wait 2 seconds...");
|
||||||
|
PutMainScreen(1, 13, 0xff, "START: quit auto app jump");
|
||||||
|
do {
|
||||||
|
ReadKey(&gKey);
|
||||||
|
|
||||||
|
if (gKey.trg & PAD_BUTTON_START)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
OS_WaitVBlankIntr();
|
||||||
|
} while (OS_TicksToSeconds(OS_GetTick() - tick) < 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// キー入力情報取得
|
||||||
|
ReadKey(&gKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 画面クリア
|
||||||
|
ClearScreen();
|
||||||
|
|
||||||
|
// メイン画面描画
|
||||||
|
PutMainScreen(0, 2, 0xf4, " ****** This APP is CARD ****** ");
|
||||||
|
PutMainScreen(0, 5, 0xff, " APP JUMP : %u times ", gAppParam.jumpCount);
|
||||||
|
PutMainScreen(0, 7, 0xff, " DELIVERED PARAM (recent 6 app)");
|
||||||
|
|
||||||
|
for (i=0; i<gArgc; i++)
|
||||||
|
{
|
||||||
|
if ( i==0 )
|
||||||
|
{
|
||||||
|
PutMainScreen(2, 8, 0xf2, "%d : %s", i+1, gStrAppParam[i]); // 最新の履歴のみ色をつける
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PutMainScreen(2, 8+i, 0xff, "%d : %s", i+1, gStrAppParam[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// サブ画面描画
|
||||||
|
PutSubScreen(0, 0, 0xf4, " ------- APP JUMP TEST -------- ");
|
||||||
|
|
||||||
|
if (gIsSetDelArg)
|
||||||
|
{
|
||||||
|
PutSubScreen(0, 2, 0xf8, " DELIVER ARG: ON");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PutSubScreen(0, 2, 0xff, " DELIVER ARG: OFF");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gAppParam.isAutoJump)
|
||||||
|
{
|
||||||
|
PutSubScreen(0, 4, 0xf8, " AUTO JUMP TEST: ON");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PutSubScreen(0, 4, 0xff, " AUTO JUMP TEST: OFF");
|
||||||
|
}
|
||||||
|
|
||||||
|
PutSubScreen(0, 14, 0xf4, " ------------------------------- ");
|
||||||
|
PutSubScreen(0, 16, 0xff, " A: JUMP TO NAND-1 APP");
|
||||||
|
PutSubScreen(0, 17, 0xff, " Y: JUMP TO NAND-2 APP");
|
||||||
|
PutSubScreen(0, 18, 0xff, " X: JUMP TO SELF");
|
||||||
|
PutSubScreen(0, 19, 0xff, " B: RETURN JUMP");
|
||||||
|
|
||||||
|
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
||||||
|
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
||||||
|
|
||||||
|
if (gKey.trg & PAD_KEY_DOWN)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else if (gKey.trg & PAD_KEY_UP)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gKey.trg & PAD_BUTTON_START)
|
||||||
|
{
|
||||||
|
// 自動テストフラグをスイッチ
|
||||||
|
gAppParam.isAutoJump ^= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gKey.trg & PAD_BUTTON_A)
|
||||||
|
{
|
||||||
|
AddDeliverArg(&argInfo, FALSE);
|
||||||
|
// NAND-1 アプリへジャンプ
|
||||||
|
if( !OS_DoApplicationJump( NANDAPP1_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||||
|
{
|
||||||
|
OS_TPrintf("Failed to Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (gKey.trg & PAD_BUTTON_Y)
|
||||||
|
{
|
||||||
|
AddDeliverArg(&argInfo, FALSE);
|
||||||
|
|
||||||
|
// NAND-2 アプリへジャンプ
|
||||||
|
if ( !OS_DoApplicationJump( NANDAPP2_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||||
|
{
|
||||||
|
OS_TPrintf("Failed to Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (gKey.trg & PAD_BUTTON_X || gAppParam.isAutoJump == 1)
|
||||||
|
{
|
||||||
|
AddDeliverArg(&argInfo, FALSE);
|
||||||
|
// 自分自身へジャンプ
|
||||||
|
if( !OS_DoApplicationJump( OS_GetTitleId(), OS_APP_JUMP_NORMAL ))
|
||||||
|
{
|
||||||
|
OS_TPrintf("Failed to Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (gKey.trg & PAD_BUTTON_B)
|
||||||
|
{
|
||||||
|
AddDeliverArg(&argInfo, TRUE);
|
||||||
|
// ジャンプ元のアプリへ戻る
|
||||||
|
if ( !OS_ReturnToPrevApplication() )
|
||||||
|
{
|
||||||
|
OS_TPrintf("Failed to Return Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
||||||
|
{
|
||||||
|
// アプリ間パラメータとして文字列を引き渡すかどうかのフラグを ON/OFF する
|
||||||
|
gIsSetDelArg = !gIsSetDelArg;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vブランク待ち
|
||||||
|
OS_WaitVBlankIntr();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vブランク待ち 最後に画面を更新してから終了
|
||||||
|
OS_WaitVBlankIntr();
|
||||||
|
OS_Terminate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Name: AddDeliverArg
|
||||||
|
|
||||||
|
Description: アプリジャンプ先へ引き渡すパラメータを追加。
|
||||||
|
|
||||||
|
Arguments: argInfo :
|
||||||
|
isReturn : ジャンプ元への復帰ならば TRUE
|
||||||
|
|
||||||
|
Returns: None.
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn)
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
char argument[APPJUMP_STRING_LENGTH + 1];
|
||||||
|
gAppParam.jumpCount++;
|
||||||
|
|
||||||
|
OS_InitDeliverArgInfo(argInfo, sizeof(AppParam));
|
||||||
|
|
||||||
|
// アプリジャンプ回数を +1 してセット
|
||||||
|
result = OS_SetBinaryToDeliverArg( &(gAppParam), sizeof(AppParam) );
|
||||||
|
|
||||||
|
if(result != OS_DELIVER_ARG_SUCCESS)
|
||||||
|
{
|
||||||
|
OS_Warning("Failed to Set DeliverArgument.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gIsSetDelArg)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
// 文字列をセット
|
||||||
|
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||||
|
if (isReturn)
|
||||||
|
{
|
||||||
|
STD_TSPrintf(argument, "Returned from CARD");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
STD_TSPrintf(argument, "Jumped from CARD");
|
||||||
|
}
|
||||||
|
OS_SetStringToDeliverArg(argument);
|
||||||
|
|
||||||
|
// 今まで引き渡されたパラメータ文字列を引き継がせる
|
||||||
|
for (i=0; i <= 4 && i < gArgc; i++)
|
||||||
|
{
|
||||||
|
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||||
|
STD_StrLCpy( argument, gStrAppParam[i], APPJUMP_STRING_LENGTH );
|
||||||
|
result = OS_SetStringToDeliverArg(argument);
|
||||||
|
OS_TPrintf("arg = %s : result = %d\n", argument, result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
OS_EncodeDeliverArg();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Name: VBlankIntr
|
||||||
|
|
||||||
|
Description: Vブランク割込みハンドラ。
|
||||||
|
|
||||||
|
Arguments: None.
|
||||||
|
|
||||||
|
Returns: None.
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
void VBlankIntr(void)
|
||||||
|
{
|
||||||
|
// テキスト表示を更新
|
||||||
|
UpdateScreen();
|
||||||
|
|
||||||
|
// IRQ チェックフラグをセット
|
||||||
|
OS_SetIrqCheckFlag(OS_IE_V_BLANK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
End of file
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
47
build/debugsoft/ApplicationJump/Card-fail/Makefile
Normal file
47
build/debugsoft/ApplicationJump/Card-fail/Makefile
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#! 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
|
||||||
|
|
||||||
|
TARGET_BIN = appjumpTestForCard_Fail.srl
|
||||||
|
INCDIR = ../include
|
||||||
|
SRCDIR = ./src ../src
|
||||||
|
SRCS = main.c screen.c font.c common.c
|
||||||
|
|
||||||
|
ROM_SPEC = appjumptest_card.rsf
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||||
|
|
||||||
|
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||||
|
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||||
|
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/ApplicationJumpTest
|
||||||
|
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
do-build: $(TARGETS)
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
LIBSYSCALL = ./460A/libsyscall.a
|
||||||
|
|
||||||
|
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||||
|
|
||||||
|
#===== End of Makefile =====
|
||||||
243
build/debugsoft/ApplicationJump/Card-fail/appjumptest_card.rsf
Normal file
243
build/debugsoft/ApplicationJump/Card-fail/appjumptest_card.rsf
Normal file
@ -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 "AppJmpTestC"
|
||||||
|
|
||||||
|
#
|
||||||
|
# MAKER CODE: Your company ID# in 2 ascii words
|
||||||
|
# issued by NINTENDO
|
||||||
|
#
|
||||||
|
MakerCode 01
|
||||||
|
|
||||||
|
#
|
||||||
|
# REMASTER VERSION: Mastering version
|
||||||
|
#
|
||||||
|
RomVersion 0
|
||||||
|
|
||||||
|
#
|
||||||
|
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||||
|
#
|
||||||
|
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||||
|
|
||||||
|
#
|
||||||
|
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||||
|
#
|
||||||
|
#RomSize 256M
|
||||||
|
|
||||||
|
#
|
||||||
|
# ROM PADDING: TRUE if finalrom
|
||||||
|
#
|
||||||
|
#RomFootPadding TRUE
|
||||||
|
|
||||||
|
#
|
||||||
|
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||||
|
#
|
||||||
|
RomHeaderTemplate ./460A/rom_header_430a.template.sbin
|
||||||
|
|
||||||
|
#
|
||||||
|
# BANNER FILE: generated from Banner Spec File
|
||||||
|
#
|
||||||
|
BannerFile $(TWLSDK_ROOT)/include/twl/specfiles/default.bnr
|
||||||
|
|
||||||
|
#
|
||||||
|
# Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||||
|
#
|
||||||
|
PermitLandingNormalJump FALSE
|
||||||
|
|
||||||
|
#
|
||||||
|
# Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||||
|
#
|
||||||
|
#PermitLandingTmpJump FALSE
|
||||||
|
|
||||||
|
###
|
||||||
|
### Setting for TWL
|
||||||
|
###
|
||||||
|
|
||||||
|
#
|
||||||
|
# ROM HEADER Ltd: Provided to every product by NINTENDO
|
||||||
|
#
|
||||||
|
RomHeaderLtd $(TWLSDK_ROOT)/tools/bin/rom_header.LTD.sbin
|
||||||
|
|
||||||
|
#
|
||||||
|
# Digest parameters:
|
||||||
|
#
|
||||||
|
DigestParam 1024 32
|
||||||
|
|
||||||
|
#
|
||||||
|
# WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD
|
||||||
|
# MAP2_BB_HYB/MAP2_BB_LTD/MAP2_TS_HYB/MAP2_TS_LTD]
|
||||||
|
# don't have to edit
|
||||||
|
#
|
||||||
|
WramMapping $(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 GameCard
|
||||||
|
|
||||||
|
#
|
||||||
|
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||||
|
#
|
||||||
|
GameCode 460A
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
}
|
||||||
BIN
build/debugsoft/ApplicationJump/Card-fail/banner/banner.bnr
Normal file
BIN
build/debugsoft/ApplicationJump/Card-fail/banner/banner.bnr
Normal file
Binary file not shown.
313
build/debugsoft/ApplicationJump/Card-fail/src/main.c
Normal file
313
build/debugsoft/ApplicationJump/Card-fail/src/main.c
Normal file
@ -0,0 +1,313 @@
|
|||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Project: TwlSDK - tests - appjumpTest - Card
|
||||||
|
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 "common.h"
|
||||||
|
#include "screen.h"
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
変数 定義
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
// キー入力
|
||||||
|
static KeyInfo gKey;
|
||||||
|
|
||||||
|
// アプリ間パラメータ
|
||||||
|
static AppParam gAppParam;
|
||||||
|
// アプリ間パラメータとして文字列をセットするかどうか
|
||||||
|
static BOOL gIsSetDelArg = TRUE;
|
||||||
|
// アプリ間パラメータとして引き渡された文字列を格納するバッファ(6つまで)
|
||||||
|
static char gStrAppParam[6][APPJUMP_STRING_LENGTH + 1] ATTRIBUTE_ALIGN(32);
|
||||||
|
// アプリ間パラメータとして引き渡された文字列の個数
|
||||||
|
static int gArgc;
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Prototype
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn);
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
void TwlMain(void)
|
||||||
|
{
|
||||||
|
OSDeliverArgInfo argInfo;
|
||||||
|
|
||||||
|
int result;
|
||||||
|
int argSize =sizeof(u32);
|
||||||
|
|
||||||
|
InitCommon();
|
||||||
|
InitScreen();
|
||||||
|
|
||||||
|
GX_DispOn();
|
||||||
|
GXS_DispOn();
|
||||||
|
|
||||||
|
ClearScreen();
|
||||||
|
|
||||||
|
// キー入力情報取得の空呼び出し(IPL での A ボタン押下対策)
|
||||||
|
ReadKey(&gKey);
|
||||||
|
|
||||||
|
OS_InitDeliverArgInfo(&argInfo, sizeof(AppParam));
|
||||||
|
OS_DecodeDeliverArg();
|
||||||
|
|
||||||
|
/* アプリ間パラメータ(バイナリデータの取得) */
|
||||||
|
if ( OS_DELIVER_ARG_SUCCESS != (result = OS_GetBinaryFromDeliverArg( &gAppParam, &argSize, sizeof(AppParam))) )
|
||||||
|
{
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: READ_ERROR (%d)", result);
|
||||||
|
|
||||||
|
OS_WaitVBlankIntr();
|
||||||
|
OS_Terminate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* アプリ間パラメータ(文字列)の取得 */
|
||||||
|
if ((gArgc = OS_GetDeliverArgc()) > 0)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
OS_TPrintf("argc = %d\n", gArgc);
|
||||||
|
|
||||||
|
for (i=0; i < gArgc && i < 6; i++)
|
||||||
|
{
|
||||||
|
STD_StrLCpy(gStrAppParam[i], (const char*)OS_GetDeliverArgv(i + 1), APPJUMP_STRING_LENGTH);
|
||||||
|
gStrAppParam[i][APPJUMP_STRING_LENGTH] = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
while(TRUE)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
// 自動テスト中に、ユーザのキー入力による終了指示を受け付けるためにウエイトを入れる
|
||||||
|
if (gAppParam.isAutoJump == 1)
|
||||||
|
{
|
||||||
|
OSTick tick = OS_GetTick();
|
||||||
|
|
||||||
|
PutMainScreen(1, 9, 0xf8, "executing auto app jump...");
|
||||||
|
PutMainScreen(1, 11, 0xff, "wait 2 seconds...");
|
||||||
|
PutMainScreen(1, 13, 0xff, "START: quit auto app jump");
|
||||||
|
do {
|
||||||
|
ReadKey(&gKey);
|
||||||
|
|
||||||
|
if (gKey.trg & PAD_BUTTON_START)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
OS_WaitVBlankIntr();
|
||||||
|
} while (OS_TicksToSeconds(OS_GetTick() - tick) < 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// キー入力情報取得
|
||||||
|
ReadKey(&gKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 画面クリア
|
||||||
|
ClearScreen();
|
||||||
|
|
||||||
|
// メイン画面描画
|
||||||
|
PutMainScreen(0, 2, 0xf4, " ****** This APP is CARD ****** ");
|
||||||
|
PutMainScreen(0, 5, 0xff, " APP JUMP : %u times ", gAppParam.jumpCount);
|
||||||
|
PutMainScreen(0, 7, 0xff, " DELIVERED PARAM (recent 6 app)");
|
||||||
|
|
||||||
|
for (i=0; i<gArgc; i++)
|
||||||
|
{
|
||||||
|
if ( i==0 )
|
||||||
|
{
|
||||||
|
PutMainScreen(2, 8, 0xf2, "%d : %s", i+1, gStrAppParam[i]); // 最新の履歴のみ色をつける
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PutMainScreen(2, 8+i, 0xff, "%d : %s", i+1, gStrAppParam[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// サブ画面描画
|
||||||
|
PutSubScreen(0, 0, 0xf4, " ------- APP JUMP TEST -------- ");
|
||||||
|
|
||||||
|
if (gIsSetDelArg)
|
||||||
|
{
|
||||||
|
PutSubScreen(0, 2, 0xf8, " DELIVER ARG: ON");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PutSubScreen(0, 2, 0xff, " DELIVER ARG: OFF");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gAppParam.isAutoJump)
|
||||||
|
{
|
||||||
|
PutSubScreen(0, 4, 0xf8, " AUTO JUMP TEST: ON");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PutSubScreen(0, 4, 0xff, " AUTO JUMP TEST: OFF");
|
||||||
|
}
|
||||||
|
|
||||||
|
PutSubScreen(0, 14, 0xf4, " ------------------------------- ");
|
||||||
|
PutSubScreen(0, 16, 0xff, " A: JUMP TO NAND-1 APP");
|
||||||
|
PutSubScreen(0, 17, 0xff, " Y: JUMP TO NAND-2 APP");
|
||||||
|
PutSubScreen(0, 18, 0xff, " X: JUMP TO SELF");
|
||||||
|
PutSubScreen(0, 19, 0xff, " B: RETURN JUMP");
|
||||||
|
|
||||||
|
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
||||||
|
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
||||||
|
|
||||||
|
if (gKey.trg & PAD_KEY_DOWN)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else if (gKey.trg & PAD_KEY_UP)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gKey.trg & PAD_BUTTON_START)
|
||||||
|
{
|
||||||
|
// 自動テストフラグをスイッチ
|
||||||
|
gAppParam.isAutoJump ^= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gKey.trg & PAD_BUTTON_A)
|
||||||
|
{
|
||||||
|
AddDeliverArg(&argInfo, FALSE);
|
||||||
|
// NAND-1 アプリへジャンプ
|
||||||
|
if( !OS_DoApplicationJump( NANDAPP1_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||||
|
{
|
||||||
|
OS_TPrintf("Failed to Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (gKey.trg & PAD_BUTTON_Y)
|
||||||
|
{
|
||||||
|
AddDeliverArg(&argInfo, FALSE);
|
||||||
|
|
||||||
|
// NAND-2 アプリへジャンプ
|
||||||
|
if ( !OS_DoApplicationJump( NANDAPP2_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||||
|
{
|
||||||
|
OS_TPrintf("Failed to Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (gKey.trg & PAD_BUTTON_X || gAppParam.isAutoJump == 1)
|
||||||
|
{
|
||||||
|
AddDeliverArg(&argInfo, FALSE);
|
||||||
|
// 自分自身へジャンプ
|
||||||
|
if( !OS_DoApplicationJump( OS_GetTitleId(), OS_APP_JUMP_NORMAL ))
|
||||||
|
{
|
||||||
|
OS_TPrintf("Failed to Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (gKey.trg & PAD_BUTTON_B)
|
||||||
|
{
|
||||||
|
AddDeliverArg(&argInfo, TRUE);
|
||||||
|
// ジャンプ元のアプリへ戻る
|
||||||
|
if ( !OS_ReturnToPrevApplication() )
|
||||||
|
{
|
||||||
|
OS_TPrintf("Failed to Return Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
||||||
|
{
|
||||||
|
// アプリ間パラメータとして文字列を引き渡すかどうかのフラグを ON/OFF する
|
||||||
|
gIsSetDelArg = !gIsSetDelArg;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vブランク待ち
|
||||||
|
OS_WaitVBlankIntr();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vブランク待ち 最後に画面を更新してから終了
|
||||||
|
OS_WaitVBlankIntr();
|
||||||
|
OS_Terminate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Name: AddDeliverArg
|
||||||
|
|
||||||
|
Description: アプリジャンプ先へ引き渡すパラメータを追加。
|
||||||
|
|
||||||
|
Arguments: argInfo :
|
||||||
|
isReturn : ジャンプ元への復帰ならば TRUE
|
||||||
|
|
||||||
|
Returns: None.
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn)
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
char argument[APPJUMP_STRING_LENGTH + 1];
|
||||||
|
gAppParam.jumpCount++;
|
||||||
|
|
||||||
|
OS_InitDeliverArgInfo(argInfo, sizeof(AppParam));
|
||||||
|
|
||||||
|
// アプリジャンプ回数を +1 してセット
|
||||||
|
result = OS_SetBinaryToDeliverArg( &(gAppParam), sizeof(AppParam) );
|
||||||
|
|
||||||
|
if(result != OS_DELIVER_ARG_SUCCESS)
|
||||||
|
{
|
||||||
|
OS_Warning("Failed to Set DeliverArgument.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gIsSetDelArg)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
// 文字列をセット
|
||||||
|
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||||
|
if (isReturn)
|
||||||
|
{
|
||||||
|
STD_TSPrintf(argument, "Returned from CARD");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
STD_TSPrintf(argument, "Jumped from CARD");
|
||||||
|
}
|
||||||
|
OS_SetStringToDeliverArg(argument);
|
||||||
|
|
||||||
|
// 今まで引き渡されたパラメータ文字列を引き継がせる
|
||||||
|
for (i=0; i <= 4 && i < gArgc; i++)
|
||||||
|
{
|
||||||
|
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||||
|
STD_StrLCpy( argument, gStrAppParam[i], APPJUMP_STRING_LENGTH );
|
||||||
|
result = OS_SetStringToDeliverArg(argument);
|
||||||
|
OS_TPrintf("arg = %s : result = %d\n", argument, result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
OS_EncodeDeliverArg();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Name: VBlankIntr
|
||||||
|
|
||||||
|
Description: Vブランク割込みハンドラ。
|
||||||
|
|
||||||
|
Arguments: None.
|
||||||
|
|
||||||
|
Returns: None.
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
void VBlankIntr(void)
|
||||||
|
{
|
||||||
|
// テキスト表示を更新
|
||||||
|
UpdateScreen();
|
||||||
|
|
||||||
|
// IRQ チェックフラグをセット
|
||||||
|
OS_SetIrqCheckFlag(OS_IE_V_BLANK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
End of file
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
@ -23,6 +23,8 @@
|
|||||||
// キー入力
|
// キー入力
|
||||||
static KeyInfo gKey;
|
static KeyInfo gKey;
|
||||||
|
|
||||||
|
// B ボタンジャンプ先の切りかえフラグ
|
||||||
|
static u8 gJumpTypeForB = JUMPTYPE_RETURN;
|
||||||
// アプリ間パラメータ
|
// アプリ間パラメータ
|
||||||
static AppParam gAppParam;
|
static AppParam gAppParam;
|
||||||
// アプリ間パラメータとして文字列をセットするかどうか
|
// アプリ間パラメータとして文字列をセットするかどうか
|
||||||
@ -157,16 +159,37 @@ void TwlMain(void)
|
|||||||
PutSubScreen(0, 16, 0xff, " A: JUMP TO NAND-1 APP");
|
PutSubScreen(0, 16, 0xff, " A: JUMP TO NAND-1 APP");
|
||||||
PutSubScreen(0, 17, 0xff, " Y: JUMP TO NAND-2 APP");
|
PutSubScreen(0, 17, 0xff, " Y: JUMP TO NAND-2 APP");
|
||||||
PutSubScreen(0, 18, 0xff, " X: JUMP TO SELF");
|
PutSubScreen(0, 18, 0xff, " X: JUMP TO SELF");
|
||||||
PutSubScreen(0, 19, 0xff, " B: RETURN JUMP");
|
switch (gJumpTypeForB)
|
||||||
|
{
|
||||||
|
case JUMPTYPE_RETURN:
|
||||||
|
PutSubScreen(0, 18, 0xff, " B: RETURN JUMP");
|
||||||
|
break;
|
||||||
|
case JUMPTYPE_ANOTHER_CARD:
|
||||||
|
break;
|
||||||
|
case JUMPTYPE_SYSMENU:
|
||||||
|
PutSubScreen(0, 18, 0xff, " B: JUMP TO SYSMENU)";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
PutSubScreen(0, 20, 0xff, " UP DOWN: SWITCH JUMP TYPE (B) ");
|
||||||
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
||||||
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
||||||
|
|
||||||
if (gKey.trg & PAD_KEY_DOWN)
|
if (gKey.trg & PAD_KEY_DOWN)
|
||||||
{
|
{
|
||||||
|
if ( gJumpTypeForB == JUMPTYPE_RETURN )
|
||||||
|
{
|
||||||
|
gJumpTypeForB = JUMPTYPE_NUM - 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gJumpTypeForB--;
|
||||||
}
|
}
|
||||||
else if (gKey.trg & PAD_KEY_UP)
|
else if (gKey.trg & PAD_KEY_UP)
|
||||||
{
|
{
|
||||||
|
if ( ++gJumpTypeForB >= JUMPTYPE_NUM )
|
||||||
|
{
|
||||||
|
gJumpTypeForB = JUMPTYPE_RETURN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gKey.trg & PAD_BUTTON_START)
|
if (gKey.trg & PAD_BUTTON_START)
|
||||||
@ -212,13 +235,21 @@ void TwlMain(void)
|
|||||||
if (gKey.trg & PAD_BUTTON_B)
|
if (gKey.trg & PAD_BUTTON_B)
|
||||||
{
|
{
|
||||||
AddDeliverArg(&argInfo, TRUE);
|
AddDeliverArg(&argInfo, TRUE);
|
||||||
// ジャンプ元のアプリへ戻る
|
switch (gJumpTypeForB)
|
||||||
if ( !OS_ReturnToPrevApplication() )
|
{
|
||||||
{
|
case JUMPTYPE_RETURN:
|
||||||
OS_TPrintf("Failed to Return Jump.\n");
|
if ( !OS_ReturnToPrevApplication() )
|
||||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
{
|
||||||
|
OS_TPrintf("Failed to Return Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case JUMPTYPE_ANOTHER_CARD:
|
||||||
|
break;
|
||||||
|
case JUMPTYPE_SYSMENU:
|
||||||
|
OS_JumpToSystemMenu();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
# in whole or in part, without the prior written consent of Nintendo.
|
# in whole or in part, without the prior written consent of Nintendo.
|
||||||
#
|
#
|
||||||
# $Date:: $
|
# $Date:: $
|
||||||
# $Rev:$
|
# $Rev$
|
||||||
# $Author:$
|
# $Author$
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
TARGET_PLATFORM = TWL
|
TARGET_PLATFORM = TWL
|
||||||
|
|
||||||
@ -23,7 +23,9 @@ include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
|||||||
|
|
||||||
SUBDIRS = Card \
|
SUBDIRS = Card \
|
||||||
Nand-1 \
|
Nand-1 \
|
||||||
Nand-2
|
Nand-2
|
||||||
|
# Card-fail \
|
||||||
|
# Card-anotherID
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@ -1,305 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Project: TwlSDK - arg-1
|
|
||||||
File: main.c
|
|
||||||
|
|
||||||
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 <nitro.h>
|
|
||||||
#include <twl.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include <twl/os/common/msJump.h>
|
|
||||||
|
|
||||||
#include "screen.h"
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
定数 定義
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
#define KEY_REPEAT_START 25 // キーリピート開始までのフレーム数
|
|
||||||
#define KEY_REPEAT_SPAN 10 // キーリピートの間隔フレーム数
|
|
||||||
|
|
||||||
//ジャンプ先
|
|
||||||
const char destinationName[21][32] ={
|
|
||||||
"PAGE_1",
|
|
||||||
"??????",
|
|
||||||
"PAGE_2",
|
|
||||||
"PAGE_3",
|
|
||||||
"PAGE_4",
|
|
||||||
"APP_MANAGER",
|
|
||||||
"WIRELESS",
|
|
||||||
"BRIGHTNESS",
|
|
||||||
"USER INFO",
|
|
||||||
"DATE",
|
|
||||||
"TIME",
|
|
||||||
"ALARM",
|
|
||||||
"TP_CALIBRATION",
|
|
||||||
"LANGUAGE",
|
|
||||||
"PARENTAL_CONTROL",
|
|
||||||
"NETWORK SETTING",
|
|
||||||
"NETWORK EURA",
|
|
||||||
"NETWORK OPTION",
|
|
||||||
"COUNTRY",
|
|
||||||
"SYSTEM UPDATE",
|
|
||||||
"SYSTEM INITIALIZE",
|
|
||||||
};
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
構造体 定義
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
// キー入力情報
|
|
||||||
typedef struct KeyInfo
|
|
||||||
{
|
|
||||||
u16 cnt; // 未加工入力値
|
|
||||||
u16 trg; // 押しトリガ入力
|
|
||||||
u16 up; // 離しトリガ入力
|
|
||||||
u16 rep; // 押し維持リピート入力
|
|
||||||
} KeyInfo;
|
|
||||||
|
|
||||||
// キー入力
|
|
||||||
static KeyInfo gKey;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Prototype
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
static void VBlankIntr(void);
|
|
||||||
static void InitInterrupts(void);
|
|
||||||
static void InitHeap(void);
|
|
||||||
|
|
||||||
static void ReadKey(KeyInfo* pKey);
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void TwlMain(void)
|
|
||||||
{
|
|
||||||
u8 argNum = 0;
|
|
||||||
|
|
||||||
OS_Init();
|
|
||||||
OS_InitTick();
|
|
||||||
OS_InitAlarm();
|
|
||||||
GX_Init();
|
|
||||||
GX_DispOff();
|
|
||||||
GXS_DispOff();
|
|
||||||
|
|
||||||
InitHeap();
|
|
||||||
InitScreen();
|
|
||||||
InitInterrupts();
|
|
||||||
|
|
||||||
GX_DispOn();
|
|
||||||
GXS_DispOn();
|
|
||||||
|
|
||||||
ClearScreen();
|
|
||||||
|
|
||||||
// キー入力情報取得の空呼び出し(IPL での A ボタン押下対策)
|
|
||||||
ReadKey(&gKey);
|
|
||||||
|
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
// キー入力情報取得
|
|
||||||
ReadKey(&gKey);
|
|
||||||
|
|
||||||
// メイン画面クリア
|
|
||||||
ClearScreen();
|
|
||||||
|
|
||||||
PutSubScreen(0, 0, 0xff, "SETTING JUMP DEMO");
|
|
||||||
PutSubScreen(0, 15, 0xff, "UP/DOWN: SELECT DESTINATION");
|
|
||||||
PutSubScreen(0, 16, 0xff, " A: JUMP TO DESTINATION");
|
|
||||||
PutSubScreen(0, 17, 0xff, " Y: JUMP TO EULA");
|
|
||||||
PutSubScreen(0, 18, 0xff, " X: JUMP TO APP MANAGER");
|
|
||||||
PutSubScreen(0, 19, 0xff, " B: JUMP TO NET SETTING");
|
|
||||||
PutSubScreen(0, 20, 0xff, " R: JUMP TO UPDATE");
|
|
||||||
|
|
||||||
PutSubScreen(0, 2, 0xff, "DESTINATION: %s", destinationName[argNum]);
|
|
||||||
|
|
||||||
if (gKey.trg & PAD_KEY_DOWN)
|
|
||||||
{
|
|
||||||
if (argNum < 20) argNum++;
|
|
||||||
}
|
|
||||||
else if (gKey.trg & PAD_KEY_UP)
|
|
||||||
{
|
|
||||||
if (argNum > 0) argNum--;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gKey.trg & PAD_BUTTON_A)
|
|
||||||
{
|
|
||||||
if( OSi_JumpToMachineSetting( argNum ) == FALSE )
|
|
||||||
{
|
|
||||||
OS_Panic("Failed to Jump.");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (gKey.trg & PAD_BUTTON_Y)
|
|
||||||
{
|
|
||||||
if( OSi_JumpToEulaDirect() == FALSE )
|
|
||||||
{
|
|
||||||
OS_Panic("Failed to Jump.");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (gKey.trg & PAD_BUTTON_X)
|
|
||||||
{
|
|
||||||
if( OSi_JumpToApplicationManagerDirect() == FALSE )
|
|
||||||
{
|
|
||||||
OS_Panic("Failed to Jump.");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (gKey.trg & PAD_BUTTON_B)
|
|
||||||
{
|
|
||||||
if( OSi_JumpToNetworkSettngDirect() == FALSE )
|
|
||||||
{
|
|
||||||
OS_Panic("Failed to Jump.");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (gKey.trg & PAD_BUTTON_R)
|
|
||||||
{
|
|
||||||
if( OSi_JumpToSystemUpdateDirect() == FALSE )
|
|
||||||
{
|
|
||||||
OS_Panic("Failed to Jump.");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Vブランク待ち ( スレッド対応 )
|
|
||||||
OS_WaitVBlankIntr();
|
|
||||||
}
|
|
||||||
|
|
||||||
OS_Terminate();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Name: VBlankIntr
|
|
||||||
|
|
||||||
Description: Vブランク割込みハンドラ。
|
|
||||||
|
|
||||||
Arguments: None.
|
|
||||||
|
|
||||||
Returns: None.
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
static void VBlankIntr(void)
|
|
||||||
{
|
|
||||||
// テキスト表示を更新
|
|
||||||
UpdateScreen();
|
|
||||||
|
|
||||||
// IRQ チェックフラグをセット
|
|
||||||
OS_SetIrqCheckFlag(OS_IE_V_BLANK);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Name: InitInterrupts
|
|
||||||
|
|
||||||
Description: 割り込み設定を初期化する。
|
|
||||||
V ブランク割り込みを許可し、割り込みハンドラを設定する。
|
|
||||||
|
|
||||||
Arguments: None.
|
|
||||||
|
|
||||||
Returns: None.
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
static void InitInterrupts(void)
|
|
||||||
{
|
|
||||||
// V ブランク割り込み設定
|
|
||||||
OS_SetIrqFunction(OS_IE_V_BLANK, VBlankIntr);
|
|
||||||
(void)OS_EnableIrqMask(OS_IE_V_BLANK);
|
|
||||||
(void)GX_VBlankIntr(TRUE);
|
|
||||||
|
|
||||||
// 割り込み許可
|
|
||||||
(void)OS_EnableIrq();
|
|
||||||
(void)OS_EnableInterrupts();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Name: InitHeap
|
|
||||||
|
|
||||||
Description: メインメモリ上のアリーナにてメモリ割当てシステムを初期化する。
|
|
||||||
|
|
||||||
Arguments: None.
|
|
||||||
|
|
||||||
Returns: None.
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
static void InitHeap(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");
|
|
||||||
}
|
|
||||||
(void)OS_SetCurrentHeap(OS_ARENA_MAIN, hh);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Name: ReadKey
|
|
||||||
|
|
||||||
Description: キー入力情報を取得し、入力情報構造体を編集する。
|
|
||||||
押しトリガ、離しトリガ、押し継続リピートトリガ を検出する。
|
|
||||||
|
|
||||||
Arguments: pKey - 編集するキー入力情報構造体を指定する。
|
|
||||||
|
|
||||||
Returns: None.
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
static void ReadKey(KeyInfo* pKey)
|
|
||||||
{
|
|
||||||
static u16 repeat_count[12];
|
|
||||||
int i;
|
|
||||||
u16 r;
|
|
||||||
|
|
||||||
r = PAD_Read();
|
|
||||||
pKey->trg = 0x0000;
|
|
||||||
pKey->up = 0x0000;
|
|
||||||
pKey->rep = 0x0000;
|
|
||||||
|
|
||||||
for (i = 0; i < 12; i++)
|
|
||||||
{
|
|
||||||
if (r & (0x0001 << i))
|
|
||||||
{
|
|
||||||
if (!(pKey->cnt & (0x0001 << i)))
|
|
||||||
{
|
|
||||||
pKey->trg |= (0x0001 << i); // 押しトリガ
|
|
||||||
repeat_count[i] = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (repeat_count[i] > KEY_REPEAT_START)
|
|
||||||
{
|
|
||||||
pKey->rep |= (0x0001 << i); // 押し継続リピート
|
|
||||||
repeat_count[i] = (u16) (KEY_REPEAT_START - KEY_REPEAT_SPAN);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
repeat_count[i]++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (pKey->cnt & (0x0001 << i))
|
|
||||||
{
|
|
||||||
pKey->up |= (0x0001 << i); // 離しトリガ
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pKey->cnt = r; // 未加工キー入力
|
|
||||||
}
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
End of file
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
@ -23,6 +23,8 @@
|
|||||||
// キー入力
|
// キー入力
|
||||||
static KeyInfo gKey;
|
static KeyInfo gKey;
|
||||||
|
|
||||||
|
// B ボタンジャンプ先の切りかえフラグ
|
||||||
|
static u8 gJumpTypeForB = JUMPTYPE_RETURN;
|
||||||
// アプリ間パラメータ
|
// アプリ間パラメータ
|
||||||
static AppParam gAppParam;
|
static AppParam gAppParam;
|
||||||
// アプリ間パラメータとして文字列をセットするかどうか
|
// アプリ間パラメータとして文字列をセットするかどうか
|
||||||
@ -153,20 +155,43 @@ void TwlMain(void)
|
|||||||
PutSubScreen(0, 4, 0xff, " AUTO JUMP TEST: OFF");
|
PutSubScreen(0, 4, 0xff, " AUTO JUMP TEST: OFF");
|
||||||
}
|
}
|
||||||
|
|
||||||
PutSubScreen(0, 14, 0xf5, " ------------------------------- ");
|
PutSubScreen(0, 13, 0xf5, " ------------------------------- ");
|
||||||
PutSubScreen(0, 16, 0xff, " A: JUMP TO CARD APP");
|
PutSubScreen(0, 15, 0xff, " A: JUMP TO CARD APP");
|
||||||
PutSubScreen(0, 17, 0xff, " Y: JUMP TO NAND-2 APP");
|
PutSubScreen(0, 16, 0xff, " Y: JUMP TO NAND-2 APP");
|
||||||
PutSubScreen(0, 18, 0xff, " X: JUMP TO SELF");
|
PutSubScreen(0, 17, 0xff, " X: JUMP TO SELF");
|
||||||
PutSubScreen(0, 19, 0xff, " B: RETURN JUMP");
|
|
||||||
|
switch (gJumpTypeForB)
|
||||||
|
{
|
||||||
|
case JUMPTYPE_RETURN:
|
||||||
|
PutSubScreen(0, 18, 0xff, " B: RETURN JUMP");
|
||||||
|
break;
|
||||||
|
case JUMPTYPE_ANOTHER_CARD:
|
||||||
|
PutSubScreen(0, 18, 0xfe, " B: JUMP TO CARD APP");
|
||||||
|
break;
|
||||||
|
case JUMPTYPE_SYSMENU:
|
||||||
|
PutSubScreen(0, 18, 0xff, " B: JUMP TO SYSMENU)";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
PutSubScreen(0, 20, 0xff, " UP DOWN: SWITCH JUMP TYPE (B) ");
|
||||||
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
||||||
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
||||||
|
|
||||||
if (gKey.trg & PAD_KEY_DOWN)
|
if (gKey.trg & PAD_KEY_DOWN)
|
||||||
{
|
{
|
||||||
|
if ( gJumpTypeForB == JUMPTYPE_RETURN )
|
||||||
|
{
|
||||||
|
gJumpTypeForB = JUMPTYPE_NUM - 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gJumpTypeForB--;
|
||||||
}
|
}
|
||||||
else if (gKey.trg & PAD_KEY_UP)
|
else if (gKey.trg & PAD_KEY_UP)
|
||||||
{
|
{
|
||||||
|
if ( ++gJumpTypeForB >= JUMPTYPE_NUM )
|
||||||
|
{
|
||||||
|
gJumpTypeForB = JUMPTYPE_RETURN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gKey.trg & PAD_BUTTON_START)
|
if (gKey.trg & PAD_BUTTON_START)
|
||||||
@ -186,6 +211,7 @@ void TwlMain(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gKey.trg & PAD_BUTTON_Y)
|
if (gKey.trg & PAD_BUTTON_Y)
|
||||||
{
|
{
|
||||||
AddDeliverArg(&argInfo, FALSE);
|
AddDeliverArg(&argInfo, FALSE);
|
||||||
@ -212,12 +238,27 @@ void TwlMain(void)
|
|||||||
if (gKey.trg & PAD_BUTTON_B)
|
if (gKey.trg & PAD_BUTTON_B)
|
||||||
{
|
{
|
||||||
AddDeliverArg(&argInfo, TRUE);
|
AddDeliverArg(&argInfo, TRUE);
|
||||||
if ( !OS_ReturnToPrevApplication() )
|
|
||||||
{
|
switch (gJumpTypeForB)
|
||||||
OS_TPrintf("Failed to Return Jump.\n");
|
{
|
||||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
case JUMPTYPE_RETURN:
|
||||||
}
|
if ( !OS_ReturnToPrevApplication() )
|
||||||
break;
|
{
|
||||||
|
OS_TPrintf("Failed to Return Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case JUMPTYPE_ANOTHER_CARD:
|
||||||
|
if ( !OS_DoApplicationJump(CARDAPP_ANO_TITLEID, OS_APP_JUMP_NORMAL) )
|
||||||
|
{
|
||||||
|
OS_TPrintf("Failed to Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case JUMPTYPE_SYSMENU:
|
||||||
|
OS_JumpToSystemMenu();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
||||||
|
|||||||
@ -20,9 +20,13 @@
|
|||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
変数 定義
|
変数 定義
|
||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// キー入力
|
// キー入力
|
||||||
static KeyInfo gKey;
|
static KeyInfo gKey;
|
||||||
|
|
||||||
|
|
||||||
|
// B ボタンジャンプ先の切りかえフラグ
|
||||||
|
static u8 gJumpTypeForB = JUMPTYPE_RETURN;
|
||||||
// アプリ間パラメータ
|
// アプリ間パラメータ
|
||||||
static AppParam gAppParam;
|
static AppParam gAppParam;
|
||||||
// アプリ間パラメータとして文字列をセットするかどうか
|
// アプリ間パラメータとして文字列をセットするかどうか
|
||||||
@ -157,16 +161,39 @@ void TwlMain(void)
|
|||||||
PutSubScreen(0, 16, 0xff, " A: JUMP TO CARD APP");
|
PutSubScreen(0, 16, 0xff, " A: JUMP TO CARD APP");
|
||||||
PutSubScreen(0, 17, 0xff, " Y: JUMP TO NAND-1 APP");
|
PutSubScreen(0, 17, 0xff, " Y: JUMP TO NAND-1 APP");
|
||||||
PutSubScreen(0, 18, 0xff, " X: JUMP TO SELF");
|
PutSubScreen(0, 18, 0xff, " X: JUMP TO SELF");
|
||||||
PutSubScreen(0, 19, 0xff, " B: RETURN JUMP");
|
|
||||||
|
switch (gJumpTypeForB)
|
||||||
|
{
|
||||||
|
case JUMPTYPE_RETURN:
|
||||||
|
PutSubScreen(0, 18, 0xff, " B: RETURN JUMP");
|
||||||
|
break;
|
||||||
|
case JUMPTYPE_ANOTHER_CARD:
|
||||||
|
PutSubScreen(0, 18, 0xfe, " B: JUMP TO CARD APP");
|
||||||
|
break;
|
||||||
|
case JUMPTYPE_SYSMENU:
|
||||||
|
PutSubScreen(0, 18, 0xff, " B: JUMP TO SYSMENU)";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
PutSubScreen(0, 20, 0xff, " UP DOWN: SWITCH JUMP TYPE (B) ");
|
||||||
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
||||||
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
||||||
|
|
||||||
if (gKey.trg & PAD_KEY_DOWN)
|
if (gKey.trg & PAD_KEY_DOWN)
|
||||||
{
|
{
|
||||||
|
if ( gJumpTypeForB == JUMPTYPE_RETURN )
|
||||||
|
{
|
||||||
|
gJumpTypeForB = JUMPTYPE_NUM - 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gJumpTypeForB--;
|
||||||
}
|
}
|
||||||
else if (gKey.trg & PAD_KEY_UP)
|
else if (gKey.trg & PAD_KEY_UP)
|
||||||
{
|
{
|
||||||
|
if ( ++gJumpTypeForB >= JUMPTYPE_NUM )
|
||||||
|
{
|
||||||
|
gJumpTypeForB = JUMPTYPE_RETURN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gKey.trg & PAD_BUTTON_START)
|
if (gKey.trg & PAD_BUTTON_START)
|
||||||
@ -186,6 +213,7 @@ void TwlMain(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gKey.trg & PAD_BUTTON_Y)
|
if (gKey.trg & PAD_BUTTON_Y)
|
||||||
{
|
{
|
||||||
AddDeliverArg(&argInfo, FALSE);
|
AddDeliverArg(&argInfo, FALSE);
|
||||||
@ -212,12 +240,26 @@ void TwlMain(void)
|
|||||||
if (gKey.trg & PAD_BUTTON_B)
|
if (gKey.trg & PAD_BUTTON_B)
|
||||||
{
|
{
|
||||||
AddDeliverArg(&argInfo, TRUE);
|
AddDeliverArg(&argInfo, TRUE);
|
||||||
if ( !OS_ReturnToPrevApplication() )
|
switch (gJumpTypeForB)
|
||||||
{
|
{
|
||||||
OS_TPrintf("Failed to Return Jump.\n");
|
case JUMPTYPE_RETURN:
|
||||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
if ( !OS_ReturnToPrevApplication() )
|
||||||
}
|
{
|
||||||
break;
|
OS_TPrintf("Failed to Return Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case JUMPTYPE_ANOTHER_CARD:
|
||||||
|
if ( !OS_DoApplicationJump(CARDAPP_ANO_TITLEID, OS_APP_JUMP_NORMAL) )
|
||||||
|
{
|
||||||
|
OS_TPrintf("Failed to Jump.\n");
|
||||||
|
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case JUMPTYPE_SYSMENU:
|
||||||
|
OS_JumpToSystemMenu();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
||||||
|
|||||||
@ -4,11 +4,19 @@ appjumpTest
|
|||||||
========================================================
|
========================================================
|
||||||
|
|
||||||
<概要> ===============================================
|
<概要> ===============================================
|
||||||
2種類のNAND アプリと 1種類のカードアプリで構成されます。
|
2種類のNAND アプリと 3種類のカードアプリで構成されます。
|
||||||
各アプリ間で、アプリジャンプの機能を一通り試すことができます。
|
各アプリ間で、アプリジャンプの機能を一通り試すことができます。
|
||||||
アプリ間でのパラメータの受け渡し、ジャンプ元へのリターンも可能です。
|
アプリ間でのパラメータの受け渡し、ジャンプ元へのリターンも可能です。
|
||||||
|
|
||||||
|
|
||||||
|
3種類のカードアプリについて
|
||||||
|
|
||||||
|
| イニシャルコード | 被ノーマルジャンプ |
|
||||||
|
| 430A | 許可 |
|
||||||
|
| 460A | 不許可 |
|
||||||
|
| 461A | 許可 |
|
||||||
|
---------------------------------------------
|
||||||
|
|
||||||
<使い方> =============================================
|
<使い方> =============================================
|
||||||
2種類のNAND アプリを TWL にインポートした状態で、カードアプリを起動してください。
|
2種類のNAND アプリを TWL にインポートした状態で、カードアプリを起動してください。
|
||||||
|
|
||||||
@ -21,6 +29,19 @@ L/R
|
|||||||
START ボタンを押すと、現在起動中のアプリ自身へのアプリジャンプを自動で繰り返すモードに入ります。
|
START ボタンを押すと、現在起動中のアプリ自身へのアプリジャンプを自動で繰り返すモードに入ります。
|
||||||
中断するには、起動後上画面にメッセージが出ている間(約2秒間)に START ボタンを押してください。
|
中断するには、起動後上画面にメッセージが出ている間(約2秒間)に START ボタンを押してください。
|
||||||
|
|
||||||
|
(2008/08/30 追記)
|
||||||
|
異常系チェックのために、カードアプリを2種追加しました。
|
||||||
|
|
||||||
|
・ひとつめ(460A)について
|
||||||
|
被ノーマルジャンプを許可していない TWL カードアプリです。
|
||||||
|
NAND アプリからこのアプリにジャンプしようとすると、必ずエラーが返るはずです。
|
||||||
|
|
||||||
|
・ふたつめ(461A)について
|
||||||
|
被ノーマルジャンプは許可していますが、最初のカードアプリとは TitleID が別物の TWL カードアプリです。
|
||||||
|
最初に、もう一方のノーマルジャンプを許可しているカードアプリ[430A]をスロットに挿入した状態で
|
||||||
|
テストを開始します。そこから NAND アプリにジャンプした後、カードを[461A] に差し替えます。
|
||||||
|
そして、NAND アプリからカードアプリへノーマルジャンプを実行した際に、ジャンプできるかどうかをチェックします。
|
||||||
|
|
||||||
|
|
||||||
<画面の見方> ==========================================
|
<画面の見方> ==========================================
|
||||||
・上画面について
|
・上画面について
|
||||||
@ -52,4 +73,5 @@ nishimoto_takashi@nintendo.co.jp
|
|||||||
|
|
||||||
|
|
||||||
<更新履歴>============================================
|
<更新履歴>============================================
|
||||||
|
2008/08/30 カードアプリ2種追加について加筆修正
|
||||||
2008/07/31 新規追加
|
2008/07/31 新規追加
|
||||||
|
|||||||
@ -31,6 +31,8 @@ extern "C" {
|
|||||||
|
|
||||||
/* TitleID */
|
/* TitleID */
|
||||||
#define CARDAPP_TITLEID (u64)(0x0003000034333041) // 430A
|
#define CARDAPP_TITLEID (u64)(0x0003000034333041) // 430A
|
||||||
|
#define CARDAPP_ANO_TITLEID (u64)(0x0003000034363041) // 460A
|
||||||
|
|
||||||
#define NANDAPP1_TITLEID (u64)(0x0003000434333141) // 431A
|
#define NANDAPP1_TITLEID (u64)(0x0003000434333141) // 431A
|
||||||
#define NANDAPP2_TITLEID (u64)(0x0003000434333241) // 432A
|
#define NANDAPP2_TITLEID (u64)(0x0003000434333241) // 432A
|
||||||
|
|
||||||
@ -44,6 +46,15 @@ extern "C" {
|
|||||||
構造体 定義
|
構造体 定義
|
||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
typedef enum JumpTypeForB
|
||||||
|
{
|
||||||
|
JUMPTYPE_RETURN = 0,
|
||||||
|
JUMPTYPE_ANOTHER_CARD,
|
||||||
|
JUMPTYPE_SYSMENU,
|
||||||
|
|
||||||
|
JUMPTYPE_NUM
|
||||||
|
} JumpTypeForB;
|
||||||
|
|
||||||
// キー入力情報
|
// キー入力情報
|
||||||
typedef struct KeyInfo
|
typedef struct KeyInfo
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,11 +4,19 @@ appjumpTest
|
|||||||
========================================================
|
========================================================
|
||||||
|
|
||||||
<概要> ===============================================
|
<概要> ===============================================
|
||||||
2種類のNAND アプリと 1種類のカードアプリで構成されます。
|
2種類のNAND アプリと 3種類のカードアプリで構成されます。
|
||||||
各アプリ間で、アプリジャンプの機能を一通り試すことができます。
|
各アプリ間で、アプリジャンプの機能を一通り試すことができます。
|
||||||
アプリ間でのパラメータの受け渡し、ジャンプ元へのリターンも可能です。
|
アプリ間でのパラメータの受け渡し、ジャンプ元へのリターンも可能です。
|
||||||
|
|
||||||
|
|
||||||
|
3種類のカードアプリについて
|
||||||
|
|
||||||
|
| イニシャルコード | 被ノーマルジャンプ |
|
||||||
|
| 430A | 許可 |
|
||||||
|
| 460A | 不許可 |
|
||||||
|
| 461A | 許可 |
|
||||||
|
---------------------------------------------
|
||||||
|
|
||||||
<使い方> =============================================
|
<使い方> =============================================
|
||||||
2種類のNAND アプリを TWL にインポートした状態で、カードアプリを起動してください。
|
2種類のNAND アプリを TWL にインポートした状態で、カードアプリを起動してください。
|
||||||
|
|
||||||
@ -21,6 +29,19 @@ L/R
|
|||||||
START ボタンを押すと、現在起動中のアプリ自身へのアプリジャンプを自動で繰り返すモードに入ります。
|
START ボタンを押すと、現在起動中のアプリ自身へのアプリジャンプを自動で繰り返すモードに入ります。
|
||||||
中断するには、起動後上画面にメッセージが出ている間(約2秒間)に START ボタンを押してください。
|
中断するには、起動後上画面にメッセージが出ている間(約2秒間)に START ボタンを押してください。
|
||||||
|
|
||||||
|
(2008/08/30 追記)
|
||||||
|
異常系チェックのために、カードアプリを2種追加しました。
|
||||||
|
|
||||||
|
・ひとつめ(460A)について
|
||||||
|
被ノーマルジャンプを許可していない TWL カードアプリです。
|
||||||
|
NAND アプリからこのアプリにジャンプしようとすると、必ずエラーが返るはずです。
|
||||||
|
|
||||||
|
・ふたつめ(461A)について
|
||||||
|
被ノーマルジャンプは許可していますが、最初のカードアプリとは TitleID が別物の TWL カードアプリです。
|
||||||
|
最初に、もう一方のノーマルジャンプを許可しているカードアプリ[430A]をスロットに挿入した状態で
|
||||||
|
テストを開始します。そこから NAND アプリにジャンプした後、カードを[461A] に差し替えます。
|
||||||
|
そして、NAND アプリからカードアプリへノーマルジャンプを実行した際に、ジャンプできるかどうかをチェックします。
|
||||||
|
|
||||||
|
|
||||||
<画面の見方> ==========================================
|
<画面の見方> ==========================================
|
||||||
・上画面について
|
・上画面について
|
||||||
@ -52,4 +73,5 @@ nishimoto_takashi@nintendo.co.jp
|
|||||||
|
|
||||||
|
|
||||||
<更新履歴>============================================
|
<更新履歴>============================================
|
||||||
|
2008/08/30 カードアプリ2種追加について加筆修正
|
||||||
2008/07/31 新規追加
|
2008/07/31 新規追加
|
||||||
|
|||||||
BIN
debugsoft/ApplicationJumpTest/appjumpTestForCard.srl
Normal file
BIN
debugsoft/ApplicationJumpTest/appjumpTestForCard.srl
Normal file
Binary file not shown.
BIN
debugsoft/ApplicationJumpTest/appjumpTestForNand1.nand.srl
Normal file
BIN
debugsoft/ApplicationJumpTest/appjumpTestForNand1.nand.srl
Normal file
Binary file not shown.
BIN
debugsoft/ApplicationJumpTest/appjumpTestForNand1.tad
Normal file
BIN
debugsoft/ApplicationJumpTest/appjumpTestForNand1.tad
Normal file
Binary file not shown.
BIN
debugsoft/ApplicationJumpTest/appjumpTestForNand2.nand.srl
Normal file
BIN
debugsoft/ApplicationJumpTest/appjumpTestForNand2.nand.srl
Normal file
Binary file not shown.
BIN
debugsoft/ApplicationJumpTest/appjumpTestForNand2.tad
Normal file
BIN
debugsoft/ApplicationJumpTest/appjumpTestForNand2.tad
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user