DispOwnerInfoテストプログラムの追加。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2820 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
yosiokat 2009-05-20 10:14:53 +00:00
parent 3cfe0cca99
commit 52325f1afa
34 changed files with 4917 additions and 0 deletions

View File

@ -0,0 +1,103 @@
#! make -f
#----------------------------------------------------------------------------
# Project: debugIPL2
# File: Makefile
#
# Copyright 2003,2004 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: Makefile,v $
# Revision 1.10.2.1 2006/02/01 05:10:42 yosiokat
# ビルドソースにIPLType.cを追加。
#
# Revision 1.10 2005/04/14 05:53:29 yosiokat
# NITRO設定データ関係を強制的に中国版にするスイッチFORCE_CHINAを追加。
#
# Revision 1.9 2005/04/07 02:23:25 yosiokat
# リリースタイム更新用のルール追加。
#
# Revision 1.8 2005/04/06 02:19:03 yosiokat
# ソースのcheckFontData.cをcheckIPL2Font.cに変更。
#
# Revision 1.7 2005/04/05 08:05:14 yosiokat
# BUILD_MAINTEスイッチによって、共通ソースからDebugToolForIPL2とMaintenanceToolForIPL2
# をビルドできるよう変更。
#
# Revision 1.6 2005/03/31 05:45:12 yosiokat
# rev.1.5は間違いNitroConfigData.cに戻す。
#
# Revision 1.5 2005/03/31 05:44:17 yosiokat
# NitroConfigData.cをnitroConfigData.cに戻す。
#
# Revision 1.4 2005/03/28 09:34:12 yosiokat
# バナー追加。
#
# Revision 1.3 2005/03/09 04:44:11 yosiokat
# 機能追加。
#
# Revision 1.2 2004/09/23 11:27:45 yosiokat
# small fix.
#
# Revision 1.1.1.1 2004/08/31 06:20:24 Yosiokat
# no message
#
#
# $NoKeywords: $
#----------------------------------------------------------------------------
SUBDIRS = banner
#----------------------------------------------------------------------------
TARGET_NEF = DebugForIPL2.nef
TARGET_BIN = DebugForIPL2.srl
SRCS = main.c initFunc.c font.c data.c dispNCD.c myFunc.c myChar.c
FONT_DIR = font
FONTS = f08han.dat f08zen.dat f10han.dat f10zen.dat f12han.dat f12zen.dat f16han.dat f16zen.dat
FONT_DATAS = $(addprefix $(FONT_DIR)/, $(FONTS))
FONT_OBJS = $(FONT_DATAS:.dat=.o)
ROM_SPEC = main.rsf
#LCFILE_SPEC = # using default
#SRCDIR = # using default
# makerom settings
MAKEROM_ROMROOT = ./data
MAKEROM_ROMFILES = *.bin
LINCLUDES += include
LLIBRARY_DIRS += mlib/$(NITRO_LIBTYPE)
LLIBRARIES += libfnt.a
LDIRT_CLEAN = $(FONT_DIR)/*.o
include $(NITROSDK_ROOT)/build/buildtools/commondefs
CCFLAGS += -DSDK_NCD_LOCAL_USE -DD$(IPL2_VER)
#----------------------------------------------------------------------------
do-build: $(FONT_OBJS) $(TARGETS)
include $(NITROSDK_ROOT)/build/buildtools/modulerules
OBJS_STATIC += $(FONT_OBJS)
$(TARGETS) : $(MAKEROM_ARM7)
$(FONT_DIR)/%.o : $(FONT_DIR)/%.dat
$(CW_BINDIR)/BinToElf.exe $< -aligndata 4 -endian little -output $@
release:
updateReleasetime.plx src/mainMenu.c
#===== End of Makefile =====

View File

@ -0,0 +1,73 @@
#! make -f
#---------------------------------------------------------------------------
# Project: NitroSDK - tools
# File: Makefile
#
# Copyright 2003,2004 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: Makefile,v $
# Revision 1.3 2005/04/14 05:58:28 yosiokat
# NITRO設定データ関係を強制的に中国版にするスイッチFORCE_CHINAを追加。
#
# Revision 1.2 2005/04/02 10:00:08 yosiokat
# BUILD_MAINTE=TRUE時には、バナータイトルを変えるようにする。
#
# Revision 1.1 2005/03/28 09:36:16 yosiokat
# バナー追加。
#
# Revision 1.2 2004/10/18 05:37:51 yasu
# Fix how to make banners
#
# Revision 1.1 2004/09/21 02:02:53 yasu
# Demo for building final rom
#
# Revision 1.1 2004/09/17 09:10:59 yasu
# Build default banner file for SDK demos
#
# $NoKeywords: $
#---------------------------------------------------------------------------
include $(NITROSDK_ROOT)/build/buildtools/commondefs
BANNER_ICON = myGameIcon.bmp
BANNER_SPEC = myGameBanner.bsf
TARGETS = myGameBanner.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 $(NITROSDK_ROOT)/build/buildtools/modulerules
#----------------------------------------------------------------------------
# build
#----------------------------------------------------------------------------
do-build: $(TARGETS)
$(TARGETS): $(BANNER_SPEC) $(BANNER_ICON)
$(NTEXCONV) -no -bg -bgb -bgnc $(BANNER_ICON) >/dev/null && \
$(MAKEBANNER) -d -N $(BANNER_ICON_NAME) $(BANNER_SPEC) $(TARGETS)
#----------------------------------------------------------------------------
# test
#----------------------------------------------------------------------------
include $(NITROSDK_ROOT)/build/buildtools/commondefs.emtype.ISD
test: $(TARGETS)
$(ADDBANNER) $(TARGETS) $(TARGETS:.bnr=.srl)
ifdef ISD_NITLOAD
$(ISD_NITLOAD) $(TARGETS:.bnr=.srl)
endif
#

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,9 @@
#ifndef FNT_H_
#define FNT_H_
#include "fnt/fnt_enum.h"
#include "fnt/fnt_struct.h"
#include "fnt/fnt_func.h"
#include "fnt/fnt_data.h"
#endif // FNT_H_

View File

@ -0,0 +1,32 @@
extern u8 NITRO_LC_Font_t_bncmp[];
extern u8 NITRO_LC_Font_t_bncmp_end[];
extern u8 NITRO_LC_Font_t_bnfr[];
extern u8 NITRO_LC_Font_t_bnfr_end[];
extern u8 NITRO_LC_Font_s_bncmp[];
extern u8 NITRO_LC_Font_s_bncmp_end[];
extern u8 NITRO_LC_Font_s_bnfr[];
extern u8 NITRO_LC_Font_s_bnfr_end[];
extern u8 NITRO_LC_Font_Chinese_t_bncmp[];
extern u8 NITRO_LC_Font_Chinese_t_bncmp_end[];
extern u8 NITRO_LC_Font_Chinese_t_bnfr[];
extern u8 NITRO_LC_Font_Chinese_t_bnfr_end[];
extern u8 NITRO_LC_Font_Chinese_s_bncmp[];
extern u8 NITRO_LC_Font_Chinese_s_bncmp_end[];
extern u8 NITRO_LC_Font_Chinese_s_bnfr[];
extern u8 NITRO_LC_Font_Chinese_s_bnfr_end[];
extern u8 NITRO_LC_Font_Hangul_t_bncmp[];
extern u8 NITRO_LC_Font_Hangul_t_bncmp_end[];
extern u8 NITRO_LC_Font_Hangul_t_bnfr[];
extern u8 NITRO_LC_Font_Hangul_t_bnfr_end[];
extern u8 NITRO_LC_Font_Hangul_s_bncmp[];
extern u8 NITRO_LC_Font_Hangul_s_bncmp_end[];
extern u8 NITRO_LC_Font_Hangul_s_bnfr[];
extern u8 NITRO_LC_Font_Hangul_s_bnfr_end[];
extern u8 NITRO_LC_Font_s_NAT_WW_bncmp[];
extern u8 NITRO_LC_Font_s_NAT_WW_bncmp_end[];
extern u8 NITRO_LC_Font_s_NAT_WW_bnfr[];
extern u8 NITRO_LC_Font_s_NAT_WW_bnfr_end[];
extern u8 NITRO_LC_Font_s_NAT_KR_bncmp[];
extern u8 NITRO_LC_Font_s_NAT_KR_bncmp_end[];
extern u8 NITRO_LC_Font_s_NAT_KR_bnfr[];
extern u8 NITRO_LC_Font_s_NAT_KR_bnfr_end[];

View File

@ -0,0 +1,35 @@
#ifndef FNT_ENUM_H_
#define FNT_ENUM_H_
enum tFntDrawContextType
{
FNT_DCTYPE_4BITS,
FNT_DCTYPE_8BITS,
FNT_DCTYPE_LAST
};
enum tFntPosXOrigin
{
FNT_POSX_ORIGIN_LEFT,
FNT_POSX_ORIGIN_CENTER,
FNT_POSX_ORIGIN_RIGHT,
FNT_POSX_ORIGIN_LAST
};
enum tFntPosYOrigin
{
FNT_POSY_ORIGIN_TOP,
FNT_POSY_ORIGIN_CENTER,
FNT_POSY_ORIGIN_BOTTOM,
FNT_POSY_ORIGIN_LAST
};
enum tFntTextHAlign
{
FNT_H_ALIGN_LEFT,
FNT_H_ALIGN_CENTER,
FNT_H_ALIGN_RIGHT,
FNT_H_ALIGN_LAST
};
#endif // FNT_ENUM_H_

View File

@ -0,0 +1,50 @@
#ifndef FNT_FUNC_H_
#define FNT_FUNC_H_
// fnt_utils.c
extern int fnt_GetLeftFromOrigin( tFntPosition posx, int width );
extern int fnt_GetTopFromOrigin ( tFntPosition posy, int height );
// fnt_font.c
extern void fnt_CreateFont ( tFntEntry* font, const void* fontRsrc, const void* cmapRsrc );
extern void fnt_CreateDrawContext( tFntDrawContext* dc, u16* canvas, u16 width, u16 height, int type, tFntEntry* font );
extern void fnt_DrawLetter ( tFntEntry* font, tFntDrawContext* dc, s32 x, s32 y, u16 letter, int palette );
extern void fnt_DrawLetterGlyph( tFntEntry* font, tFntDrawContext* dc, s32 x, s32 y, u16 glyph, int palette );
extern void fnt_DrawString ( tFntEntry* font, tFntDrawContext* dc, tFntPosition posx, tFntPosition posy, int step_x, int step_y, const u16* str, int palette );
extern int fnt_GetLetterWidth ( tFntEntry* font, u16 letter );
extern int fnt_GetLetterOffset( tFntEntry* font, u16 letter );
extern void fnt_DrawLetterGlyphFast( tFntEntry* font, tFntDrawContext* dc, s32 x, s32 y, u16 glyph, int palette );
extern BOOL fnt_SetDefaultLetter( tFntEntry* font, u16 letter );
extern const u16* fnt_GetLineWidth ( tFntEntry* font, const u16* str, int* pwidth, int step_x );
extern int fnt_GetStringWidth ( tFntEntry* font, const u16* str, int step_x );
extern int fnt_GetStringHeight( tFntEntry* font, const u16* str, int step_y );
extern void fnt_ClearRect( tFntDrawContext* dc, u16 x, u16 y, u16 height, u16 width );
// fnt_layout.c
extern void fnt_DrawMessage ( tFntDrawContext* dc, tFntMessage* message, const u16* mes_data );
extern void fnt_DrawLetterLayout( tFntDrawContext* dc, const void* layout );
extern tFntMessage* fnt_GetFntMessage ( const void* layout, int index );
extern const u16* fnt_GetMessage ( const void* layout, int index );
extern int fnt_GetMessageNum ( const void* layout );
extern int fnt_LoadCelltoOam ( const void* celldata, GXOamAttr* poam, tFntPosition posx, tFntPosition posy, int cell_index );
extern int fnt_DrawCellLayout ( const void* celldata, const void* layout, GXOamAttr* poam );
// fnt_celldata.c
extern int fnt_GetCellOamNum ( const void* celldata, int index );
extern tFntCellCharInfo* fnt_GetCellCharInfo ( const void* celldata, int index );
extern tFntCellCharOam* fnt_GetCellOam ( const void* celldata, int index );
extern const void* fnt_GetCellObjChar ( const void* celldata );
extern u32 fnt_GetCellObjCharSizeAll( const void* celldata );
extern int fnt_GetCellCharVramMode ( const void* celldata );
extern int fnt_GetCellCharNameShift ( const void* celldata );
// fnt_touch.c
extern int fnt_GetFntRegionNum ( const void* base );
extern tFntRegion* fnt_GetFntRegion ( const void* base, int index );
extern int fnt_GetHitFntRegionIndex( const void* base, int x, int y );
#endif // FNT_FUNC_H_

View File

@ -0,0 +1,224 @@
#ifndef FNT_STRUCT_H_
#define FNT_STRUCT_H_
/** --------------------------------------------------------------------
----------------------------------------------------------------------*/
typedef struct tagFntCellInfo
{
u16 width : 5; // 最大32
u16 height : 5; // 最大32
u16 dummy : 6;
} tFntCellInfo;
/** --------------------------------------------------------------------
----------------------------------------------------------------------*/
typedef struct tagFntWidthEntry
{
u16 offset : 8; // オフセット(書きはじめまでのピクセル数)
u16 width : 8; // 幅
} tFntWidthEntry;
/** --------------------------------------------------------------------
CMAPの連続領域用構造体
----------------------------------------------------------------------*/
typedef struct tagFntCtEntry
{
u16 start;
u16 end;
} tFntCtEntry;
/** --------------------------------------------------------------------
----------------------------------------------------------------------*/
typedef struct tagFntEntry
{
const u16* font_image; // フォントイメージへのポインタ
const u16* cmap; // コード->glyph変換用cmapへのポインタ
tFntCtEntry* ctmap; // コード->glyph変換用cmapへのポインタ
tFntWidthEntry* width_table; // 幅テーブル
u16 glyph_num; // glyph数
u16 default_glyph; // 見つからなかったときに使われる文字のglyph
s16 cell_size; // 一文字のセルサイズ(ワード単位)
tFntCellInfo cell_info; // セルの情報
u16 cmap_num; // glyph_comp == 1のときのcmapの数
u16 ctmap_num; // glyph_comp == 1のときのctmapの数
u32 glyph_sort : 1; // グリフがソートされているかどうか
u32 glyph_comp : 1; // グリフの連続されている部分が圧縮されているかどうか
} tFntEntry;
/** --------------------------------------------------------------------
----------------------------------------------------------------------*/
typedef struct tagFntDrawContext
{
u16* canvas;
u16 width;
u16 height;
u16 canvas_type;
u8 pad[2];
tFntEntry* font;
} tFntDrawContext;
/** --------------------------------------------------------------------
----------------------------------------------------------------------*/
/** --------------------------------------------------------------------
----------------------------------------------------------------------*/
typedef struct tagFntLayoutHeader
{
u8 name[4];
u16 version;
u16 table_num;
} tFntLayoutHeader;
/** --------------------------------------------------------------------
CMAPヘッダー
----------------------------------------------------------------------*/
typedef struct tagFntCmapHeader
{
u32 ct_offset;
u32 cm_offset;
} tFntCmapHeader;
/** --------------------------------------------------------------------
----------------------------------------------------------------------*/
typedef struct tagFntPosition
{
s16 pos : 12;
u16 pos_origin : 2;
u16 text_align : 2;
} tFntPosition; // この宣言でも、2Bytesにきちんと収まる。処理系によっては、sizeof()でチェックすること。
/** ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/** --------------------------------------------------------------------
tFntLayoutHeader header;
tFntMessage message[header.table_num];
----------------------------------------------------------------------*/
typedef struct tagFntMessage
{
// 位置
tFntPosition x;
tFntPosition y;
// 文字間隔
s16 spacing_x : 8;
s16 spacing_y : 8;
// 色
u16 color : 8;
u16 palette : 4;
u16 font : 4;
// メッセージへのオフセット
u32 offset;
} tFntMessage;
/** ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
OBJのセルを扱うための構造体
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/** --------------------------------------------------------------------
tFntLayoutHeader header;
tFntCell cell[header.table_num];
----------------------------------------------------------------------*/
typedef struct tagFntCell
{
// 位置
tFntPosition x;
tFntPosition y;
// セルキャラクタへのインデックス
u32 cell_index;
} tFntCell;
/** --------------------------------------------------------------------
tFntLayoutHeader header;
tFntCellCharHeader char_header;
tFntCellCharInfo cellchar_info[header.table_num];
tFntCellCharOam cellchar_oam[];
u16 char_data[];
----------------------------------------------------------------------*/
/** --------------------------------------------------------------------
----------------------------------------------------------------------*/
typedef struct tagFntCellCharHeader
{
u32 cell_offset; // tFntCellChar配列へのオフセット
u32 oam_offset; // tFntOamChar配列へのオフセット
u32 char_offset; // キャラクタデータへのオフセット
u32 char_size; // キャラクタデータのサイズ
u32 char_mode : 3; // OBJVRAMMODE_CHAR_1DのEXOBJフラグ
} tFntCellCharHeader;
/** --------------------------------------------------------------------
----------------------------------------------------------------------*/
typedef struct tagFntCellCharInfo
{
u16 width : 8; // セルの大きさ情報。
u16 height : 8;
u16 oam_index; // oam_offset[oam_index] から、
u16 oam_num; // oam_num分だけのoamを使用します。
} tFntCellCharInfo;
/** --------------------------------------------------------------------
OAM情報
----------------------------------------------------------------------*/
typedef struct tagFntCellCharOam
{
GXOamAttr attr; // CharNameの部分は、使用しません。ロード位置をユーザ定義にするため。
u16 char_index; // キャラクタデータのインデックス。
u16 char_num; // キャラクタデータの数。最大、64ぐらい
} tFntCellCharOam;
/** ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/** --------------------------------------------------------------------
----------------------------------------------------------------------*/
typedef struct tagFntRegion
{
// 位置
tFntPosition x;
tFntPosition y;
// サイズ
u16 width : 8; // セルの大きさ情報。
u16 height : 8;
} tFntRegion;
#endif // FNT_STRUCT_H_

View File

