mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/branches/20130304_launcher_save_app_to_sd_kai@3078 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
4a7de1415e
commit
678ced70e8
79
build/debugsoft/AppJumpChecker/Makefile
Normal file
79
build/debugsoft/AppJumpChecker/Makefile
Normal file
@ -0,0 +1,79 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - debugsoft - ApplicationJump
|
||||
# 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
|
||||
|
||||
TWL_NANDAPP = TRUE
|
||||
TARGET_BIN = appJumpChecker.tad
|
||||
|
||||
INCDIR = ./include $(ROOT)/build/libraries/os/common/include
|
||||
SRCDIR = ./src
|
||||
|
||||
SRCS = main.c screen.c font.c common.c
|
||||
|
||||
LLIBRARIES += libes$(TWL_LIBSUFFIX).a \
|
||||
libboc$(TWL_LIBSUFFIX).a \
|
||||
libsfs$(TWL_LIBSUFFIX).a
|
||||
|
||||
#----------------------------------
|
||||
# sea ‚ðŽg—p
|
||||
|
||||
LLIBRARIES += libsea$(TWL_LIBSUFFIX).a
|
||||
|
||||
#----------------------------------
|
||||
# nam ‚ðŽg—p
|
||||
|
||||
LLIBRARIES += libnam$(TWL_LIBSUFFIX).a
|
||||
|
||||
|
||||
ROM_SPEC = appJumpChecker.autogen.rsf
|
||||
ROM_SPEC_TEMPLATE = $(ROOT)/include/twl/specfiles/ROM-TS_sys.rsf
|
||||
|
||||
ROM_SPEC_PARAM = MakerCode=01 \
|
||||
GameCode=456A \
|
||||
NANDAccess=TRUE \
|
||||
Media=NAND \
|
||||
Secure=TRUE \
|
||||
BannerFile=appjumpchecker.bnr \
|
||||
PermitLandingNormalJump=TRUE \
|
||||
WramMapping=MAP_TS_SCR
|
||||
|
||||
COMPONENT_NAME = armadillo
|
||||
MAKEROM_ARM7_BASE = $(TWL_COMPONENTSDIR)/$(COMPONENT_NAME)/$(TWL_BUILDTYPE_ARM7)/$(COMPONENT_NAME)
|
||||
MAKEROM_ARM7 = $(MAKEROM_ARM7_BASE).$(TWL_ELF_EXT)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
MAKEROM := $(TWL_TOOLSDIR)/bin/makerom.TWL.secure.exe
|
||||
MAKETAD_OPTION := -s
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
INSTALL_DIR = ./roms
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
#===== End of Makefile =====
|
||||
|
||||
|
||||
BIN
build/debugsoft/AppJumpChecker/appjumpchecker.bnr
Normal file
BIN
build/debugsoft/AppJumpChecker/appjumpchecker.bnr
Normal file
Binary file not shown.
67
build/debugsoft/AppJumpChecker/include/common.h
Normal file
67
build/debugsoft/AppJumpChecker/include/common.h
Normal file
@ -0,0 +1,67 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest
|
||||
File: common.h
|
||||
|
||||
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$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef COMMON_H_
|
||||
#define COMMON_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
#include <twl.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
定数定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#define KEY_REPEAT_START 25 // キーリピート開始までのフレーム数
|
||||
#define KEY_REPEAT_SPAN 10 // キーリピートの間隔フレーム数
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
構造体 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
// キー入力情報
|
||||
typedef struct KeyInfo
|
||||
{
|
||||
u16 cnt; // 未加工入力値
|
||||
u16 trg; // 押しトリガ入力
|
||||
u16 up; // 離しトリガ入力
|
||||
u16 rep; // 押し維持リピート入力
|
||||
} KeyInfo;
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Prototype
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitCommon(void);
|
||||
|
||||
void ReadKey(KeyInfo* pKey);
|
||||
|
||||
void VBlankIntr(void);
|
||||
|
||||
/*===========================================================================*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* COMMON_H_ */
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
41
build/debugsoft/AppJumpChecker/include/font.h
Normal file
41
build/debugsoft/AppJumpChecker/include/font.h
Normal file
@ -0,0 +1,41 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - WCM - demos - wcm-list-2
|
||||
File: font.h
|
||||
|
||||
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$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef FONT_H_
|
||||
#define FONT_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
#include <nitro/types.h>
|
||||
|
||||
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
|
||||
*---------------------------------------------------------------------------*/
|
||||
49
build/debugsoft/AppJumpChecker/include/screen.h
Normal file
49
build/debugsoft/AppJumpChecker/include/screen.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - WCM - demos - wcm-list-2
|
||||
File: screen.h
|
||||
|
||||
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$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef SCREEN_H_
|
||||
#define SCREEN_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
#include <nitro/types.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
ŠÖ<EFBFBD>” ’è‹`
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitScreen(void);
|
||||
void ClearScreen(void);
|
||||
void ClearMainScreen(void);
|
||||
void ClearSubScreen(void);
|
||||
void PutMainScreen(s32 x, s32 y, u8 palette, char* text, ...);
|
||||
void PutSubScreen(s32 x, s32 y, u8 palette, char* text, ...);
|
||||
void UpdateScreen(void);
|
||||
|
||||
/*===========================================================================*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* SCREEN_H_ */
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
153
build/debugsoft/AppJumpChecker/src/common.c
Normal file
153
build/debugsoft/AppJumpChecker/src/common.c
Normal file
@ -0,0 +1,153 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest
|
||||
File: common.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"
|
||||
|
||||
static void InitInterrupts(void);
|
||||
static void InitHeap(void);
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
関数定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitCommon
|
||||
|
||||
Description: 基本的な初期化関数をここで呼ぶ。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitCommon(void)
|
||||
{
|
||||
OS_Init();
|
||||
OS_InitTick();
|
||||
OS_InitAlarm();
|
||||
GX_Init();
|
||||
GX_DispOff();
|
||||
GXS_DispOff();
|
||||
|
||||
InitHeap();
|
||||
InitInterrupts();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: ReadKey
|
||||
|
||||
Description: キー入力情報を取得し、入力情報構造体を編集する。
|
||||
押しトリガ、離しトリガ、押し継続リピートトリガ を検出する。
|
||||
|
||||
Arguments: pKey - 編集するキー入力情報構造体を指定する。
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
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; // 未加工キー入力
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
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);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
585
build/debugsoft/AppJumpChecker/src/font.c
Normal file
585
build/debugsoft/AppJumpChecker/src/font.c
Normal file
@ -0,0 +1,585 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: NitroWiFi - WCM - demos - wcm-list
|
||||
File: font.c
|
||||
|
||||
Copyright 2005,2006 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.
|
||||
|
||||
$Log: font.c,v $
|
||||
Revision 1.2 2006/03/10 09:22:43 kitase_hirotake
|
||||
INDENT SOURCE
|
||||
|
||||
Revision 1.1 2005/07/21 08:21:06 adachi_hiroaki
|
||||
<EFBFBD>V‹K’ljÁ
|
||||
|
||||
|
||||
$NoKeywords: $
|
||||
*---------------------------------------------------------------------------*/
|
||||
#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
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
493
build/debugsoft/AppJumpChecker/src/main.c
Normal file
493
build/debugsoft/AppJumpChecker/src/main.c
Normal file
@ -0,0 +1,493 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest - Nand-2
|
||||
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/nam.h>
|
||||
#include <twl/os/common/format_rom.h>
|
||||
|
||||
#include "application_jump_private.h"
|
||||
#include "common.h"
|
||||
#include "screen.h"
|
||||
|
||||
#define DMA_NO_FS 1
|
||||
#define TITLE_NUM_CUL 18
|
||||
#define TITLE_NUM_PAGE (TITLE_NUM_CUL * 2)
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
変数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
// キー入力
|
||||
static KeyInfo gKey;
|
||||
|
||||
// インストールされている NAND アプリの数
|
||||
static s32 gNandAppNum;
|
||||
|
||||
// カーソル位置
|
||||
static s32 gCurPos = 0;
|
||||
|
||||
static BOOL gIsExistCard = FALSE;
|
||||
|
||||
// エラー表示用バッファ
|
||||
static char gErrBuf[33];
|
||||
|
||||
// エラー表示時間計測用
|
||||
static OSTick gErrTick = 0;
|
||||
|
||||
typedef struct DataStruct
|
||||
{
|
||||
NAMTitleId id;
|
||||
BOOL normaljmp_flag;
|
||||
} DataStruct;
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Prototype
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void PrintErrMsg(const char* msg);
|
||||
|
||||
static BOOL GetDataStruct(DataStruct* list);
|
||||
static void DrawScene(DataStruct* list);
|
||||
|
||||
static void ConvertTitleIdLo(u8* code, u8* titleid_lo);
|
||||
static void ConvertGameCode(u8* code, u32 game_code);
|
||||
static void ConvertInitialCode(u8* code, u32 titleid_lo);
|
||||
|
||||
static void* AllocForNAM(u32 size);
|
||||
static void FreeForNAM(void* ptr);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
static void PrintErrMsg(const char* msg)
|
||||
{
|
||||
if ( STD_StrLen(msg) > 32 )
|
||||
{
|
||||
OS_Warning("err msg is too long.");
|
||||
return;
|
||||
}
|
||||
|
||||
STD_StrCpy( gErrBuf, msg );
|
||||
gErrTick = OS_GetTick();
|
||||
}
|
||||
|
||||
void TwlMain(void)
|
||||
{
|
||||
DataStruct dataList[TITLE_NUM_PAGE];
|
||||
|
||||
InitCommon();
|
||||
InitScreen();
|
||||
|
||||
GX_DispOn();
|
||||
GXS_DispOn();
|
||||
|
||||
FS_Init(DMA_NO_FS);
|
||||
NAM_Init(AllocForNAM, FreeForNAM);
|
||||
|
||||
ClearScreen();
|
||||
|
||||
// NAND にインポートされているNAND アプリの数を取得する
|
||||
if ( (gNandAppNum = NAM_GetNumTitles()) < 0)
|
||||
{
|
||||
OS_Panic("NAM_GetNumTitles() failed.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
// キー入力情報取得の空呼び出し(IPL での A ボタン押下対策)
|
||||
ReadKey(&gKey);
|
||||
|
||||
// 情報の取得
|
||||
if ( !GetDataStruct(dataList) )
|
||||
{
|
||||
PrintErrMsg("Failed to get dataList.");
|
||||
}
|
||||
|
||||
while(TRUE)
|
||||
{
|
||||
// キー入力情報取得
|
||||
ReadKey(&gKey);
|
||||
|
||||
// カーソルの移動
|
||||
if (gKey.trg & PAD_KEY_DOWN)
|
||||
{
|
||||
gCurPos++;
|
||||
if ( gCurPos >= ( gNandAppNum < TITLE_NUM_PAGE ? gNandAppNum : TITLE_NUM_PAGE) )
|
||||
{
|
||||
gCurPos = 0;
|
||||
}
|
||||
}
|
||||
if (gKey.trg & PAD_KEY_UP)
|
||||
{
|
||||
if ( gCurPos == 0)
|
||||
{
|
||||
if ( gNandAppNum < TITLE_NUM_PAGE )
|
||||
{
|
||||
gCurPos = gNandAppNum - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
gCurPos = TITLE_NUM_PAGE - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gCurPos--;
|
||||
}
|
||||
}
|
||||
|
||||
// 列の移動
|
||||
if ( (gKey.trg & PAD_KEY_RIGHT || gKey.trg & PAD_KEY_LEFT) && gNandAppNum >= TITLE_NUM_CUL )
|
||||
{
|
||||
if ( gCurPos > TITLE_NUM_CUL )
|
||||
{
|
||||
if ( gCurPos - TITLE_NUM_CUL < gNandAppNum )
|
||||
{
|
||||
gCurPos -= TITLE_NUM_CUL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( gCurPos + TITLE_NUM_CUL < gNandAppNum )
|
||||
{
|
||||
gCurPos += TITLE_NUM_CUL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// アプリジャンプの実行
|
||||
if (gKey.trg & PAD_BUTTON_A)
|
||||
{
|
||||
OS_DoApplicationJump(dataList[gCurPos].id, OS_APP_JUMP_NORMAL);
|
||||
// 成功時はここ以降は実行されない
|
||||
PrintErrMsg("Failed to App Jump.");
|
||||
}
|
||||
// 内部関数を使用したアプリジャンプの実行
|
||||
if (gKey.trg & PAD_BUTTON_B)
|
||||
{
|
||||
LauncherBootFlags flag;
|
||||
|
||||
flag.bootType = LAUNCHER_BOOTTYPE_NAND;
|
||||
flag.isValid = TRUE;
|
||||
flag.isLogoSkip = TRUE;
|
||||
flag.isInitialShortcutSkip = FALSE;
|
||||
flag.isAppLoadCompleted = FALSE;
|
||||
flag.isAppRelocate = FALSE;
|
||||
flag.rsv = 0;
|
||||
OS_SetLauncherParamAndResetHardware(dataList[gCurPos].id, &flag);
|
||||
// 成功時はここ以降は実行されない
|
||||
PrintErrMsg("Failed to App Jump(force).");
|
||||
}
|
||||
|
||||
// カードアプリへのアプリジャンプ試行
|
||||
if (gKey.trg & PAD_BUTTON_Y)
|
||||
{
|
||||
CARDRomHeader* rh;
|
||||
// u64 titleId;
|
||||
rh = (CARDRomHeader*)CARD_GetRomHeader();
|
||||
|
||||
// TWL アプリの場合
|
||||
if ( rh->product_id & 0x03 || rh->product_id & 0x02 ) // 刺さっているカードのロムが TWLアプリ
|
||||
{
|
||||
ROM_Header* rh2;
|
||||
rh2 = (ROM_Header*)HW_TWL_CARD_ROM_HEADER_BUF;
|
||||
|
||||
OS_DoApplicationJump( rh2->s.titleID, OS_APP_JUMP_NORMAL);
|
||||
}
|
||||
|
||||
// titleId = (0x00030000 << 32) | rh->game_code;
|
||||
// NITRO カードアプリなら失敗(特殊なものでない限り TitleID が設定されていないため)
|
||||
|
||||
PrintErrMsg("Failed to App Jump.");
|
||||
}
|
||||
|
||||
// エラー表示判定
|
||||
if ( OS_TicksToSeconds(OS_GetTick() - gErrTick) > 3 )
|
||||
{
|
||||
PrintErrMsg(" ");
|
||||
}
|
||||
|
||||
// 画面描画
|
||||
DrawScene(dataList);
|
||||
|
||||
// Vブランク待ち
|
||||
OS_WaitVBlankIntr();
|
||||
|
||||
// 画面クリア
|
||||
ClearScreen();
|
||||
}
|
||||
|
||||
// Vブランク待ち 最後に画面を更新してから終了
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
static BOOL GetDataStruct(DataStruct* list)
|
||||
{
|
||||
// 36個分のタイトルIDリストバッファ
|
||||
NAMTitleId titleIdList[TITLE_NUM_PAGE];
|
||||
s32 i;
|
||||
FSFile fp;
|
||||
|
||||
if ( NAM_GetTitleList(titleIdList, TITLE_NUM_PAGE) != NAM_OK )
|
||||
{
|
||||
PrintErrMsg("NAM_GetTitleList failed.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// データリストの作成(1ページ分)
|
||||
for ( i=0; i<TITLE_NUM_PAGE; i++, list++)
|
||||
{
|
||||
ROM_Header_Short rh;
|
||||
char pathbuf[FS_ENTRY_LONGNAME_MAX + 32];
|
||||
|
||||
// そもそも NAND アプリの数が 1ページにも満たない場合は途中で終了する
|
||||
if ( i >= gNandAppNum )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// TitleID の格納
|
||||
list->id = titleIdList[i];
|
||||
|
||||
// ノーマルジャンプをされるのを許可するかを表すフラグの取得
|
||||
// TitleID を見て、タイトル種別がデータタイトルならば
|
||||
// そもそも ROMヘッダが存在しない、アプリジャンプをする必要もない
|
||||
if ( !NAM_IsDataTitle(list->id) )
|
||||
{
|
||||
// アプリ本体へのパスを取得
|
||||
if ( NAM_GetTitleBootContentPath(pathbuf, list->id) != NAM_OK )
|
||||
{
|
||||
PrintErrMsg("GetContentPath failed.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// アプリのファイルオープン
|
||||
FS_InitFile(&fp);
|
||||
if ( !FS_OpenFileEx(&fp, pathbuf, FS_FILEMODE_R) )
|
||||
{
|
||||
// 失敗時はエラーコード出力で終了
|
||||
PrintErrMsg("FS_OpenFileEx failed.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( -1 == FS_ReadFile(&fp, &rh, sizeof(ROM_Header_Short) ))
|
||||
{
|
||||
PrintErrMsg("FS_ReadFile failed.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
list->normaljmp_flag = rh.permit_landing_normal_jump;
|
||||
|
||||
FS_CloseFile(&fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
list->normaljmp_flag = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
PrintErrMsg(" ");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void DrawScene(DataStruct* list)
|
||||
{
|
||||
s32 i;
|
||||
u8 init_code[5], titleid_lo[5];
|
||||
|
||||
// 上画面
|
||||
PutMainScreen( 0, 1, 0xff, " ------ App Jump Checker ------ ");
|
||||
|
||||
PutMainScreen( 0, 3, 0xff, " total app : %d", gNandAppNum);
|
||||
|
||||
PutMainScreen( 0, 5, 0xff, " ------------------------------ ");
|
||||
|
||||
PutMainScreen( 0, 7, 0xff, " A : try App Jump (to NAND)" );
|
||||
PutMainScreen( 0, 8, 0xfe, " B : try App Jump (force) " );
|
||||
PutMainScreen( 0, 9, 0xff, " Y : try App Jump (to CARD)" );
|
||||
PutMainScreen( 0, 11, 0xff, " UP ,DOWN ,LEFT ,RIGHT KEY :" );
|
||||
PutMainScreen( 0, 12, 0xff, " move * (cursor) ");
|
||||
PutMainScreen( 0, 14, 0xff, " ------------------------------ ");
|
||||
|
||||
PutMainScreen( 0, 16, 0xf1, "%s", gErrBuf);
|
||||
|
||||
// 下画面
|
||||
PutSubScreen( 0, 0, 0xf4, " NAND ( max 36 )");
|
||||
PutSubScreen( 0, 1, 0xff, "--- ID ---------------- ID -------");
|
||||
|
||||
|
||||
// 下画面に1行ずつ、カーソル用スペース、イニシャルコード、ノーマルジャンプ可否フラグを表示
|
||||
for ( i=0; i < TITLE_NUM_PAGE; i++, list++)
|
||||
{
|
||||
// そもそも NAND アプリの数が 1ページにも満たない場合は途中で終了する
|
||||
if ( i >= gNandAppNum )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
ConvertInitialCode(init_code, NAM_GetTitleIdLo(list->id));
|
||||
|
||||
if ( list->normaljmp_flag )
|
||||
{
|
||||
PutSubScreen( (i >= TITLE_NUM_CUL ? 18 : 0), 2 + (i >= TITLE_NUM_CUL ? i-18 : i), 0xf2, " %s : o", init_code );
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen( (i >= TITLE_NUM_CUL ? 18 : 0), 2 + (i >= TITLE_NUM_CUL ? i-18 : i), 0xff, " %s : -", init_code );
|
||||
}
|
||||
}
|
||||
|
||||
// カードアプリチェック
|
||||
PutSubScreen( 0, 2 + TITLE_NUM_CUL + 1, 0xf4, " CARD: Init. Code, TitleID_Lo");
|
||||
{
|
||||
CARDRomHeader* rh;
|
||||
rh = (CARDRomHeader*)CARD_GetRomHeader();
|
||||
|
||||
if ( rh->game_code != 0 )
|
||||
{
|
||||
// イニシャルコードの取得
|
||||
if ( rh->product_id & 0x03 || rh->product_id & 0x02 ) // 刺さっているカードのロムが TWLアプリ
|
||||
{
|
||||
ROM_Header* rh2;
|
||||
rh2 = (ROM_Header*)HW_TWL_CARD_ROM_HEADER_BUF;
|
||||
|
||||
// ROM ヘッダの拡張領域まで TitleID_Lo を見に行く
|
||||
// ROM ヘッダ(共通部)のイニシャルコードは基本的に製品版に入れられる
|
||||
// ConvertTitleIdLo(titleid_lo, rh2->s.titleID_Lo);
|
||||
MI_CpuCopy8( rh2->s.titleID_Lo, titleid_lo, 4 );
|
||||
titleid_lo[4] = 0x00;
|
||||
MI_CpuCopy8( rh2->s.game_code, init_code, 4 );
|
||||
}
|
||||
else // 刺さっているカードのロムが NTRアプリ
|
||||
{
|
||||
// 未マスタリング状態のロムでは、ROM ヘッダ(共通部)のイニシャルコードへ
|
||||
// 設定が反映されない
|
||||
|
||||
// 特別に設定された NTRアプリなら TitleID_Lo が設定されている可能性があるので読み込んでみる
|
||||
MI_CpuClear8( titleid_lo, 5 );
|
||||
MI_CpuCopy8( ((ROM_Header*)rh)->s.titleID_Lo, titleid_lo, 4 );
|
||||
titleid_lo[4] = 0x00;
|
||||
ConvertGameCode(init_code, rh->game_code);
|
||||
}
|
||||
|
||||
// ノーマルジャンプを許可しているかどうかを取得
|
||||
if ( rh->reserved_A[8] & 0x01 )
|
||||
{
|
||||
PutSubScreen( 0, 2 + TITLE_NUM_CUL + 2, 0xf2, " %s, %s : o", init_code, titleid_lo );
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen( 0, 2 + TITLE_NUM_CUL + 2, 0xff, " %s, %s : -", init_code, titleid_lo );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen( 0, 2 + TITLE_NUM_CUL + 2, 0xfe, " not exist");
|
||||
}
|
||||
|
||||
ConvertGameCode(init_code, rh->game_code);
|
||||
}
|
||||
|
||||
|
||||
// カーソル描画
|
||||
PutSubScreen( 1 + (gCurPos >= TITLE_NUM_CUL ? 18 : 0), 2 + (gCurPos >= TITLE_NUM_CUL ? gCurPos - 18 : gCurPos), 0xf4, "*");
|
||||
}
|
||||
|
||||
static void ConvertTitleIdLo(u8* code, u8* titleid_lo)
|
||||
{
|
||||
u8 tmp[5];
|
||||
s32 i;
|
||||
|
||||
// for ( titleid_lo += 3, i=0 ; i<4; i++, code++, titleid_lo--)
|
||||
for ( i=3; i>=0; i--, titleid_lo++ )
|
||||
{
|
||||
tmp[i] = *titleid_lo;
|
||||
*code = tmp[i];
|
||||
}
|
||||
|
||||
// *code = tmp;
|
||||
|
||||
// NULL 終端
|
||||
*code = 0x00;
|
||||
}
|
||||
|
||||
static void ConvertGameCode(u8* code, u32 game_code)
|
||||
{
|
||||
u8 tmp[5];
|
||||
s32 i;
|
||||
|
||||
ConvertInitialCode(tmp, game_code);
|
||||
|
||||
for ( i=3; i>=0; i--, code++)
|
||||
{
|
||||
*code = tmp[i];
|
||||
}
|
||||
|
||||
// NULL 文字終端
|
||||
*code = 0x00;
|
||||
}
|
||||
|
||||
static void ConvertInitialCode(u8* code, u32 titleid_lo)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for ( i=0; i<4; i++, code++)
|
||||
{
|
||||
*code = (u8)(titleid_lo >> (8 * (3-i)));
|
||||
}
|
||||
|
||||
// NULL文字終端
|
||||
*code = 0x00;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: VBlankIntr
|
||||
|
||||
Description: Vブランク割込みハンドラ。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void VBlankIntr(void)
|
||||
{
|
||||
// テキスト表示を更新
|
||||
UpdateScreen();
|
||||
|
||||
// IRQ チェックフラグ47をセット
|
||||
OS_SetIrqCheckFlag(OS_IE_V_BLANK);
|
||||
}
|
||||
|
||||
static void* AllocForNAM(u32 size)
|
||||
{
|
||||
void* ptr;
|
||||
ptr = OS_AllocFromMain(size);
|
||||
|
||||
if (ptr == NULL)
|
||||
{
|
||||
OS_Panic("alloc failed.");
|
||||
}
|
||||
|
||||
return ptr;
|
||||
|
||||
}
|
||||
|
||||
static void FreeForNAM(void* ptr)
|
||||
{
|
||||
OS_FreeToMain(ptr);
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
194
build/debugsoft/AppJumpChecker/src/screen.c
Normal file
194
build/debugsoft/AppJumpChecker/src/screen.c
Normal file
@ -0,0 +1,194 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - WCM - demos - wcm-list-2
|
||||
File: screen.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 "screen.h"
|
||||
#include "font.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
定数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
#define TEXT_SCREEN_SIZE 2048
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
内部変数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
// 仮想スクリーン[ 上下画面 ][ BG 枚数 ][ キャラクタ数 ]
|
||||
static u16 gScreen[2 ][ 1 ][ TEXT_SCREEN_SIZE / sizeof(u16) ] ATTRIBUTE_ALIGN(32);
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitScreen
|
||||
|
||||
Description: 文字表示システムのために、表示設定を初期化する。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitScreen(void)
|
||||
{
|
||||
// 各 V-RAM 初期化
|
||||
GX_SetBankForLCDC(GX_VRAM_LCDC_ALL);
|
||||
MI_CpuClearFast((void*)HW_LCDC_VRAM, HW_LCDC_VRAM_SIZE);
|
||||
(void)GX_DisableBankForLCDC();
|
||||
|
||||
// OAM 初期化
|
||||
MI_CpuFillFast((void*)HW_OAM, 0xc0, HW_OAM_SIZE);
|
||||
MI_CpuFillFast((void*)HW_DB_OAM, 0xc0, HW_DB_OAM_SIZE);
|
||||
|
||||
// パレット初期化
|
||||
MI_CpuClearFast((void*)HW_PLTT, HW_PLTT_SIZE);
|
||||
MI_CpuClearFast((void*)HW_DB_PLTT, HW_DB_PLTT_SIZE);
|
||||
|
||||
// 上画面設定
|
||||
GX_SetGraphicsMode(GX_DISPMODE_GRAPHICS, GX_BGMODE_0, GX_BG0_AS_2D);
|
||||
|
||||
GX_SetBankForBG(GX_VRAM_BG_128_A);
|
||||
G2_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256, GX_BG_COLORMODE_16, GX_BG_SCRBASE_0x0000, GX_BG_CHARBASE_0x04000,
|
||||
GX_BG_EXTPLTT_01);
|
||||
G2_SetBG0Priority(0);
|
||||
|
||||
GX_SetVisiblePlane(GX_PLANEMASK_BG0);
|
||||
GX_LoadBG0Char(d_CharData, 0, sizeof(d_CharData));
|
||||
GX_LoadBGPltt(d_PaletteData, 0, sizeof(d_PaletteData));
|
||||
((u16*)HW_PLTT)[0] = 0x0000; // black
|
||||
MI_CpuFillFast(gScreen[0][0], 0, TEXT_SCREEN_SIZE);
|
||||
DC_StoreRange(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
GX_LoadBG0Scr(gScreen[0][0], 0, TEXT_SCREEN_SIZE);
|
||||
|
||||
// 下画面設定
|
||||
GX_SetBankForSubBG(GX_VRAM_SUB_BG_32_H);
|
||||
G2S_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256, GX_BG_COLORMODE_16, GX_BG_SCRBASE_0x0000, GX_BG_CHARBASE_0x04000,
|
||||
GX_BG_EXTPLTT_01);
|
||||
G2S_SetBG0Priority(0);
|
||||
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));
|
||||
((u16*)HW_DB_PLTT)[0] = 0x0000; // black
|
||||
MI_CpuFillFast(gScreen[1][0], 0, TEXT_SCREEN_SIZE);
|
||||
DC_StoreRange(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
GXS_LoadBG0Scr(gScreen[1][0], 0, TEXT_SCREEN_SIZE);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: ClearScreen
|
||||
|
||||
Description: 画面のテキスト表示をクリアする。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void ClearScreen(void)
|
||||
{
|
||||
MI_CpuClearFast(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
MI_CpuClearFast(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
}
|
||||
void ClearMainScreen(void)
|
||||
{
|
||||
MI_CpuClearFast(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
|
||||
}
|
||||
void ClearSubScreen(void)
|
||||
{
|
||||
MI_CpuClearFast(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: PutMainScreen
|
||||
|
||||
Description: メイン画面にテキスト出力する。
|
||||
|
||||
Arguments: text - 出力する文字列。
|
||||
... - 仮想引数。
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void PutMainScreen(s32 x, s32 y, u8 palette, char* text, ...)
|
||||
{
|
||||
va_list vlist;
|
||||
char temp[33];
|
||||
s32 i;
|
||||
|
||||
va_start(vlist, text);
|
||||
(void)vsnprintf(temp, 33, text, vlist);
|
||||
va_end(vlist);
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
if (temp[i] == 0x00)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
gScreen[0][0][((y * 32) + x + i) % (32 * 32)] = (u16) (palette << 12 | temp[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: PrintSubScreen
|
||||
|
||||
Description: サブ画面にテキスト出力する。
|
||||
|
||||
Arguments: text - 出力する文字列。
|
||||
... - 仮想引数。
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void PutSubScreen(s32 x, s32 y, u8 palette, char* text, ...)
|
||||
{
|
||||
va_list vlist;
|
||||
char temp[33];
|
||||
s32 i;
|
||||
|
||||
va_start(vlist, text);
|
||||
(void)vsnprintf(temp, 33, text, vlist);
|
||||
va_end(vlist);
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
if (temp[i] == 0x00)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
gScreen[1][0][((y * 32) + x + i) % (32 * 32)] = (u16) (palette << 12 | temp[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: UpdateScreen
|
||||
|
||||
Description: 仮想スクリーンを V-RAM に反映する。
|
||||
V ブランク期間中での呼び出しを想定。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void UpdateScreen(void)
|
||||
{
|
||||
// 仮想スクリーンを V-RAM に反映
|
||||
DC_StoreRange(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
GX_LoadBG0Scr(gScreen[0][0], 0, TEXT_SCREEN_SIZE);
|
||||
DC_StoreRange(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
GXS_LoadBG0Scr(gScreen[1][0], 0, TEXT_SCREEN_SIZE);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
BIN
build/debugsoft/ApplicationJump/Card-anotherID/461A/libsyscall.a
Normal file
BIN
build/debugsoft/ApplicationJump/Card-anotherID/461A/libsyscall.a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
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_461a.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-1 && 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-1; 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
|
||||
*---------------------------------------------------------------------------*/
|
||||
BIN
build/debugsoft/ApplicationJump/Card-fail/460A/libsyscall.a
Normal file
BIN
build/debugsoft/ApplicationJump/Card-fail/460A/libsyscall.a
Normal file
Binary file not shown.
BIN
build/debugsoft/ApplicationJump/Card-fail/460A/libsyscall_c.bin
Normal file
BIN
build/debugsoft/ApplicationJump/Card-fail/460A/libsyscall_c.bin
Normal file
Binary file not shown.
Binary file not shown.
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_460a.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-1 && 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-1; 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
|
||||
*---------------------------------------------------------------------------*/
|
||||
49
build/debugsoft/ApplicationJump/Card/Makefile
Normal file
49
build/debugsoft/ApplicationJump/Card/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.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 = ./430A/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
243
build/debugsoft/ApplicationJump/Card/appjumptest_card.rsf
Normal file
243
build/debugsoft/ApplicationJump/Card/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 ./430A/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 430A
|
||||
|
||||
#
|
||||
# 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/banner/banner.bnr
Normal file
BIN
build/debugsoft/ApplicationJump/Card/banner/banner.bnr
Normal file
Binary file not shown.
344
build/debugsoft/ApplicationJump/Card/src/main.c
Normal file
344
build/debugsoft/ApplicationJump/Card/src/main.c
Normal file
@ -0,0 +1,344 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
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;
|
||||
|
||||
// B ボタンジャンプ先の切りかえフラグ
|
||||
static u8 gJumpTypeForB = JUMPTYPE_RETURN;
|
||||
// アプリ間パラメータ
|
||||
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-1 && 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-1; 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, 13, 0xf4, " ------------------------------- ");
|
||||
PutSubScreen(0, 15, 0xff, " A: JUMP TO NAND-1 APP");
|
||||
PutSubScreen(0, 16, 0xff, " Y: JUMP TO NAND-2 APP");
|
||||
PutSubScreen(0, 17, 0xff, " X: JUMP TO SELF");
|
||||
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, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
||||
|
||||
if (gKey.trg & PAD_KEY_DOWN)
|
||||
{
|
||||
if ( gJumpTypeForB == JUMPTYPE_RETURN )
|
||||
{
|
||||
gJumpTypeForB = JUMPTYPE_NUM - 1;
|
||||
}
|
||||
else
|
||||
gJumpTypeForB--;
|
||||
}
|
||||
else if (gKey.trg & PAD_KEY_UP)
|
||||
{
|
||||
if ( ++gJumpTypeForB >= JUMPTYPE_NUM )
|
||||
{
|
||||
gJumpTypeForB = JUMPTYPE_RETURN;
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
switch (gJumpTypeForB)
|
||||
{
|
||||
case JUMPTYPE_RETURN:
|
||||
if ( !OS_ReturnToPrevApplication() )
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
*---------------------------------------------------------------------------*/
|
||||
38
build/debugsoft/ApplicationJump/Makefile
Normal file
38
build/debugsoft/ApplicationJump/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - debugsoft - ApplicationJump
|
||||
# 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
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = Card \
|
||||
Nand-1 \
|
||||
Nand-2 \
|
||||
Card-fail \
|
||||
Card-anotherID
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
#===== End of Makefile =====
|
||||
|
||||
|
||||
BIN
build/debugsoft/ApplicationJump/Nand-1/431A/libsyscall.a
Normal file
BIN
build/debugsoft/ApplicationJump/Nand-1/431A/libsyscall.a
Normal file
Binary file not shown.
BIN
build/debugsoft/ApplicationJump/Nand-1/431A/libsyscall_c.bin
Normal file
BIN
build/debugsoft/ApplicationJump/Nand-1/431A/libsyscall_c.bin
Normal file
Binary file not shown.
Binary file not shown.
47
build/debugsoft/ApplicationJump/Nand-1/Makefile
Normal file
47
build/debugsoft/ApplicationJump/Nand-1/Makefile
Normal file
@ -0,0 +1,47 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Nand-1
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM := TWL
|
||||
TWL_NANDAPP := TRUE
|
||||
|
||||
TARGET_BIN = appjumpTestForNand1.tad
|
||||
INCDIR = ../include
|
||||
SRCDIR = ./src ../src
|
||||
SRCS = main.c screen.c font.c common.c
|
||||
|
||||
ROM_SPEC = main_nand1.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 = ./431A/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
BIN
build/debugsoft/ApplicationJump/Nand-1/banner/banner.bnr
Normal file
BIN
build/debugsoft/ApplicationJump/Nand-1/banner/banner.bnr
Normal file
Binary file not shown.
243
build/debugsoft/ApplicationJump/Nand-1/main_nand1.rsf
Normal file
243
build/debugsoft/ApplicationJump/Nand-1/main_nand1.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 AppJmpTestN1
|
||||
|
||||
#
|
||||
# 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 ./431A/rom_header_431a.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile "./banner/banner.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 NAND
|
||||
|
||||
#
|
||||
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||
#
|
||||
GameCode 431A
|
||||
|
||||
#
|
||||
# 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
|
||||
}
|
||||
362
build/debugsoft/ApplicationJump/Nand-1/src/main.c
Normal file
362
build/debugsoft/ApplicationJump/Nand-1/src/main.c
Normal file
@ -0,0 +1,362 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest - Nand-1
|
||||
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;
|
||||
|
||||
// B ボタンジャンプ先の切りかえフラグ
|
||||
static u8 gJumpTypeForB = JUMPTYPE_RETURN;
|
||||
// アプリ間パラメータ
|
||||
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-1 && 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, 0xf5, " ***** This APP is NAND-1 ***** ");
|
||||
PutMainScreen(0, 5, 0xff, " APP JUMP : %u times ", gAppParam.jumpCount);
|
||||
PutMainScreen(0, 7, 0xff, " DELIVERED PARAM (recent 6 app)");
|
||||
|
||||
for (i=0; i<gArgc-1; 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, 0xf5, " ------- 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, 13, 0xf5, " ------------------------------- ");
|
||||
PutSubScreen(0, 15, 0xff, " A: JUMP TO CARD APP");
|
||||
PutSubScreen(0, 16, 0xff, " Y: JUMP TO NAND-2 APP");
|
||||
PutSubScreen(0, 17, 0xff, " X: JUMP TO SELF");
|
||||
|
||||
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 (ANO)");
|
||||
break;
|
||||
case JUMPTYPE_SYSMENU:
|
||||
PutSubScreen(0, 18, 0xff, " B: JUMP TO SYSMENU");
|
||||
break;
|
||||
case JUMPTYPE_FAIL_CARD:
|
||||
PutSubScreen(0, 18, 0xfe, " B: JUMP TO CARD APP (FAIL)");
|
||||
break;
|
||||
}
|
||||
|
||||
PutSubScreen(0, 20, 0xff, " UP DOWN: SWITCH JUMP TYPE (B) ");
|
||||
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)
|
||||
{
|
||||
if ( gJumpTypeForB == JUMPTYPE_RETURN )
|
||||
{
|
||||
gJumpTypeForB = JUMPTYPE_NUM - 1;
|
||||
}
|
||||
else
|
||||
gJumpTypeForB--;
|
||||
}
|
||||
else if (gKey.trg & PAD_KEY_UP)
|
||||
{
|
||||
if ( ++gJumpTypeForB >= JUMPTYPE_NUM )
|
||||
{
|
||||
gJumpTypeForB = JUMPTYPE_RETURN;
|
||||
}
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_START)
|
||||
{
|
||||
// 自動テストフラグをスイッチ
|
||||
gAppParam.isAutoJump ^= 1;
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_A)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
// カードアプリへジャンプ
|
||||
if( !OS_DoApplicationJump( CARDAPP_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 アプリへジャンプ
|
||||
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);
|
||||
|
||||
switch (gJumpTypeForB)
|
||||
{
|
||||
case JUMPTYPE_RETURN:
|
||||
if ( !OS_ReturnToPrevApplication() )
|
||||
{
|
||||
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;
|
||||
case JUMPTYPE_FAIL_CARD:
|
||||
if ( !OS_DoApplicationJump(CARDAPP_FAIL_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_L || gKey.trg & PAD_BUTTON_R)
|
||||
{
|
||||
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 NAND-1");
|
||||
}
|
||||
else
|
||||
{
|
||||
STD_TSPrintf(argument, "Jumped from NAND-1");
|
||||
}
|
||||
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
|
||||
*---------------------------------------------------------------------------*/
|
||||
BIN
build/debugsoft/ApplicationJump/Nand-2/432A/libsyscall.a
Normal file
BIN
build/debugsoft/ApplicationJump/Nand-2/432A/libsyscall.a
Normal file
Binary file not shown.
BIN
build/debugsoft/ApplicationJump/Nand-2/432A/libsyscall_c.bin
Normal file
BIN
build/debugsoft/ApplicationJump/Nand-2/432A/libsyscall_c.bin
Normal file
Binary file not shown.
Binary file not shown.
47
build/debugsoft/ApplicationJump/Nand-2/Makefile
Normal file
47
build/debugsoft/ApplicationJump/Nand-2/Makefile
Normal file
@ -0,0 +1,47 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Nand-2
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM := TWL
|
||||
TWL_NANDAPP := TRUE
|
||||
|
||||
TARGET_BIN = appjumpTestForNand2.tad
|
||||
INCDIR = ../include
|
||||
SRCDIR = ./src ../src
|
||||
SRCS = main.c screen.c font.c common.c
|
||||
|
||||
ROM_SPEC = main_nand2.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 = ./431A/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
BIN
build/debugsoft/ApplicationJump/Nand-2/banner/banner.bnr
Normal file
BIN
build/debugsoft/ApplicationJump/Nand-2/banner/banner.bnr
Normal file
Binary file not shown.
243
build/debugsoft/ApplicationJump/Nand-2/main_nand2.rsf
Normal file
243
build/debugsoft/ApplicationJump/Nand-2/main_nand2.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 AppJmpTestN2
|
||||
|
||||
#
|
||||
# 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 ./432A/rom_header_432a.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile "./banner/banner.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 NAND
|
||||
|
||||
#
|
||||
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||
#
|
||||
GameCode 432A
|
||||
|
||||
#
|
||||
# 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
|
||||
}
|
||||
364
build/debugsoft/ApplicationJump/Nand-2/src/main.c
Normal file
364
build/debugsoft/ApplicationJump/Nand-2/src/main.c
Normal file
@ -0,0 +1,364 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest - Nand-2
|
||||
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;
|
||||
|
||||
|
||||
// B ボタンジャンプ先の切りかえフラグ
|
||||
static u8 gJumpTypeForB = JUMPTYPE_RETURN;
|
||||
// アプリ間パラメータ
|
||||
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-1 && 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, 0xf6, " ***** This APP is NAND-2 ***** ");
|
||||
PutMainScreen(0, 5, 0xff, " APP JUMP : %u times ", gAppParam.jumpCount);
|
||||
PutMainScreen(0, 7, 0xff, " DELIVERED PARAM (recent 6 app)");
|
||||
|
||||
for (i=0; i<gArgc-1; 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, 0xf6, " ------- 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, 13, 0xf6, " ------------------------------- ");
|
||||
PutSubScreen(0, 15, 0xff, " A: JUMP TO CARD APP");
|
||||
PutSubScreen(0, 16, 0xff, " Y: JUMP TO NAND-1 APP");
|
||||
PutSubScreen(0, 17, 0xff, " X: JUMP TO SELF");
|
||||
|
||||
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 (ANO)");
|
||||
break;
|
||||
case JUMPTYPE_SYSMENU:
|
||||
PutSubScreen(0, 18, 0xff, " B: JUMP TO SYSMENU");
|
||||
break;
|
||||
case JUMPTYPE_FAIL_CARD:
|
||||
PutSubScreen(0, 18, 0xfe, " B: JUMP TO CARD APP (FAIL)");
|
||||
break;
|
||||
}
|
||||
|
||||
PutSubScreen(0, 20, 0xff, " UP DOWN: SWITCH JUMP TYPE (B) ");
|
||||
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)
|
||||
{
|
||||
if ( gJumpTypeForB == JUMPTYPE_RETURN )
|
||||
{
|
||||
gJumpTypeForB = JUMPTYPE_NUM - 1;
|
||||
}
|
||||
else
|
||||
gJumpTypeForB--;
|
||||
}
|
||||
else if (gKey.trg & PAD_KEY_UP)
|
||||
{
|
||||
if ( ++gJumpTypeForB >= JUMPTYPE_NUM )
|
||||
{
|
||||
gJumpTypeForB = JUMPTYPE_RETURN;
|
||||
}
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_START)
|
||||
{
|
||||
// 自動テストフラグをスイッチ
|
||||
gAppParam.isAutoJump ^= 1;
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_A)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
// カードアプリへジャンプ
|
||||
if( !OS_DoApplicationJump( CARDAPP_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 アプリへジャンプ
|
||||
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_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);
|
||||
switch (gJumpTypeForB)
|
||||
{
|
||||
case JUMPTYPE_RETURN:
|
||||
if ( !OS_ReturnToPrevApplication() )
|
||||
{
|
||||
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;
|
||||
case JUMPTYPE_FAIL_CARD:
|
||||
if ( !OS_DoApplicationJump(CARDAPP_FAIL_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_L || gKey.trg & PAD_BUTTON_R)
|
||||
{
|
||||
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 NAND-2");
|
||||
}
|
||||
else
|
||||
{
|
||||
STD_TSPrintf(argument, "Jumped from NAND-2");
|
||||
}
|
||||
|
||||
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
|
||||
*---------------------------------------------------------------------------*/
|
||||
77
build/debugsoft/ApplicationJump/ReadMe.txt
Normal file
77
build/debugsoft/ApplicationJump/ReadMe.txt
Normal file
@ -0,0 +1,77 @@
|
||||
appjumpTest
|
||||
|
||||
アプリジャンプ機能をテストするためのアプリセットです。
|
||||
========================================================
|
||||
|
||||
<概要> ===============================================
|
||||
2種類のNAND アプリと 3種類のカードアプリで構成されます。
|
||||
各アプリ間で、アプリジャンプの機能を一通り試すことができます。
|
||||
アプリ間でのパラメータの受け渡し、ジャンプ元へのリターンも可能です。
|
||||
|
||||
|
||||
3種類のカードアプリについて
|
||||
|
||||
| ファイル名 | イニシャルコード | 被ノーマルジャンプ |
|
||||
| appjumpTestForCard.srl | 430A | 許可 |
|
||||
| appjumpTestForCard_Fail.srl | 460A | 不許可 |
|
||||
| appjumpTestForCard_AID.srl | 461A | 許可 |
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
<使い方> =============================================
|
||||
2種類のNAND アプリを TWL にインポートした状態で、カードアプリを起動してください。
|
||||
|
||||
操作方法は、下画面下部に一覧表示されます。
|
||||
ABXY ボタンがそれぞれに対応したターゲットへのアプリジャンプを実行します。
|
||||
|
||||
L/R ボタンで、アプリ間パラメータ(文字列データ)を次のジャンプ先へ渡すかどうかを
|
||||
切り替えることができます(デフォルトは ON になっています)。
|
||||
|
||||
START ボタンを押すと、現在起動中のアプリ自身へのアプリジャンプを自動で繰り返すモードに入ります。
|
||||
中断するには、起動後上画面にメッセージが出ている間(約2秒間)に START ボタンを押してください。
|
||||
|
||||
(2008/08/30 追記)
|
||||
異常系チェックのために、カードアプリを2種追加しました。
|
||||
|
||||
・ひとつめ(460A)について
|
||||
被ノーマルジャンプを許可していない TWL カードアプリです。
|
||||
NAND アプリからこのアプリにジャンプしようとすると、必ずエラーが返るはずです。
|
||||
|
||||
・ふたつめ(461A)について
|
||||
被ノーマルジャンプは許可していますが、最初のカードアプリとは TitleID が別物の TWL カードアプリです。
|
||||
最初に、もう一方のノーマルジャンプを許可しているカードアプリ[430A]をスロットに挿入した状態で
|
||||
テストを開始します。そこから NAND アプリにジャンプした後、カードを[461A] に差し替えます。
|
||||
そして、NAND アプリからカードアプリへノーマルジャンプを実行した際に、ジャンプできるかどうかをチェックします。
|
||||
|
||||
|
||||
<画面の見方> ==========================================
|
||||
・上画面について
|
||||
起動中のアプリが 3種類の内どれかを色と文字で表します。
|
||||
(黄:CARD、紫:NAND-1、水色:NAND-2)
|
||||
|
||||
APP JUMP -> 今までのアプリジャンプ実行回数です。
|
||||
DELIVERED PARAM -> アプリ間パラメータ渡しをONにしている場合、ジャンプ元へのリターンも含めて
|
||||
これまでのジャンプ元の履歴が 6つまで表示されます。
|
||||
エラー表示 -> アプリジャンプに失敗した場合、赤字でエラーが表示されます。
|
||||
エラー表示が出た場合、それ以上アプリの実行はできませんので再起動してください。
|
||||
|
||||
・下画面について
|
||||
DELIVER ARG: (ON or OFF) -> アプリ間パラメータ渡しを有効にするかどうかのフラグの状態です。
|
||||
L/R ボタンで ON/OFF を切り替えることができます。
|
||||
AUTO JUMP TEST: (ON or OFF) -> 自分自身へのアプリジャンプを中断するまで繰り返すテストモードかどうかを示す値です。
|
||||
操作方法一覧 -> 各ボタンの説明を表示しています。アプリによって、ボタンに割り当てられた
|
||||
ジャンプ先が異なりますので注意してください。
|
||||
ただし、ジャンプ元へのリターンは Bボタン、自分自身へのジャンプは Xボタン固定です。
|
||||
|
||||
<その他注意事項>
|
||||
初回起動時(アプリジャンプを一度も実行していない状態)に、ジャンプ元へのリターンを行うと、
|
||||
必ずエラーになります。
|
||||
|
||||
|
||||
========================================================
|
||||
なにか問題がありましたら、環境制作部 西本まで。
|
||||
nishimoto_takashi@nintendo.co.jp
|
||||
|
||||
|
||||
<更新履歴>============================================
|
||||
2008/08/30 カードアプリ2種追加について加筆修正
|
||||
2008/07/31 新規追加
|
||||
96
build/debugsoft/ApplicationJump/include/common.h
Normal file
96
build/debugsoft/ApplicationJump/include/common.h
Normal file
@ -0,0 +1,96 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest
|
||||
File: common.h
|
||||
|
||||
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$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef COMMON_H_
|
||||
#define COMMON_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
#include <twl.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
定数定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
/* TitleID */
|
||||
#define CARDAPP_TITLEID (u64)(0x0003000034333041) // 430A
|
||||
#define CARDAPP_FAIL_TITLEID (u64)(0x0003000034363041) // 460A
|
||||
#define CARDAPP_ANO_TITLEID (u64)(0x0003000034363141) // 461A
|
||||
|
||||
#define NANDAPP1_TITLEID (u64)(0x0003000434333141) // 431A
|
||||
#define NANDAPP2_TITLEID (u64)(0x0003000434333241) // 432A
|
||||
|
||||
#define KEY_REPEAT_START 25 // キーリピート開始までのフレーム数
|
||||
#define KEY_REPEAT_SPAN 10 // キーリピートの間隔フレーム数
|
||||
|
||||
/* アプリ間パラメータ関連 */
|
||||
#define APPJUMP_STRING_LENGTH 24 // 引数一つ分として受け渡しされる文字列の長さ制限
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
構造体 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
typedef enum JumpTypeForB
|
||||
{
|
||||
JUMPTYPE_RETURN = 0,
|
||||
JUMPTYPE_ANOTHER_CARD,
|
||||
JUMPTYPE_SYSMENU,
|
||||
JUMPTYPE_FAIL_CARD,
|
||||
|
||||
JUMPTYPE_NUM
|
||||
} JumpTypeForB;
|
||||
|
||||
// キー入力情報
|
||||
typedef struct KeyInfo
|
||||
{
|
||||
u16 cnt; // 未加工入力値
|
||||
u16 trg; // 押しトリガ入力
|
||||
u16 up; // 離しトリガ入力
|
||||
u16 rep; // 押し維持リピート入力
|
||||
} KeyInfo;
|
||||
|
||||
// アプリ間でバイナリデータとして引き渡す構造体
|
||||
typedef struct AppParam
|
||||
{
|
||||
u32 jumpCount; // アプリジャンプの実行回数
|
||||
u8 isAutoJump; // 一定間隔で自動的にアプリジャンプを実行するかどうかのフラグ
|
||||
u8 rsv[3]; // 4バイトアラインメントのため
|
||||
} AppParam;
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Prototype
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitCommon(void);
|
||||
|
||||
void ReadKey(KeyInfo* pKey);
|
||||
|
||||
void VBlankIntr(void);
|
||||
|
||||
/*===========================================================================*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* COMMON_H_ */
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
41
build/debugsoft/ApplicationJump/include/font.h
Normal file
41
build/debugsoft/ApplicationJump/include/font.h
Normal file
@ -0,0 +1,41 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - WCM - demos - wcm-list-2
|
||||
File: font.h
|
||||
|
||||
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$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef FONT_H_
|
||||
#define FONT_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
#include <nitro/types.h>
|
||||
|
||||
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
|
||||
*---------------------------------------------------------------------------*/
|
||||
49
build/debugsoft/ApplicationJump/include/screen.h
Normal file
49
build/debugsoft/ApplicationJump/include/screen.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - WCM - demos - wcm-list-2
|
||||
File: screen.h
|
||||
|
||||
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$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef SCREEN_H_
|
||||
#define SCREEN_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
#include <nitro/types.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
ŠÖ<EFBFBD>” ’è‹`
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitScreen(void);
|
||||
void ClearScreen(void);
|
||||
void ClearMainScreen(void);
|
||||
void ClearSubScreen(void);
|
||||
void PutMainScreen(s32 x, s32 y, u8 palette, char* text, ...);
|
||||
void PutSubScreen(s32 x, s32 y, u8 palette, char* text, ...);
|
||||
void UpdateScreen(void);
|
||||
|
||||
/*===========================================================================*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* SCREEN_H_ */
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
153
build/debugsoft/ApplicationJump/src/common.c
Normal file
153
build/debugsoft/ApplicationJump/src/common.c
Normal file
@ -0,0 +1,153 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest
|
||||
File: common.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"
|
||||
|
||||
static void InitInterrupts(void);
|
||||
static void InitHeap(void);
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
関数定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitCommon
|
||||
|
||||
Description: 基本的な初期化関数をここで呼ぶ。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitCommon(void)
|
||||
{
|
||||
OS_Init();
|
||||
OS_InitTick();
|
||||
OS_InitAlarm();
|
||||
GX_Init();
|
||||
GX_DispOff();
|
||||
GXS_DispOff();
|
||||
|
||||
InitHeap();
|
||||
InitInterrupts();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: ReadKey
|
||||
|
||||
Description: キー入力情報を取得し、入力情報構造体を編集する。
|
||||
押しトリガ、離しトリガ、押し継続リピートトリガ を検出する。
|
||||
|
||||
Arguments: pKey - 編集するキー入力情報構造体を指定する。
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
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; // 未加工キー入力
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
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);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
585
build/debugsoft/ApplicationJump/src/font.c
Normal file
585
build/debugsoft/ApplicationJump/src/font.c
Normal file
@ -0,0 +1,585 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: NitroWiFi - WCM - demos - wcm-list
|
||||
File: font.c
|
||||
|
||||
Copyright 2005,2006 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.
|
||||
|
||||
$Log: font.c,v $
|
||||
Revision 1.2 2006/03/10 09:22:43 kitase_hirotake
|
||||
INDENT SOURCE
|
||||
|
||||
Revision 1.1 2005/07/21 08:21:06 adachi_hiroaki
|
||||
<EFBFBD>V‹K’ljÁ
|
||||
|
||||
|
||||
$NoKeywords: $
|
||||
*---------------------------------------------------------------------------*/
|
||||
#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
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
194
build/debugsoft/ApplicationJump/src/screen.c
Normal file
194
build/debugsoft/ApplicationJump/src/screen.c
Normal file
@ -0,0 +1,194 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - WCM - demos - wcm-list-2
|
||||
File: screen.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 "screen.h"
|
||||
#include "font.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
定数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
#define TEXT_SCREEN_SIZE 2048
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
内部変数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
// 仮想スクリーン[ 上下画面 ][ BG 枚数 ][ キャラクタ数 ]
|
||||
static u16 gScreen[2 ][ 1 ][ TEXT_SCREEN_SIZE / sizeof(u16) ] ATTRIBUTE_ALIGN(32);
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitScreen
|
||||
|
||||
Description: 文字表示システムのために、表示設定を初期化する。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitScreen(void)
|
||||
{
|
||||
// 各 V-RAM 初期化
|
||||
GX_SetBankForLCDC(GX_VRAM_LCDC_ALL);
|
||||
MI_CpuClearFast((void*)HW_LCDC_VRAM, HW_LCDC_VRAM_SIZE);
|
||||
(void)GX_DisableBankForLCDC();
|
||||
|
||||
// OAM 初期化
|
||||
MI_CpuFillFast((void*)HW_OAM, 0xc0, HW_OAM_SIZE);
|
||||
MI_CpuFillFast((void*)HW_DB_OAM, 0xc0, HW_DB_OAM_SIZE);
|
||||
|
||||
// パレット初期化
|
||||
MI_CpuClearFast((void*)HW_PLTT, HW_PLTT_SIZE);
|
||||
MI_CpuClearFast((void*)HW_DB_PLTT, HW_DB_PLTT_SIZE);
|
||||
|
||||
// 上画面設定
|
||||
GX_SetGraphicsMode(GX_DISPMODE_GRAPHICS, GX_BGMODE_0, GX_BG0_AS_2D);
|
||||
|
||||
GX_SetBankForBG(GX_VRAM_BG_128_A);
|
||||
G2_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256, GX_BG_COLORMODE_16, GX_BG_SCRBASE_0x0000, GX_BG_CHARBASE_0x04000,
|
||||
GX_BG_EXTPLTT_01);
|
||||
G2_SetBG0Priority(0);
|
||||
|
||||
GX_SetVisiblePlane(GX_PLANEMASK_BG0);
|
||||
GX_LoadBG0Char(d_CharData, 0, sizeof(d_CharData));
|
||||
GX_LoadBGPltt(d_PaletteData, 0, sizeof(d_PaletteData));
|
||||
((u16*)HW_PLTT)[0] = 0x0000; // black
|
||||
MI_CpuFillFast(gScreen[0][0], 0, TEXT_SCREEN_SIZE);
|
||||
DC_StoreRange(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
GX_LoadBG0Scr(gScreen[0][0], 0, TEXT_SCREEN_SIZE);
|
||||
|
||||
// 下画面設定
|
||||
GX_SetBankForSubBG(GX_VRAM_SUB_BG_32_H);
|
||||
G2S_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256, GX_BG_COLORMODE_16, GX_BG_SCRBASE_0x0000, GX_BG_CHARBASE_0x04000,
|
||||
GX_BG_EXTPLTT_01);
|
||||
G2S_SetBG0Priority(0);
|
||||
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));
|
||||
((u16*)HW_DB_PLTT)[0] = 0x0000; // black
|
||||
MI_CpuFillFast(gScreen[1][0], 0, TEXT_SCREEN_SIZE);
|
||||
DC_StoreRange(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
GXS_LoadBG0Scr(gScreen[1][0], 0, TEXT_SCREEN_SIZE);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: ClearScreen
|
||||
|
||||
Description: 画面のテキスト表示をクリアする。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void ClearScreen(void)
|
||||
{
|
||||
MI_CpuClearFast(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
MI_CpuClearFast(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
}
|
||||
void ClearMainScreen(void)
|
||||
{
|
||||
MI_CpuClearFast(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
|
||||
}
|
||||
void ClearSubScreen(void)
|
||||
{
|
||||
MI_CpuClearFast(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: PutMainScreen
|
||||
|
||||
Description: メイン画面にテキスト出力する。
|
||||
|
||||
Arguments: text - 出力する文字列。
|
||||
... - 仮想引数。
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void PutMainScreen(s32 x, s32 y, u8 palette, char* text, ...)
|
||||
{
|
||||
va_list vlist;
|
||||
char temp[33];
|
||||
s32 i;
|
||||
|
||||
va_start(vlist, text);
|
||||
(void)vsnprintf(temp, 33, text, vlist);
|
||||
va_end(vlist);
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
if (temp[i] == 0x00)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
gScreen[0][0][((y * 32) + x + i) % (32 * 32)] = (u16) (palette << 12 | temp[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: PrintSubScreen
|
||||
|
||||
Description: サブ画面にテキスト出力する。
|
||||
|
||||
Arguments: text - 出力する文字列。
|
||||
... - 仮想引数。
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void PutSubScreen(s32 x, s32 y, u8 palette, char* text, ...)
|
||||
{
|
||||
va_list vlist;
|
||||
char temp[33];
|
||||
s32 i;
|
||||
|
||||
va_start(vlist, text);
|
||||
(void)vsnprintf(temp, 33, text, vlist);
|
||||
va_end(vlist);
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
if (temp[i] == 0x00)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
gScreen[1][0][((y * 32) + x + i) % (32 * 32)] = (u16) (palette << 12 | temp[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: UpdateScreen
|
||||
|
||||
Description: 仮想スクリーンを V-RAM に反映する。
|
||||
V ブランク期間中での呼び出しを想定。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void UpdateScreen(void)
|
||||
{
|
||||
// 仮想スクリーンを V-RAM に反映
|
||||
DC_StoreRange(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
GX_LoadBG0Scr(gScreen[0][0], 0, TEXT_SCREEN_SIZE);
|
||||
DC_StoreRange(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
GXS_LoadBG0Scr(gScreen[1][0], 0, TEXT_SCREEN_SIZE);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
51
build/debugsoft/CardRomHeaderChecker/Card/Makefile
Normal file
51
build/debugsoft/CardRomHeaderChecker/Card/Makefile
Normal file
@ -0,0 +1,51 @@
|
||||
#! 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
|
||||
|
||||
SUBDIRS = ../common/banner \
|
||||
$(ROOT)/build/demos/gx/UnitTours/DEMOLib
|
||||
|
||||
TARGET_BIN = CardRomHeaderChecker.srl
|
||||
#INCDIR = ../common/include
|
||||
SRCDIR = ../common/src
|
||||
SRCS = main.c
|
||||
|
||||
ROM_SPEC = ./ROM-TS.rsf
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib
|
||||
|
||||
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/CardRomHeaderChecker
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
endif
|
||||
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
LIBSYSCALL = ../common/0CZA/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
196
build/debugsoft/CardRomHeaderChecker/Card/ROM-TS.rsf
Normal file
196
build/debugsoft/CardRomHeaderChecker/Card/ROM-TS.rsf
Normal file
@ -0,0 +1,196 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - include
|
||||
# File: ROM-TS.rsf
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# TWL ROM SPEC FILE
|
||||
#
|
||||
|
||||
Arm9
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
Elf "$(MAKEROM_ARM9:r).tef"
|
||||
}
|
||||
|
||||
Arm7
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
Elf "$(MAKEROM_ARM7_BASE:r).tef"
|
||||
}
|
||||
|
||||
Arm9.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
}
|
||||
|
||||
Arm7.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
}
|
||||
|
||||
Property
|
||||
{
|
||||
###
|
||||
### Settings for FinalROM
|
||||
###
|
||||
#### BEGIN
|
||||
#
|
||||
# TITLE NAME: Your product name within 12bytes
|
||||
#
|
||||
TitleName "CardRH Check"
|
||||
|
||||
#
|
||||
# MAKER CODE: Your company ID# in 2 ascii words
|
||||
# issued by NINTENDO
|
||||
#
|
||||
#MakerCode "00"
|
||||
|
||||
#
|
||||
# REMASTER VERSION: Mastering version
|
||||
#
|
||||
#RomVersion 0
|
||||
|
||||
#
|
||||
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||
#
|
||||
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||
|
||||
#
|
||||
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||
#
|
||||
#RomSize 256M
|
||||
|
||||
#
|
||||
# ROM PADDING: TRUE if finalrom
|
||||
#
|
||||
#RomFootPadding TRUE
|
||||
|
||||
#
|
||||
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderTemplate ../common/0CZA/rom_header_0cza.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile ../common/banner/banner.bnr
|
||||
|
||||
###
|
||||
### 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
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
35
build/debugsoft/CardRomHeaderChecker/Makefile
Normal file
35
build/debugsoft/CardRomHeaderChecker/Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - debugsoft - ApplicationJump
|
||||
# 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
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = Card \
|
||||
Nand
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
#===== End of Makefile =====
|
||||
|
||||
|
||||
52
build/debugsoft/CardRomHeaderChecker/Nand/Makefile
Normal file
52
build/debugsoft/CardRomHeaderChecker/Nand/Makefile
Normal file
@ -0,0 +1,52 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Card
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM := TWL
|
||||
TWL_NANDAPP := TRUE
|
||||
|
||||
SUBDIRS = ../common/banner \
|
||||
$(ROOT)/build/demos/gx/UnitTours/DEMOLib
|
||||
|
||||
TARGET_BIN = CardRomHeaderChecker.tad
|
||||
#INCDIR = ../common/include
|
||||
SRCDIR = ../common/src
|
||||
SRCS = main.c
|
||||
|
||||
ROM_SPEC = ./ROM-TS_nand.rsf
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib
|
||||
|
||||
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/CardRomHeaderChecker
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
endif
|
||||
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
LIBSYSCALL = ../common/0CZA/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
243
build/debugsoft/CardRomHeaderChecker/Nand/ROM-TS_nand.rsf
Normal file
243
build/debugsoft/CardRomHeaderChecker/Nand/ROM-TS_nand.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 "CardRH Check"
|
||||
|
||||
#
|
||||
# MAKER CODE: Your company ID# in 2 ascii words
|
||||
# issued by NINTENDO
|
||||
#
|
||||
#MakerCode "00"
|
||||
|
||||
#
|
||||
# REMASTER VERSION: Mastering version
|
||||
#
|
||||
#RomVersion 0
|
||||
|
||||
#
|
||||
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||
#
|
||||
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||
|
||||
#
|
||||
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||
#
|
||||
#RomSize 256M
|
||||
|
||||
#
|
||||
# ROM PADDING: TRUE if finalrom
|
||||
#
|
||||
#RomFootPadding TRUE
|
||||
|
||||
#
|
||||
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderTemplate ../common/0CZA/rom_header_0cza.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile ../common/banner/banner.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 NAND
|
||||
|
||||
#
|
||||
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||
#
|
||||
#GameCode ABCJ
|
||||
|
||||
#
|
||||
# Public save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PublicSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Private save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PrivateSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Enable SubBannerFile
|
||||
#SubBannerFile TRUE
|
||||
|
||||
#
|
||||
# Game card power on: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardOn FALSE
|
||||
|
||||
#
|
||||
# Game card transferd to nitro mode: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardNitroMode FALSE
|
||||
}
|
||||
|
||||
RomSpec
|
||||
{
|
||||
Offset 0x00000000
|
||||
Segment ALL
|
||||
HostRoot $(MAKEROM_ROMROOT)
|
||||
Root /
|
||||
File $(MAKEROM_ROMFILES)
|
||||
}
|
||||
|
||||
Rating
|
||||
{
|
||||
#
|
||||
# Permited age to play for each rating organization
|
||||
#
|
||||
# Supported organization
|
||||
# - CERO (OGN0) : for Japan
|
||||
# - ESRB (OGN1) : for North America
|
||||
# - BBFC (OGN2) : obsolete organization
|
||||
# - USK (OGN3) : for German
|
||||
# - PEGI_GEN (OGN4) : for Europe
|
||||
# - PEGI_FINLAND (OGN5) : obsolete organization
|
||||
# - PEGI_PRT (OGN6) : for Portugal
|
||||
# - PEGI_BBFC (OGN7) : for UK
|
||||
# - OFLC (OGN8) : for Australia and NewZealand
|
||||
# - GRB (OGN9) : for Korea
|
||||
# - OGN10 : reserved
|
||||
# - OGN11 : reserved
|
||||
# - OGN12 : reserved
|
||||
# - OGN13 : reserved
|
||||
# - OGN14 : reserved
|
||||
# - OGN15 : reserved
|
||||
#
|
||||
# Available age [ 0 - 31 / PENDING / FREE ]
|
||||
|
||||
CERO FREE
|
||||
# ESRB FREE
|
||||
# USK FREE
|
||||
# PEGI_GEN FREE
|
||||
# PEGI_PRT FREE
|
||||
# PEGI_BBFC FREE
|
||||
# OFLC FREE
|
||||
# GRB FREE
|
||||
}
|
||||
BIN
build/debugsoft/CardRomHeaderChecker/common/0CZA/libsyscall.a
Normal file
BIN
build/debugsoft/CardRomHeaderChecker/common/0CZA/libsyscall.a
Normal file
Binary file not shown.
Binary file not shown.
49
build/debugsoft/CardRomHeaderChecker/common/banner/Makefile
Normal file
49
build/debugsoft/CardRomHeaderChecker/common/banner/Makefile
Normal file
@ -0,0 +1,49 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||
|
||||
ICON_DIR = ./icon
|
||||
|
||||
BANNER_ICON = $(ICON_DIR)/gameIcon.bmp
|
||||
BANNER_SPEC = banner_v3.bsf
|
||||
|
||||
TARGETS = banner.bnr
|
||||
INSTALL_DIR = ./
|
||||
INSTALL_TARGETS = $(TARGETS)
|
||||
|
||||
BANNER_ICON_NAME = $(basename $(BANNER_ICON))
|
||||
|
||||
LDIRT_CLEAN = $(TARGETS) \
|
||||
$(BANNER_ICON_NAME).nbfs \
|
||||
$(BANNER_ICON_NAME).nbfc \
|
||||
$(BANNER_ICON_NAME).nbfp \
|
||||
$(TARGETS:.bnr=.srl)
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# build
|
||||
#----------------------------------------------------------------------------
|
||||
do-build: $(TARGETS)
|
||||
|
||||
$(TARGETS): $(BANNER_SPEC) $(BANNER_ICON)
|
||||
$(NTEXCONV) -no -bg -bgb -bgnc $(BANNER_ICON) >/dev/null && \
|
||||
$(MAKEBANNER) -N $(BANNER_ICON_NAME) $(BANNER_SPEC) $(TARGETS)
|
||||
|
||||
#
|
||||
BIN
build/debugsoft/CardRomHeaderChecker/common/banner/banner_v3.bsf
Normal file
BIN
build/debugsoft/CardRomHeaderChecker/common/banner/banner_v3.bsf
Normal file
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 630 B |
207
build/debugsoft/CardRomHeaderChecker/common/src/main.c
Normal file
207
build/debugsoft/CardRomHeaderChecker/common/src/main.c
Normal file
@ -0,0 +1,207 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - template - demos
|
||||
File: main.c
|
||||
|
||||
Copyright 2003-2005,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>
|
||||
#include <twl/os/common/format_rom.h>
|
||||
#include <twl/hw/common/mmap_shared.h>
|
||||
#include "DEMO.h"
|
||||
|
||||
#define COLOR_WHITE (GX_RGBA(31, 31, 31, 1))
|
||||
#define COLOR_CYAN (GX_RGBA(0, 31, 31, 1))
|
||||
#define COLOR_RED (GX_RGBA(31, 0, 0, 1))
|
||||
#define COLOR_YELLOW (GX_RGBA(31, 31, 0, 1))
|
||||
|
||||
#define TITLE_COLOR COLOR_YELLOW
|
||||
#define LABEL_COLOR COLOR_WHITE
|
||||
#define VALUE_COLOR COLOR_WHITE
|
||||
#define OK_COLOR COLOR_CYAN
|
||||
#define NG_COLOR COLOR_RED
|
||||
|
||||
// CRC計算
|
||||
#define CRC16_INIT_VALUE 0xffff
|
||||
#define CALC_CRC16_SIZE 0x15e
|
||||
static u16 CalcCRC16(u16 start, u8 *data, int size);
|
||||
|
||||
void TwlMain(void)
|
||||
{
|
||||
ROM_Header *prhTWL, *prhNTR;
|
||||
char str[100];
|
||||
u16 row = 0;
|
||||
u16 shift = 8;
|
||||
u16 crc;
|
||||
|
||||
OS_Init();
|
||||
(void)OS_EnableIrq();
|
||||
(void)OS_EnableInterrupts();
|
||||
|
||||
DEMOInitCommon();
|
||||
DEMOInitVRAM();
|
||||
DEMOInitDisplayBitmap();
|
||||
DEMOHookConsole();
|
||||
|
||||
DEMOSetBitmapTextColor(GX_RGBA(31, 31, 0, 1));
|
||||
DEMOSetBitmapGroundColor(DEMO_RGB_CLEAR);
|
||||
DEMOStartDisplay();
|
||||
|
||||
// カードROMヘッダ: NTR互換用
|
||||
prhNTR = (ROM_Header*)HW_CARD_ROM_HEADER;
|
||||
|
||||
DEMOSetBitmapTextColor(COLOR_YELLOW);
|
||||
DEMODrawText( 8, row, "Card ROM Header" );
|
||||
row += 2 * shift;
|
||||
|
||||
DEMOSetBitmapTextColor(LABEL_COLOR);
|
||||
DEMODrawText( 8, row, "Title Name:" );
|
||||
MI_CpuClear8( str, 100 );
|
||||
MI_CpuCopy8( prhNTR->s.title_name, str, TITLE_NAME_MAX );
|
||||
DEMOSetBitmapTextColor(VALUE_COLOR);
|
||||
DEMODrawText( 96, row, str );
|
||||
row += shift;
|
||||
|
||||
DEMOSetBitmapTextColor(LABEL_COLOR);
|
||||
DEMODrawText( 8, row, "Game Code:" );
|
||||
MI_CpuClear8( str, 100 );
|
||||
MI_CpuCopy8( prhNTR->s.game_code, str, GAME_CODE_MAX );
|
||||
DEMOSetBitmapTextColor(VALUE_COLOR);
|
||||
DEMODrawText( 96, row, str );
|
||||
row += shift;
|
||||
|
||||
DEMOSetBitmapTextColor(LABEL_COLOR);
|
||||
DEMODrawText( 8, row, "Header CRC:" );
|
||||
DEMOSetBitmapTextColor(VALUE_COLOR);
|
||||
DEMODrawText( 96, row, "0x%04x", prhNTR->s.header_crc16 );
|
||||
row += shift;
|
||||
|
||||
crc = CalcCRC16( CRC16_INIT_VALUE, (u8*)prhNTR, CALC_CRC16_SIZE );
|
||||
if( crc == prhNTR->s.header_crc16 )
|
||||
{
|
||||
DEMOSetBitmapTextColor(OK_COLOR);
|
||||
DEMODrawText( 96, row, "0x%04x OK", crc );
|
||||
}
|
||||
else
|
||||
{
|
||||
DEMOSetBitmapTextColor(NG_COLOR);
|
||||
DEMODrawText( 96, row, "0x%04x NG", crc );
|
||||
}
|
||||
row += 3 * shift;
|
||||
|
||||
// この固定メモリアドレスにTWLカードROMヘッダがある
|
||||
// これはカードROMヘッダとは異なる
|
||||
// カードROMヘッダ: NTR互換のための領域でROMヘッダのNTR互換部分だけがある
|
||||
// TWLカードROMヘッダ: NTR互換部分に加えてROMヘッダのTWLで追加された部分もある
|
||||
prhTWL = (ROM_Header*)HW_TWL_CARD_ROM_HEADER_BUF;
|
||||
|
||||
DEMOSetBitmapTextColor(COLOR_YELLOW);
|
||||
DEMODrawText( 8, row, "TWL Card ROM Header" );
|
||||
row += 2 * shift;
|
||||
|
||||
DEMOSetBitmapTextColor(LABEL_COLOR);
|
||||
DEMODrawText( 8, row, "Title Name: " );
|
||||
MI_CpuClear8( str, 100 );
|
||||
MI_CpuCopy8( prhTWL->s.title_name, str, TITLE_NAME_MAX );
|
||||
DEMOSetBitmapTextColor(VALUE_COLOR);
|
||||
DEMODrawText( 96, row, str );
|
||||
row += shift;
|
||||
|
||||
DEMOSetBitmapTextColor(LABEL_COLOR);
|
||||
DEMODrawText( 8, row, "Game Code: " );
|
||||
MI_CpuClear8( str, 100 );
|
||||
MI_CpuCopy8( prhTWL->s.game_code, str, GAME_CODE_MAX );
|
||||
DEMOSetBitmapTextColor(VALUE_COLOR);
|
||||
DEMODrawText( 96, row, str );
|
||||
row += shift;
|
||||
|
||||
DEMOSetBitmapTextColor(LABEL_COLOR);
|
||||
DEMODrawText( 8, row, "TitleID_Hi: " );
|
||||
prhTWL = (ROM_Header*)HW_TWL_CARD_ROM_HEADER_BUF;
|
||||
DEMOSetBitmapTextColor(VALUE_COLOR);
|
||||
DEMODrawText( 96, row, "0x%08x", prhTWL->s.titleID_Hi );
|
||||
row += shift;
|
||||
|
||||
DEMOSetBitmapTextColor(LABEL_COLOR);
|
||||
DEMODrawText( 8, row, "TitleID_Lo: " );
|
||||
MI_CpuClear8( str, 100 );
|
||||
MI_CpuCopy8( prhTWL->s.titleID_Lo, str, 4 );
|
||||
DEMOSetBitmapTextColor(VALUE_COLOR);
|
||||
DEMODrawText( 96, row, str );
|
||||
row += shift;
|
||||
|
||||
DEMOSetBitmapTextColor(LABEL_COLOR);
|
||||
DEMODrawText( 8, row, "Header CRC:" );
|
||||
DEMOSetBitmapTextColor(VALUE_COLOR);
|
||||
DEMODrawText( 96, row, "0x%04x", prhTWL->s.header_crc16 );
|
||||
row += shift;
|
||||
|
||||
crc = CalcCRC16( CRC16_INIT_VALUE, (u8*)prhTWL, CALC_CRC16_SIZE );
|
||||
if( crc == prhTWL->s.header_crc16 )
|
||||
{
|
||||
DEMOSetBitmapTextColor(OK_COLOR);
|
||||
DEMODrawText( 96, row, "0x%04x OK", crc );
|
||||
}
|
||||
else
|
||||
{
|
||||
DEMOSetBitmapTextColor(NG_COLOR);
|
||||
DEMODrawText( 96, row, "0x%04x NG", crc );
|
||||
}
|
||||
row += 2 * shift;
|
||||
|
||||
DEMOSetBitmapTextColor(GX_RGBA(31, 31, 31, 1));
|
||||
DEMODrawText( 8, row, "End." );
|
||||
|
||||
while (1)
|
||||
{
|
||||
DEMO_DrawFlip();
|
||||
OS_WaitVBlankIntr();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
* Math
|
||||
*
|
||||
* u16 CalcCRC16( u16 start, u8 *data, int size )
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
static u16 crc16_table[16] = {
|
||||
0x0000, 0xCC01, 0xD801, 0x1400,
|
||||
0xF001, 0x3C00, 0x2800, 0xE401,
|
||||
0xA001, 0x6C00, 0x7800, 0xB401,
|
||||
0x5000, 0x9C01, 0x8801, 0x4400
|
||||
};
|
||||
|
||||
static u16 CalcCRC16(u16 start, u8 *data, int size)
|
||||
{
|
||||
u16 r1;
|
||||
u16 total = start;
|
||||
|
||||
while (size-- > 0)
|
||||
{
|
||||
// 下位4bit
|
||||
r1 = crc16_table[total & 0xf];
|
||||
total = (u16)((total >> 4) & 0x0fff);
|
||||
total = (u16)(total ^ r1 ^ crc16_table[*data & 0xf]);
|
||||
|
||||
// 上位4bit
|
||||
r1 = crc16_table[total & 0xf];
|
||||
total = (u16)((total >> 4) & 0x0fff);
|
||||
total = (u16)(total ^ r1 ^ crc16_table[(*data >> 4) & 0xf]);
|
||||
|
||||
data++;
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
||||
/*====== End of main.c ======*/
|
||||
35
build/debugsoft/Internet/Makefile
Normal file
35
build/debugsoft/Internet/Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests
|
||||
# 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$
|
||||
#----------------------------------------------------------------------------
|
||||
TARGET_PLATFORM = TWL NITRO
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = NCFGCrusher \
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
#===== End of Makefile =====
|
||||
|
||||
|
||||
68
build/debugsoft/Internet/NCFGCrusher/Makefile
Normal file
68
build/debugsoft/Internet/NCFGCrusher/Makefile
Normal file
@ -0,0 +1,68 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlWiFi - NCFG - demos - ncfg-1
|
||||
# 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$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = $(ROOT)/build/demos/gx/UnitTours/DEMOLib
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
TARGET_PLATFORM = TWL
|
||||
TWL_ARCHGEN := LIMITED
|
||||
TWL_NANDAPP := TRUE
|
||||
TARGET_NAME = NCFGCrusher
|
||||
TARGET_BIN = $(TARGET_NAME).srl
|
||||
#TARGET_BIN = $(TARGET_NAME).tad
|
||||
SRCS = main.c
|
||||
|
||||
|
||||
ROM_SPEC = $(TARGET_NAME).autogen.rsf
|
||||
ROM_SPEC_TEMPLATE = $(ROOT)/include/twl/specfiles/ROM-TS_sys.rsf
|
||||
ROM_SPEC_PARAM = MakerCode=01 \
|
||||
BannerFile=./banner/banner.bnr \
|
||||
GameCode=4S03 \
|
||||
TitleName=$(TARGET_NAME) \
|
||||
AppType=USER \
|
||||
# Media=NAND \
|
||||
|
||||
|
||||
MAKEROM := $(TWL_TOOLSDIR)/bin/makerom.TWL.exe
|
||||
|
||||
|
||||
#-------------------------
|
||||
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/$(TARGET_NAME)
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
include $(TWLWIFI_ROOT)/build/buildtools/commondefs.demos
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
include $(TWLWIFI_ROOT)/build/buildtools/modulerules
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
BIN
build/debugsoft/Internet/NCFGCrusher/banner/banner.bnr
Normal file
BIN
build/debugsoft/Internet/NCFGCrusher/banner/banner.bnr
Normal file
Binary file not shown.
33
build/debugsoft/Internet/NCFGCrusher/readme.txt
Normal file
33
build/debugsoft/Internet/NCFGCrusher/readme.txt
Normal file
@ -0,0 +1,33 @@
|
||||
NCFGTest
|
||||
|
||||
*概要
|
||||
接続設定を破壊するツールです。
|
||||
|
||||
*操作方法
|
||||
上下キーで破壊する接続設定を選択し、Aボタンで決定します。
|
||||
下画面に元の接続設定データと、破壊後のデータが表示されます。
|
||||
|
||||
破壊は、各データの先頭に 0x61 ~ 0x67を埋め込む形で実現しています。
|
||||
|
||||
|
||||
----------
|
||||
*NCFGの修復仕様まとめ
|
||||
|
||||
接続設定のCRCをチェックし、エラーがある場合はその設定を初期化します。
|
||||
(IPアドレスの設定や、接続タイプ等が全てクリアされる状態)
|
||||
|
||||
Nitroのときのように、接続設定1と2を異常にすると、3も道連れになりクリアされるというようなことはありません。
|
||||
|
||||
|
||||
より、詳細な仕様は影舞に記されています。
|
||||
http://phoenix.boy.nintendo.co.jp/~twl-wifi/kagemai/html/user.cgi?project=twl-wifi&action=view_report&id=84
|
||||
http://phoenix.boy.nintendo.co.jp/~twl-wifi/kagemai/html/user.cgi?project=twl-wifi&action=view_report&id=83
|
||||
|
||||
一部抜粋
|
||||
- CRC エラーの接続先は、個別に消去します。
|
||||
- 全領域 CRC エラーだった場合は、初回起動だと見なし、消去のみを行い、
|
||||
エラーを返しません。
|
||||
- 設定がされていた領域で消去が発生した場合は、エラーを通知します。
|
||||
- それ以外の場合は、エラーを返しません。
|
||||
(元々設定されていなかった領域で消去が発生した場合も含む)
|
||||
|
||||
183
build/debugsoft/Internet/NCFGCrusher/src/main.c
Normal file
183
build/debugsoft/Internet/NCFGCrusher/src/main.c
Normal file
@ -0,0 +1,183 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlWiFi - NCFG - demos - ncfg-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$
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
NVRAM 上のネットワーク設定を一定の値で初期化しながら、
|
||||
その結果をダンプするサンプルプログラムです。
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include <nitro.h>
|
||||
#include <nitroWiFi.h>
|
||||
#include <nitroWiFi/ncfg.h>
|
||||
#include <DEMO.h>
|
||||
#include <nitro/pad.h>
|
||||
|
||||
//#include <nitro/std.h>
|
||||
//#include <nitro/fs.h>
|
||||
|
||||
static void MainLoop(void);
|
||||
//static void VBlankIntr(void);
|
||||
|
||||
static void ReadNCFG(s32 index, u8* out);
|
||||
static void WriteNCFG(s32 index);
|
||||
static void InitDEMOSystem(void);
|
||||
|
||||
static u32 UpdateCursor(u32 val, u32 max, u16 key);
|
||||
|
||||
static const char* SLOT_NAME[] = {
|
||||
"SLOT_1", "SLOT_2", "SLOT_3", "SLOT_EX_1", "SLOT_EX_2", "SLOT_EX_3"
|
||||
};
|
||||
static const u32 SLOT_NUM = sizeof(SLOT_NAME) / sizeof(char*);
|
||||
|
||||
void NitroMain()
|
||||
{
|
||||
OS_Init();
|
||||
FX_Init();
|
||||
GX_Init();
|
||||
|
||||
// GX_DispOff();
|
||||
// GXS_DispOff();
|
||||
|
||||
// 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();
|
||||
|
||||
InitDEMOSystem();
|
||||
|
||||
(void)PAD_Read();
|
||||
|
||||
|
||||
|
||||
OS_TPrintf("UP DOWN - SELECT NCFG SLOT\n");
|
||||
OS_TPrintf("A - OVERWRITE NCFG\n");
|
||||
|
||||
|
||||
MainLoop();
|
||||
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
static u32 UpdateCursor(u32 val, u32 max, u16 key)
|
||||
{
|
||||
if(key & PAD_KEY_DOWN)
|
||||
{
|
||||
val = (val + 1) % max;
|
||||
}
|
||||
if(key & PAD_KEY_UP)
|
||||
{
|
||||
val = (val + max - 1) % max;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
static void MainLoop(void)
|
||||
{
|
||||
u32 index = 0;
|
||||
s32 slot_index[] =
|
||||
{
|
||||
NCFG_SLOT_1,
|
||||
NCFG_SLOT_2,
|
||||
NCFG_SLOT_3,
|
||||
NCFG_SLOT_EX_1,
|
||||
NCFG_SLOT_EX_2,
|
||||
NCFG_SLOT_EX_3,
|
||||
};
|
||||
u16 key = 0, old_key = 0, trig = 0;
|
||||
|
||||
while(1)
|
||||
{
|
||||
s32 i = 0;
|
||||
|
||||
old_key = key;
|
||||
key = PAD_Read();
|
||||
trig = (u16)(key & (key ^ old_key));
|
||||
|
||||
index = UpdateCursor(index, SLOT_NUM, trig);
|
||||
if(trig & PAD_BUTTON_A)
|
||||
{
|
||||
WriteNCFG(slot_index[index]);
|
||||
OS_TPrintf("%s was modified\n", SLOT_NAME[index]);
|
||||
}
|
||||
|
||||
for(i = 0; i < SLOT_NUM; ++i)
|
||||
{
|
||||
|
||||
DEMODrawText(0, i * 8, ((index == i) ? "*" : " "));
|
||||
DEMODrawText(8, i * 8, "%s\n", SLOT_NAME[i]);
|
||||
}
|
||||
DEMO_DrawFlip();
|
||||
OS_WaitVBlankIntr();
|
||||
}
|
||||
}
|
||||
|
||||
static void ReadNCFG(s32 index, u8* out)
|
||||
{
|
||||
static u8 buf[512];
|
||||
FSFile fp;
|
||||
s32 result;
|
||||
|
||||
FS_InitFile(&fp);
|
||||
|
||||
result = NCFG_ReadBackupMemory(buf, sizeof(buf), index);
|
||||
OS_TPrintf("NCFG_ReadBackupMemory(%d): %d\n", index, result);
|
||||
if ( result >= 0 )
|
||||
{
|
||||
// OS_TPrintfEx("% *.16b", result, buf);
|
||||
OS_TPrintfEx("% 256.16b", buf);
|
||||
OS_TPrintf("\n");
|
||||
}
|
||||
|
||||
MI_CpuCopy8(buf, out, sizeof(buf));
|
||||
}
|
||||
|
||||
static void WriteNCFG(s32 index)
|
||||
{
|
||||
static u8 buf[512];
|
||||
s32 result;
|
||||
|
||||
ReadNCFG(index, buf);
|
||||
MI_CpuCopy("abcdefg", buf, 7);
|
||||
result = NCFG_WriteBackupMemory(index, buf, sizeof(buf));
|
||||
OS_TPrintf("NCFG_WriteBackupMemory(%d): %d\n", index, result);
|
||||
OS_TPrintfEx("% 256.16b", buf);
|
||||
OS_TPrintf("\n");
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitDEMOSystem
|
||||
|
||||
Description: コンソールの画面出力用の表示設定を行います。
|
||||
|
||||
Arguments: なし。
|
||||
|
||||
Returns: なし。
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void InitDEMOSystem(void)
|
||||
{
|
||||
// 画面表示の初期化。
|
||||
DEMOInitCommon();
|
||||
DEMOInitVRAM();
|
||||
DEMOInitDisplayBitmap();
|
||||
DEMOHookConsole();
|
||||
DEMOSetBitmapTextColor(GX_RGBA(31, 31, 31, 1));
|
||||
DEMOSetBitmapGroundColor(DEMO_RGB_CLEAR);
|
||||
DEMOStartDisplay();
|
||||
}
|
||||
34
build/debugsoft/Jpeg/Makefile
Normal file
34
build/debugsoft/Jpeg/Makefile
Normal file
@ -0,0 +1,34 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests
|
||||
# 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$
|
||||
#----------------------------------------------------------------------------
|
||||
TARGET_PLATFORM = TWL NITRO
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = SdToPhoto
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
#===== End of Makefile =====
|
||||
|
||||
|
||||
138
build/debugsoft/Jpeg/SdToPhoto/Makefile
Normal file
138
build/debugsoft/Jpeg/SdToPhoto/Makefile
Normal file
@ -0,0 +1,138 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tools - NandFiler
|
||||
# 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.cpp
|
||||
TARGET_NAME = sd2photo
|
||||
TWLNMENU_ROOT ?= .
|
||||
|
||||
|
||||
#-------------------------
|
||||
#-- バナーデータを生成します
|
||||
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)$(ROM_SPEC_NAME_PART).autogen.rsf
|
||||
ROM_SPEC_TEMPLATE = $(ROOT)/include/twl/specfiles/ROM-TS_sys.rsf
|
||||
ROM_SPEC_PARAM = MakerCode=01 \
|
||||
GameCode=4S01 \
|
||||
Secure=TRUE \
|
||||
BannerFile=./banner/banner.bnr \
|
||||
NANDAccess=TRUE \
|
||||
SDCardAccess=TRUE \
|
||||
TitleName=$(TARGET_NAME)
|
||||
|
||||
#-------------------------
|
||||
#-- CARD, NANDによるオプションの指定
|
||||
|
||||
TWL_NANDAPP = TRUE
|
||||
|
||||
ifeq ($(APP_TYPE),)
|
||||
APP_TYPE = CARD
|
||||
endif
|
||||
|
||||
ifeq ($(APP_TYPE),CARD)
|
||||
MEDIA = GameCard
|
||||
SUFFIX = .srl
|
||||
endif
|
||||
|
||||
ifeq ($(APP_TYPE),NAND)
|
||||
MEDIA = NAND
|
||||
SUFFIX = .tad
|
||||
ROM_SPEC_NAME_PART := $(ROM_SPEC_NAME_PART).nand
|
||||
endif
|
||||
|
||||
ROM_SPEC_PARAM += Media=$(MEDIA)
|
||||
TARGET_BIN = $(TARGET_NAME)$(SUFFIX)
|
||||
|
||||
#-------------------------
|
||||
# 対象拡張子のためのインクルードファイルを決定
|
||||
ifneq ($(SUFFIX_DEFINE),)
|
||||
SUFFIX_FILE = $(SUFFIX_DEFINE)
|
||||
else
|
||||
SUFFIX_FILE = default_suffix.h
|
||||
endif
|
||||
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
#-------------------------
|
||||
# セキュア用
|
||||
MAKEROM := $(TWL_TOOLSDIR)/bin/makerom.TWL.secure.exe
|
||||
MAKETAD_OPTION := -s
|
||||
|
||||
|
||||
#-------------------------
|
||||
# ビルドパラメータ
|
||||
INCDIR = $(TWLSYSTEM_ROOT)/include \
|
||||
./include
|
||||
|
||||
|
||||
#-------------------------
|
||||
# インストール指定
|
||||
|
||||
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/$(TARGET_NAME)
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
endif
|
||||
|
||||
#-------------------------
|
||||
# 対象拡張子のためのインクルードファイルをビルドディレクトリにコピー
|
||||
.PHONY: suffix
|
||||
|
||||
suffix:
|
||||
cp $(SUFFIX_FILE) ./include/suffix.h
|
||||
|
||||
#-------------------------
|
||||
# ビルド
|
||||
do-build: suffix $(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
build/debugsoft/Jpeg/SdToPhoto/banner/banner.bnr
Normal file
BIN
build/debugsoft/Jpeg/SdToPhoto/banner/banner.bnr
Normal file
Binary file not shown.
9
build/debugsoft/Jpeg/SdToPhoto/default_suffix.h
Normal file
9
build/debugsoft/Jpeg/SdToPhoto/default_suffix.h
Normal file
@ -0,0 +1,9 @@
|
||||
namespace{
|
||||
const char* SUFFIX[] =
|
||||
{
|
||||
".jpg",
|
||||
".jpeg",
|
||||
".JPG",
|
||||
".JPEG",
|
||||
};
|
||||
}
|
||||
28
build/debugsoft/Jpeg/SdToPhoto/readme.txt
Normal file
28
build/debugsoft/Jpeg/SdToPhoto/readme.txt
Normal file
@ -0,0 +1,28 @@
|
||||
sd2photo
|
||||
|
||||
*概要
|
||||
SDカード内を走査して、指定した拡張子のファイルを探し、
|
||||
"photo:/"以下へコピーするツールです。
|
||||
|
||||
*拡張子の指定方法
|
||||
コピー対象とする拡張子を記述したファイルをビルド時に指定します。
|
||||
具体的な指定はmake時に下記の変数を渡すことで行ってください。
|
||||
|
||||
SUFFIX_DEFINE=hoge
|
||||
|
||||
省略すると、default_suffix.h が指定されます。(".jpg", ".jpeg", ".JPG", "JPEG"に対応します。)
|
||||
|
||||
*操作方法
|
||||
SDカードを挿入した状態でデバッガ等で起動してください。
|
||||
(SDを指さずに起動すると画面が赤くなり、SDが挿されるまで待ちます)
|
||||
|
||||
自動的に、ファイルの検索とコピーが始まります。
|
||||
|
||||
検索、コピー中は、画面の色が緑色になっています。
|
||||
(SDを抜いたり電源を切ったりしないほうが無難です。)
|
||||
処理が終わったら青色になります。
|
||||
|
||||
*仕様
|
||||
・フォルダ構成をそのままコピーします。例えば、SD上で"/test/aa.jpg"があったとすれば、NAND上で"photo:/test/aa.jpg"が作成されます。
|
||||
・NAND上に同名のファイルが存在する場合、問答無用に上書きされます。
|
||||
・残り容量が少ない場合、上書きになる場合でもファイルをコピーできないことがあります。
|
||||
286
build/debugsoft/Jpeg/SdToPhoto/src/main.cpp
Normal file
286
build/debugsoft/Jpeg/SdToPhoto/src/main.cpp
Normal file
@ -0,0 +1,286 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tools - NandFiler
|
||||
File: main.cpp
|
||||
|
||||
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>
|
||||
#include <nitro/fs.h>
|
||||
#include <nitro/std.h>
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include "suffix.h"
|
||||
|
||||
inline void* operator new(size_t size) { return OS_Alloc(size); }
|
||||
inline void* operator new[](size_t size) { return OS_Alloc(size); }
|
||||
inline void operator delete(void* ptr) { OS_Free(ptr); }
|
||||
inline void operator delete[](void* ptr) { OS_Free(ptr); }
|
||||
|
||||
typedef std::list<std::string> PathList;
|
||||
|
||||
namespace
|
||||
{
|
||||
void
|
||||
InitInterrupt(void)
|
||||
{
|
||||
OS_EnableIrq();
|
||||
OS_EnableInterrupts();
|
||||
}
|
||||
|
||||
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();
|
||||
static void InitFileSystem();
|
||||
|
||||
static void PickupTargetPath(const char* root, const char* suffix, PathList& out);
|
||||
static void CopyTarget(const char* to, const char* header, PathList& out);
|
||||
static void CopyFile(const char* src, const char* dest);
|
||||
|
||||
void
|
||||
TwlStartUp()
|
||||
{
|
||||
OS_Init();
|
||||
InitAlloc();
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: TwlMain
|
||||
|
||||
Description: メイン関数です。
|
||||
|
||||
Arguments: なし。
|
||||
|
||||
Returns: なし。
|
||||
*---------------------------------------------------------------------------*/
|
||||
void TwlMain(void)
|
||||
{
|
||||
InitInteruptSystem();
|
||||
InitFileSystem();
|
||||
|
||||
GX_DispOn();
|
||||
GXS_DispOn();
|
||||
|
||||
// SDがささってなかったら刺さるまで待つ
|
||||
{
|
||||
FSArchiveResource res;
|
||||
while(!FS_GetArchiveResource("sdmc:/", &res))
|
||||
{
|
||||
*(u16*)HW_PLTT = static_cast<u16>(0x001f);
|
||||
*(u16*)HW_DB_PLTT = static_cast<u16>(0x001f);
|
||||
}
|
||||
}
|
||||
|
||||
PathList path;
|
||||
|
||||
for(u32 i = 0; i < sizeof(SUFFIX) / sizeof(char*); ++i)
|
||||
{
|
||||
PickupTargetPath("sdmc:/", SUFFIX[i], path);
|
||||
}
|
||||
CopyTarget("nand2:/photo", "sdmc:", path);
|
||||
|
||||
|
||||
*(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);
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitFileSystem
|
||||
|
||||
Description: FS を初期化して rom にアクセスできるようにします。
|
||||
この関数を呼び出す前に InitInteruptSystem() が
|
||||
呼ばれている必要があります。
|
||||
|
||||
Arguments: なし。
|
||||
|
||||
Returns: なし。
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void InitFileSystem()
|
||||
{
|
||||
// ARM7との通信FIFO割り込み許可
|
||||
(void)OS_EnableIrqMask(OS_IE_SPFIFO_RECV);
|
||||
|
||||
// ファイルシステム初期化
|
||||
FS_Init( FS_DMA_NOT_USE );
|
||||
}
|
||||
|
||||
|
||||
static void PickupTargetPath(const char* root, const char* suffix, PathList& out)
|
||||
{
|
||||
FSFile fp;
|
||||
FSDirectoryEntryInfo fdei;
|
||||
BOOL result;
|
||||
|
||||
FS_InitFile(&fp);
|
||||
// ディレクトリのオープン
|
||||
result = FS_OpenDirectory(&fp, root, NULL);
|
||||
if(!result)
|
||||
{
|
||||
OS_TPrintf("%s: Fail Open\nErrorCode:%d\n", root, FS_GetArchiveResultCode(root));
|
||||
return;
|
||||
}
|
||||
|
||||
while(FS_ReadDirectory(&fp, &fdei))
|
||||
{
|
||||
if(STD_StrCmp(fdei.longname, ".") == 0 || STD_StrCmp(fdei.longname, "..") == 0)
|
||||
continue;
|
||||
|
||||
OS_TPrintf("%s:\n", fdei.longname);
|
||||
// ディレクトリなら子を読む
|
||||
if(fdei.attributes & FS_ATTRIBUTE_IS_DIRECTORY)
|
||||
{
|
||||
PickupTargetPath((std::string(root) + fdei.longname + "/").c_str(), suffix, out);
|
||||
}
|
||||
else // ファイルならoutに追加
|
||||
{
|
||||
// 拡張子を判定
|
||||
if(std::string(fdei.longname).rfind(suffix) + STD_StrLen(suffix) == STD_StrLen(fdei.longname))
|
||||
{
|
||||
out.push_back(std::string(root) + fdei.longname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FS_CloseDirectory(&fp);
|
||||
|
||||
}
|
||||
|
||||
static void CopyTarget(const char* to, const char* header, PathList& list)
|
||||
{
|
||||
PathList::iterator itr = list.begin(), end = list.end();
|
||||
u16 color = 0;
|
||||
for(; itr != end; ++itr)
|
||||
{
|
||||
std::string dest = std::string(to) + (*itr).substr(static_cast<u32>(STD_StrLen(header)));
|
||||
|
||||
CopyFile((*itr).c_str(), dest.c_str());
|
||||
color = static_cast<u16>((color + 2) & 0x001f);
|
||||
*(u16*)HW_PLTT = static_cast<u16>(color << 5);
|
||||
*(u16*)HW_DB_PLTT = static_cast<u16>(color << 5);
|
||||
}
|
||||
}
|
||||
|
||||
static void CopyFile(const char* src, const char* dest)
|
||||
{
|
||||
FSFile sfp, dfp;
|
||||
BOOL result;
|
||||
std::string tmp_name = dest;
|
||||
|
||||
tmp_name += "___tmp";
|
||||
|
||||
OS_TPrintf("Copying %s...", dest);
|
||||
|
||||
// テンポラリファイルにコピー
|
||||
FS_DeleteFile(tmp_name.c_str());
|
||||
result = FS_CreateFileAuto(tmp_name.c_str(), FS_PERMIT_R | FS_PERMIT_W);
|
||||
// result = FS_CreateFileAuto(dest, FS_PERMIT_R | FS_PERMIT_W);
|
||||
if(!result)
|
||||
{
|
||||
OS_TPrintf("%s:Cant create\n", tmp_name.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
result = FS_OpenFileEx(&sfp, src, FS_FILEMODE_R);
|
||||
if(!result)
|
||||
{
|
||||
OS_TPrintf("%s:Cant open\n", src);
|
||||
return;
|
||||
}
|
||||
|
||||
result = FS_OpenFileEx(&dfp, tmp_name.c_str(), FS_FILEMODE_W);
|
||||
if(!result)
|
||||
{
|
||||
OS_TPrintf("%s:Cant open\n", src);
|
||||
FS_CloseFile(&sfp);
|
||||
return;
|
||||
}
|
||||
|
||||
const u32 BUFSIZE = 4096;
|
||||
u8 buf[BUFSIZE];
|
||||
s32 count = 0;
|
||||
while((count = FS_ReadFile(&sfp, buf, BUFSIZE)) > 0)
|
||||
{
|
||||
s32 write = FS_WriteFile(&dfp, buf, count);
|
||||
if(write <= 0)
|
||||
{
|
||||
OS_TPrintf("Cant Write\n");
|
||||
FS_CloseFile(&sfp);
|
||||
FS_CloseFile(&dfp);
|
||||
FS_DeleteFile(tmp_name.c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
FS_CloseFile(&sfp);
|
||||
FS_CloseFile(&dfp);
|
||||
|
||||
// テンポラリファイルをリネーム
|
||||
// すでにファイルが存在するなら削除
|
||||
FS_DeleteFileAuto(dest);
|
||||
FS_RenameFile(tmp_name.c_str(), dest);
|
||||
|
||||
OS_TPrintf("...ok\n");
|
||||
}
|
||||
|
||||
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set0.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set0.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set1.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set1.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set2.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set2.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set3.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set3.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set4.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set4.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set5.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set5.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set6.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/armadillo_set6.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/mongoose_set2.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/mongoose_set2.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/mongoose_set3.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/mongoose_set3.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/mongoose_set4.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/mongoose_set4.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/mongoose_set5.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/mongoose_set5.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/mongoose_set6.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/mongoose_set6.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/racoon_set2.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/racoon_set2.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/racoon_set3.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/racoon_set3.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/racoon_set4.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/racoon_set4.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/racoon_set5.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/racoon_set5.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/racoon_set6.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/racoon_set6.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/tarsier_set2.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/tarsier_set2.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/tarsier_set3.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/tarsier_set3.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/tarsier_set4.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/tarsier_set4.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/tarsier_set5.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/tarsier_set5.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Dev/tarsier_set6.srl
Normal file
BIN
build/debugsoft/KeyCheck/Dev/tarsier_set6.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set0.srl
Normal file
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set0.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set1.srl
Normal file
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set1.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set2.srl
Normal file
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set2.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set3.srl
Normal file
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set3.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set4.srl
Normal file
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set4.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set5.srl
Normal file
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set5.srl
Normal file
Binary file not shown.
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set6.srl
Normal file
BIN
build/debugsoft/KeyCheck/Prod/armadillo_set6.srl
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user