@ -0,0 +1,39 @@
#
# Nitro ROM SPEC FILE
#
Arm9
{
Static "$(MAKEROM_ARM9:r).sbin"
OverlayDefs "$(MAKEROM_ARM9:r)_defs.sbin"
OverlayTable "$(MAKEROM_ARM9:r)_table.sbin"
Nef "$(MAKEROM_ARM9:r).nef"
}
Arm7
{
Static "$(MAKEROM_ARM7:r).sbin"
OverlayDefs "$(MAKEROM_ARM7:r)_defs.sbin"
OverlayTable "$(MAKEROM_ARM7:r)_table.sbin"
Nef "$(MAKEROM_ARM7:r).nef"
}
Property
{
BannerFile ./banner/myGameBanner.bnr
# RomSpeedType MROM
}
RomSpec
{
Offset 0x00000000
Segment ALL
Align 512
Padding 0xFF
HostRoot data
Root /data
File *.bncmp *.bnfr
}

Binary file not shown.

View File

@ -0,0 +1,679 @@
/********************************************************************/
/* NitroConfigData.h */
/* NITRO-IPL */
/* */
/* Copyright (C) 2003-2004 NINTENDO Co.,Ltd. */
/********************************************************************/
/*
NITR設定データ定義 
$Log: NitroConfigData.h,v $
Revision 1.4.2.2.4.1.4.1 2007/01/22 07:36:16 yosiokat
NAT-IPL2への対応
Revision 1.4.2.5 2006/06/26 02:57:54 yosiokat
Revision 1.4.2.4 2006/02/06 11:34:56 yosiokat
NCD_GetIPL2BM7RomAddr関数の追加
Revision 1.4.2.3 2006/02/06 08:27:19 yosiokat
IPL2バージョンの定義をIPLType.hの定義値を使うよう変更
Revision 1.4.2.2 2005/10/31 08:49:57 yosiokat
USG_BACKLIGHT_DEFAULTを"2"
Revision 1.4.2.1 2005/10/25 08:14:41 yosiokat
USG対応のため
NitroConfigData構造体にbackLightBrightnessを追加
IPL2_TYPE判定用の定数定義にUSGのものを追加
Revision 1.4 2005/04/01 05:45:04 yosiokat
Revision 1.3 2005/03/31 06:06:54 yosiokat
NitroConfigDataアクセス関数の全面改定
Revision 1.31.2.2 2005/03/16 00:36:01 yosiokat
NitroConfigDataExの新設とNitroConfigDataの取扱いの変更
Revision 1.31.2.1 2005/03/11 11:08:56 yosiokat
Revision 1.31 2005/02/15 02:38:27 yosiokat
NCD_CorrectDataの削除
Revision 1.30 2005/02/07 11:12:03 yosiokat
NCD_CorrectDataの追加
Revision 1.29 2004/09/25 10:42:54 Yosiokat
NvOption内のrsv領域にrtcOffset算出用パラメータrtcLastSetYearを保存するよう変更
Revision 1.28 2004/09/16 07:02:51 Yosiokat
NCD_ClearOwnerInfoの追加
Revision 1.27 2004/09/01 09:18:35 Yosiokat
NvOptionにdestroyFlashFlagを追加
NCD_GetDestroyFlashNCD_SetDestroyFlashを追加
Revision 1.26 2004/08/31 09:52:38 Yosiokat
small fix.
Revision 1.25 2004/08/27 12:36:08 Yosiokat
IPL2_BUILD_をSDK_SMALL_BUILDに変更
Revision 1.24 2004/08/25 09:27:41 Yosiokat
rsvに変更
NvAlarm.second
NvAlarm.enableWeek
NvOption.detectPullOutCardFlag
NvOption.detectPullOutCtrdgFlag
NvOption.timezone
Revision 1.23 2004/08/25 05:12:20 Yosiokat
red_ipl2_2004_08_24_pp2_isdbg_fixとのマージ
Revision 1.22 2004/08/25 01:28:23 Yosiokat
NvOption.backLightOffFlagがビットフィールドになっていなかったのを修正
NvOption.input_birthdayフラグを追加NCD_GetInputBirthdayNCD_SetInputBirthday
NCDStoreを32byte単位のサイズになるよう調整
Revision 1.21 2004/08/23 08:24:23 Yosiokat
ON,OFFフラグをIPl2_workから再度NitroConfigDataに戻す
Revision 1.20 2004/08/19 06:06:02 yosiokat
NitroConfigDataにビットフィールドが使われているため
SDK_CWが定義されていなければ
Revision 1.19 2004/08/18 07:33:00 Yosiokat
NCD_FAVORITE_COLOR_MAX_NUM追加
NitroConfigData.option.input_favoriteColor追加
Revision 1.18 2004/08/17 05:44:19 Nakasima
topLcdBackLightOffをNitroConfigDataからIPL2_workへ移動
detectPullOutFlagを削除しdetectPullOutCardFlaとdetectPullOutCtrdgFlagを追加
Revision 1.17 2004/08/16 10:13:09 Yosiokat
pullCardFlagをdetectPullOutFlagに変更
Revision 1.16 2004/08/16 10:09:34 Yosiokat
NvOptionにpullCardFlagを追加
Revision 1.15 2004/08/13 07:41:30 Yosiokat
NvOwnerInfoからsexを削除
NvOptionからbottomLcdBackLightOffを削除
NvOptionにautoBootFlagを追加
NCD_SetSex, NCD_GetSexを削除
NCD_GetRtcClockAdjustNCD_GetAutoBootFlagNCD_SetRtcClockAdjustNCD_SetAutoBootFlagの追加
Revision 1.14 2004/07/29 04:53:18 Yosiokat
Revision 1.13 2004/07/18 10:55:13 Yosiokat
NITRO設定データのセット関数を用意
Revision 1.12 2004/07/17 09:00:14 Yosiokat
Revision 1.11 2004/07/15 12:47:33 Yosiokat
Revision 1.10 2004/07/15 12:26:43 Yosiokat
NITRO設定データのフォーマットを変更
 a)
 b)
 c)
 d)
e)
Revision 1.9 2004/07/13 00:20:15 Yosiokat
small fix.
Revision 1.8 2004/07/05 02:29:23 Yosiokat
FRENCHに修正
Revision 1.7 2004/06/28 01:56:17 Yosiokat
ON,OFF設定の値を追加
TPRTC
"3"
Revision 1.6 2004/06/14 04:55:10 yosiokat
NitroConfigDataのrtcOffsetをintからs64に変更
NCDフォーマットのバージョンを"2"
Revision 1.5 2004/06/07 10:51:58 Yosiokat
SJISからUnicodeUTF16
Revision 1.4 2004/05/21 06:12:17 Yosiokat
C++};
Revision 1.3 2004/05/21 05:37:46 Yosiokat
TPキャリブレーションをNVRAMに保存するデータにLCDの左上ポイントLCDの右下ポイントを含めるよう変更8->12byteへ
SDKにconfig.hの名前でNitroConfigData.hと同一ファイルが入っていたのでMakefileでコンパイル時にIPL2_BUILD_シンボルを与えるよう変更
Revision 1.2 2004/05/19 08:25:28 yosiokat
*/
#ifndef NITRO_CONFIG_DATA_H_
#define NITRO_CONFIG_DATA_H_
#if defined(SDK_CW) // NitroConfigDataにビットフィールドを使っているので、コンパイラ依存で不具合が発生する可能性がある。
// よって、CW以外のコンパイラの場合は、このヘッダを無効にしてエラーを出させるようにして再確認する。
#ifdef __cplusplus
extern "C" {
#endif
#include <nitro.h>
#define USING_COMPONENT // IPL2上ではないので、このスイッチを有効に。
// define data ------------------------------------
#define NITRO_CONFIG_DATA_VERSION 5 // NITRO設定データフォーマットバージョン
#define NITRO_CONFIG_DATA_EX_VERSION 1 // 拡張NITRO設定データフォーマットバージョン
#define NCD_NICKNAME_LENGTH 10 // ニックネーム長
#define NCD_COMMENT_LENGTH 26 // コメント長
#define NCD_FAVORITE_COLOR_MAX_NUM 16 // 好きな色の最大数
#define NCD_ROM_ADDR_SHIFT 3 // IPL2ヘッダのNitroConfigData格納アドレスのシフト値
#define FONT_ROM_ADDR_SHIFT 2 // IPL2ヘッダのフォントデータ格納アドレスのシフト値
#define NCD_SYS_RSV_SIZE 1024 // システム予約領域サイズ
#define NCD_APP_RSV_SIZE 512 // アプリ 予約領域サイズ
// NCD_SYS_RSV_ROM_ADDR = ncd_rom_addr - NCD_SYS_RSV_SIZE
// NCD_APP_RSV_ROM_ADDR = ncd_rom_addr - NCD_SYS_RSV_SIZE - NCD_APP_RSV_SIZE
#define USG_BACKLIGHT_DEFAULT 2 // USGのバックライトデフォルト値
// 言語設定コード
typedef enum NvLangCode{
LANG_JAPANESE =0, // 日本語
LANG_ENGLISH, // 英語
LANG_FRENCH, // フランス語
LANG_GERMAN, // ドイツ語
LANG_ITALIAN, // イタリア語
LANG_SPANISH, // スペイン語
LANG_CHINESE, // 中国語
LANG_HANGUL, // 韓国語
LANG_CODE_MAX
}NvLangCode;
#define LANG_CODE_MAX_WW LANG_CHINESE // 中国版以前の通常版IPL2でのLANG_CODE_MAX
#define LANG_BITMAP_WW ( ( 0x0001 << LANG_JAPANESE ) \
| ( 0x0001 << LANG_ENGLISH ) \
| ( 0x0001 << LANG_FRENCH ) \
| ( 0x0001 << LANG_GERMAN ) \
| ( 0x0001 << LANG_ITALIAN ) \
| ( 0x0001 << LANG_SPANISH ) ) // 通常版での対応言語ビットマップ
#define LANG_BITMAP_CN ( ( 0x0001 << LANG_ENGLISH ) \
| ( 0x0001 << LANG_FRENCH ) \
| ( 0x0001 << LANG_GERMAN ) \
| ( 0x0001 << LANG_ITALIAN ) \
| ( 0x0001 << LANG_SPANISH ) \
| ( 0x0001 << LANG_CHINESE ) ) // 中国版での対応言語ビットマップ
#define LANG_BITMAP_KR ( ( 0x0001 << LANG_JAPANESE ) \
| ( 0x0001 << LANG_ENGLISH ) \
| ( 0x0001 << LANG_FRENCH ) \
| ( 0x0001 << LANG_GERMAN ) \
| ( 0x0001 << LANG_SPANISH ) \
| ( 0x0001 << LANG_HANGUL ) ) // 韓国版での対応言語ビットマップ
// 日付データ
typedef struct NvDate{
u8 month; // 月:0112
u8 day; // 日:0131
}NvDate; // 2byte
// ニックネーム
typedef struct NvNickname{
u16 str[NCD_NICKNAME_LENGTH]; // ニックネームUnicode(UTF16)で最大10文字、終端コードなし
u8 length; // 文字数
u8 rsv;
}NvNickname; // 22byte
// コメント
typedef struct NvComment{
u16 str[NCD_COMMENT_LENGTH]; //コメントUnicode(UTF16)で最大26文字、終端コードなし
u8 length; // 文字数
u8 rsv;
}NvComment; // 54byte
// オーナー情報
typedef struct NvOwnerInfo{
u8 favoriteColor : 4; // 好きな色
u8 rsv : 4; // 予約。
NvDate birthday; // 生年月日
u8 pad;
NvNickname nickname; // ニックネーム
NvComment comment; // コメント
}NvOwnerInfo; // 80byte
// IPL用目覚まし時計データ
typedef struct NvAlarm{
u8 hour; // アラーム時:0023
u8 minute; // アラーム分:0059
u8 rsv1; // 予約
u8 pad;
u16 alarmOn : 1; // アラームON,OFF0:OFF, 1:ON
u16 rsv2 : 15; // 予約
}NvAlarm; // 6byte
// タッチパネルキャリブレーションデータ
typedef struct NvTpCalibData{
u16 raw_x1; // 第キャリブレーション点のTP取得値X
u16 raw_y1; //             TP取得値Y
u8 dx1; //             LCD座標 X
u8 dy1; //             LCD座標 Y
u16 raw_x2; // 第キャリブレーション点のTP取得値X
u16 raw_y2; //             TP取得値Y
u8 dx2; //             LCD座標 X
u8 dy2; //             LCD座標 Y
}NvTpCalibData; // 12byte
// オプション情報
typedef struct NvOption{
u16 language : 3; // 言語コードLANG_SPANISHまでの標準言語コードが入る
u16 agbLcd : 1; // AGBモードで起動する時にどちらのLCDで起動するか0:TOP,1:BOTTOM
u16 backLightBrightness : 2; // バックライト輝度データ
u16 autoBootFlag : 1; // 起動シーケンスで、メニュー停止なしで自動起動するかどうか?(0:OFF, 1:ON)
u16 backLightOffFlag : 1; // バックライトON,OFFフラグ0:ON, 1:OFF
u16 rsv2 : 1; // 予約。
u16 destroyFlashFlag : 1; // フラッシュ壊れシーケンス中フラグ
u16 input_birthday : 1; // 誕生日が入力されたか?
u16 input_favoriteColor : 1; // 好きな色が入力されたか?
u16 input_tp : 1; // タッチパネルがキャリブレーションされたか?( 〃 )
u16 input_language : 1; // 言語入力がされたか?  (0:未設定, 1:設定済み)
u16 input_rtc : 1; // RTC設定がされたか ( 〃      )
u16 input_nickname : 1; // ニックネームが入力されたか? ( 〃      )
u8 rtcLastSetYear; // RTCの前回設定年
u8 rtcClockAdjust; // RTCクロック調整値
s64 rtcOffset; // RTC設定時のオフセット値ユーザーがRTC設定を変更する度にその値に応じて増減します。
}NvOption; // 12byte
// NITRO各種設定データ
typedef struct NitroConfigData{
u8 version; // フラッシュ格納データフォーマットのバージョン
u8 pad;
NvOwnerInfo owner; // オーナー情報
NvAlarm alarm; // IPL用目覚まし時計データ
NvTpCalibData tp; // タッチパネルキャリブレーションデータ
NvOption option; // オプション
}NitroConfigData; // 112byte
// NITRO各種設定データのNVRAM保存時フォーマット
typedef struct NCDStore{
NitroConfigData ncd; // NITRO各種設定データ
u16 saveCount; // 0x00-0x7fをループしてカウントし、カウント値が新しいデータが有効。
u16 crc16; // NITRO各種設定データの16bitCRC
u8 pad[ 128 - sizeof(NitroConfigData) - 4];
}NCDStore; // 128byte // ※本来なら、saveCountとcrc16は256byteの最後に付加して、間にパディングを埋める方がいい。
//----------------------------------------------
// IPL2中国版での拡張フォーマット
//----------------------------------------------
// 拡張NITRO設定データ
typedef struct NitroConfigDataEx{
u8 version; // バージョン
u8 language; // 言語コードLANG_CHINESE以降に拡張された値が入る。
u16 valid_language_bitmap; // 本IPL2で有効な言語コードを示したビットマップ
u8 pad[ 256 - sizeof(NitroConfigData) - 4 - 4 - 2 ]; // 4:saveCount+crc16, 2:NCDEx.version+NCDEx.language, 2:crc16_ex
}NitroConfigDataEx; // 138bytes
// NITRO各種設定データのNVRAM保存時フォーマット
typedef struct NCDStoreEx{
NitroConfigData ncd; // NITRO各種設定データ
u16 saveCount; // 0x00-0x7fをループしてカウントし、カウント値が新しいデータが有効。
u16 crc16; // NITRO各種設定データの16bitCRC
NitroConfigDataEx ncd_ex;
u16 crc16_ex;
}NCDStoreEx; // 256byte // ※本来なら、saveCountとcrc16は256byteの最後に付加して、間にパディングを埋める方がいい。
typedef struct NCDTimeStamp {
u8 minute;
u8 hour;
u8 day;
u8 month;
u8 year;
}NCDTimeStamp;
//=========================================================
// NVRAMへのリードライト関数
//=========================================================
#ifdef SDK_ARM9
extern int NVRAMm_ReadNitroConfigData (NitroConfigData *dstp);
extern void NVRAMm_WriteNitroConfigData(NitroConfigData *dstp);
#endif
//=========================================================
// NITRO設定データへのアクセス関数
//=========================================================
extern NitroConfigDataEx ncdEx;
extern u16 valid_lang_bitmap;
#define GetNcdWorkAddr() ( (NitroConfigData *)( HW_NVRAM_USER_INFO ) )
#define GetNcdExWorkAddr() ( &ncdEx )
// NITRO設定データ領域のアドレス獲得
extern void NCD_ClearOwnerInfo( void ); // ニックネーム・誕生日・好きな色のクリア
#ifdef USING_COMPONENT
extern void NCD_ReadIPL2Header ( void ); // IPL2ヘッダの読み出し。
extern u8 NCD_GetIPL2Type ( void ); // IPL2タイプの取得。
extern u16 NCD_GetIPL2TypeEx ( void ); // 拡張IPL2タイプの取得。
extern u8 *NCD_GetIPL2Version ( void ); // IPL2バージョンの取得。
extern u32 NCD_GetNCDRomAddr ( void ); // NCD格納ROMアドレスの取得。
extern u32 NCD_GetSysRsvRomAddr( void ); // システム予約領域ROMアドレスの取得。
extern u32 NCD_GetAppRsvRomAddr( void ); // アプリ 予約領域ROMアドレスの取得。
extern u32 NCD_GetIPL2BM7RomAddr( void ); // ブートメニューARM7コードROMアドレスの取得。
extern u32 NCD_GetIPL2DataRomAddr( void ); // IPL2データROMアドレスの取得。
extern u32 NCD_GetFontBncmpRomAddr( void ); // フォントデータbncmpのROMアドレス取得。中国版、日本向け試遊台版でのみ有効。
extern u32 NCD_GetFontBnfrRomAddr( void ); // フォントデータbnfr のROMアドレス取得。中国版、日本向け試遊台版でのみ有効。
#endif
//=========================================================
// データ取得
//=========================================================
//-----------------------------------
// オーナー情報全体の取得。
static inline NvOwnerInfo *NCD_GetOwnerInfo(void)
{
return &GetNcdWorkAddr()->owner;
}
// 好きな色の取得。
static inline u8 NCD_GetFavoriteColor(void)
{
return (u8)GetNcdWorkAddr()->owner.favoriteColor;
}
// 誕生日の取得。
static inline NvDate *NCD_GetBirthday(void)
{
return &GetNcdWorkAddr()->owner.birthday;
}
// ニックネームの取得。
static inline NvNickname *NCD_GetNickname(void)
{
return &GetNcdWorkAddr()->owner.nickname;
}
// コメントの取得。
static inline NvComment *NCD_GetComment(void)
{
return &GetNcdWorkAddr()->owner.comment;
}
//-----------------------------------
// アラーム情報の取得。
static inline NvAlarm *NCD_GetAlarmData(void)
{
return &GetNcdWorkAddr()->alarm;
}
//-----------------------------------
// タッチパネルキャリブレーションデータの取得。
static inline NvTpCalibData *NCD_GetTPCalibration(void)
{
return &GetNcdWorkAddr()->tp;
}
//-----------------------------------
// オプション情報の取得。
// 言語コードの取得
static inline NvLangCode NCD_GetLanguageOrg(void)
{
return (NvLangCode)GetNcdWorkAddr()->option.language;
}
static inline NvLangCode NCD_GetLanguage(void)
{
return (NvLangCode)GetNcdExWorkAddr()->language;
}
// RTCオフセット値の取得
static inline s64 NCD_GetRtcOffset(void)
{
return GetNcdWorkAddr()->option.rtcOffset;
}
// RTCクロック調整値の取得
static inline u8 NCD_GetRtcClockAdjust(void)
{
return GetNcdWorkAddr()->option.rtcClockAdjust;
}
// RTCの前回セットした年の取得
static inline u8 NCD_GetRtcLastSetYear(void)
{
return GetNcdWorkAddr()->option.rtcLastSetYear;
}
// 起動シーケンスの自動起動ONか0:OFF, 1:ON
static inline int NCD_GetAutoBootFlag(void)
{
return (int)GetNcdWorkAddr()->option.autoBootFlag;
}
// バックライトOFFか0:ON, 1:OFF
static inline int NCD_GetBackLightOffFlag(void)
{
return (int)GetNcdWorkAddr()->option.backLightOffFlag;
}
// フラッシュ壊れシーケンス中かどうか?
static inline int NCD_GetDestroyFlash(void)
{
return (int)GetNcdWorkAddr()->option.destroyFlashFlag;
}
// 誕生日データがセットされているか?
static inline int NCD_GetInputBirthday(void)
{
return (int)GetNcdWorkAddr()->option.input_birthday;
}
// 好きな色データがセットされているか?
static inline int NCD_GetInputFavoriteColor(void)
{
return (int)GetNcdWorkAddr()->option.input_favoriteColor;
}
// TPキャリブレーションデータがセットされているか
static inline int NCD_GetInputTP(void)
{
return (int)GetNcdWorkAddr()->option.input_tp;
}
// 言語コードがセットされているか?
static inline int NCD_GetInputLanguage(void)
{
return (int)GetNcdWorkAddr()->option.input_language;
}
// RTCデータがセットされているか
static inline int NCD_GetInputRTC(void)
{
return (int)GetNcdWorkAddr()->option.input_rtc;
}
// オーナー情報のニックネームがセットされているか?
static inline int NCD_GetInputNickname(void)
{
return (int)GetNcdWorkAddr()->option.input_nickname;
}
//=========================================================
// データセット
//=========================================================
//-----------------------------------
// オーナー情報全体のセット。
static inline void NCD_SetOwnerInfo(NvOwnerInfo *owinfop)
{
SVC_CpuCopy( owinfop, &GetNcdWorkAddr()->owner, sizeof(NvOwnerInfo), 16);
}
// 好きな色のセット。
static inline void NCD_SetFavoriteColor(u8 favoriteColor)
{
GetNcdWorkAddr()->owner.favoriteColor = favoriteColor;
}
// 誕生日のセット。
static inline void NCD_SetBirthday(NvDate *birthp)
{
GetNcdWorkAddr()->owner.birthday.month = birthp->month;
GetNcdWorkAddr()->owner.birthday.day = birthp->day;
}
// ニックネームのセット。
static inline void NCD_SetNickname(NvNickname *namep)
{
SVC_CpuCopy( namep, &GetNcdWorkAddr()->owner.nickname, sizeof(NvNickname), 16);
}
// コメントのセット。
static inline void NCD_SetComment(NvComment *commentp)
{
SVC_CpuCopy( commentp, &GetNcdWorkAddr()->owner.comment, sizeof(NvComment), 16);
}
//-----------------------------------
// アラーム情報のセット。
static inline void NCD_SetAlarmData(NvAlarm *alarmp)
{
SVC_CpuCopy( alarmp, &GetNcdWorkAddr()->alarm, sizeof(NvAlarm), 16);
}
//-----------------------------------
// タッチパネルキャリブレーションデータのセット。
static inline void NCD_SetTPCalibration(NvTpCalibData *tp_calibp)
{
SVC_CpuCopy( tp_calibp, &GetNcdWorkAddr()->tp, sizeof(NvTpCalibData), 16);
}
//-----------------------------------
// オプション情報のセット。
// 言語コードのセット
#if 0
static inline void NCD_SetLanguage(NvLangCode language)
{
GetNcdExWorkAddr()->language = language;
GetNcdExWorkAddr()->valid_language_bitmap = LANG_BITMAP_CHINESE;
if( language == LANG_CHINESE ) {
GetNcdWorkAddr()->option.language = LANG_ENGLISH;
}else {
GetNcdWorkAddr()->option.language = language;
}
}
#endif
// RTCオフセット値のセット
static inline void NCD_SetRtcOffset(s64 rtcOffset)
{
GetNcdWorkAddr()->option.rtcOffset = rtcOffset;
}
// RTCクロック調整値のセット
static inline void NCD_SetRtcClockAdjust(u8 rtcClockAdjust)
{
GetNcdWorkAddr()->option.rtcClockAdjust = rtcClockAdjust;
}
// RTCのLastSetYearへのセット
static inline void NCD_SetRtcLastSetYear(u8 rtcLastSetYear)
{
GetNcdWorkAddr()->option.rtcLastSetYear = rtcLastSetYear;
}
// 起動シーケンスの自動起動ON,OFFフラグをセット。
static inline void NCD_SetAutoBootFlag(BOOL autoBootFlag)
{
GetNcdWorkAddr()->option.autoBootFlag = (u16)autoBootFlag;
}
// バックライトON,OFFフラグをセット。
static inline void NCD_SetBackLightOffFlag(BOOL backLightOffFlag)
{
GetNcdWorkAddr()->option.backLightOffFlag = (u16)backLightOffFlag;
}
// フラッシュ壊れシーケンス中かどうかのフラグセット。
static inline void NCD_SetDestroyFlash(BOOL destroy)
{
GetNcdWorkAddr()->option.destroyFlashFlag = (u16)destroy;
}
// 誕生日データの入力済みフラグセット。
static inline void NCD_SetInputBirthday(BOOL input)
{
GetNcdWorkAddr()->option.input_birthday = (u16)input;
}
// 好きな色データの入力済みフラグセット。
static inline void NCD_SetInputFavoriteColor(BOOL input)
{
GetNcdWorkAddr()->option.input_favoriteColor = (u16)input;
}
// TPキャリブレーションデータの入力済みフラグセット。
static inline void NCD_SetInputTP(BOOL input)
{
GetNcdWorkAddr()->option.input_tp = (u16)input;
}
// 言語コードの入力済みフラグセット。
static inline void NCD_SetInputLanguage(BOOL input)
{
GetNcdWorkAddr()->option.input_language = (u16)input;
}
// RTCデータの入力済みフラグセット。
static inline void NCD_SetInputRTC(BOOL input)
{
GetNcdWorkAddr()->option.input_rtc = (u16)input;
}
// オーナー情報のニックネームの入力済みフラグセット。
static inline void NCD_SetInputNickname(BOOL input)
{
GetNcdWorkAddr()->option.input_nickname = (u16)input;
}
#ifdef __cplusplus
}
#endif
#endif // SDK_CW
#endif // NITRO_CONFIG_DATA_H_

View File

@ -0,0 +1,595 @@
/********************************************************************/
/* data.c */
/* DebugForIPL2 */
/* */
/* Copyright (C) 2003-2004 NINTENDO Co.,Ltd. */
/********************************************************************/
/*
$Log: data.c,v $
Revision 1.3 2005/04/02 07:43:18 yosiokat
IPL2フォント表示のためのデータ定義追加
Revision 1.2 2005/03/31 06:01:14 yosiokat
調
Revision 1.1 2004/08/31 06:20:24 Yosiokat
Initial revision
*/
#include <nitro.h>
#include "data.h"
// global variables----------------------------------------
int (*nowProcess)(void); // 現在実行中のプロセス
GXOamAttr oamBakM[ 128 ]; // OAM バックアップ
GXOamAttr oamBakS[ 128 ]; // OAM バックアップ
u16 bgBakM[ 32*24 ]; // BG バックアップ
u16 bgBakS[ 32*24 ]; // BG バックアップ
TpWork tpd; // タッチパネルデータ
KeyWork pad; // キーパッド入力データ
// IPL2フォント表示用
tFntEntry font_m;
tFntDrawContext context_m;
u16 canvas_m[ CANVAS_WIDTH * CANVAS_HEIGHT / 4 ] ATTRIBUTE_ALIGN(32);
u16 screen_m[ (CANVAS_WIDTH>>3) * (CANVAS_HEIGHT>>3) ] ATTRIBUTE_ALIGN(32);
tFntEntry font_s;
tFntDrawContext context_s;
u16 canvas_s[ CANVAS_WIDTH * CANVAS_HEIGHT / 4 ] ATTRIBUTE_ALIGN(32);
u16 screen_s[ (CANVAS_WIDTH>>3) * (CANVAS_HEIGHT>>3) ] ATTRIBUTE_ALIGN(32);
u16 s_Palette[] = {
0x0000, 0x001f, 0x03e0, 0x03ff,
0x7c00, 0x7c1f, 0x7fe0, 0x7fff,
0x0000, 0x001f, 0x03e0, 0x03ff,
0x7c00, 0x7c1f, 0x7fe0, 0x7fff,
};
/*---------------------- パレットデータ ---------------------------*/
#define RGB555(r,g,b) (b<<10|g<<5|r)
// 背景黒ベース
const u16 myPlttData[13][16] = {
{RGB555( 0, 0, 0), RGB555(31, 31, 31), RGB555(15, 15, 15), RGB555( 0, 0, 0),}, // White
{RGB555( 0, 0, 0), RGB555(31, 0, 0), RGB555( 0, 0, 0), RGB555( 0, 0, 0),}, // Red
{RGB555( 0, 0, 0), RGB555( 0, 19, 0), RGB555( 0, 0, 0), RGB555( 0, 0, 0),}, // Green
{RGB555( 0, 0, 0), RGB555( 0, 11, 31), RGB555( 0, 0, 0), RGB555( 0, 0, 0),}, // Blue
{RGB555( 0, 0, 0), RGB555(31, 31, 0), RGB555( 0, 0, 0), RGB555( 0, 0, 0),}, // Yellow
{RGB555( 0, 0, 0), RGB555( 0, 31, 31), RGB555( 0, 0, 0), RGB555( 0, 0, 0),}, // Cyan
{RGB555( 0, 0, 0), RGB555(31, 0, 31), RGB555( 0, 0, 0), RGB555( 0, 0, 0),}, // Purple
{RGB555( 0, 0, 0), RGB555( 0, 31, 0), RGB555( 0, 0, 0), RGB555( 0, 0, 0),}, // Light Green
{RGB555( 0, 0, 0), RGB555( 0, 0, 0), RGB555(31, 31, 0), RGB555(31, 31, 0),}, // HighLight Yellow
{RGB555( 0, 0, 0), RGB555( 0, 0, 0), RGB555( 0, 31, 31), RGB555( 0, 31, 31),}, // HighLight CYAN
{RGB555( 0, 0, 0), RGB555( 0, 0, 0), RGB555(31, 31, 31), RGB555(31, 31, 31),}, // HighLight WHITE
{RGB555( 0, 0, 0), RGB555( 0, 0, 0), RGB555( 0, 11, 31), RGB555( 0, 11, 31),}, // HighLight BLUE
{RGB555( 0, 0, 0), RGB555( 0, 0, 0), RGB555(31, 0, 0), RGB555(31, 0, 0),}, // HighLight RED
};
/*---------------------- キャラクタデータ -------------------------*/
/*
const u32 sampleCharData[8*0x100] = {
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
};
*/

View File

@ -0,0 +1,108 @@
/********************************************************************/
/* data.h */
/* DebugForIPL2 */
/* */
/* Copyright (C) 2003-2004 NINTENDO Co.,Ltd. */
/********************************************************************/
/*
 
*/
#ifndef __DATA_H__
#define __DATA_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <nitro.h>
#include <fnt.h>
// define data---------------------------------------------
// パレットカラー
#define WHITE ( 1 << 12 )
#define RED ( 2 << 12 )
#define GREEN ( 3 << 12 )
#define BLUE ( 4 << 12 )
#define YELLOW ( 5 << 12 )
#define CYAN ( 6 << 12 )
#define PURPLE ( 7 << 12 )
#define LIGHTGREEN ( 8 << 12 )
#define HIGHLIGHT_Y ( 9 << 12 )
#define HIGHLIGHT_C ( 10 << 12 )
#define HIGHLIGHT_W ( 11 << 12 )
#define HIGHLIGHT_B ( 12 << 12 )
#define HIGHLIGHT_R ( 13 << 12 )
// fntライブラリのカラー指定
#define FNT_BLACK 0
#define FNT_RED 1
#define FNT_LIGHT_GREEN 2
#define FNT_YELLOW 3
#define FNT_BLUE 4
#define FNT_PURPLE 5
#define FNT_VERMILION 6
#define FNT_WHITE 7
#define FNT_SYUIRO 8
#define FNT_GREEN 9
#define FNT_USER_COLOR 10
#define CANVAS_WIDTH 256 // 文字表示キャンパス横ドット数
#define CANVAS_HEIGHT 192 //    〃     縦ドット数
#define LINE_DOT_NUM 10
// キーデータワーク
typedef struct {
u16 trg; // トリガ入力
u16 cont; // ベタ 入力
}KeyWork;
// タッチパネルワーク
typedef struct {
int detached; // 今回のデータ入力でタッチが離れたことを示す。
BOOL initial; // 初期化直後は、TPがデタッチされるまで、データ取得しないようにする。
TPData disp; // 今回の入力値LCD座標
TPData raw; // 今回の入力値TP 座標)
TPData last; // 前回の入力値LCD座標
}TpWork;
// global variables----------------------------------------
extern int (*nowProcess)( void );
extern GXOamAttr oamBakM[ 128 ]; // OAM バックアップ
extern GXOamAttr oamBakS[ 128 ]; // OAM バックアップ
extern u16 bgBakM[ 32*24 ]; // BG バックアップ
extern u16 bgBakS[ 32*24 ]; // BG バックアップ
extern TpWork tpd; // タッチパネルデータ
extern KeyWork pad; // キーパッド入力データ
extern tFntEntry font_m;
extern tFntDrawContext context_m;
extern u16 canvas_m[ CANVAS_WIDTH * CANVAS_HEIGHT / 4 ] ATTRIBUTE_ALIGN(32);
extern u16 screen_m[ (CANVAS_WIDTH>>3) * (CANVAS_HEIGHT>>3) ] ATTRIBUTE_ALIGN(32);
extern tFntEntry font_s;
extern tFntDrawContext context_s;
extern u16 canvas_s[ CANVAS_WIDTH * CANVAS_HEIGHT / 4 ] ATTRIBUTE_ALIGN(32);
extern u16 screen_s[ (CANVAS_WIDTH>>3) * (CANVAS_HEIGHT>>3) ] ATTRIBUTE_ALIGN(32);
extern u16 s_Palette[ 0x10 ];
// global const data---------------------------------------
extern const u16 myPlttData[13][16];
// function------------------------------------------------
#ifdef __cplusplus
}
#endif
#endif // __DATA_H__

View File

@ -0,0 +1,280 @@
/********************************************************************/
/* dispNCD.c */
/* DebugForIPL2 */
/* */
/* Copyright (C) 2003-2004 NINTENDO Co.,Ltd. */
/********************************************************************/
/*
NITRO設定データ表示
$Log: dispNCD.c,v $
Revision 1.7.2.2.8.1 2007/01/22 07:36:16 yosiokat
NAT-IPL2への対応
Revision 1.7.2.3 2006/06/26 04:09:02 yosiokat
DrawNCD_Elementの言語コードの表示判定部を修正
Revision 1.7.2.2 2006/02/01 06:32:43 yosiokat
IPL2バージョン情報取得関数の整理
Revision 1.7.2.1 2005/10/25 08:19:39 yosiokat
IsIPLTypeChineseで行うよう変更
USG版の時に
Revision 1.7 2005/04/14 05:53:47 yosiokat
NITRO設定データ関係を強制的に中国版にするスイッチFORCE_CHINAを追加
Revision 1.6 2005/04/02 10:04:08 yosiokat
Revision 1.5 2005/04/02 07:42:54 yosiokat
IPL2フォントを使用して全て表示できるよう変更
Revision 1.4 2005/04/01 05:47:24 yosiokat
NitroConfigDataEx対応IPL2の時にはEx側も表示するよう変更
Revision 1.3 2005/03/31 05:59:15 yosiokat
CHINESEUNKNOWNの追加
TPデータワークのクリアをInitTPData()
Revision 1.2 2005/03/09 04:44:39 yosiokat
Revision 1.1.1.1 2004/08/31 06:20:24 Yosiokat
no message
*/
#include <nitro.h>
#include "main.h"
#include "NitroConfigData.h"
#include "font.h"
// define data------------------------------------------
#define CANCEL_BUTTON_LT_X 2
#define CANCEL_BUTTON_LT_Y 22
#define CANCEL_BUTTON_RB_X (CANCEL_BUTTON_LT_X+8)
#define CANCEL_BUTTON_RB_Y (CANCEL_BUTTON_LT_Y+2)
#define IPL2_GAIJI_SIKAKU 0x25a0
/* 本体情報 : 「お気に入りの色」定数 (GXRgb) */
#define FAVORITE_COLOR_VALUE_GRAY GX_RGB(12,16,19)
#define FAVORITE_COLOR_VALUE_BROWN GX_RGB(23, 9, 0)
#define FAVORITE_COLOR_VALUE_RED GX_RGB(31, 0, 3)
#define FAVORITE_COLOR_VALUE_PINK GX_RGB(31,17,31)
#define FAVORITE_COLOR_VALUE_ORANGE GX_RGB(31,18, 0)
#define FAVORITE_COLOR_VALUE_YELLOW GX_RGB(30,28, 0)
#define FAVORITE_COLOR_VALUE_LIME_GREEN GX_RGB(21,31, 0)
#define FAVORITE_COLOR_VALUE_GREEN GX_RGB( 0,31, 0)
#define FAVORITE_COLOR_VALUE_DARK_GREEN GX_RGB( 0,20, 7)
#define FAVORITE_COLOR_VALUE_SEA_GREEN GX_RGB( 9,27,17)
#define FAVORITE_COLOR_VALUE_TURQUOISE GX_RGB( 6,23,30)
#define FAVORITE_COLOR_VALUE_BLUE GX_RGB( 0,11,30)
#define FAVORITE_COLOR_VALUE_DARK_BLUE GX_RGB( 0, 0,18)
#define FAVORITE_COLOR_VALUE_PURPLE GX_RGB(17, 0,26)
#define FAVORITE_COLOR_VALUE_VIOLET GX_RGB(26, 0,29)
#define FAVORITE_COLOR_VALUE_MAGENTA GX_RGB(31, 0,18)
// extern data------------------------------------------
// function's prototype declaration---------------------
static void DrawNCD_ElementName( void );
static void DrawNCD_Element( void );
static void DispUserNameAndComment( u16 color );
// global variable -------------------------------------
// static variable -------------------------------------
// const data -----------------------------------------
static const u8 *str_lcd[] = { (const u8 *)"TOP",
(const u8 *)"BOTTOM" };
static const u8 *str_onoff[] = { (const u8 *)"OFF",
(const u8 *)"ON" };
static const u8 *str_inputFlags[] = {
(const u8 *)"NAME",
(const u8 *)"RTC ",
(const u8 *)"LANG",
(const u8 *)"TP ",
(const u8 *)"COL ",
(const u8 *)"BDAY", };
static const u8 *str_language[] = { (const u8 *)"JAPANESE",
(const u8 *)"ENGLISH",
(const u8 *)"FRENCH",
(const u8 *)"GERMAN",
(const u8 *)"ITALIAN",
(const u8 *)"SPANISH",
(const u8 *)"CHINISE",
(const u8 *)"HANGUL",
(const u8 *)"UNKNOWN",
};
static const u8 *str_userColor[] = {
(const u8 *)"GRAY",
(const u8 *)"BROWN",
(const u8 *)"RED",
(const u8 *)"PINK",
(const u8 *)"ORANGE",
(const u8 *)"YELLOW",
(const u8 *)"LIME GREEN ",
(const u8 *)"GREEN",
(const u8 *)"DARK GREEN",
(const u8 *)"SEA GREEN",
(const u8 *)"TURQUOISE",
(const u8 *)"BLUE",
(const u8 *)"DARK BLUE",
(const u8 *)"PURPLE",
(const u8 *)"VIOLET",
(const u8 *)"MAGENTA",
};
static const u16 palette_userColor[] = {
FAVORITE_COLOR_VALUE_GRAY,
FAVORITE_COLOR_VALUE_BROWN,
FAVORITE_COLOR_VALUE_RED,
FAVORITE_COLOR_VALUE_PINK,
FAVORITE_COLOR_VALUE_ORANGE,
FAVORITE_COLOR_VALUE_YELLOW,
FAVORITE_COLOR_VALUE_LIME_GREEN,
FAVORITE_COLOR_VALUE_GREEN,
FAVORITE_COLOR_VALUE_DARK_GREEN,
FAVORITE_COLOR_VALUE_SEA_GREEN,
FAVORITE_COLOR_VALUE_TURQUOISE,
FAVORITE_COLOR_VALUE_BLUE,
FAVORITE_COLOR_VALUE_DARK_BLUE,
FAVORITE_COLOR_VALUE_PURPLE,
FAVORITE_COLOR_VALUE_VIOLET,
FAVORITE_COLOR_VALUE_MAGENTA,
};
static const u16 str_sikaku[] = L"■■■■";
//======================================================
// NITRO設定データ表示
//======================================================
// NITRO設定データ表示の初期化
void SEQ_DispNCD_init( void )
{
GXS_SetVisiblePlane( GX_PLANEMASK_NONE );
GX_SetVisiblePlane ( GX_PLANEMASK_NONE );
SVC_CpuClearFast( 0x0000, bgBakM, sizeof(bgBakM) );
SVC_CpuClearFast( 0x0000, bgBakS, sizeof(bgBakS) );
ClearAllStringSJIS();
(void)DrawStringSJIS( 1, 0, YELLOW, (const u8 *)"Disp OwnerInfo [Use SDK]" );
DrawNCD_ElementName();
DrawNCD_Element();
GX_SetVisiblePlane ( GX_PLANEMASK_BG1 | GX_PLANEMASK_BG2 );
GXS_SetVisiblePlane( GX_PLANEMASK_BG1 | GX_PLANEMASK_BG2 | GX_PLANEMASK_OBJ );
}
// NITRO設定データの表示
int SEQ_DispNCD( void )
{
BOOL tp_cancel = FALSE;
return 0;
}
// NITRO設定データの要素名表示
static void DrawNCD_ElementName( void )
{
{ // TOP LCD
SetTargetScreenSJIS( BOTTOM_SCREEN );
(void)DrawStringSJIS( 1, 4, CYAN , (const u8 *)"[OPTION]" );
(void)DrawStringSJIS( 2, 6, LIGHTGREEN, (const u8 *)"Language :" );
(void)DrawStringSJIS( 1, 8, CYAN , (const u8 *)"[OWNER]" );
(void)DrawStringSJIS( 2, 10, LIGHTGREEN, (const u8 *)"fav color:" );
(void)DrawStringSJIS( 2, 12, LIGHTGREEN, (const u8 *)"birthday :" );
(void)DrawStringSJIS( 2, 14, LIGHTGREEN, (const u8 *)"nickname :" );
(void)DrawStringSJIS( 2, 16, LIGHTGREEN, (const u8 *)"comment :" );
// SetTargetScreenSJIS( BOTTOM_SCREEN );
}
}
// NITRO設定データの各要素表示
static void DrawNCD_Element( void )
{
const u8 *str;
OSOwnerInfo info;
OS_GetOwnerInfo( &info );
{ // TOP LCD
SetTargetScreenSJIS( BOTTOM_SCREEN );
if( info.language < LANG_CODE_MAX ) {
str = str_language[ info.language ];
}else {
str = str_language[ LANG_CODE_MAX ];
}
(void)DrawStringSJISEx( 12, 6, WHITE, str, 0 );
// SetTargetScreenSJIS( BOTTOM_SCREEN );
}
{
int temp;
// ユーザーカラー
{
tFntPosition x = (tFntPosition){ 12 * 8 , FNT_POSX_ORIGIN_LEFT, FNT_H_ALIGN_LEFT };
tFntPosition y = (tFntPosition){ 11 * 8 + 4, FNT_POSY_ORIGIN_BOTTOM , 0 /*unused*/ };
temp = info.favoriteColor;
fnt_DrawString( &font_s, &context_s, x, y, 1, 0, str_sikaku, FNT_USER_COLOR );
(void)DrawDecimalSJIS( 18, 10, WHITE, &temp, 2, 4 );
(void)DrawStringSJIS ( 20, 10, WHITE, str_userColor[ temp ] );
GXS_LoadBGPltt( &palette_userColor[ temp ], FNT_USER_COLOR * 2, 2 );
}
(void)DrawStringSJIS ( 14, 12, WHITE, (const u8 *)"/" );
(void)DrawDecimalSJIS( 12, 12, WHITE, &info.birthday.month, 2, 1 );
(void)DrawDecimalSJIS( 15, 12, WHITE, &info.birthday.day, 2, 1 );
// ユーザーネーム、コメント
DispUserNameAndComment( FNT_WHITE );
// ユーザーネーム長、コメント長
(void)DrawDecimalSJIS ( 0, 14, YELLOW, &info.nickNameLength, 2, 1 );
(void)DrawDecimalSJIS ( 0, 16, YELLOW, &info.commentLength, 2, 1 );
}
}
static void DispUserNameAndComment( u16 color )
{
u16 color2 = ( color == FNT_BLACK ) ? (u16)FNT_BLACK : (u16)FNT_YELLOW;
u16 buff[ 256 ];
tFntPosition x = (tFntPosition){ 12 * 8 , FNT_POSX_ORIGIN_LEFT, FNT_H_ALIGN_LEFT };
tFntPosition y = (tFntPosition){ 15 * 8 + 4, FNT_POSY_ORIGIN_BOTTOM , 0 /*unused*/ };
OSOwnerInfo info;
OS_GetOwnerInfo( &info );
// ユーザーネームの表示
MI_CpuCopy16 ( info.nickName, buff, NCD_NICKNAME_LENGTH * 2 );
buff[ NCD_NICKNAME_LENGTH ] = 0;
fnt_DrawString( &font_s, &context_s, x, y, 1, 0, buff, color2 );
buff[ info.nickNameLength ] = 0;
fnt_DrawString( &font_s, &context_s, x, y, 1, 0, buff, color );
// コメントの表示
y.pos = 19 * 8 + 4;
MI_CpuCopy16( info.comment, buff, (u32)( info.commentLength * 2 ) );
buff[ info.commentLength ] = 0;
if ( info.commentLength > 13 ) { // 2行にまたがる時。
fnt_DrawString( &font_s, &context_s, x, y, 1, 0, &buff[13], color );
}
buff[ 13 ] = 0;
y.pos -= 2 * 8;
fnt_DrawString( &font_s, &context_s, x, y, 1, 0, buff, color );
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,123 @@
/********************************************************************/
/* font.c */
/* DebugForIPL2 */
/* */
/* Copyright (C) 2003-2004 NINTENDO Co.,Ltd. */
/********************************************************************/
/*
$Log: font.h,v $
Revision 1.2 2005/03/09 04:44:39 yosiokat
Revision 1.1.1.1 2004/08/31 06:20:24 Yosiokat
no message
// **** old logs ****
Revision 1.7 2004/08/18 07:17:26 Yosiokat
LCDをターゲットにして
Revision 1.6 2004/08/17 07:52:03 Yosiokat
SetTargetScreenSJISを追加してLCDのどちらにも文字表示が可能になるよう変更
Revision 1.5 2004/08/07 05:44:43 Yosiokat
SJIS文字列表示関数を引数でハンドルを指定しない仕様に変更する
Revision 1.4 2004/07/13 00:31:48 Yosiokat
LCD側のVRAMを対象にするよう変更
Revision 1.3 2004/06/06 02:39:31 Yosiokat
SJISコード判定用の定数定義をfont.hに移動
Revision 1.2 2004/05/26 01:16:57 Yosiokat
SJISベースに変更中
Revision 1.1 2004/05/25 08:59:22 Yosiokat
SJISで制御するように変更
*/
#ifndef __FONT_H_
#define __FONT_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <nitro.h>
// define data----------------------------------
#define STR_ENTRY_MAX_NUM 256 // 登録可能な文字列データの最大個数
#define SJIS_CHAR_VRAM_OFFSET 0x100 // SJIS文字列キャラクタ用VRAMのオフセット値
#define SJIS_CHAR_VRAM_SIZE (0x8000 + 0x20) //             のサイズ0x20はヒープのヘッダ
#define VRAM_M_ARENA_LO (HW_BG_VRAM + SJIS_CHAR_VRAM_OFFSET - 0x20)
#define VRAM_M_ARENA_HI (VRAM_M_ARENA_LO + SJIS_CHAR_VRAM_SIZE)
#define VRAM_S_ARENA_LO (HW_DB_BG_VRAM + SJIS_CHAR_VRAM_OFFSET - 0x20)
#define VRAM_S_ARENA_HI (VRAM_S_ARENA_LO + SJIS_CHAR_VRAM_SIZE)
// VRAMアリーナのLo & Hi
// SJISコード判定用の値
#define SJIS_HIGHER_CODE1_MIN 0x81
#define SJIS_HIGHER_CODE1_MAX 0x9f
#define SJIS_HIGHER_CODE2_MIN 0xe0
#define SJIS_HIGHER_CODE2_MAX 0xea
// 関数のエラーリターン値
#define DSJIS_ERR_ENTRY_GET_FAILED 0x8000
#define DSJIS_ERR_ENTRY_ALLOC_FAILED 0x8001
#define DSJIS_ERR_CHAR_ALLOC_FAILED 0x8002
#define DSJIS_ERR_STR_MEMORY_OVER 0x8003
#define DSJIS_ERR_STR_LENGTH_TOO_LONG 0x8004
// SetTargetScreenSJISの引数target
typedef enum TargetScreen {
TOP_SCREEN =0,
BOTTOM_SCREEN
}TargetScreen;
// フォント種類データSelectFontで指定
typedef enum FontType{ // 全角  半角
FONT12, // 12x12 & 12x 7dot
FONT_TYPE_MAX
}FontType;
// function's prototype declaration-------------
void InitFont( TargetScreen target );
void SetFont( FontType font );
void SetTargetScreenSJIS( TargetScreen target );
u16 ChangeColorSJIS( u16 handle, u16 new_color );
// 以下の表示関数は、データアドレスからデータハンドルを算出するので、ハンドルを引数で与えなくて良いが、同一アドレスのデータを複数場所に配置することができない。
u16 DrawStringSJIS ( u16 x, u16 y, u16 color, const void *str );
u16 DrawHexSJIS ( u16 x, u16 y, u16 color, const void *hexp, u16 figure );
u16 DrawDecimalSJIS( u16 x, u16 y, u16 color, const void *hexp, u16 figure, u16 size );
// Ex系は、引数にindexを設けることで、上記関数で制限されている同一アドレスデータの複数場所配置に対応している。
u16 DrawStringSJISEx ( u16 x, u16 y, u16 color, const void *strp, int index );
u16 DrawHexSJISEx ( u16 x, u16 y, u16 color, const void *hexp, u16 figure, int index );
u16 DrawDecimalSJISEx( u16 x, u16 y, u16 color, const void *hexp, u16 figure, u16 size, int index );
// 表示文字列クリア関数
void ClearStringSJIS( void *datap );
void ClearStringSJISEx( void *datap, int handleIndex );
void ClearStringSJIS_handle( u16 handle );
void ClearAllStringSJIS( void );
#ifdef __cplusplus
}
#endif
#endif // __FONT_H_

View File

@ -0,0 +1,149 @@
/********************************************************************/
/* initFunc.c */
/* DebugForIPL2 */
/* */
/* Copyright (C) 2003-2004 NINTENDO Co.,Ltd. */
/********************************************************************/
/*
$Log: initFunc.c,v $
Revision 1.2.10.1 2007/01/22 07:36:16 yosiokat
NAT-IPL2への対応
Revision 1.2.2.1 2006/02/06 11:34:35 yosiokat
GetIPL2CRC16をUSG-IPL2-WW版でのコードのNVRAM格納フォーマットが変更されたことに
Revision 1.2 2005/04/02 07:42:19 yosiokat
IPL2フォントを"s"
Revision 1.1 2005/04/02 06:41:18 yosiokat
main.cから起動時の初期化関数を分離
*/
#include <nitro.h>
#include "data.h"
#include "main.h"
// define data---------------------------------------------
// extern data---------------------------------------------
// function's prototype------------------------------------
// global variables----------------------------------------
u32 ipl2_crc32 = 0;
// static variables----------------------------------------
// const data----------------------------------------------
// ==================================================================
/* function */
// 表示系初期化
void InitDisp( void )
{
// メインLCD
{
GX_SetBankForBG ( GX_VRAM_BG_128_A ); //       BG 用
GX_SetBankForOBJ( GX_VRAM_OBJ_32_FG ); //       OBJ用
GX_SetGraphicsMode( GX_DISPMODE_GRAPHICS, GX_BGMODE_0, GX_BG0_AS_2D );
G2_SetBG1Control( GX_BG_SCRSIZE_TEXT_256x256, // 256pix x 256pix text
GX_BG_COLORMODE_16, // use 256 colors mode
GX_BG_SCRBASE_0xf000, // screen base offset + 0x0000 is the address for BG #0 screen
GX_BG_CHARBASE_0x00000, // character base offset + 0x04000 is the address for BG #0 characters
GX_BG_EXTPLTT_01 // use BGExtPltt slot #0 if BGExtPltt is enabled
);
G2_SetBG1Priority( 3 );
G2_BG1Mosaic( FALSE );
G2_SetBG2ControlText( GX_BG_SCRSIZE_TEXT_256x256,
GX_BG_COLORMODE_16,
GX_BG_SCRBASE_0xf800,
GX_BG_CHARBASE_0x10000
);
G2_SetBG2Priority( 2 );
G2_BG2Mosaic( FALSE );
MI_CpuClearFast( (void *)HW_BG_VRAM, 0x20000 ); // BG -VRAM クリア
MI_CpuClearFast( (void *)HW_OBJ_VRAM, 0x8000 ); // OBJ-VRAM クリア
MI_CpuClearFast( (void *)HW_PLTT, HW_PLTT_SIZE ); // パレット クリア // NitroSDKではcrt0.cでクリアしている。
MI_CpuFill32( (void *)HW_OAM, 192, HW_OAM_SIZE ); // OAM クリア // NitroSDKではcrt0.cでクリアしている。
MI_CpuCopyFast( myPlttData, (void *)( HW_BG_PLTT + 2 * 16 ), sizeof(myPlttData) ); // BGパレット セット
MI_CpuCopyFast( myPlttData, (void *)( HW_BG_PLTT + 2 * 16 ), sizeof(myPlttData) ); // OBJパレット セット
}
// サブLCD
{
GXS_SetOBJVRamModeChar(GX_OBJVRAMMODE_CHAR_1D_32K);
GX_SetBankForSubBG ( GX_VRAM_SUB_BG_128_C ); // VRAM-C for BGs
GX_SetBankForSubOBJ( GX_VRAM_SUB_OBJ_128_D ); // VRAM-D for BGs
GXS_SetGraphicsMode( GX_BGMODE_0 ); // BGMODE is 0
G2S_SetBG1Control( GX_BG_SCRSIZE_TEXT_256x256, // 256pix x 256pix text
GX_BG_COLORMODE_16, // use 256 colors mode
GX_BG_SCRBASE_0xf000, // screen base offset + 0x0000 is the address for BG #0 screen
GX_BG_CHARBASE_0x00000, // character base offset + 0x04000 is the address for BG #0 characters
GX_BG_EXTPLTT_01 // use BGExtPltt slot #0 if BGExtPltt is enabled
);
G2S_SetBG1Priority( 3 );
G2S_BG1Mosaic( FALSE );
G2S_SetBG2ControlText( GX_BG_SCRSIZE_TEXT_256x256,
GX_BG_COLORMODE_16,
GX_BG_SCRBASE_0xf800,
GX_BG_CHARBASE_0x10000
);
G2S_SetBG2Priority( 2 );
G2S_BG2Mosaic( FALSE );
GXS_SetVisiblePlane( GX_PLANEMASK_BG1 | GX_PLANEMASK_BG2 ); // display only BG #0
MI_CpuFill32( (void *)HW_DB_OAM, 192, HW_OAM_SIZE ); // OAM クリア
MI_CpuClearFast( (void *)HW_DB_BG_VRAM, 0x20000 ); // BG -VRAM クリア
MI_CpuClearFast( (void *)HW_DB_OBJ_VRAM, 0x20000 ); // OBJ -VRAM クリア
MI_CpuCopyFast( myPlttData, (void *)( HW_DB_BG_PLTT + 2 * 16 ), sizeof(myPlttData) ); // BGパレット セット
MI_CpuCopyFast( myPlttData, (void *)( HW_DB_BG_PLTT + 2 * 16 ), sizeof(myPlttData) ); // OBJパレット セット
}
}
//---------------------------------------------------------------------------
// IPL2フォント初期化
//---------------------------------------------------------------------------
void InitIPL2Font( void )
{
// フォントインスタンスの作成。
// 描画用のキャラクタバッファを作成。
fnt_CreateFont( &font_m, NITRO_LC_Font_s_bnfr, NITRO_LC_Font_s_bncmp );
fnt_CreateDrawContext( &context_m, canvas_m, CANVAS_WIDTH, CANVAS_HEIGHT, FNT_DCTYPE_4BITS, &font_m );
fnt_CreateFont( &font_s, NITRO_LC_Font_s_bnfr, NITRO_LC_Font_s_bncmp );
fnt_CreateDrawContext( &context_s, canvas_s, CANVAS_WIDTH, CANVAS_HEIGHT, FNT_DCTYPE_4BITS, &font_s );
InitIPL2FontBG();
}
//---------------------------------------------------------------------------
// IPL2フォント表示用スクリーンパレット初期化
//---------------------------------------------------------------------------
void InitIPL2FontBG( void )
{
int x, y;
GX_LoadBGPltt ( s_Palette, 0, sizeof(s_Palette) );
GXS_LoadBGPltt( s_Palette, 0, sizeof(s_Palette) );
for ( y = 0 ; y < (CANVAS_HEIGHT >> 3) ; ++y ) {
for ( x = 0 ; x < (CANVAS_WIDTH >> 3) ; ++x ) {
screen_m[ y * 32 + x] = (u16)(y * 32 + x);
screen_s[ y * 32 + x] = (u16)(y * 32 + x);
}
}
DC_FlushRange ( screen_m, (CANVAS_WIDTH >> 3) * (CANVAS_HEIGHT >> 3) * 2 );
GX_LoadBG2Scr ( screen_m, 0, (CANVAS_WIDTH >> 3) * (CANVAS_HEIGHT >> 3) * 2 );
MI_CpuFillFast( canvas_m, 0, sizeof(canvas_m) );
DC_FlushRange ( screen_s, (CANVAS_WIDTH >> 3) * (CANVAS_HEIGHT >> 3) * 2 );
GXS_LoadBG2Scr( screen_s, 0, (CANVAS_WIDTH >> 3) * (CANVAS_HEIGHT >> 3) * 2 );
MI_CpuFillFast( canvas_s, 0, sizeof(canvas_s) );
}

View File

@ -0,0 +1,164 @@
/********************************************************************/
/* main.c */
/* DebugForIPL2 */
/* */
/* Copyright (C) 2003-2004 NINTENDO Co.,Ltd. */
/********************************************************************/
/*
$Log: main.c,v $
Revision 1.7 2005/04/06 08:26:57 yosiokat
IPL2フォントチェックでのメモリ確保サイズ増加に伴い0x100000
Revision 1.6 2005/04/02 07:41:57 yosiokat
IPL2フォント表示に対応
initFunc.cに分離
Revision 1.5 2005/04/01 05:46:48 yosiokat
Revision 1.4 2005/03/31 05:58:17 yosiokat
NVRAMアクセス関数を修正し
IPL2ヘッダ情報取得を専用関数を用いるよう変更
GetIPL2CRC16のNVRAMアクセス関数を変更
Revision 1.3 2005/03/09 04:44:39 yosiokat
Revision 1.2 2004/09/23 11:28:32 Yosiokat
IPL2 verを表示するよう変更
Revision 1.1.1.1 2004/08/31 06:20:24 Yosiokat
no message
*/
#include <nitro.h>
#include "data.h"
#include "main.h"
// define data---------------------------------------------
// extern data---------------------------------------------
// function's prototype------------------------------------
static void VBlankIntr( void );
// global variables----------------------------------------
// static variables----------------------------------------
// const data----------------------------------------------
// ==================================================================
/* function */
// メイン
void NitroMain( void )
{
/* OS 初期化 */
OS_InitPrintServer();
OS_Init();
PXI_InitFifo();
OS_InitThread();
OS_InitTick();
OS_InitAlarm();
FX_Init();
TP_Init();
(void)RTC_Init();
/* GX 初期化 */
GX_Init();
GX_DispOff();
GXS_DispOff();
/* Vブランク割込設定 */
(void)OS_SetIrqFunction( OS_IE_V_BLANK, VBlankIntr );
(void)OS_EnableIrqMask( OS_IE_V_BLANK );
(void)OS_EnableIrqMask(OS_IE_FIFO_RECV);
(void)OS_EnableIrq();
(void)OS_EnableInterrupts();
(void)GX_VBlankIntr( TRUE );
{ /* メモリ割り当ての初期化 */
enum { MAIN_HEAP_SIZE = 0x100000 } ;
void *heapStart, *nstart;
int hh;
nstart = OS_InitAlloc( OS_ARENA_MAIN, OS_GetMainArenaLo(), OS_GetMainArenaHi(), 16 );
OS_SetMainArenaLo( nstart );
heapStart = OS_AllocFromMainArenaLo( (u32)MAIN_HEAP_SIZE, 32 );
hh = OS_CreateHeap( OS_ARENA_MAIN, heapStart, (void*)( (u32)heapStart + MAIN_HEAP_SIZE ) );
(void)OS_SetCurrentHeap( OS_ARENA_MAIN, hh );
}
{ /* FS 初期化 */
static u32 fs_tablework[0x100 / 4];
FS_Init(FS_DMA_NOT_USE);
(void)FS_LoadTable(fs_tablework, sizeof(fs_tablework));
}
// Disp初期化
InitDisp();
InitIPL2Font();
/* 表示開始 */
GX_DispOn();
GXS_DispOn();
// 初期メインループ関数の設定
pad.cont = 0xffff;
SEQ_DispNCD_init();
nowProcess = SEQ_DispNCD;
/* メインループ */
while(1) {
SVC_WaitVBlankIntr();
ReadKeyPad();
(void)nowProcess();
OS_PrintServer();
}
}
// Vブランク割り込み処理
static void VBlankIntr( void )
{
// OAM, BG-VRAMの更新
DC_FlushRange ( oamBakM, sizeof(oamBakM) );
DC_FlushRange ( oamBakS, sizeof(oamBakS) );
DC_FlushRange ( bgBakM, sizeof(bgBakM) );
DC_FlushRange ( bgBakS, sizeof(bgBakS) );
MI_CpuCopyFast( oamBakM, (void*)HW_OAM, sizeof(oamBakM) );
MI_CpuCopyFast( oamBakS, (void*)HW_DB_OAM, sizeof(oamBakS) );
MI_CpuCopyFast( bgBakM, (void*)(HW_BG_VRAM + 0xf000), sizeof(bgBakM) );
MI_CpuCopyFast( bgBakS, (void*)(HW_DB_BG_VRAM + 0xf000), sizeof(bgBakS) );
// BG2キャラクタに転送。
DC_FlushRange ( context_m.canvas, sizeof( canvas_m ) );
GX_LoadBG2Char ( context_m.canvas, 0, sizeof( canvas_m ) );
DC_FlushRange ( context_s.canvas, sizeof( canvas_s ) );
GXS_LoadBG2Char( context_s.canvas, 0, sizeof( canvas_s ) );
//---- 割り込みチェックフラグ
OS_SetIrqCheckFlag( OS_IE_V_BLANK );
}
// キー入力データ読み出し
void ReadKeyPad( void )
{
u16 readData = PAD_Read();
pad.trg = (u16)(readData & (readData ^ pad.cont)); // トリガ 入力
pad.cont = readData; // ベタ 入力
}

View File

@ -0,0 +1,41 @@
/********************************************************************/
/* main.h */
/* DebugForIPL2 */
/* */
/* Copyright (C) 2003-2004 NINTENDO Co.,Ltd. */
/********************************************************************/
/*
 
*/
#ifndef __MAIN_H__
#define __MAIN_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <nitro.h>
#include <fnt.h>
#include "myFunc.h"
// define data--------------------------------------------
#define MSG_VIEW_COUNT 30
// function-----------------------------------------------
extern void SEQ_DispNCD_init( void );
extern int SEQ_DispNCD( void );
// プログラム起動時に使用
extern void InitDisp( void );
extern void InitIPL2Font( void );
extern void InitIPL2FontBG( void );
extern void ReadKeyPad( void );
#ifdef __cplusplus
}
#endif
#endif // __MAIN_H__

View File

@ -0,0 +1,667 @@
/********************************************************************/
/* myChar.c */
/* NITRO-IPL */
/* */
/* Copyright (C) 2003-2004 NINTENDO Co.,Ltd. */
/********************************************************************/
/*
$Log: myChar.c,v $
Revision 1.1 2005/02/08 04:41:25 yosiokat
Revision 1.2 2004/05/19 08:25:28 yosiokat
*/
#include "myFunc.h"
// パレットデータ--------------------------------------------------------------
// キャラクタデータ------------------------------------------------------------
const u16 myChar[0x2800*8/16]={
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //0
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //1
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //2
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //3
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //4
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //5
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //6
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //7
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //8
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //9
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //a
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //b
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //c
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //d
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //e
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //f
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //10
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //11
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //12
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //13
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //14
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //15
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //16
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //17
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //18
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //19
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //1a
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //1b
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //1c
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //1d
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //1e
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //1f
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //20
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x1333,0x3321,0x1333,0x3321,0x1333,0x3321, //21
0x1333,0x3321,0x2333,0x3332,0x1333,0x3321,0x2333,0x3332,
0x2113,0x3211,0x2113,0x3211,0x2123,0x3212,0x3213,0x3321, //22
0x3323,0x3332,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x2133,0x3321,0x1113,0x3211,0x2123,0x3321, //23
0x2133,0x3321,0x1113,0x3211,0x2123,0x3321,0x3233,0x3332,
0x3333,0x3333,0x1333,0x3332,0x1133,0x3211,0x1213,0x3322, //24
0x1123,0x3311,0x1233,0x2112,0x1113,0x3211,0x1223,0x3322,
0x3333,0x3333,0x2133,0x2133,0x1213,0x3212,0x2123,0x3321, //25
0x1233,0x3212,0x2133,0x2121,0x3213,0x3212,0x3323,0x3323,
0x3333,0x3333,0x1133,0x3331,0x2113,0x3212,0x1123,0x3321, //26
0x2113,0x2111,0x3213,0x3213,0x1123,0x2121,0x2233,0x3232,
0x1133,0x3332,0x1133,0x3332,0x1233,0x3332,0x2133,0x3333, //27
0x3233,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3213,0x3333,0x3321,0x1333,0x3332, //28
0x1333,0x3332,0x1333,0x3332,0x2333,0x3331,0x3333,0x3312,
0x3333,0x3333,0x3133,0x3333,0x1233,0x3333,0x2333,0x3321, //29
0x3333,0x3321,0x3333,0x3321,0x1333,0x3332,0x2133,0x3333,
0x3333,0x3333,0x1333,0x3332,0x1213,0x3212,0x1133,0x3321, //2a
0x1233,0x3332,0x1133,0x3321,0x1213,0x3212,0x1323,0x3222,
0x3333,0x3333,0x3333,0x3333,0x1333,0x3332,0x1333,0x3332, //2b
0x1113,0x3211,0x1223,0x3222,0x1333,0x3332,0x2333,0x3332,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //2c
0x1133,0x3332,0x1133,0x3332,0x1233,0x3332,0x2133,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //2d
0x1113,0x3211,0x2223,0x3222,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //2e
0x3333,0x3333,0x3333,0x3333,0x2133,0x3333,0x2233,0x3333,
0x3333,0x3333,0x3333,0x2133,0x3333,0x3213,0x3333,0x3321, //2f
0x1333,0x3332,0x2133,0x3333,0x3213,0x3333,0x3323,0x3333,
0x3333,0x3333,0x1133,0x3211,0x2113,0x2112,0x2113,0x2113, //30
0x2113,0x2113,0x2113,0x2113,0x1123,0x3211,0x2233,0x3322,
0x3333,0x3333,0x1333,0x3321,0x1133,0x3321,0x1233,0x3321, //31
0x1333,0x3321,0x1333,0x3321,0x1333,0x3321,0x2333,0x3322,
0x3333,0x3333,0x1113,0x3211,0x2223,0x2112,0x1133,0x3211, //32
0x2113,0x3322,0x2113,0x3333,0x1113,0x2111,0x2223,0x3222,
0x3333,0x3333,0x1113,0x3211,0x2223,0x2112,0x1133,0x3211, //33
0x2233,0x2112,0x3333,0x2113,0x1113,0x3211,0x2223,0x3322,
0x3333,0x3333,0x3333,0x3211,0x1333,0x3211,0x2133,0x3211, //34
0x3213,0x3211,0x1113,0x2111,0x2223,0x3211,0x3333,0x3322,
0x3333,0x3333,0x1113,0x3211,0x2213,0x3322,0x1113,0x3211, //35
0x2223,0x2112,0x3333,0x2113,0x1113,0x3211,0x2223,0x3322,
0x3333,0x3333,0x1133,0x3211,0x2113,0x3322,0x1113,0x3211, //36
0x2113,0x2112,0x2113,0x2113,0x1123,0x3211,0x2233,0x3322,
0x3333,0x3333,0x1113,0x2111,0x2223,0x2122,0x3333,0x3213, //37
0x3333,0x3321,0x1333,0x3321,0x1333,0x3321,0x2333,0x3332,
0x3333,0x3333,0x1133,0x3211,0x2113,0x2112,0x1123,0x3211, //38
0x2113,0x2112,0x2113,0x2113,0x1123,0x3211,0x2233,0x3322,
0x3333,0x3333,0x1133,0x3211,0x2113,0x2112,0x2113,0x2113, //39
0x1123,0x2111,0x2233,0x2112,0x1133,0x3211,0x2233,0x3322,
0x3333,0x3333,0x1333,0x3321,0x1333,0x3321,0x2333,0x3322, //3a
0x3333,0x3333,0x1333,0x3321,0x1333,0x3321,0x2333,0x3322,
0x3333,0x3333,0x1333,0x3321,0x1333,0x3321,0x2333,0x3322, //3b
0x3333,0x3333,0x1333,0x3321,0x1333,0x3321,0x2333,0x3321,
0x3333,0x3333,0x3333,0x3321,0x1333,0x3332,0x2133,0x3333, //3c
0x2133,0x3333,0x1233,0x3333,0x2333,0x3321,0x3333,0x3322,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x1133,0x3211, //3d
0x2233,0x3222,0x1133,0x3211,0x2233,0x3222,0x3333,0x3333,
0x3333,0x3333,0x1333,0x3333,0x2333,0x3331,0x3333,0x3212, //3e
0x3333,0x3213,0x3333,0x3321,0x1333,0x3332,0x2333,0x3333,
0x3333,0x3333,0x1133,0x3211,0x2113,0x2112,0x2113,0x2113, //3f
0x3223,0x3211,0x1333,0x3321,0x2333,0x3332,0x1333,0x3321,
0x3333,0x3333,0x1133,0x3321,0x2213,0x3212,0x1213,0x2121, //40
0x2113,0x2121,0x2113,0x2121,0x1213,0x3211,0x1123,0x2121,
0x3333,0x3333,0x1133,0x3211,0x2113,0x2112,0x2113,0x2113, //41
0x1113,0x2111,0x2113,0x2112,0x2113,0x2113,0x2223,0x2223,
0x3333,0x3333,0x1113,0x3211,0x2113,0x2112,0x1113,0x3211, //42
0x2113,0x2112,0x2113,0x2113,0x1113,0x3211,0x2223,0x3322,
0x3333,0x3333,0x1133,0x3211,0x2113,0x2112,0x2113,0x2223, //43
0x2113,0x3333,0x2113,0x2113,0x1123,0x3211,0x2233,0x3322,
0x3333,0x3333,0x1113,0x3211,0x2113,0x2112,0x2113,0x2113, //44
0x2113,0x2113,0x2113,0x2113,0x1113,0x3211,0x2223,0x3322,
0x3333,0x3333,0x1113,0x2111,0x2113,0x2222,0x1113,0x3211, //45
0x2113,0x3222,0x2113,0x3333,0x1113,0x2111,0x2223,0x2222,
0x3333,0x3333,0x1113,0x2111,0x2113,0x2222,0x1113,0x3211, //46
0x2113,0x3222,0x2113,0x3333,0x2113,0x3333,0x2223,0x3333,
0x3333,0x3333,0x1133,0x3211,0x2113,0x3322,0x2113,0x2111, //47
0x2113,0x2112,0x2113,0x2113,0x1123,0x2111,0x2233,0x3222,
0x3333,0x3333,0x2113,0x2113,0x2113,0x2113,0x1113,0x2111, //48
0x2113,0x2112,0x2113,0x2113,0x2113,0x2113,0x2223,0x2223,
0x3333,0x3333,0x1333,0x3321,0x1333,0x3321,0x1333,0x3321, //49
0x1333,0x3321,0x1333,0x3321,0x1333,0x3321,0x2333,0x3322,
0x3333,0x3333,0x3333,0x2113,0x3333,0x2113,0x3333,0x2113, //4a
0x2113,0x2113,0x2113,0x2113,0x1123,0x3211,0x2233,0x3322,
0x3333,0x3333,0x2113,0x2113,0x2113,0x3211,0x1113,0x3322, //4b
0x1113,0x3331,0x2113,0x3311,0x2113,0x2112,0x2223,0x2223,
0x3333,0x3333,0x2113,0x3333,0x2113,0x3333,0x2113,0x3333, //4c
0x2113,0x3333,0x2113,0x3333,0x1113,0x2111,0x2223,0x2222,
0x3333,0x3333,0x2133,0x2133,0x1113,0x1112,0x1113,0x1112, //4d
0x1113,0x1111,0x2113,0x1121,0x2113,0x1121,0x3223,0x2232,
0x3333,0x3333,0x2113,0x2113,0x1113,0x2112,0x1113,0x2112, //4e
0x2113,0x2111,0x2113,0x2111,0x2113,0x2112,0x2223,0x2223,
0x3333,0x3333,0x1133,0x3211,0x2113,0x2112,0x2113,0x2113, //4f
0x2113,0x2113,0x2113,0x2113,0x1123,0x3211,0x2233,0x3322,
0x3333,0x3333,0x1113,0x3211,0x2113,0x2112,0x1113,0x3211, //50
0x2113,0x3322,0x2113,0x3333,0x2113,0x3333,0x2223,0x3333,
0x3333,0x3333,0x1133,0x3211,0x2113,0x2112,0x2113,0x2113, //51
0x2113,0x2113,0x2113,0x2113,0x1123,0x3211,0x2233,0x2111,
0x3333,0x3333,0x1113,0x3211,0x2113,0x2112,0x1113,0x3211, //52
0x2113,0x2112,0x2113,0x2113,0x2113,0x2113,0x2223,0x2223,
0x3333,0x3333,0x1133,0x2111,0x2113,0x3222,0x1123,0x3331, //53
0x1233,0x3311,0x2333,0x2112,0x1113,0x3211,0x2223,0x3322,
0x3333,0x3333,0x1113,0x2111,0x1223,0x3221,0x1333,0x3321, //54
0x1333,0x3321,0x1333,0x3321,0x1333,0x3321,0x2333,0x3322,
0x3333,0x3333,0x2113,0x2113,0x2113,0x2113,0x2113,0x2113, //55
0x2113,0x2113,0x2113,0x2113,0x1123,0x3211,0x2233,0x3322,
0x3333,0x3333,0x2113,0x2113,0x2113,0x2113,0x2113,0x2113, //56
0x2113,0x2113,0x2123,0x3213,0x1233,0x3321,0x2333,0x3332,
0x3333,0x3333,0x2113,0x1121,0x2113,0x1121,0x2113,0x1121, //57
0x1113,0x1111,0x1123,0x2112,0x2133,0x2133,0x3233,0x3233,
0x3333,0x3333,0x2113,0x2113,0x2113,0x2113,0x1123,0x3211, //58
0x1233,0x3211,0x2113,0x2112,0x2113,0x2113,0x3223,0x3223,
0x3333,0x3333,0x2113,0x2113,0x2113,0x2113,0x2133,0x3213, //59
0x1133,0x3211,0x1333,0x3321,0x1333,0x3321,0x2333,0x3322,
0x3333,0x3333,0x1113,0x2111,0x2223,0x2112,0x1333,0x3221, //5a
0x1133,0x3332,0x2113,0x3333,0x1113,0x2111,0x2223,0x2222,
0x3333,0x3333,0x1333,0x3321,0x1333,0x3322,0x1333,0x3332, //5b
0x1333,0x3332,0x1333,0x3332,0x1333,0x3321,0x2333,0x3322,
0x3333,0x3333,0x3313,0x3333,0x3123,0x3333,0x1233,0x3333, //5c
0x2333,0x3331,0x3333,0x3312,0x3333,0x3123,0x3333,0x3233,
0x3333,0x3333,0x1333,0x3321,0x2333,0x3321,0x3333,0x3321, //5d
0x3333,0x3321,0x3333,0x3321,0x1333,0x3321,0x2333,0x3322,
0x3333,0x3333,0x1333,0x3332,0x2133,0x3321,0x3233,0x3322, //5e
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //5f
0x3333,0x3333,0x3333,0x3333,0x1113,0x2111,0x2223,0x2222,
0x1333,0x3321,0x1333,0x3321,0x1333,0x3332,0x2333,0x3321, //60
0x3333,0x3332,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x1133,0x3211,0x2213,0x2112, //61
0x1123,0x2111,0x2113,0x2112,0x1123,0x2111,0x2233,0x2222,
0x2113,0x3333,0x2113,0x3333,0x1113,0x3211,0x2113,0x2112, //62
0x2113,0x2113,0x2113,0x2113,0x1113,0x3211,0x2223,0x3322,
0x3333,0x3333,0x3333,0x3333,0x1133,0x3211,0x2113,0x2122, //63
0x2113,0x3233,0x2113,0x2133,0x1123,0x3211,0x2233,0x3322,
0x3333,0x2113,0x3333,0x2113,0x1133,0x2111,0x2113,0x2112, //64
0x2113,0x2113,0x2113,0x2113,0x1123,0x2111,0x2233,0x2222,
0x3333,0x3333,0x3333,0x3333,0x1133,0x3211,0x2113,0x2112, //65
0x1113,0x2111,0x2113,0x3222,0x1123,0x2111,0x2233,0x3222,
0x1333,0x3211,0x1133,0x3322,0x1113,0x3321,0x1123,0x3332, //66
0x1133,0x3332,0x1133,0x3332,0x1133,0x3332,0x2233,0x3333,
0x3333,0x3333,0x3333,0x3333,0x1133,0x2111,0x2113,0x2112, //67
0x2113,0x2113,0x1123,0x2111,0x2213,0x2112,0x1133,0x3211,
0x2113,0x3333,0x2113,0x3333,0x1113,0x3311,0x2113,0x2112, //68
0x2113,0x2113,0x2113,0x2113,0x2113,0x2113,0x2223,0x2223,
0x1333,0x3321,0x2333,0x3332,0x1333,0x3321,0x1333,0x3321, //69
0x1333,0x3321,0x1333,0x3321,0x1333,0x3321,0x2333,0x3322,
0x3333,0x3211,0x3333,0x3322,0x3333,0x3211,0x3333,0x3211, //6a
0x3333,0x3211,0x3333,0x3211,0x3213,0x3211,0x1123,0x3321,
0x2113,0x3333,0x2113,0x3213,0x2113,0x3211,0x1113,0x3321, //6b
0x1113,0x3321,0x2113,0x3311,0x2113,0x2112,0x2223,0x3223,
0x1333,0x3321,0x1333,0x3321,0x1333,0x3321,0x1333,0x3321, //6c
0x1333,0x3321,0x1333,0x3321,0x1333,0x3321,0x2333,0x3322,
0x3333,0x3333,0x3333,0x3333,0x1111,0x2111,0x1211,0x1121, //6d
0x1211,0x1121,0x1211,0x1121,0x1211,0x1121,0x2322,0x2232,
0x3333,0x3333,0x3333,0x3333,0x1113,0x3211,0x2113,0x2112, //6e
0x2113,0x2113,0x2113,0x2113,0x2113,0x2113,0x2223,0x2223,
0x3333,0x3333,0x3333,0x3333,0x1133,0x3211,0x2113,0x2112, //6f
0x2113,0x2113,0x2113,0x2113,0x1123,0x3211,0x2233,0x3322,
0x3333,0x3333,0x3333,0x3333,0x1113,0x3211,0x2113,0x2112, //70
0x2113,0x2113,0x1113,0x3211,0x2113,0x3322,0x2113,0x3333,
0x3333,0x3333,0x3333,0x3333,0x1133,0x2111,0x2113,0x2112, //71
0x2113,0x2113,0x1123,0x2111,0x2233,0x2112,0x3333,0x2113,
0x3333,0x3333,0x3333,0x3333,0x1133,0x2112,0x1133,0x2111, //72
0x1133,0x3222,0x1133,0x3332,0x1133,0x3332,0x2233,0x3332,
0x3333,0x3333,0x3333,0x3333,0x1133,0x3211,0x1113,0x3322, //73
0x1133,0x3211,0x2233,0x2111,0x1133,0x3211,0x2233,0x3322,
0x1133,0x3332,0x1113,0x3321,0x1123,0x3332,0x1133,0x3332, //74
0x1133,0x3332,0x1133,0x3332,0x1233,0x3321,0x2333,0x3332,
0x3333,0x3333,0x3333,0x3333,0x2113,0x2113,0x2113,0x2113, //75
0x2113,0x2113,0x2113,0x2113,0x1123,0x3211,0x2233,0x3322,
0x3333,0x3333,0x3333,0x3333,0x2113,0x2113,0x2113,0x2113, //76
0x2113,0x2113,0x2113,0x3213,0x1113,0x3321,0x2223,0x3332,
0x3333,0x3333,0x3333,0x3333,0x1211,0x1121,0x1211,0x1121, //77
0x1211,0x1121,0x1211,0x1121,0x1111,0x2111,0x2222,0x3222,
0x3333,0x3333,0x3333,0x3333,0x2113,0x2113,0x2113,0x2113, //78
0x1123,0x3211,0x2113,0x2112,0x2113,0x2113,0x3223,0x3223,
0x3333,0x3333,0x3333,0x3333,0x2113,0x2113,0x2113,0x2113, //79
0x2113,0x2113,0x1123,0x2111,0x2233,0x2112,0x1133,0x3211,
0x3333,0x3333,0x3333,0x3333,0x1113,0x2111,0x2223,0x3211, //7a
0x1333,0x3321,0x1133,0x3332,0x1113,0x2111,0x2223,0x2222,
0x3333,0x3333,0x3333,0x3321,0x1333,0x3332,0x1333,0x3332, //7b
0x2133,0x3333,0x1333,0x3332,0x1333,0x3332,0x3333,0x3321,
0x3333,0x3333,0x1333,0x3332,0x1333,0x3332,0x1333,0x3332, //7c
0x1333,0x3332,0x1333,0x3332,0x1333,0x3332,0x2333,0x3332,
0x3333,0x3333,0x1333,0x3332,0x3333,0x3321,0x3333,0x3321, //7d
0x3333,0x3213,0x3333,0x3321,0x3333,0x3321,0x1333,0x3332,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3113,0x3333, //7e
0x1221,0x2133,0x2332,0x3211,0x3333,0x3322,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //7f
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x2211,0x2222,0x2211,0x2222,0x2211,0x2222,0x2211,0x2222, //80
0x2211,0x2222,0x2211,0x2222,0x2211,0x2222,0x2211,0x2222,
0x1111,0x2222,0x1111,0x2222,0x1111,0x2222,0x1111,0x2222, //81
0x1111,0x2222,0x1111,0x2222,0x1111,0x2222,0x1111,0x2222,
0x1111,0x2211,0x1111,0x2211,0x1111,0x2211,0x1111,0x2211, //82
0x1111,0x2211,0x1111,0x2211,0x1111,0x2211,0x1111,0x2211,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111, //83
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222, //84
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x1333,0x3331,0x1333,0x3331,0x1333,0x3331,0x1333,0x3331, //85
0x1333,0x3331,0x1333,0x3331,0x1333,0x3331,0x1333,0x3331,
0x1333,0x3331,0x1333,0x3331,0x1333,0x3331,0x1333,0x3331, //86
0x1111,0x1111,0x1333,0x3331,0x1333,0x3331,0x1333,0x3331,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //87
0x1111,0x1111,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x1113,0x3333,0x2213, //88
0x3333,0x1213,0x3333,0x1213,0x3333,0x1213,0x3333,0x1213,
0x3333,0x3333,0x3333,0x3333,0x1111,0x1111,0x2222,0x2222, //89
0x1111,0x1111,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x1111,0x1111,0x2222,0x2222, //8a
0x1111,0x1111,0x1333,0x3331,0x1333,0x3331,0x1333,0x3331,
0x3333,0x1213,0x3333,0x1213,0x3333,0x1213,0x3333,0x1213, //8b
0x3333,0x1213,0x3333,0x1213,0x3333,0x1213,0x3333,0x1213,
0x3133,0x3333,0x1133,0x3333,0x1133,0x3331,0x1133,0x3311, //8c
0x1133,0x3321,0x1133,0x3332,0x2133,0x3333,0x3233,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x1113,0x3332, //8d
0x2123,0x3213,0x1133,0x3321,0x1213,0x3212,0x2113,0x3321,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //8e
0x3333,0x3321,0x3213,0x3213,0x3213,0x3213,0x2133,0x3323,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x1333,0x3332, //8f
0x1133,0x3332,0x2213,0x3321,0x3323,0x3321,0x1133,0x3332,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x2133,0x3333, //90
0x1113,0x3321,0x1223,0x3332,0x2133,0x3333,0x1213,0x3321,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x1113,0x3312, //91
0x2123,0x3323,0x1113,0x3321,0x2113,0x3213,0x2113,0x3321,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3213,0x3321, //92
0x1123,0x3211,0x2113,0x3212,0x1223,0x3322,0x1333,0x3332,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x1333,0x3332, //93
0x1213,0x3321,0x1113,0x3212,0x1213,0x3211,0x1323,0x3322,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x1333,0x3332, //94
0x1333,0x3321,0x1133,0x3332,0x1213,0x3321,0x1123,0x3332,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //95
0x1333,0x3321,0x2113,0x3212,0x3223,0x3213,0x1333,0x3321,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //96
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //97
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //98
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //99
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //9a
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //9b
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //9c
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //9d
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //9e
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //9f
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //a0
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //a1
0x3333,0x3333,0x1133,0x3321,0x2133,0x3321,0x1133,0x3321,
0x3333,0x3333,0x1333,0x3211,0x1333,0x3322,0x1333,0x3332, //a2
0x1333,0x3332,0x2333,0x3332,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3321, //a3
0x3333,0x3321,0x3333,0x3321,0x1133,0x3321,0x2233,0x3322,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //a4
0x3333,0x3333,0x3333,0x3333,0x2133,0x3333,0x1333,0x3332,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //a5
0x1333,0x3332,0x2333,0x3332,0x3333,0x3333,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x1113,0x2111,0x2223,0x2122, //a6
0x1113,0x2111,0x2223,0x2122,0x3333,0x3213,0x1113,0x3321,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x1113,0x3321, //a7
0x2223,0x3321,0x2133,0x3321,0x2133,0x3332,0x3213,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3321, //a8
0x1133,0x3332,0x2111,0x3333,0x2122,0x3333,0x2133,0x3333,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x1333,0x3332, //a9
0x1113,0x3211,0x2213,0x3212,0x3323,0x3321,0x1133,0x3332,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //aa
0x1133,0x3321,0x1233,0x3332,0x1333,0x3332,0x1113,0x3211,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3321, //ab
0x1113,0x3211,0x2223,0x3321,0x1333,0x3321,0x2113,0x3321,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x1213,0x3211, //ac
0x2111,0x3212,0x2122,0x3323,0x1333,0x3332,0x1333,0x3332,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //ad
0x1113,0x3321,0x2223,0x3321,0x3333,0x3321,0x1113,0x3211,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x1133,0x3211, //ae
0x2233,0x3212,0x1133,0x3211,0x2233,0x3212,0x1133,0x3211,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //af
0x1213,0x3212,0x2323,0x3213,0x3333,0x3321,0x1133,0x3332,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //b0
0x3333,0x3333,0x1113,0x3211,0x2223,0x3322,0x3333,0x3333,
0x3333,0x3333,0x3333,0x3333,0x1111,0x2111,0x2222,0x3212, //b1
0x2133,0x3213,0x2133,0x3321,0x2133,0x3332,0x3211,0x3333,
0x3333,0x3333,0x3333,0x2133,0x3333,0x3213,0x1333,0x3321, //b2
0x2113,0x3321,0x3223,0x3321,0x3333,0x3321,0x3333,0x3321,
0x3333,0x3333,0x1333,0x3332,0x1113,0x2111,0x2213,0x2122, //b3
0x3323,0x2133,0x3333,0x3213,0x3333,0x3321,0x1133,0x3332,
0x3333,0x3333,0x3333,0x3333,0x1113,0x3211,0x1223,0x3322, //b4
0x1333,0x3332,0x1333,0x3332,0x1333,0x3332,0x1111,0x2111,
0x3333,0x3333,0x3333,0x3213,0x1113,0x2111,0x2223,0x3212, //b5
0x3333,0x3211,0x1333,0x3212,0x1333,0x3212,0x2113,0x3213,
0x3333,0x3333,0x1333,0x3332,0x1113,0x2111,0x1223,0x2122, //b6
0x1333,0x2132,0x2133,0x2133,0x2133,0x2133,0x3213,0x3213,
0x3333,0x3333,0x1333,0x3332,0x1113,0x2111,0x2223,0x3221, //b7
0x3333,0x3321,0x1113,0x1111,0x2223,0x2212,0x3333,0x3213,
0x3333,0x3333,0x1133,0x2111,0x2133,0x2122,0x3213,0x2133, //b8
0x3323,0x3213,0x3333,0x3213,0x3333,0x3321,0x1133,0x3332,
0x3333,0x3333,0x3213,0x3333,0x1113,0x2111,0x2213,0x3212, //b9
0x3321,0x3213,0x3332,0x3321,0x3333,0x3321,0x1133,0x3332,
0x3333,0x3333,0x3333,0x3333,0x1113,0x2111,0x2223,0x2122, //ba
0x3333,0x2133,0x3333,0x2133,0x3333,0x2133,0x1113,0x2111,
0x3333,0x3333,0x3213,0x3213,0x1111,0x2111,0x2212,0x3212, //bb
0x3213,0x3213,0x3323,0x3213,0x3333,0x3321,0x1133,0x3332,
0x3333,0x3333,0x3333,0x3333,0x2113,0x2133,0x3223,0x2133, //bc
0x2113,0x2133,0x3223,0x2133,0x3333,0x3213,0x1113,0x3321,
0x3333,0x3333,0x3333,0x3333,0x1113,0x2111,0x2223,0x3212, //bd
0x3333,0x3321,0x3333,0x3321,0x1333,0x3212,0x2113,0x2133,
0x3333,0x3333,0x2133,0x3333,0x1133,0x2111,0x2111,0x2122, //be
0x2122,0x3213,0x2133,0x3323,0x2133,0x3333,0x1133,0x2111,
0x3333,0x3333,0x3333,0x3333,0x3213,0x2133,0x3213,0x2133, //bf
0x2123,0x3213,0x3233,0x3213,0x3333,0x3321,0x1133,0x3332,
0x3333,0x3333,0x1133,0x2111,0x2133,0x2122,0x2133,0x2133, //c0
0x1213,0x2111,0x2323,0x2122,0x3333,0x3213,0x1133,0x3321,
0x3333,0x3333,0x3333,0x3213,0x1113,0x3321,0x2223,0x3321, //c1
0x1111,0x2111,0x2222,0x3221,0x3333,0x3321,0x1133,0x3332,
0x3333,0x3333,0x3333,0x3333,0x1213,0x2132,0x1213,0x2132, //c2
0x2323,0x2133,0x3333,0x2133,0x3333,0x3213,0x1113,0x3321,
0x3333,0x3333,0x1113,0x3211,0x2223,0x3322,0x1111,0x2111, //c3
0x2222,0x3221,0x3333,0x3321,0x1333,0x3332,0x2113,0x3333,
0x3333,0x3333,0x2133,0x3333,0x2133,0x3333,0x2133,0x3333, //c4
0x1133,0x3332,0x2133,0x3211,0x2133,0x3322,0x2133,0x3333,
0x3333,0x3333,0x3333,0x3321,0x1111,0x2111,0x2222,0x3221, //c5
0x3333,0x3321,0x3333,0x3321,0x1333,0x3332,0x2113,0x3333,
0x3333,0x3333,0x3333,0x3333,0x1133,0x3211,0x2233,0x3322, //c6
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x1113,0x2111,
0x3333,0x3333,0x3333,0x3333,0x1111,0x2111,0x2222,0x3212, //c7
0x3133,0x3321,0x1233,0x3332,0x2133,0x3321,0x3211,0x3213,
0x3333,0x3333,0x1333,0x3332,0x1111,0x2111,0x2222,0x3212, //c8
0x3333,0x3321,0x1133,0x3212,0x1211,0x2132,0x1322,0x3232,
0x3333,0x3333,0x3333,0x3213,0x3333,0x3213,0x3333,0x3213, //c9
0x3333,0x3321,0x3333,0x3321,0x1333,0x3332,0x2113,0x3333,
0x3333,0x3333,0x1333,0x3332,0x3333,0x3321,0x3213,0x3213, //ca
0x3213,0x3213,0x3321,0x2133,0x3321,0x2133,0x3321,0x2133,
0x3333,0x3333,0x3213,0x2133,0x3213,0x3211,0x1113,0x3322, //cb
0x2213,0x3333,0x3213,0x3333,0x3213,0x3333,0x1133,0x2111,
0x3333,0x3333,0x3333,0x3333,0x1111,0x2111,0x2222,0x2122, //cc
0x3333,0x3213,0x3333,0x3213,0x3333,0x3321,0x1113,0x3332,
0x3333,0x3333,0x3333,0x3333,0x2133,0x3333,0x1213,0x3332, //cd
0x3321,0x3321,0x3332,0x3213,0x3333,0x2133,0x3333,0x3233,
0x3333,0x3333,0x1333,0x3332,0x1111,0x2111,0x1222,0x3222, //ce
0x1213,0x3212,0x1213,0x2132,0x1321,0x2132,0x1321,0x2132,
0x3333,0x3333,0x3333,0x3333,0x1111,0x2111,0x2222,0x2122, //cf
0x3213,0x3213,0x2133,0x3321,0x1333,0x3332,0x3333,0x3321,
0x3333,0x3333,0x3113,0x3333,0x1223,0x3311,0x2333,0x2122, //d0
0x1133,0x3231,0x2233,0x3212,0x1113,0x3322,0x2223,0x2111,
0x3333,0x3333,0x1333,0x3332,0x2133,0x3333,0x3213,0x3333, //d1
0x3213,0x3213,0x3321,0x2133,0x3321,0x2133,0x1111,0x2111,
0x3333,0x3333,0x3333,0x3213,0x3213,0x3213,0x2133,0x3321, //d2
0x1333,0x3332,0x1333,0x3332,0x2133,0x3321,0x3211,0x3213,
0x3333,0x3333,0x3333,0x3333,0x1111,0x2111,0x2122,0x3222, //d3
0x1111,0x2111,0x2122,0x3222,0x2133,0x3333,0x1133,0x2111,
0x3333,0x3333,0x2133,0x3333,0x1133,0x2111,0x2111,0x2122, //d4
0x2122,0x3213,0x2133,0x3323,0x1333,0x3332,0x1333,0x3332,
0x3333,0x3333,0x3333,0x3333,0x1113,0x3321,0x2223,0x3321, //d5
0x3333,0x3321,0x3333,0x3321,0x3333,0x3321,0x1111,0x2111,
0x3333,0x3333,0x3333,0x3333,0x1113,0x2111,0x2223,0x2122, //d6
0x1113,0x2111,0x2223,0x2122,0x3333,0x2133,0x1113,0x2111,
0x3333,0x3333,0x1113,0x3211,0x2223,0x3322,0x1111,0x2111, //d7
0x2222,0x2122,0x3333,0x2133,0x3333,0x3213,0x1113,0x3321,
0x3333,0x3333,0x3213,0x3213,0x3213,0x3213,0x3213,0x3213, //d8
0x3213,0x3213,0x3323,0x3213,0x3333,0x3321,0x1113,0x3332,
0x3333,0x3333,0x1333,0x3332,0x1213,0x3332,0x1213,0x3332, //d9
0x1213,0x2132,0x1213,0x2132,0x1213,0x3212,0x1321,0x3321,
0x3333,0x3333,0x3213,0x3333,0x3213,0x3333,0x3213,0x3333, //da
0x3213,0x3213,0x3213,0x3213,0x3213,0x3321,0x1113,0x3332,
0x3333,0x3333,0x3333,0x3333,0x1113,0x2111,0x2213,0x2122, //db
0x3213,0x2133,0x3213,0x2133,0x3213,0x2133,0x1113,0x2111,
0x3333,0x3333,0x3333,0x3333,0x1113,0x2111,0x2213,0x2122, //dc
0x3323,0x2133,0x3333,0x2133,0x3333,0x3213,0x1133,0x3321,
0x3333,0x3333,0x3333,0x3333,0x1113,0x2132,0x2223,0x2133, //dd
0x3333,0x2133,0x3333,0x2133,0x3333,0x3213,0x1113,0x3321,
0x3333,0x1313,0x1333,0x2322,0x1113,0x2111,0x1223,0x2122, //de
0x1333,0x2132,0x2133,0x2133,0x2133,0x2133,0x3213,0x3213,
0x3333,0x1313,0x1333,0x2322,0x1113,0x2111,0x2223,0x3221, //df
0x3333,0x3321,0x1113,0x1111,0x2223,0x2212,0x3333,0x3213,
0x3333,0x1213,0x3333,0x2323,0x1133,0x2111,0x2133,0x2122, //e0
0x3213,0x3213,0x3323,0x3213,0x3333,0x3321,0x1133,0x3332,
0x3333,0x1313,0x3213,0x2323,0x1113,0x2111,0x2213,0x3212, //e1
0x3321,0x3213,0x3332,0x3321,0x3333,0x3321,0x1133,0x3332,
0x3333,0x1313,0x3333,0x2323,0x1113,0x2111,0x2223,0x2122, //e2
0x3333,0x2133,0x3333,0x2133,0x3333,0x2133,0x1113,0x2111,
0x3333,0x1313,0x3333,0x2323,0x3213,0x3213,0x1111,0x2111, //e3
0x2212,0x3212,0x3213,0x3213,0x3323,0x3321,0x1133,0x3332,
0x3333,0x1313,0x3333,0x2323,0x2113,0x2133,0x3223,0x2133, //e4
0x2113,0x2133,0x3223,0x2133,0x3333,0x3213,0x1113,0x3321,
0x3333,0x1313,0x3333,0x2323,0x1113,0x2111,0x2223,0x3212, //e5
0x3333,0x3321,0x3333,0x3321,0x1333,0x3212,0x2113,0x2133,
0x3333,0x1313,0x2133,0x2323,0x1133,0x2111,0x2111,0x2122, //e6
0x2122,0x3213,0x2133,0x3323,0x2133,0x3333,0x1133,0x2111,
0x3333,0x1313,0x3333,0x2323,0x3213,0x2133,0x3213,0x2133, //e7
0x2123,0x3213,0x3233,0x3213,0x3333,0x3321,0x1133,0x3332,
0x3333,0x1313,0x3333,0x2323,0x1133,0x2111,0x2133,0x2122, //e8
0x1213,0x2111,0x2323,0x2122,0x3333,0x3213,0x1133,0x3321,
0x3333,0x1313,0x3333,0x2323,0x1113,0x3211,0x2223,0x3321, //e9
0x1111,0x2111,0x2222,0x3221,0x3333,0x3321,0x1133,0x3332,
0x3333,0x1313,0x3333,0x2323,0x1213,0x2132,0x1213,0x2132, //ea
0x2323,0x2133,0x3333,0x2133,0x3333,0x3213,0x1113,0x3321,
0x3333,0x1313,0x3333,0x2323,0x1113,0x3211,0x2223,0x3322, //eb
0x1111,0x2111,0x2222,0x3221,0x3333,0x3321,0x1113,0x3332,
0x3333,0x3333,0x2133,0x1313,0x2133,0x2323,0x2133,0x3333, //ec
0x1133,0x3333,0x2133,0x3211,0x2133,0x3322,0x2133,0x3333,
0x3333,0x1313,0x1333,0x2323,0x3333,0x3331,0x3213,0x3213, //ed
0x3213,0x3213,0x3321,0x2133,0x3321,0x2133,0x3321,0x2133,
0x3333,0x1313,0x3213,0x2323,0x3213,0x2111,0x1113,0x3222, //ee
0x2213,0x3333,0x3213,0x3333,0x3213,0x3333,0x1123,0x2111,
0x3333,0x1313,0x3333,0x2323,0x1111,0x2111,0x2222,0x2122, //ef
0x3333,0x3213,0x3333,0x3213,0x3333,0x3321,0x1113,0x3332,
0x3333,0x3333,0x3333,0x1313,0x2133,0x2323,0x1213,0x3332, //f0
0x3321,0x3321,0x3332,0x3213,0x3333,0x2133,0x3333,0x3233,
0x3333,0x1313,0x1333,0x2323,0x1111,0x2111,0x1222,0x3222, //f1
0x1213,0x3212,0x1213,0x2132,0x1321,0x2132,0x1321,0x2132,
0x3333,0x1313,0x1333,0x2322,0x1113,0x2111,0x2213,0x2122, //f2
0x3323,0x2133,0x3333,0x3213,0x3333,0x3321,0x1133,0x3332,
0x3333,0x3133,0x1333,0x1212,0x3333,0x2121,0x3213,0x3213, //f3
0x3213,0x3213,0x3321,0x2133,0x3321,0x2133,0x3321,0x2133,
0x3333,0x3133,0x3213,0x1213,0x3213,0x2111,0x1113,0x3222, //f4
0x2213,0x3333,0x3213,0x3333,0x3213,0x3333,0x1133,0x2111,
0x3333,0x3133,0x3333,0x1213,0x1111,0x2111,0x2222,0x2122, //f5
0x3333,0x3213,0x3333,0x3213,0x3333,0x3321,0x1113,0x3332,
0x3333,0x3133,0x3333,0x1213,0x2133,0x2123,0x1213,0x3232, //f6
0x3321,0x3321,0x3332,0x3213,0x3333,0x2133,0x3333,0x3233,
0x3333,0x3133,0x1333,0x1212,0x1111,0x2111,0x1222,0x3222, //f7
0x1213,0x3212,0x1213,0x2132,0x1321,0x2132,0x1321,0x2132,
0x3333,0x3333,0x1333,0x3332,0x1113,0x3211,0x2123,0x3322, //f8
0x1113,0x2113,0x1223,0x3221,0x2133,0x3332,0x1133,0x2111,
0x3333,0x3333,0x1333,0x3332,0x1113,0x3321,0x2123,0x2132, //f9
0x1113,0x3211,0x2121,0x2121,0x1321,0x2132,0x2113,0x3213,
0x3333,0x3333,0x3213,0x3333,0x3213,0x3213,0x3213,0x2133, //fa
0x3213,0x2133,0x3213,0x2133,0x1213,0x3232,0x2133,0x3333,
0x3333,0x3333,0x1133,0x3321,0x2233,0x3332,0x1333,0x3211, //fb
0x2113,0x2122,0x3223,0x2133,0x3333,0x3213,0x1133,0x3321,
0x3333,0x3333,0x1133,0x3321,0x2233,0x3332,0x1113,0x3211, //fc
0x2223,0x3321,0x1333,0x3332,0x2133,0x3321,0x3213,0x2113,
0x3333,0x3333,0x2133,0x2133,0x1133,0x2121,0x2113,0x3232, //fd
0x1123,0x3211,0x2113,0x2122,0x2121,0x2133,0x2113,0x3213,
0x3333,0x3333,0x3333,0x3321,0x2133,0x3213,0x1111,0x2132, //fe
0x2122,0x2121,0x3213,0x3321,0x3321,0x3321,0x1132,0x3332,
0x3333,0x3333,0x1333,0x3332,0x1113,0x3211,0x2223,0x3321, //ff
0x1133,0x2111,0x2233,0x3212,0x3313,0x3323,0x1133,0x3211,
0x3333,0x3333,0x3333,0x3213,0x3333,0x3321,0x1333,0x3332, //100
0x2133,0x3333,0x1333,0x3332,0x3333,0x3321,0x3333,0x3213,
0x3333,0x3333,0x3333,0x3213,0x1213,0x2111,0x2213,0x3212, //101
0x3213,0x3213,0x3213,0x3213,0x2133,0x3213,0x3233,0x3321,
0x3333,0x3333,0x3333,0x3333,0x1133,0x3211,0x2233,0x2122, //102
0x3333,0x3213,0x3333,0x3323,0x3213,0x3333,0x1133,0x2111,
0x3333,0x3333,0x1333,0x3332,0x1113,0x3211,0x2223,0x3321, //103
0x3333,0x3212,0x3333,0x3213,0x3213,0x3333,0x1123,0x3211,
0x3333,0x3333,0x3333,0x3333,0x3213,0x3333,0x3213,0x3333, //104
0x3213,0x3333,0x3213,0x3333,0x3213,0x3213,0x1123,0x3321,
0x3333,0x3333,0x3333,0x3321,0x1113,0x2111,0x2223,0x3221, //105
0x1133,0x3321,0x2133,0x3321,0x1333,0x3321,0x1113,0x3332,
0x3333,0x3333,0x3333,0x3333,0x3213,0x3321,0x1113,0x2111, //106
0x3211,0x3321,0x3212,0x3321,0x3213,0x2133,0x1133,0x3211,
0x3333,0x3333,0x2133,0x2133,0x2133,0x2133,0x3233,0x3213, //107
0x1113,0x2111,0x1223,0x3222,0x2133,0x3333,0x1333,0x2111,
0x3333,0x3333,0x1333,0x3332,0x1113,0x3211,0x2123,0x3322, //108
0x3213,0x2111,0x3213,0x3222,0x1213,0x3332,0x3321,0x2111,
0x3333,0x3333,0x1333,0x3332,0x1113,0x3211,0x2123,0x3322, //109
0x1213,0x3311,0x2113,0x2122,0x3223,0x2133,0x1333,0x3211,
0x3333,0x3333,0x3333,0x3333,0x1133,0x3211,0x2211,0x2122, //10a
0x3322,0x2133,0x3333,0x2133,0x3333,0x3213,0x1133,0x3321,
0x3333,0x3333,0x3333,0x2113,0x1133,0x3211,0x2211,0x3321, //10b
0x1322,0x3332,0x1333,0x3332,0x3333,0x3321,0x3333,0x2113,
0x3333,0x3333,0x3213,0x3333,0x3213,0x2133,0x2133,0x3211, //10c
0x1133,0x3322,0x2213,0x3333,0x3213,0x3333,0x1133,0x2111,
0x3333,0x3333,0x2133,0x3333,0x1111,0x2112,0x2212,0x3223, //10d
0x3213,0x3213,0x1321,0x3211,0x2132,0x2112,0x1333,0x3221,
0x3333,0x3333,0x3333,0x3333,0x1213,0x2111,0x2213,0x3222, //10e
0x3213,0x3333,0x3213,0x3333,0x3213,0x3321,0x2133,0x2113,
0x3333,0x3333,0x3333,0x3321,0x3213,0x3321,0x1213,0x3211, //10f
0x2113,0x2121,0x1121,0x2112,0x2121,0x2121,0x3213,0x3211,
0x3333,0x3333,0x3333,0x3333,0x3213,0x3211,0x1211,0x2122, //110
0x2112,0x2133,0x3213,0x2111,0x3211,0x2121,0x3212,0x3211,
0x3333,0x3333,0x3333,0x3333,0x1133,0x3211,0x2113,0x2122, //111
0x2121,0x2133,0x2121,0x2133,0x2121,0x2133,0x3213,0x3213,
0x3333,0x3333,0x3333,0x3213,0x1121,0x2111,0x2221,0x3212, //112
0x3321,0x3213,0x1321,0x3211,0x2121,0x2112,0x1332,0x3221,
0x3333,0x3333,0x2133,0x3333,0x2111,0x3213,0x3212,0x2113, //113
0x3321,0x3213,0x3321,0x3213,0x3321,0x3321,0x1113,0x3332,
0x3333,0x3333,0x1133,0x3333,0x2233,0x3321,0x3333,0x3332, //114
0x1213,0x3332,0x3321,0x2121,0x3321,0x2121,0x1132,0x3232,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x1133,0x3332, //115
0x2213,0x3321,0x3321,0x3213,0x3332,0x2133,0x3333,0x2233,
0x3333,0x3333,0x1321,0x2111,0x2321,0x3212,0x1321,0x2111, //116
0x2321,0x3212,0x1321,0x3211,0x2121,0x2112,0x1213,0x3221,
0x3333,0x3333,0x1113,0x3211,0x2223,0x3321,0x1113,0x3211, //117
0x2223,0x3321,0x1113,0x3321,0x2221,0x3211,0x1113,0x3322,
0x3333,0x3333,0x1113,0x3321,0x1223,0x3332,0x2133,0x3213, //118
0x1113,0x3211,0x2121,0x2112,0x3211,0x3213,0x3322,0x3321,
0x3333,0x3333,0x2133,0x3333,0x1111,0x3212,0x2122,0x2133, //119
0x2113,0x3333,0x2121,0x2133,0x3213,0x2133,0x1133,0x3211,
0x3333,0x3333,0x3333,0x3321,0x1213,0x3211,0x2113,0x2121, //11a
0x1211,0x2132,0x1121,0x2132,0x2121,0x2133,0x3213,0x3213,
0x3333,0x3333,0x1333,0x3332,0x1113,0x3321,0x2123,0x3332, //11b
0x1113,0x3321,0x2123,0x2132,0x2133,0x2133,0x1333,0x3211,
0x3333,0x3333,0x3333,0x3321,0x1213,0x3211,0x2113,0x2121, //11c
0x3211,0x2132,0x2122,0x3213,0x2133,0x3323,0x1333,0x3332,
0x3333,0x3333,0x1333,0x3332,0x1321,0x3211,0x1121,0x2122, //11d
0x1211,0x2132,0x1321,0x2132,0x1332,0x3212,0x2133,0x3323,
0x3333,0x3333,0x1333,0x3332,0x1333,0x3211,0x1333,0x3322, //11e
0x1333,0x3332,0x1113,0x3321,0x1221,0x3212,0x2113,0x3323,
0x3333,0x3333,0x1133,0x3321,0x2233,0x3332,0x2133,0x3211, //11f
0x1213,0x2122,0x2113,0x2133,0x3223,0x2133,0x1333,0x3211,
0x3333,0x3333,0x2133,0x3333,0x3213,0x3213,0x3213,0x3213, //120
0x2113,0x3213,0x3223,0x3213,0x3333,0x3321,0x1133,0x3332,
0x3333,0x3333,0x1113,0x3211,0x2223,0x3321,0x1333,0x3211, //121
0x2113,0x2122,0x1221,0x2121,0x2132,0x2121,0x1333,0x3211,
0x3333,0x3333,0x3333,0x3211,0x1213,0x3212,0x1211,0x3212, //122
0x2112,0x3213,0x3213,0x3213,0x3211,0x3213,0x3212,0x2133,
0x3333,0x3333,0x1333,0x3211,0x2113,0x3321,0x1223,0x3332, //123
0x1133,0x3211,0x2211,0x2122,0x3322,0x2133,0x1333,0x3211,
0x3333,0x3333,0x3333,0x3333,0x3213,0x3311,0x1211,0x2122, //124
0x2112,0x2133,0x3213,0x2133,0x3211,0x2133,0x3212,0x3211,
0x3333,0x3333,0x3333,0x3333,0x1333,0x3332,0x1333,0x3332, //125
0x2133,0x3333,0x1133,0x3332,0x1213,0x2132,0x3321,0x3211,
0x3333,0x1313,0x3333,0x2323,0x2133,0x3213,0x1111,0x2132, //126
0x2122,0x2121,0x3213,0x3221,0x3321,0x3321,0x1132,0x3332,
0x3333,0x1313,0x1333,0x2322,0x1113,0x3211,0x2223,0x3321, //127
0x1133,0x2111,0x2233,0x3212,0x3313,0x3323,0x1123,0x3211,
0x3333,0x1313,0x3333,0x2323,0x3333,0x3321,0x1333,0x3332, //128
0x2133,0x3333,0x1233,0x3333,0x2333,0x3331,0x3333,0x3312,
0x3333,0x1313,0x3333,0x2323,0x1213,0x2111,0x3213,0x3213, //129
0x3213,0x3213,0x3213,0x3213,0x2123,0x3213,0x3233,0x3321,
0x3333,0x1313,0x3333,0x2323,0x1133,0x3211,0x2233,0x2122, //12a
0x3333,0x3213,0x3333,0x3323,0x3213,0x3333,0x1123,0x3111,
0x3333,0x1313,0x1333,0x2322,0x1113,0x3211,0x2223,0x3321, //12b
0x3333,0x3212,0x3333,0x3213,0x3213,0x3323,0x1123,0x3211,
0x3333,0x3333,0x3333,0x3131,0x3213,0x3232,0x3213,0x3333, //12c
0x3213,0x3333,0x3213,0x3333,0x3213,0x3213,0x1133,0x3321,
0x3333,0x1313,0x3333,0x2321,0x1113,0x2111,0x2223,0x3321, //12d
0x1133,0x3321,0x2133,0x3321,0x1333,0x3321,0x1113,0x3332,
0x3333,0x1313,0x3333,0x2323,0x3213,0x3321,0x1113,0x2111, //12e
0x2211,0x3221,0x3212,0x3321,0x3213,0x2132,0x1133,0x3211,
0x3333,0x1313,0x2133,0x2323,0x2133,0x2133,0x3233,0x3213, //12f
0x1113,0x3111,0x1223,0x3222,0x2133,0x3333,0x1233,0x2111,
0x3333,0x1313,0x1333,0x2322,0x1113,0x3211,0x2123,0x3322, //130
0x3213,0x2111,0x3213,0x3222,0x1213,0x3332,0x2321,0x2111,
0x3333,0x1313,0x1333,0x2322,0x1113,0x3211,0x2123,0x3322, //131
0x1213,0x3211,0x2113,0x2122,0x3223,0x2133,0x1333,0x3211,
0x3333,0x1313,0x3333,0x2323,0x1133,0x3211,0x2211,0x2122, //132
0x3322,0x2133,0x3333,0x2133,0x3333,0x3213,0x1133,0x3321,
0x3333,0x1313,0x3333,0x2323,0x1133,0x2111,0x2211,0x3221, //133
0x1322,0x3332,0x1333,0x3332,0x3333,0x3321,0x3333,0x2113,
0x3333,0x1313,0x3213,0x2323,0x3213,0x2133,0x2133,0x3211, //134
0x1133,0x3322,0x2213,0x3333,0x3213,0x3333,0x1133,0x2111,
0x3333,0x1313,0x3333,0x2323,0x1121,0x2111,0x2221,0x3212, //135
0x3321,0x3213,0x1321,0x3211,0x2121,0x2112,0x1332,0x3221,
0x3333,0x1313,0x2133,0x2323,0x2111,0x3213,0x3212,0x2113, //136
0x3321,0x3213,0x3321,0x3213,0x3321,0x3321,0x1113,0x3332,
0x3333,0x1313,0x1133,0x2323,0x2233,0x3321,0x3333,0x3332, //137
0x1213,0x3332,0x2321,0x2121,0x3321,0x2121,0x1132,0x3232,
0x3333,0x3333,0x3333,0x3131,0x3333,0x3232,0x1133,0x3332, //138
0x2213,0x3321,0x3321,0x3213,0x3332,0x2133,0x3333,0x3233,
0x3333,0x1313,0x1321,0x2321,0x2321,0x3212,0x1321,0x2111, //139
0x2321,0x3212,0x1321,0x3211,0x2121,0x2112,0x1213,0x3221,
0x3333,0x3133,0x3333,0x1213,0x1121,0x2111,0x2221,0x3212, //13a
0x3321,0x3213,0x1321,0x3211,0x2121,0x2112,0x1332,0x3221,
0x3333,0x3133,0x2133,0x1213,0x2111,0x2123,0x3213,0x1113, //13b
0x3321,0x2213,0x3321,0x3213,0x3321,0x3321,0x1113,0x3332,
0x3333,0x3133,0x1133,0x1213,0x2233,0x2121,0x3333,0x3232, //13c
0x1213,0x3332,0x3321,0x2121,0x3321,0x2121,0x1132,0x3232,
0x3333,0x3313,0x3333,0x2121,0x3333,0x3212,0x1133,0x3322, //13d
0x2213,0x3321,0x3321,0x3213,0x3332,0x2133,0x3333,0x3233,
0x3333,0x3133,0x1321,0x1211,0x2321,0x2112,0x1321,0x2111, //13e
0x2321,0x3212,0x1321,0x3211,0x2121,0x2112,0x1213,0x3221,
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333, //13f
0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,0x3333,
};

View File

@ -0,0 +1,361 @@
/********************************************************************/
/* myFunc.c */
/* NITRO-IPL */
/* */
/* Copyright (C) 2003-2004 NINTENDO Co.,Ltd. */
/********************************************************************/
/*
$Log: myFunc.c,v $
Revision 1.1.4.1 2006/02/01 06:29:37 yosiokat
mf_strcpyの仕様変更
Revision 1.1 2005/02/08 04:41:25 yosiokat
Revision 1.2 2004/05/19 08:25:28 yosiokat
*/
#include "myFunc.h"
// define data----------------------------------
#define CHAR_INDEX 0x200 // キャラベース0x4000
// function's prototype-------------------------
void mf_copyBuffer(u8 *srcp,u8 *dstp,u16 length);
// extern data----------------------------------
//extern u16 bgBakS[32*24]; // BG バックアップ
//extern u32 oamBakS[128*2]; // OAM バックアップ
// const data-----------------------------------
const u16 csr_charList1[] ={0x008c, 0x008c, 0x008c, 0x008c};
const u8 str_time_period[]={" . ."};
// global variable------------------------------
MyTime myTime;
//KeyWork pad;
// static variable------------------------------
static u16 csr_animeCount, csr_animeCharNum;
static u16 key_rapid[4];
static u16 blinkCount;
static u16 csr_pos_x, csr_pos_y, csr_add_y;
// ============================================================================
// function's description
// ============================================================================
// BgBakオフセット値算出
__inline static u16 *calcBgOffset(u16 pos_x,u16 pos_y)
{
return bgBakS+pos_x+(pos_y<<5);
}
// メインメモリからでも大丈夫な形式での1byteのデータ読み出し。
__inline static u16 ReadByteHWBus(const void *srcp)
{
if((int)srcp & 0x00000001) return (u16)(*(u16 *)((int)srcp ^ 0x00000001) >> 8);
else return (u16)(*(u16 *)(srcp) & 0x00ff);
}
// 初期化
void mf_init(void)
{
mf_KEYPAD_initRapid();
mf_CSR_init(0,0,0);
mf_BLINK_initCounter();
}
/*
// キー入力読み出し
void mf_KEYPAD_read(void)
{
u16 ReadData= PAD_Read();
pad.trg = (u16)(ReadData & (ReadData ^ pad.cont)); // トリガ 入力
pad.cont= ReadData; // ベタ 入力
}
*/
// キー連射入力処理 初期化(十字キーのみ)
void mf_KEYPAD_initRapid(void)
{
u16 *krp=key_rapid;
*krp++=0;
*krp++=0;
*krp++=0;
*krp++=0;
}
// キー連射入力(十字キーのみ)
void mf_KEYPAD_rapid(void)
{
u16 mask,i;
for(i=0;i<4;i++){
mask=(u16)(0x0001<<(i+4));
if(pad.cont & mask){
key_rapid[i]++;
if(key_rapid[i]==30) {
pad.trg|=mask;
key_rapid[i]=20;
}
}else{
key_rapid[i]=0;
}
}
}
// 10進データ表示
void mf_drawDecimal(u16 pos_x,u16 pos_y,u16 color,const void *valuep,u8 drawLength,u8 size)
{
u16 count,charCode;
u16 *dstp;
u32 mask,divisor,target;
mask=0xff;
while(--size>0) mask=(mask<<8)|0xff;
target=(*(u32 *)valuep)&mask;
count=10;
divisor=1000000000;
dstp=calcBgOffset(pos_x,pos_y);
while(count) {
CP_SetDiv32_32(target, divisor);
if (count<=drawLength) {
charCode=(u16)(CP_GetDivResult32()+0x0030);
*dstp++ =(u16)( charCode | color | CHAR_INDEX );
}
target=(u32)CP_GetDivRemainder32();
CP_SetDiv32_32(divisor, 10);
divisor=(u32)CP_GetDivResult32();
count--;
}
}
// 16進データ表示
void mf_drawHex(u16 pos_x,u16 pos_y,u16 color,const void *valuep,u8 drawLength)
{
u16 count,charCode;
u16 *dstp=calcBgOffset(pos_x,pos_y)+drawLength-1;
for(count=0;count<drawLength;count++){
charCode=ReadByteHWBus(valuep);
if (count & 0x01){
charCode=(u16)((charCode>>4) & 0x000f);
((u8 *)valuep)++;
}else{
charCode=(u16)( charCode & 0x000f);
}
if (charCode<0x000a) charCode+=0x0030;
else charCode+=0x0041-0x000a;
*dstp--=(u16)( charCode | color | CHAR_INDEX );
}
}
// 1byte文字列データ表示0x000xffまでの1文字が1byteで良い文字列を描画する
void mf_drawString(u16 pos_x,u16 pos_y, u16 color, const u8 *strp)
{
u16 data16;
u16 *dstp=calcBgOffset(pos_x,pos_y);
while(1) {
data16=ReadByteHWBus(strp++);
if(data16==0) break;
*dstp++=(u16)( color | data16 | CHAR_INDEX );
}
}
// 2byte文字列データ表示0x0100以降の1文字に2byte必要な文字列を描画する
void mf_drawString2(u16 pos_x,u16 pos_y, u16 color, const u16 *strp)
{
u16 *dstp=calcBgOffset(pos_x,pos_y);
while(*strp) *dstp++ = (u16)( *strp++ | color | CHAR_INDEX );
}
// 矩形BGクリア
void mf_clearRect(u16 pos_x,u16 pos_y,u8 height,u8 width)
{
u16 i,j;
u16 *dstp=calcBgOffset(pos_x,pos_y);
for(i=0;i<height;i++) {
for(j=0;j<width;j++) *dstp++ = (u16)( 0x0000 );
dstp+=0x20-width;
}
}
// カーソル初期化
void mf_CSR_init(u16 pos_x,u16 pos_y,u16 add_y)
{
csr_pos_x=pos_x;
csr_pos_y=pos_y;
csr_add_y=add_y;
}
// カーソル移動&アニメーション
void mf_CSR_moveAndAnime(int nowNum)
{
u16 *oamp=(u16 *)&oamBakS[0];
// move
oamp[0]=(u16)(csr_pos_y + nowNum*csr_add_y);
oamp[1]=csr_pos_x;
// anime
mf_CSR_anime(csr_charList1);
}
// カーソルアニメーション
void mf_CSR_anime(const u16 *csr_charListp)
{
u16 *oamp=(u16 *)&oamBakS[0];
// anime
if((++csr_animeCount & 0x0f)==0) {
csr_animeCharNum=(u16)((csr_animeCharNum+1) & 0x03);
}
oamp[2]=(u16)(RED | csr_charListp[csr_animeCharNum]);
}
// メッセージ点滅カウンター 初期化
void mf_BLINK_initCounter(void)
{
blinkCount=0;
mf_clearRect(0,20,1,0x0020);
}
// 文字列点滅表示
void mf_BLINK_drawString(u16 pos_x, u16 pos_y, u16 color, const u8 *strp)
{
u16 len=0;
blinkCount++;
if((blinkCount & 0x60)==0x60) {
while(*strp++) len++;
mf_clearRect(pos_x,pos_y,1,(u8)len);
}else {
mf_drawString(pos_x,pos_y,color,strp);
}
}
// Xframeウェイト
void mf_waitXframe(u16 frame)
{
BOOL prelIRQ=OS_EnableIrq();
while(frame--) SVC_WaitVBlankIntr();
(void)OS_RestoreIrq(prelIRQ);
}
// 時間表示
void mf_TIME_init(void)
{
BOOL prelIRQ=OS_EnableIrq();
myTime.frame=0;
myTime.hour=0;
myTime.minute=0;
myTime.second=0;
myTime.enable=0;
(void)OS_RestoreIrq(prelIRQ);
}
void mf_TIME_start(int init_flag)
{
if(init_flag) mf_TIME_init();
myTime.enable=1;
}
void mf_TIME_stop(void)
{
myTime.enable=2;
}
void mf_TIME_count(void)
{
if(myTime.enable!=1) return;
myTime.frame++;
if(myTime.frame==60) {
myTime.frame=0;
myTime.second++;
if(myTime.second==60) {
myTime.second=0;
myTime.minute++;
if(myTime.minute==60) {
myTime.minute=0;
myTime.hour++;
}
}
}
}
void mf_TIME_draw(u16 pos_x, u16 pos_y, u16 color)
{
u8 keta;
if(myTime.enable==0) {
return;
}else if(myTime.enable==2){
color=RED;
}
mf_drawString(pos_x,pos_y,color,str_time_period);
if(myTime.hour<10){
keta=1;
}else if(myTime.hour<100){
keta=2;
}else if(myTime.hour<1000){
keta=3;
}else{
keta=4;
}
mf_drawDecimal((u16)(pos_x+4-keta), pos_y, color, &myTime.hour,keta,2);
mf_drawDecimal((u16)(pos_x+5), pos_y, color, &myTime.minute,2,1);
mf_drawDecimal((u16)(pos_x+8), pos_y, color, &myTime.second,2,1);
}
// 文字列コピー
u8 *mf_strcpy(const u8 *str1p,u8 *str2p)
{
while(*str1p) *str2p++=*str1p++;
*str2p=0x00;
return str2p;
}
// 文字列比較
u8 mf_strcmp(const u8 *str1p,const u8 *str2p)
{
while(*str1p) {
if(*str1p++!=*str2p++) return 1;
}
return 0;
}

View File

@ -0,0 +1,91 @@
/********************************************************************/
/* myFunc.h */
/* NITRO-IPL */
/* */
/* Copyright (C) 2003-2004 NINTENDO Co.,Ltd. */
/********************************************************************/
/*
 
$Log: myFunc.h,v $
Revision 1.1.4.1 2006/02/01 06:29:33 yosiokat
mf_strcpyの仕様変更
Revision 1.1 2005/02/08 04:41:23 yosiokat
Revision 1.2 2004/05/19 08:25:28 yosiokat
*/
#ifndef __MY_FUNC_H__
#define __MY_FUNC_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <nitro.h>
#include "data.h"
// define data ---------------------------------
// 時間計測構造体
typedef struct {
int enable;
int frame;
int second;
int minute;
int hour;
}MyTime;
// キーデータ・ワークエリア構造体
//typedef struct {
// u16 trg; // トリガ入力
// u16 cont; // ベタ 入力
//}KeyWork;
// global variable------------------------------
extern MyTime myTime;
//extern KeyWork pad;
// const data-----------------------------------
extern const u16 myChar[0x2800*8/16]; // キャラクターデータ
// function-------------------------------------
extern void mf_init(void);
extern void mf_KEYPAD_read(void);
extern void mf_KEYPAD_initRapid(void);
extern void mf_KEYPAD_rapid(void);
extern void mf_drawDecimal(u16 pos_x,u16 pos_y,u16 color,const void *valuep,u8 drawLength,u8 size);
extern void mf_drawHex(u16 pos_x,u16 pos_y,u16 color,const void *valuep,u8 drawLength);
extern void mf_drawString(u16 pos_x,u16 pos_y,u16 color,const u8 *strp);
extern void mf_drawString2(u16 pos_x,u16 pos_y,u16 color,const u16 *strp);
extern void mf_clearRect(u16 pos_x,u16 pos_y,u8 height,u8 width);
extern void mf_CSR_init(u16 pos_x,u16 pos_y,u16 add_y);
extern void mf_CSR_moveAndAnime(int nowNum);
extern void mf_CSR_anime(const u16 *csr_charListp);
extern void mf_BLINK_initCounter(void);
extern void mf_BLINK_drawString(u16 pos_x,u16 pos_y,u16 color,const u8 *strp);
extern void mf_waitXframe(u16 frame);
extern void mf_TIME_init(void);
extern void mf_TIME_start(int init_flag);
extern void mf_TIME_stop(void);
extern void mf_TIME_count(void);
extern void mf_TIME_draw(u16 pos_x,u16 pos_y,u16 color);
extern u8* mf_strcpy(const u8 *str1p,u8 *str2p);
extern u8 mf_strcmp(const u8 *str1p,const u8 *str2p);
#ifdef __cplusplus
#endif
#endif // __MY_FUNC_H__