アプリ間接起動のサンプルをSDKに移すための対応中

・NitroSystem_twlを使わないようにし、表示や動作も簡略化
・メモリ上のアプリを起動するサンプルで、ARM7側が上書きされる形になっていたので修正

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@560 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
yoshida_teruhisa 2008-02-01 07:32:22 +00:00
parent 6623b57ba9
commit 59d935bdc9
33 changed files with 4072 additions and 373 deletions

View File

@ -0,0 +1,98 @@
#! make -f
#----------------------------------------------------------------------------
# Project: TwlSDK - components - racoon.TWL
# File: Makefile
#
# Copyright 2007 Nintendo. All rights reserved.
#
# These coded instructions, statements, and computer programs contain
# proprietary information of Nintendo of America Inc. and/or Nintendo
# Company Ltd., and are protected by Federal copyright law. They may
# not be disclosed to third parties or copied or duplicated in any form,
# in whole or in part, without the prior written consent of Nintendo.
#
# $Date:: 2007-11-30#$
# $Rev: 2778 $
# $Author: terui $
#----------------------------------------------------------------------------
override TARGET_PLATFORM = TWL
override TWL_PROC = ARM7
override TWL_ARCHGEN = LIMITED
TWL_NO_STD_PCHDR = True
TWL_CODEGEN ?= ALL
#----------------------------------------------------------------------------
SRCDIR = $(ROOT)/build/components/mongoose.TWL/src
SRCS = main.c
TARGET_NAME = my_racoon
TARGET_NEF = $(TARGET_NAME).tef
LCFILE_SPEC = $(TARGET_NAME).lsf
LCFILE_TEMPLATE = $(TARGET_NAME).lcf.template
LDRES_TEMPLATE = $(TARGET_NAME).response.template
CRT0_O = crt0.LTD.TWL.o
#----------------------------------------------------------------------------
include $(TWLSDK_ROOT)/build/buildtools/commondefs
ifdef TWLSDK_NOCRYPTO
CCFLAGS += -DSDK_NOCRYPTO
endif
ifndef TWLSDK_NOCRYPTO
MAKELCF_FLAGS += -DUSE_CRYPTO_LIBS='libaes_sp$(TWL_LIBSUFFIX).a'
endif
#MACRO_FLAGS += -DSDK_ARM7COMP_LTD
ifeq ($(TWL_PLATFORM),BB)
MAKELCF_FLAGS += -DADDRESS_LTDWRAM='0x037e0000'
else
MAKELCF_FLAGS += -DADDRESS_LTDWRAM='0x037c0000'
endif
MAKELCF_FLAGS += -DISDBG_LIBS_TWL='$(if $(ISDBG_LIBS_TWL),$(ISDBG_LIBS_TWL),libstubsistd_sp$(TWL_LIBSUFFIX).a)' \
-DISDBG_LIBS_NITRO='libstubsisd_sp$(TWL_LIBSUFFIX).a'
#--------------------------------
# install target
#--------------------------------
INSTALL_TARGETS = $(BINDIR)/$(TARGET_NAME).tef \
$(BINDIR)/$(TARGET_NAME).TWL.FLX.sbin \
$(BINDIR)/$(TARGET_NAME)_defs.TWL.FLX.sbin \
$(BINDIR)/$(TARGET_NAME).TWL.LTD.sbin \
$(BINDIR)/$(TARGET_NAME)_defs.TWL.LTD.sbin
INSTALL_DIR = $(TWL_INSTALL_COMPONENTSDIR)/$(TARGET_NAME)/$(TWL_BUILDTYPE)
LINCLUDES = $(ROOT)/build/libraries/spi/ARM7/include
#LLIBRARIES += libwl_sp.TWL.LTD.a libsdio_hcd_twl$(TWL_LIBSUFFIX).a libsdio_busdriver$(TWL_LIBSUFFIX).a libsdio_lib$(TWL_LIBSUFFIX).a libARM7athdrv$(TWL_LIBSUFFIX).a
LLIBRARIES += libwl_sp.TWL.LTD.a
#LLIBRARIES += libwl_sp$(TWL_LIBSUFFIX).a \
# libcdc_sp$(TWL_LIBSUFFIX).a \
# libtpex_sp$(TWL_LIBSUFFIX).a \
# libmicex_sp$(TWL_LIBSUFFIX).a \
# libsdio_hcd_twl$(TWL_LIBSUFFIX).a \
# libsdio_busdriver$(TWL_LIBSUFFIX).a \
# libsdio_lib$(TWL_LIBSUFFIX).a \
# librompatch_sp$(TWL_LIBSUFFIX).a \
# libARM7athdrv$(TWL_LIBSUFFIX).a
LDEPENDS_NEF = $(TWL_LIBS) $(LLIBRARIES)
do-build: $(TARGETS)
#----------------------------------------------------------------------------
include $(TWLSDK_ROOT)/build/buildtools/modulerules
#===== End of Makefile =====
include $(TWLSDK_ROOT)/build/buildtools/modulerules
#===== End of Makefile =====

View File

@ -0,0 +1,915 @@
#---------------------------------------------------------------------------
# Project: TwlSDK - components - racoon.TWL
# File: racoon.lcf.template
#
# Copyright 2007 Nintendo. All rights reserved.
#
# These coded instructions, statements, and computer programs contain
# proprietary information of Nintendo of America Inc. and/or Nintendo
# Company Ltd., and are protected by Federal copyright law. They may
# not be disclosed to third parties or copied or duplicated in any form,
# in whole or in part, without the prior written consent of Nintendo.
#
# $Date:: 2007-11-12#$
# $Rev: 2249 $
# $Author: terui $
#---------------------------------------------------------------------------
MEMORY
{
<STATIC.NAME> (RWX) : ORIGIN = <STATIC.ADDRESS>, LENGTH = 0x0 > <STATIC.NAME><PROPERTY.FLXSUFFIX>
<FOREACH.AUTOLOADS>
<AUTOLOAD.NAME> (RWX) : ORIGIN = <AUTOLOAD.ADDRESS>, LENGTH = 0x0 >> <STATIC.NAME><PROPERTY.FLXSUFFIX>
<END.AUTOLOADS>
binary.AUTOLOAD_INFO (RWX) : ORIGIN = 0, LENGTH = 0x0 >> <STATIC.NAME><PROPERTY.FLXSUFFIX>
binary.STATIC_FOOTER (RWX) : ORIGIN = 0, LENGTH = 0x0 >> <STATIC.NAME><PROPERTY.FLXSUFFIX>
<PROPERTY.OVERLAYDEFS>F (RW) : ORIGIN = 0, LENGTH = 0x0 > <PROPERTY.OVERLAYDEFS><PROPERTY.FLXSUFFIX>
<PROPERTY.OVERLAYTABLE>F (RW) : ORIGIN = 0, LENGTH = 0x0 > <PROPERTY.OVERLAYTABLE><PROPERTY.FLXSUFFIX>
<FOREACH.OVERLAYS>
<OVERLAY.NAME> (RWXO): ORIGIN = <OVERLAY.ADDRESS>, LENGTH = 0x0 > <OVERLAY.NAME><PROPERTY.FLXSUFFIX>
<END.OVERLAYS>
check.WORKRAM (RWX) : ORIGIN = 0x037c0000, LENGTH = 0x50000 > workram.check
binary.LTDAUTOLOAD_TOP (RW) : ORIGIN = 0, LENGTH = 0x0 > <STATIC.NAME><PROPERTY.LTDSUFFIX>
<FOREACH.LTDAUTOLOADS>
<LTDAUTOLOAD.NAME> (RWX) : ORIGIN = <LTDAUTOLOAD.ADDRESS>, LENGTH = 0x0 >> <STATIC.NAME><PROPERTY.LTDSUFFIX>
<END.LTDAUTOLOADS>
binary.LTDAUTOLOAD_INFO (RWX) : ORIGIN = 0, LENGTH = 0x0 >> <STATIC.NAME><PROPERTY.LTDSUFFIX>
<PROPERTY.LTDOVERLAYDEFS>L (RW) : ORIGIN = 0, LENGTH = 0x0 > <PROPERTY.LTDOVERLAYDEFS><PROPERTY.LTDSUFFIX>
<PROPERTY.LTDOVERLAYTABLE>L (RW) : ORIGIN = 0, LENGTH = 0x0 > <PROPERTY.LTDOVERLAYTABLE><PROPERTY.LTDSUFFIX>
<FOREACH.LTDOVERLAYS>
<LTDOVERLAY.NAME> (RWXO): ORIGIN = <LTDOVERLAY.ADDRESS>, LENGTH = 0x0 > <LTDOVERLAY.NAME><PROPERTY.LTDSUFFIX>
<END.LTDOVERLAYS>
check.LTDMAIN (RWX) : ORIGIN = 0x02f88000, LENGTH = 0x74000 > ltdmain.check
}
KEEP_SECTION
{
.sinit
}
SECTIONS
{
############################ STATIC #################################
.<STATIC.NAME>:
{
ALIGNALL(4);
. = ALIGN(4);
#
# Definition to refer overlay segment, when same name symbols exist in multiple overlays.
#
<FOREACH.STATIC.SEARCHSYMBOLS>
SEARCH_SYMBOL <STATIC.SEARCHSYMBOL>;
<END.STATIC.SEARCHSYMBOLS>
#
# TEXT BLOCK: READ ONLY
#
SDK_STATIC_START =.;
SDK_STATIC_TEXT_START =.;
#:::::::::: text/rodata
OBJECT(_start,*)
<FOREACH.STATIC.OBJECTS=.text>
<STATIC.OBJECT=.text:t>
<END.STATIC.OBJECTS>
<FOREACH.STATIC.LIBRARIES=.text>
<STATIC.LIBRARY=.text:t>
<END.STATIC.LIBRARIES>
<FOREACH.STATIC.OBJECTS=.rodata>
<STATIC.OBJECT=.rodata:t>
<END.STATIC.OBJECTS>
<FOREACH.STATIC.LIBRARIES=.rodata>
<STATIC.LIBRARY=.rodata:t>
<END.STATIC.LIBRARIES>
<FOREACH.STATIC.OBJECTS=.init>
<STATIC.OBJECT=.init:t>
<END.STATIC.OBJECTS>
<FOREACH.STATIC.LIBRARIES=.init>
<STATIC.LIBRARY=.init:t>
<END.STATIC.LIBRARIES>
. = ALIGN(4);
SDK_STATIC_SINIT_START =.;
#:::::::::: ctor
<FOREACH.STATIC.OBJECTS=.ctor>
<STATIC.OBJECT=.ctor:t>
<END.STATIC.OBJECTS>
<FOREACH.STATIC.LIBRARIES=.ctor>
<STATIC.LIBRARY=.ctor:t>
<END.STATIC.LIBRARIES>
<FOREACH.STATIC.OBJECTS=.sinit>
<STATIC.OBJECT=.sinit:t>
<END.STATIC.OBJECTS>
<FOREACH.STATIC.LIBRARIES=.sinit>
<STATIC.LIBRARY=.sinit:t>
<END.STATIC.LIBRARIES>
WRITEW 0;
#:::::::::: ctor
SDK_STATIC_SINIT_END =.;
#:::::::::: text/rodata
SDK_STATIC_TEXT_END =.;
#
# DATA BLOCK: READ WRITE
#
. = ALIGN(4);
SDK_STATIC_DATA_START =.;
#:::::::::: data
<FOREACH.STATIC.OBJECTS=.sdata>
<STATIC.OBJECT=.sdata:t>
<END.STATIC.OBJECTS>
<FOREACH.STATIC.LIBRARIES=.sdata>
<STATIC.LIBRARY=.sdata:t>
<END.STATIC.LIBRARIES>
<FOREACH.STATIC.OBJECTS=.data>
<STATIC.OBJECT=.data:t>
<END.STATIC.OBJECTS>
<FOREACH.STATIC.LIBRARIES=.data>
<STATIC.LIBRARY=.data:t>
<END.STATIC.LIBRARIES>
#:::::::::: data
SDK_STATIC_DATA_END =.;
. = ALIGN(4);
SDK_STATIC_END =.;
SDK_STATIC_TEXT_SIZE = SDK_STATIC_TEXT_END - SDK_STATIC_TEXT_START;
SDK_STATIC_DATA_SIZE = SDK_STATIC_DATA_END - SDK_STATIC_DATA_START;
SDK_STATIC_SIZE = SDK_STATIC_END - SDK_STATIC_START;
__sinit__ = SDK_STATIC_SINIT_START; # for static initializer
} > <STATIC.NAME>
.<STATIC.NAME>.bss:
{
ALIGNALL(4);
. = ALIGN(4);
#
# Definition to refer overlay segment, when same name symbols exist in multiple overlays.
#
<FOREACH.STATIC.SEARCHSYMBOLS>
SEARCH_SYMBOL <STATIC.SEARCHSYMBOL>;
<END.STATIC.SEARCHSYMBOLS>
#
# BSS BLOCK
#
SDK_STATIC_BSS_START =.;
#:::::::::: bss
<FOREACH.STATIC.OBJECTS=.sbss>
<STATIC.OBJECT=.sbss:t>
<END.STATIC.OBJECTS>
<FOREACH.STATIC.LIBRARIES=.sbss>
<STATIC.LIBRARY=.sbss:t>
<END.STATIC.LIBRARIES>
<FOREACH.STATIC.OBJECTS=.bss>
<STATIC.OBJECT=.bss:t>
<END.STATIC.OBJECTS>
<FOREACH.STATIC.LIBRARIES=.bss>
<STATIC.LIBRARY=.bss:t>
<END.STATIC.LIBRARIES>
#:::::::::: bss
. = ALIGN(4);
SDK_STATIC_BSS_END = .;
SDK_STATIC_BSS_SIZE = SDK_STATIC_BSS_END - SDK_STATIC_BSS_START;
} >> <STATIC.NAME>
############################ AUTOLOADS ##############################
SDK_AUTOLOAD.WRAM.START = 0x037c0000;
SDK_AUTOLOAD.WRAM.END = SDK_AUTOLOAD.WRAM.START;
SDK_AUTOLOAD.WRAM.BSS_END = SDK_AUTOLOAD.WRAM.START;
SDK_AUTOLOAD.WRAM.SIZE = 0;
SDK_AUTOLOAD.WRAM.BSS_SIZE = 0;
SDK_AUTOLOAD_START = SDK_STATIC_END;
SDK_AUTOLOAD_SIZE = 0;
SDK_AUTOLOAD_NUMBER = <NUMBER.AUTOLOADS>;
<FOREACH.AUTOLOADS>
.<AUTOLOAD.NAME>:
{
ALIGNALL(4);
. = ALIGN(4);
#
# Definition to refer overlay segment, when same name symbols exist in multiple overlays.
#
<FOREACH.AUTOLOAD.SEARCHSYMBOLS>
SEARCH_SYMBOL <AUTOLOAD.SEARCHSYMBOL>;
<END.AUTOLOAD.SEARCHSYMBOLS>
#
# TEXT BLOCK: READ ONLY
#
SDK_AUTOLOAD_<AUTOLOAD.NAME>_ID =<AUTOLOAD.ID>;
SDK_AUTOLOAD.<AUTOLOAD.NAME>.ID =<AUTOLOAD.ID>;
SDK_AUTOLOAD.<AUTOLOAD.NAME>.START =.;
SDK_AUTOLOAD.<AUTOLOAD.NAME>.TEXT_START =.;
#:::::::::: text/rodata
<FOREACH.AUTOLOAD.OBJECTS=.text>
<AUTOLOAD.OBJECT=.text:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.text>
<AUTOLOAD.LIBRARY=.text:t>
<END.AUTOLOAD.LIBRARIES>
<FOREACH.AUTOLOAD.OBJECTS=.etable>
<AUTOLOAD.OBJECT=.exception:t>
. = ALIGN(4);
SDK_STATIC_ETABLE_START =.;
__exception_table_start__ =.;
EXCEPTION
__exception_table_end__ =.;
SDK_STATIC_ETABLE_END =.;
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.OBJECTS=.rodata>
<AUTOLOAD.OBJECT=.rodata:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.rodata>
<AUTOLOAD.LIBRARY=.rodata:t>
<END.AUTOLOAD.LIBRARIES>
<FOREACH.AUTOLOAD.OBJECTS=.init>
<AUTOLOAD.OBJECT=.init:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.init>
<AUTOLOAD.LIBRARY=.init:t>
<END.AUTOLOAD.LIBRARIES>
. = ALIGN(4);
SDK_AUTOLOAD.<AUTOLOAD.NAME>.SINIT_START =.;
#:::::::::: ctor
<FOREACH.AUTOLOAD.OBJECTS=.ctor>
<AUTOLOAD.OBJECT=.ctor:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.ctor>
<AUTOLOAD.LIBRARY=.ctor:t>
<END.AUTOLOAD.LIBRARIES>
<FOREACH.AUTOLOAD.OBJECTS=.sinit>
<AUTOLOAD.OBJECT=.sinit:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.sinit>
<AUTOLOAD.LIBRARY=.sinit:t>
<END.AUTOLOAD.LIBRARIES>
WRITEW 0;
#:::::::::: ctor
SDK_AUTOLOAD.<AUTOLOAD.NAME>.SINIT_END =.;
#:::::::::: text/rodata
SDK_AUTOLOAD.<AUTOLOAD.NAME>.TEXT_END =.;
#
# DATA BLOCK: READ WRITE BLOCK
#
. = ALIGN(4);
SDK_AUTOLOAD.<AUTOLOAD.NAME>.DATA_START =.;
#:::::::::: data
<FOREACH.AUTOLOAD.OBJECTS=.wram>
<AUTOLOAD.OBJECT=.wram:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.wram>
<AUTOLOAD.LIBRARY=.wram:t>
<END.AUTOLOAD.LIBRARIES>
<FOREACH.AUTOLOAD.OBJECTS=.ltdwram>
<AUTOLOAD.OBJECT=.ltdwram:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.ltdwram>
<AUTOLOAD.LIBRARY=.ltdwram:t>
<END.AUTOLOAD.LIBRARIES>
<FOREACH.AUTOLOAD.OBJECTS=.sdata>
<AUTOLOAD.OBJECT=.sdata:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.sdata>
<AUTOLOAD.LIBRARY=.sdata:t>
<END.AUTOLOAD.LIBRARIES>
<FOREACH.AUTOLOAD.OBJECTS=.data>
<AUTOLOAD.OBJECT=.data:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.data>
<AUTOLOAD.LIBRARY=.data:t>
<END.AUTOLOAD.LIBRARIES>
#:::::::::: data
SDK_AUTOLOAD.<AUTOLOAD.NAME>.DATA_END =.;
. = ALIGN(4);
SDK_AUTOLOAD.<AUTOLOAD.NAME>.END =.;
SDK_AUTOLOAD.<AUTOLOAD.NAME>.TEXT_SIZE = SDK_AUTOLOAD.<AUTOLOAD.NAME>.TEXT_END - SDK_AUTOLOAD.<AUTOLOAD.NAME>.TEXT_START;
SDK_AUTOLOAD.<AUTOLOAD.NAME>.DATA_SIZE = SDK_AUTOLOAD.<AUTOLOAD.NAME>.DATA_END - SDK_AUTOLOAD.<AUTOLOAD.NAME>.DATA_START;
SDK_AUTOLOAD.<AUTOLOAD.NAME>.SIZE = SDK_AUTOLOAD.<AUTOLOAD.NAME>.END - SDK_AUTOLOAD.<AUTOLOAD.NAME>.START;
SDK_AUTOLOAD_SIZE = SDK_AUTOLOAD_SIZE + SDK_AUTOLOAD.<AUTOLOAD.NAME>.SIZE;
} > <AUTOLOAD.NAME>
.<AUTOLOAD.NAME>.bss:
{
ALIGNALL(4);
. = ALIGN(4);
#
# Definition to refer overlay segment, when same name symbols exist in multiple overlays.
#
<FOREACH.AUTOLOAD.SEARCHSYMBOLS>
SEARCH_SYMBOL <AUTOLOAD.SEARCHSYMBOL>;
<END.AUTOLOAD.SEARCHSYMBOLS>
#
# BSS BLOCK
#
SDK_AUTOLOAD.<AUTOLOAD.NAME>.BSS_START = .;
#:::::::::: bss
<FOREACH.AUTOLOAD.OBJECTS=.wram>
<AUTOLOAD.OBJECT=.wram.bss:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.wram>
<AUTOLOAD.LIBRARY=.wram.bss:t>
<END.AUTOLOAD.LIBRARIES>
<FOREACH.AUTOLOAD.OBJECTS=.ltdwram>
<AUTOLOAD.OBJECT=.ltdwram.bss:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.ltdwram>
<AUTOLOAD.LIBRARY=.ltdwram.bss:t>
<END.AUTOLOAD.LIBRARIES>
<FOREACH.AUTOLOAD.OBJECTS=.sbss>
<AUTOLOAD.OBJECT=.sbss:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.sbss>
<AUTOLOAD.LIBRARY=.sbss:t>
<END.AUTOLOAD.LIBRARIES>
<FOREACH.AUTOLOAD.OBJECTS=.bss>
<AUTOLOAD.OBJECT=.bss:t>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES=.bss>
<AUTOLOAD.LIBRARY=.bss:t>
<END.AUTOLOAD.LIBRARIES>
#:::::::::: bss
. = ALIGN(4);
SDK_AUTOLOAD.<AUTOLOAD.NAME>.BSS_END = .;
SDK_AUTOLOAD.<AUTOLOAD.NAME>.BSS_SIZE = SDK_AUTOLOAD.<AUTOLOAD.NAME>.BSS_END - SDK_AUTOLOAD.<AUTOLOAD.NAME>.BSS_START;
} >> <AUTOLOAD.NAME>
<END.AUTOLOADS>
SDK_AUTOLOAD_WRAM_START = SDK_AUTOLOAD.WRAM.START;
SDK_AUTOLOAD_WRAM_END = SDK_AUTOLOAD.WRAM.END;
SDK_AUTOLOAD_WRAM_BSS_END = SDK_AUTOLOAD.WRAM.BSS_END;
SDK_AUTOLOAD_WRAM_SIZE = SDK_AUTOLOAD.WRAM.SIZE;
SDK_AUTOLOAD_WRAM_BSS_SIZE = SDK_AUTOLOAD.WRAM.BSS_SIZE;
############################ AUTOLOAD_INFO ##########################
.binary.AUTOLOAD_INFO:
{
<FOREACH.AUTOLOADS>
WRITEW ADDR(.<AUTOLOAD.NAME>);
WRITEW SDK_AUTOLOAD.<AUTOLOAD.NAME>.SIZE;
WRITEW SDK_AUTOLOAD.<AUTOLOAD.NAME>.SINIT_START;
WRITEW SDK_AUTOLOAD.<AUTOLOAD.NAME>.BSS_SIZE;
<END.AUTOLOADS>
} > binary.AUTOLOAD_INFO
SDK_AUTOLOAD_LIST = SDK_AUTOLOAD_START + SDK_AUTOLOAD_SIZE;
SDK_AUTOLOAD_LIST_END = SDK_AUTOLOAD_START + SDK_AUTOLOAD_SIZE + SIZEOF(.binary.AUTOLOAD_INFO);
SDK_AUTOLOAD_SIZE = SDK_AUTOLOAD_SIZE + SIZEOF(.binary.AUTOLOAD_INFO);
############################ STATIC_FOOTER ##########################
.binary.STATIC_FOOTER:
{
WRITEW 0xdec00621; # LE(0x2106C0DE) = NITRO CODE
WRITEW _start_ModuleParams - ADDR(.<STATIC.NAME>);
WRITEW 0; # NO DIGEST
WRITEW _start_LtdModuleParams - ADDR(.<STATIC.NAME>);
} > binary.STATIC_FOOTER
############################ OVERLAYS ###############################
SDK_OVERLAY_NUMBER = <NUMBER.OVERLAYS>;
<FOREACH.OVERLAYS>
.<OVERLAY.NAME>:<OVERLAY.NAME>
{
ALIGNALL(4);
. = ALIGN(4);
#
# Definition to refer overlay segment, when same name symbols exist in multiple overlays.
#
<FOREACH.OVERLAY.SEARCHSYMBOLS>
SEARCH_SYMBOL <OVERLAY.SEARCHSYMBOL>;
<END.OVERLAY.SEARCHSYMBOLS>
#
# TEXT BLOCK: READ ONLY
#
SDK_OVERLAY_<OVERLAY.NAME>_ID =<OVERLAY.ID>; ### SEGMENT <OVERLAY.NAME> OVERLAY ID
SDK_OVERLAY.<OVERLAY.NAME>.ID =<OVERLAY.ID>;
SDK_OVERLAY.<OVERLAY.NAME>.START =.;
SDK_OVERLAY.<OVERLAY.NAME>.TEXT_START =.;
#:::::::::: text/rodata
<FOREACH.OVERLAY.OBJECTS=.text>
<OVERLAY.OBJECT=.text:t>
<END.OVERLAY.OBJECTS>
<FOREACH.OVERLAY.LIBRARIES=.text>
<OVERLAY.LIBRARY=.text:t>
<END.OVERLAY.LIBRARIES>
<FOREACH.OVERLAY.OBJECTS=.rodata>
<OVERLAY.OBJECT=.rodata:t>
<END.OVERLAY.OBJECTS>
<FOREACH.OVERLAY.LIBRARIES=.rodata>
<OVERLAY.LIBRARY=.rodata:t>
<END.OVERLAY.LIBRARIES>
<FOREACH.OVERLAY.OBJECTS=.init>
<OVERLAY.OBJECT=.init:t>
<END.OVERLAY.OBJECTS>
<FOREACH.OVERLAY.LIBRARIES=.init>
<OVERLAY.LIBRARY=.init:t>
<END.OVERLAY.LIBRARIES>
. = ALIGN(4);
SDK_OVERLAY.<OVERLAY.NAME>.SINIT_START =.;
#:::::::::: ctor
<FOREACH.OVERLAY.OBJECTS=.ctor>
<OVERLAY.OBJECT=.ctor:t>
<END.OVERLAY.OBJECTS>
<FOREACH.OVERLAY.LIBRARIES=.ctor>
<OVERLAY.LIBRARY=.ctor:t>
<END.OVERLAY.LIBRARIES>
<FOREACH.OVERLAY.OBJECTS=.sinit>
<OVERLAY.OBJECT=.sinit:t>
<END.OVERLAY.OBJECTS>
<FOREACH.OVERLAY.LIBRARIES=.sinit>
<OVERLAY.LIBRARY=.sinit:t>
<END.OVERLAY.LIBRARIES>
WRITEW 0;
#:::::::::: ctor
SDK_OVERLAY.<OVERLAY.NAME>.SINIT_END =.;
#:::::::::: text/rodata
SDK_OVERLAY.<OVERLAY.NAME>.TEXT_END =.;
#
# DATA BLOCK: READ WRITE
#
. = ALIGN(4);
SDK_OVERLAY.<OVERLAY.NAME>.DATA_START =.;
#:::::::::: data
<FOREACH.OVERLAY.OBJECTS=.sdata>
<OVERLAY.OBJECT=.sdata:t>
<END.OVERLAY.OBJECTS>
<FOREACH.OVERLAY.LIBRARIES=.sdata>
<OVERLAY.LIBRARY=.sdata:t>
<END.OVERLAY.LIBRARIES>
<FOREACH.OVERLAY.OBJECTS=.data>
<OVERLAY.OBJECT=.data:t>
<END.OVERLAY.OBJECTS>
<FOREACH.OVERLAY.LIBRARIES=.data>
<OVERLAY.LIBRARY=.data:t>
<END.OVERLAY.LIBRARIES>
#:::::::::: data
SDK_OVERLAY.<OVERLAY.NAME>.DATA_END =.;
. = ALIGN(4);
SDK_OVERLAY.<OVERLAY.NAME>.END =.;
SDK_OVERLAY.<OVERLAY.NAME>.TEXT_SIZE = SDK_OVERLAY.<OVERLAY.NAME>.TEXT_END - SDK_OVERLAY.<OVERLAY.NAME>.TEXT_START;
SDK_OVERLAY.<OVERLAY.NAME>.DATA_SIZE = SDK_OVERLAY.<OVERLAY.NAME>.DATA_END - SDK_OVERLAY.<OVERLAY.NAME>.DATA_START;
SDK_OVERLAY.<OVERLAY.NAME>.SIZE = SDK_OVERLAY.<OVERLAY.NAME>.END - SDK_OVERLAY.<OVERLAY.NAME>.START;
} > <OVERLAY.NAME>
.<OVERLAY.NAME>.bss:<OVERLAY.NAME>
{
ALIGNALL(4);
. = ALIGN(4);
#
# Definition to refer overlay segment, when same name symbols exist in multiple overlays.
#
<FOREACH.OVERLAY.SEARCHSYMBOLS>
SEARCH_SYMBOL <OVERLAY.SEARCHSYMBOL>;
<END.OVERLAY.SEARCHSYMBOLS>
#
# BSS BLOCK
#
SDK_OVERLAY.<OVERLAY.NAME>.BSS_START = .;
#:::::::::: bss
<FOREACH.OVERLAY.OBJECTS=.bss>
<OVERLAY.OBJECT=.bss:t>
<END.OVERLAY.OBJECTS>
<FOREACH.OVERLAY.LIBRARIES=.bss>
<OVERLAY.LIBRARY=.bss:t>
<END.OVERLAY.LIBRARIES>
<FOREACH.OVERLAY.OBJECTS=.sbss>
<OVERLAY.OBJECT=.sbss:t>
<END.OVERLAY.OBJECTS>
<FOREACH.OVERLAY.LIBRARIES=.sbss>
<OVERLAY.LIBRARY=.sbss:t>
<END.OVERLAY.LIBRARIES>
#:::::::::: bss
. = ALIGN(4);
SDK_OVERLAY.<OVERLAY.NAME>.BSS_END = .;
SDK_OVERLAY.<OVERLAY.NAME>.BSS_SIZE = SDK_OVERLAY.<OVERLAY.NAME>.BSS_END - SDK_OVERLAY.<OVERLAY.NAME>.BSS_START;
} >> <OVERLAY.NAME>
<END.OVERLAYS>
############################ OVERLAYDEFS ############################
.<PROPERTY.OVERLAYDEFS>F:
{
### <STATIC.NAME> module information
WRITEW ADDR(.<STATIC.NAME>); # load address
WRITEW _start; # entry address
WRITEW SDK_STATIC_SIZE + SDK_AUTOLOAD_SIZE; # size of module
WRITEW _start_AutoloadDoneCallback; # callback autoload done
### overlay filename
<FOREACH.OVERLAYS>
WRITES ("<OVERLAY.NAME><PROPERTY.FLXSUFFIX>"); # Overlay <OVERLAY.ID>
<END.OVERLAYS>
} > <PROPERTY.OVERLAYDEFS>F
############################ OVERLAYTABLE ###########################
.<PROPERTY.OVERLAYTABLE>F:
{
<FOREACH.OVERLAYS>
WRITEW <OVERLAY.ID>; # overlay ID
WRITEW ADDR(.<OVERLAY.NAME>); # load address
WRITEW SDK_OVERLAY.<OVERLAY.NAME>.SIZE; # size of module
WRITEW SDK_OVERLAY.<OVERLAY.NAME>.BSS_SIZE; # size of bss
WRITEW SDK_OVERLAY.<OVERLAY.NAME>.SINIT_START; # start address of static init
WRITEW SDK_OVERLAY.<OVERLAY.NAME>.SINIT_END; # end address of static init
WRITEW <OVERLAY.ID>; # ROM file ID
WRITEW 0; # Reserved
<END.OVERLAYS>
} > <PROPERTY.OVERLAYTABLE>F
############################ OTHERS #################################
SDK_WRAM_ARENA_LO = SDK_AUTOLOAD.WRAM.BSS_END;
SDK_IRQ_STACKSIZE = <STATIC.IRQSTACKSIZE>; # allocated in WRAM
SDK_SYS_STACKSIZE = <STATIC.STACKSIZE>; # allocated in WRAM
SDK_SYS_STACKSIZE_SIGN = (SDK_SYS_STACKSIZE < 0x80000000) * 2 - 1;
.check.WORKRAM:
{
. = . + SDK_AUTOLOAD.WRAM.BSS_END - SDK_AUTOLOAD.WRAM.START + 0x080 + SDK_IRQ_STACKSIZE + SDK_SYS_STACKSIZE * SDK_SYS_STACKSIZE_SIGN;
} > check.WORKRAM
########################### LTDAUTOLOADS ############################
SDK_LTDAUTOLOAD.LTDMAIN.START = 0x02f88000;
SDK_LTDAUTOLOAD.LTDMAIN.END = SDK_LTDAUTOLOAD.LTDMAIN.START;
SDK_LTDAUTOLOAD.LTDMAIN.BSS_END = SDK_LTDAUTOLOAD.LTDMAIN.START;
SDK_LTDAUTOLOAD.LTDMAIN.SIZE = 0;
SDK_LTDAUTOLOAD.LTDMAIN.BSS_SIZE = 0;
SDK_LTDAUTOLOAD_TOP_START = 0x02e80000;
SDK_LTDAUTOLOAD_TOP_SIZE = 4; # STATIC 領域が無い代わりに 4 bytes のダミーがバイナリファイルの先頭に入る #
SDK_LTDAUTOLOAD_START = SDK_LTDAUTOLOAD_TOP_START + SDK_LTDAUTOLOAD_TOP_SIZE;
SDK_LTDAUTOLOAD_SIZE = 0;
SDK_LTDAUTOLOAD_NUMBER = <NUMBER.LTDAUTOLOADS>;
.binary.LTDAUTOLOAD_TOP:
{
WRITEW 0;
} > binary.LTDAUTOLOAD_TOP
<FOREACH.LTDAUTOLOADS>
.<LTDAUTOLOAD.NAME>:
{
ALIGNALL(4);
. = ALIGN(4);
#
# Definition to refer overlay segment, when same name symbols exist in multiple overlays.
#
<FOREACH.LTDAUTOLOAD.SEARCHSYMBOLS>
SEARCH_SYMBOL <LTDAUTOLOAD.SEARCHSYMBOL>;
<END.LTDAUTOLOAD.SEARCHSYMBOLS>
SDK_LTDAUTOLOAD_<LTDAUTOLOAD.NAME>_ID =<LTDAUTOLOAD.ID>;
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.ID =<LTDAUTOLOAD.ID>;
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.START =.;
#
# TEXT BLOCK: READ ONLY
#
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.TEXT_START =.;
#:::::::::: text/rodata
<FOREACH.LTDAUTOLOAD.OBJECTS=.text>
<LTDAUTOLOAD.OBJECT=.text:t>
<END.LTDAUTOLOAD.OBJECTS>
<FOREACH.LTDAUTOLOAD.LIBRARIES=.text>
<LTDAUTOLOAD.LIBRARY=.text:t>
<END.LTDAUTOLOAD.LIBRARIES>
<FOREACH.LTDAUTOLOAD.OBJECTS=.rodata>
<LTDAUTOLOAD.OBJECT=.rodata:t>
<END.LTDAUTOLOAD.OBJECTS>
<FOREACH.LTDAUTOLOAD.LIBRARIES=.rodata>
<LTDAUTOLOAD.LIBRARY=.rodata:t>
<END.LTDAUTOLOAD.LIBRARIES>
<FOREACH.LTDAUTOLOAD.OBJECTS=.init>
<LTDAUTOLOAD.OBJECT=.init:t>
<END.LTDAUTOLOAD.OBJECTS>
<FOREACH.LTDAUTOLOAD.LIBRARIES=.init>
<LTDAUTOLOAD.LIBRARY=.init:t>
<END.LTDAUTOLOAD.LIBRARIES>
. = ALIGN(4);
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.SINIT_START =.;
#:::::::::: ctor
<FOREACH.LTDAUTOLOAD.OBJECTS=.ctor>
<LTDAUTOLOAD.OBJECT=.ctor:t>
<END.LTDAUTOLOAD.OBJECTS>
<FOREACH.LTDAUTOLOAD.LIBRARIES=.ctor>
<LTDAUTOLOAD.LIBRARY=.ctor:t>
<END.LTDAUTOLOAD.LIBRARIES>
<FOREACH.LTDAUTOLOAD.OBJECTS=.sinit>
<LTDAUTOLOAD.OBJECT=.sinit:t>
<END.LTDAUTOLOAD.OBJECTS>
<FOREACH.LTDAUTOLOAD.LIBRARIES=.sinit>
<LTDAUTOLOAD.LIBRARY=.sinit:t>
<END.LTDAUTOLOAD.LIBRARIES>
WRITEW 0;
#:::::::::: ctor
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.SINIT_END =.;
#:::::::::: text/rodata
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.TEXT_END =.;
#
# DATA BLOCK: READ WRITE BLOCK
#
. = ALIGN(4);
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.DATA_START =.;
#:::::::::: data
<FOREACH.LTDAUTOLOAD.OBJECTS=.sdata>
<LTDAUTOLOAD.OBJECT=.sdata:t>
<END.LTDAUTOLOAD.OBJECTS>
<FOREACH.LTDAUTOLOAD.LIBRARIES=.sdata>
<LTDAUTOLOAD.LIBRARY=.sdata:t>
<END.LTDAUTOLOAD.LIBRARIES>
<FOREACH.LTDAUTOLOAD.OBJECTS=.data>
<LTDAUTOLOAD.OBJECT=.data:t>
<END.LTDAUTOLOAD.OBJECTS>
<FOREACH.LTDAUTOLOAD.LIBRARIES=.data>
<LTDAUTOLOAD.LIBRARY=.data:t>
<END.LTDAUTOLOAD.LIBRARIES>
<FOREACH.LTDAUTOLOAD.OBJECTS=.ltdmain>
<LTDAUTOLOAD.OBJECT=.ltdmain:t>
<END.LTDAUTOLOAD.OBJECTS>
<FOREACH.LTDAUTOLOAD.LIBRARIES=.ltdmain>
<LTDAUTOLOAD.LIBRARY=.ltdmain:t>
<END.LTDAUTOLOAD.LIBRARIES>
#:::::::::: data
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.DATA_END =.;
. = ALIGN(4);
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.END =.;
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.TEXT_SIZE = SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.TEXT_END - SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.TEXT_START;
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.DATA_SIZE = SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.DATA_END - SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.DATA_START;
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.SIZE = SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.END - SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.START;
SDK_LTDAUTOLOAD_SIZE = SDK_LTDAUTOLOAD_SIZE + SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.SIZE;
} > <LTDAUTOLOAD.NAME>
.<LTDAUTOLOAD.NAME>.bss:
{
ALIGNALL(4);
. = ALIGN(4);
#
# Definition to refer overlay segment, when same name symbols exist in multiple overlays.
#
<FOREACH.LTDAUTOLOAD.SEARCHSYMBOLS>
SEARCH_SYMBOL <LTDAUTOLOAD.SEARCHSYMBOL>;
<END.LTDAUTOLOAD.SEARCHSYMBOLS>
#
# BSS BLOCK
#
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.BSS_START =.;
#:::::::::: bss
<FOREACH.LTDAUTOLOAD.OBJECTS=.sbss>
<LTDAUTOLOAD.OBJECT=.sbss:t>
<END.LTDAUTOLOAD.OBJECTS>
<FOREACH.LTDAUTOLOAD.LIBRARIES=.sbss>
<LTDAUTOLOAD.LIBRARY=.sbss:t>
<END.LTDAUTOLOAD.LIBRARIES>
<FOREACH.LTDAUTOLOAD.OBJECTS=.bss>
<LTDAUTOLOAD.OBJECT=.bss:t>
<END.LTDAUTOLOAD.OBJECTS>
<FOREACH.LTDAUTOLOAD.LIBRARIES=.bss>
<LTDAUTOLOAD.LIBRARY=.bss:t>
<END.LTDAUTOLOAD.LIBRARIES>
<FOREACH.LTDAUTOLOAD.OBJECTS=.ltdmain>
<LTDAUTOLOAD.OBJECT=.ltdmain.bss:t>
<END.LTDAUTOLOAD.OBJECTS>
<FOREACH.LTDAUTOLOAD.LIBRARIES=.ltdmain>
<LTDAUTOLOAD.LIBRARY=.ltdmain.bss:t>
<END.LTDAUTOLOAD.LIBRARIES>
#:::::::::: bss
. = ALIGN(4);
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.BSS_END =.;
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.BSS_SIZE = SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.BSS_END - SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.BSS_START;
} >> <LTDAUTOLOAD.NAME>
<END.LTDAUTOLOADS>
SDK_LTDAUTOLOAD_LTDMAIN_START = SDK_LTDAUTOLOAD.LTDMAIN.START;
SDK_LTDAUTOLOAD_LTDMAIN_END = SDK_LTDAUTOLOAD.LTDMAIN.END;
SDK_LTDAUTOLOAD_LTDMAIN_BSS_END = SDK_LTDAUTOLOAD.LTDMAIN.BSS_END;
SDK_LTDAUTOLOAD_LTDMAIN_SIZE = SDK_LTDAUTOLOAD.LTDMAIN.SIZE;
SDK_LTDAUTOLOAD_LTDMAIN_BSS_SIZE = SDK_LTDAUTOLOAD.LTDMAIN.BSS_SIZE;
######################### LTDAUTOLOAD_INFO ##########################
.binary.LTDAUTOLOAD_INFO:
{
<FOREACH.LTDAUTOLOADS>
WRITEW ADDR(.<LTDAUTOLOAD.NAME>);
WRITEW SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.SIZE;
WRITEW SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.SINIT_START;
WRITEW SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.BSS_SIZE;
<END.LTDAUTOLOADS>
} > binary.LTDAUTOLOAD_INFO
SDK_LTDAUTOLOAD_LIST = SDK_LTDAUTOLOAD_START + SDK_LTDAUTOLOAD_SIZE;
SDK_LTDAUTOLOAD_LIST_END = SDK_LTDAUTOLOAD_LIST + SIZEOF(.binary.LTDAUTOLOAD_INFO);
SDK_LTDAUTOLOAD_SIZE = SDK_LTDAUTOLOAD_SIZE + SIZEOF(.binary.LTDAUTOLOAD_INFO);
########################### LTDOVERLAYS #############################
SDK_LTDOVERLAY_NUMBER = <NUMBER.LTDOVERLAYS>;
<FOREACH.LTDOVERLAYS>
.<LTDOVERLAY.NAME>:<LTDOVERLAY.NAME>
{
ALIGNALL(4);
. = ALIGN(4);
#
# Definition to refer overlay segment, when same name symbols exist in multiple overlays.
#
<FOREACH.LTDOVERLAY.SEARCHSYMBOLS>
SEARCH_SYMBOL <LTDOVERLAY.SEARCHSYMBOL>;
<END.LTDOVERLAY.SEARCHSYMBOLS>
SDK_LTDOVERLAY_<LTDOVERLAY.NAME>_ID =<LTDOVERLAY.ID>;
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.ID =<LTDOVERLAY.ID>;
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.START =.;
#
# TEXT BLOCK: READ ONLY
#
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.TEXT_START =.;
#:::::::::: text/rodata
<FOREACH.LTDOVERLAY.OBJECTS=.text>
<LTDOVERLAY.OBJECT=.text:t>
<END.LTDOVERLAY.OBJECTS>
<FOREACH.LTDOVERLAY.LIBRARIES=.text>
<LTDOVERLAY.LIBRARY=.text:t>
<END.LTDOVERLAY.LIBRARIES>
<FOREACH.LTDOVERLAY.OBJECTS=.rodata>
<LTDOVERLAY.OBJECT=.rodata:t>
<END.LTDOVERLAY.OBJECTS>
<FOREACH.LTDOVERLAY.LIBRARIES=.rodata>
<LTDOVERLAY.LIBRARY=.rodata:t>
<END.LTDOVERLAY.LIBRARIES>
<FOREACH.LTDOVERLAY.OBJECTS=.init>
<LTDOVERLAY.OBJECT=.init:t>
<END.LTDOVERLAY.OBJECTS>
<FOREACH.LTDOVERLAY.LIBRARIES=.init>
<LTDOVERLAY.LIBRARY=.init:t>
<END.LTDOVERLAY.LIBRARIES>
. = ALIGN(4);
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.SINIT_START =.;
#:::::::::: ctor
<FOREACH.LTDOVERLAY.OBJECTS=.ctor>
<LTDOVERLAY.OBJECT=.ctor:t>
<END.LTDOVERLAY.OBJECTS>
<FOREACH.LTDOVERLAY.LIBRARIES=.ctor>
<LTDOVERLAY.LIBRARY=.ctor:t>
<END.LTDOVERLAY.LIBRARIES>
<FOREACH.LTDOVERLAY.OBJECTS=.sinit>
<LTDOVERLAY.OBJECT=.sinit:t>
<END.LTDOVERLAY.OBJECTS>
<FOREACH.LTDOVERLAY.LIBRARIES=.sinit>
<LTDOVERLAY.LIBRARY=.sinit:t>
<END.LTDOVERLAY.LIBRARIES>
WRITEW 0;
#:::::::::: ctor
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.SINIT_END =.;
#:::::::::: text/rodata
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.TEXT_END =.;
#
# DATA BLOCK: READ WRITE
#
. = ALIGN(4);
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.DATA_START =.;
#:::::::::: data
<FOREACH.LTDOVERLAY.OBJECTS=.sdata>
<LTDOVERLAY.OBJECT=.sdata:t>
<END.LTDOVERLAY.OBJECTS>
<FOREACH.LTDOVERLAY.LIBRARIES=.sdata>
<LTDOVERLAY.LIBRARY=.sdata:t>
<END.LTDOVERLAY.LIBRARIES>
<FOREACH.LTDOVERLAY.OBJECTS=.data>
<LTDOVERLAY.OBJECT=.data:t>
<END.LTDOVERLAY.OBJECTS>
<FOREACH.LTDOVERLAY.LIBRARIES=.data>
<LTDOVERLAY.LIBRARY=.data:t>
<END.LTDOVERLAY.LIBRARIES>
#:::::::::: data
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.DATA_END =.;
. = ALIGN(4);
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.END =.;
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.TEXT_SIZE = SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.TEXT_END - SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.TEXT_START;
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.DATA_SIZE = SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.DATA_END - SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.DATA_START;
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.SIZE = SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.END - SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.START;
} > <LTDOVERLAY.NAME>
.<LTDOVERLAY.NAME>.bss:<LTDOVERLAY.NAME>
{
ALIGNALL(4);
. = ALIGN(4);
#
# Definition to refer overlay segment, when same name symbols exist in multiple overlays.
#
<FOREACH.LTDOVERLAY.SEARCHSYMBOLS>
SEARCH_SYMBOL <LTDOVERLAY.SEARCHSYMBOL>;
<END.LTDOVERLAY.SEARCHSYMBOLS>
#
# BSS BLOCK
#
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.BSS_START =.;
#:::::::::: bss
<FOREACH.LTDOVERLAY.OBJECTS=.bss>
<LTDOVERLAY.OBJECT=.bss:t>
<END.LTDOVERLAY.OBJECTS>
<FOREACH.LTDOVERLAY.LIBRARIES=.bss>
<LTDOVERLAY.LIBRARY=.bss:t>
<END.LTDOVERLAY.LIBRARIES>
<FOREACH.LTDOVERLAY.OBJECTS=.sbss>
<LTDOVERLAY.OBJECT=.sbss:t>
<END.LTDOVERLAY.OBJECTS>
<FOREACH.LTDOVERLAY.LIBRARIES=.sbss>
<LTDOVERLAY.LIBRARY=.sbss:t>
<END.LTDOVERLAY.LIBRARIES>
#:::::::::: bss
. = ALIGN(4);
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.BSS_END =.;
SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.BSS_SIZE = SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.BSS_END - SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.BSS_START;
} >> <LTDOVERLAY.NAME>
<END.LTDOVERLAYS>
########################## LTDOVERLAYDEFS ###########################
.<PROPERTY.LTDOVERLAYDEFS>L:
{
### TWL limited extended static module information
WRITEW SDK_LTDAUTOLOAD_TOP_START; # load address
WRITEW 0; # padding
WRITEW SDK_LTDAUTOLOAD_SIZE + SDK_LTDAUTOLOAD_TOP_SIZE; # size of module
WRITEW 0; # padding
### TWL limited overlay filename
<FOREACH.LTDOVERLAYS>
WRITES ("<LTDOVERLAY.NAME><PROPERTY.LTDSUFFIX>");
<END.LTDOVERLAYS>
} > <PROPERTY.LTDOVERLAYDEFS>L
######################### LTDOVERLAYTABLE ###########################
.<PROPERTY.LTDOVERLAYTABLE>L:
{
<FOREACH.LTDOVERLAYS>
WRITES <LTDOVERLAY.ID> # overlay ID
WRITEW ADDR(.<LTDOVERLAY.NAME>); # load address
WRITEW SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.SIZE; # size of module
WRITEW SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.BSS_SIZE; # size of bss
WRITEW SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.SINIT_START; # start address of static init
WRITEW SDK_LTDOVERLAY.<LTDOVERLAY.NAME>.SINIT_END; # end address of static init
WRITEW <LTDOVERLAY.ID> # ROM file ID
WRITEW 0; # Reserved
<END.LTDOVERLAYS>
} > <PROPERTY.LTDOVERLAYTABLE>L
############################ OTHERS #################################
SDK_SUBPRIV_ARENA_LO = SDK_LTDAUTOLOAD.LTDMAIN.BSS_END;
.check.LTDMAIN:
{
. = SDK_SUBPRIV_ARENA_LO;
} > check.LTDMAIN
}

View File

@ -0,0 +1,187 @@
#----------------------------------------------------------------------------
# Project: TwlSDK - components - racoon.TWL
# File: racoon.lsf
#
# Copyright 2007 Nintendo. All rights reserved.
#
# These coded insructions, statements, and computer programs contain
# proprietary information of Nintendo of America Inc. and/or Nintendo
# Company Ltd., and are protected by Federal copyright law. They may
# not be disclosed to third parties or copied or duplicated in any form,
# in whole or in part, without the prior written consent of Nintendo.
#
# $Date:: 2008-02-01#$
# $Rev: 4002 $
# $Author: terui $
#----------------------------------------------------------------------------
#
# Nitro LCF SPEC FILE
#
#--------
Static $(TARGET_NAME)
{
Address 0x02a00000
Library $(CRT0_O)
StackSize 1024 1024
}
#--------
Autoload WRAM
{
Address $(ADDRESS_LTDWRAM)
Library libsubpsyscall.a \
libsyscall_sp.twl.a \
$(CW_LIBS) \
libos_sp$(LIBSUFFIX).a \
libmi_sp$(LIBSUFFIX).a \
libpad_sp$(LIBSUFFIX).a \
libpxi_sp$(LIBSUFFIX).a \
libstd_sp$(LIBSUFFIX).a \
libexi_sp$(LIBSUFFIX).a \
libsnd_sp$(LIBSUFFIX).a \
libspi_sp$(LIBSUFFIX).a \
libpm_sp$(LIBSUFFIX).a \
libmath_sp$(LIBSUFFIX).a \
libscfg_sp$(LIBSUFFIX).a \
libtp_sp$(LIBSUFFIX).a \
libmic_sp$(LIBSUFFIX).a \
libfs_sp$(LIBSUFFIX).a \
libcard_sp$(LIBSUFFIX).a \
libi2c_sp$(LIBSUFFIX).a \
libcamera_sp$(LIBSUFFIX).a \
libcdc_sp$(LIBSUFFIX).a \
libsndex_sp$(LIBSUFFIX).a \
libtpex_sp$(LIBSUFFIX).a \
libmicex_sp$(LIBSUFFIX).a \
libmcu_sp$(LIBSUFFIX).a \
Library libsdio_sp$(LIBSUFFIX).a
Library libnvram_sp$(LIBSUFFIX).a
Library librtc_sp$(LIBSUFFIX).a
Object * (.etable)
Object * (.wram)
Object * (.ltdwram)
Object $(OBJDIR)/main.o
# caches in fatfs library, that should be on WRAM.
# 2007/12/11 OBJECT() による .bss シンボルのリンクがうまくいかないので、
# 変数定義箇所に pragma で .ltdwram セクションに含まれるように暫定対策しました。
# Object OBJECT( FATFSi___mem_drives_structures , libfatfs_sp$(LIBSUFFIX).a) (.bss)
#####
# Sub-routines in WL library , that should be on WRAM.
# in TaskMan.o
Object OBJECT( MainTaskRoutine , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( AddTask , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( DeleteTask , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( LowestIdleTask , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( ExecuteMessage , libwl_sp$(LIBSUFFIX).a ) (.text)
# in BufMan.o
Object OBJECT( NewHeapBuf , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( DeleteHeapBuf , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( AllocateHeapBuf , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( ReleaseHeapBuf , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( MoveHeapBuf , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( AddHeapBuf , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( GetHeapBufNextAdrs , libwl_sp$(LIBSUFFIX).a ) (.text)
# in WlCmdIf.o
Object OBJECT( RequestCmdTask , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( SendMessageToWmDirect , libwl_sp$(LIBSUFFIX).a ) (.text)
# in WlNic.o
Object OBJECT( WStart , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WStop , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WSetStaState , libwl_sp$(LIBSUFFIX).a ) (.text)
# in WlIntr.o
Object OBJECT( WlIntr , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrPreTbtt , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrTbtt , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrActEnd , libwl_sp$(LIBSUFFIX).a ) (.text)
# Object OBJECT( WlIntrAckCntOvf , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrCntOvf , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrTxErr , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrRxCntup , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrTxEnd , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrRxEnd , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrMpEnd , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrStartTx , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrStartRx , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( SetParentTbttTxq , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( MacBugTxMp , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( AdjustRingPointer , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( CheckKeyTxEnd , libwl_sp$(LIBSUFFIX).a ) (.text)
# in WlIntrTask.o
Object OBJECT( WlIntrTxBeaconTask , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrTxEndTask , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrRxEndTask , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WlIntrMpEndTask , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( SetParentTbttTxqTask , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( TakeoutRxFrame , libwl_sp$(LIBSUFFIX).a ) (.text)
# in TxCtrl.o
Object OBJECT( InitTxCtrl , libwl_sp$(LIBSUFFIX).a ) (.text)
# in RxCtrl.o
Object OBJECT( InitRxCtrl , libwl_sp$(LIBSUFFIX).a ) (.text)
# in WaitLoop.o
Object OBJECT( WaitLoop_Rxpe , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WaitLoop_Waitus , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WaitLoop_ClrAid , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WaitLoop_BbpAccess , libwl_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( WaitLoop_RfAccess , libwl_sp$(LIBSUFFIX).a ) (.text)
# Object OBJECT( s_ar_cookie_mem , libathdrv_sp$(LIBSUFFIX).a ) (.bss)
# Object OBJECT( nin_ar , libathdrv_sp$(LIBSUFFIX).a ) (.bss)
Object OBJECT( a_netbuf_alloc_rx , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( a_netbuf_register_rx_callback , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( nin_driver_tx , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( nin_tx_queue_full , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( nin_tx_complete , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( nin_rx , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( ar6000_bitrate_rx , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( ar6000_channelList_rx , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( ar6000_txPwr_rx , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( ar6000_gpio_intr_rx , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( ar6000_gpio_data_rx , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( ar6000_gpio_ack_rx , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( nin_drv_BmiWriteSocReg , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( ar6000_control_tx , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( nin_drv_BmiReadMemory , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( nin_drv_BmiWriteMemory , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( BMI_read_reg , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( BMI_write_reg , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( BMI_read_mem , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( BMI_write_mem , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( wmi_dix_2_dot3 , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( wmi_control_rx_xtnd , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( wmi_control_rx , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( wmi_cmd_send , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( wmi_cmd_send_xtnd , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( HIFReadWrite , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( ath_ioctl , libathdrv_sp$(LIBSUFFIX).a ) (.text)
Object OBJECT( wpa_sm_rx_eapol , libwpa_sp$(LIBSUFFIX).a ) (.text)
}
#--------
Ltdautoload LTDMAIN
{
Address 0x02f88000
Object * (.ltdmain)
Library libwm_sp$(LIBSUFFIX).a \
libnwm_sp$(LIBSUFFIX).a \
libwvr_sp$(LIBSUFFIX).a \
libwl_sp$(LIBSUFFIX).a
Library libwpa_sp$(LIBSUFFIX).a
Library libathdrv_sp$(LIBSUFFIX).a
Library libfatfs_sp$(LIBSUFFIX).a \
$(USE_CRYPTO_LIBS)
Library $(ISDBG_LIBS_TWL)
Library $(ISDBG_LIBS_NITRO)
}

View File

@ -0,0 +1,40 @@
<FOREACH.STATIC.OBJECTS:f>
<STATIC.OBJECT>
<END.STATIC.OBJECTS>
<FOREACH.STATIC.LIBRARIES:f>
-l<STATIC.LIBRARY>
<END.STATIC.LIBRARIES>
<FOREACH.AUTOLOADS>
<FOREACH.AUTOLOAD.OBJECTS:f>
<AUTOLOAD.OBJECT>
<END.AUTOLOAD.OBJECTS>
<FOREACH.AUTOLOAD.LIBRARIES:f>
-l<AUTOLOAD.LIBRARY>
<END.AUTOLOAD.LIBRARIES>
<END.AUTOLOADS>
<FOREACH.OVERLAYS>
-og <OVERLAY.GROUP>,0 -ol <OVERLAY.NAME>
<FOREACH.OVERLAY.OBJECTS:f>
<OVERLAY.OBJECT>
<END.OVERLAY.OBJECTS>
<FOREACH.OVERLAY.LIBRARIES:f>
-l<OVERLAY.LIBRARY>
<END.OVERLAY.LIBRARIES>
<END.OVERLAYS>
<FOREACH.LTDAUTOLOADS>
<FOREACH.LTDAUTOLOAD.OBJECTS:f>
<LTDAUTOLOAD.OBJECT>
<END.LTDAUTOLOAD.OBJECTS>
<FOREACH.LTDAUTOLOAD.LIBRARIES:f>
-l<LTDAUTOLOAD.LIBRARY>
<END.LTDAUTOLOAD.LIBRARIES>
<END.LTDAUTOLOADS>
<FOREACH.LTDOVERLAYS>
-og <LTDOVERLAY.GROUP>,0 -ol <LTDOVERLAY.NAME>
<FOREACH.LTDOVERLAY.OBJECTS:f>
<LTDOVERLAY.OBJECT>
<END.LTDOVERLAY.OBJECTS>
<FOREACH.LTDOVERLAY.LIBRARIES:f>
-l<LTDOVERLAY.LIBRARY>
<END.LTDOVERLAY.LIBRARIES>
<END.LTDOVERLAYS>

View File

@ -1,6 +1,6 @@
#! make -f #! make -f
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Project: TwlSDK - demos - simpleShoot-1 # Project: TwlSDK - demos.TWL - nandApp - ExecPreLoadedApp
# File: Makefile # File: Makefile
# #
# Copyright 2007 Nintendo. All rights reserved. # Copyright 2007 Nintendo. All rights reserved.
@ -18,41 +18,40 @@
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
TARGET_FIRM = SYSTEMMENU
TARGET_PLATFORM = TWL TARGET_PLATFORM = TWL
TWL_ARCHGEN = LIMITED TWL_ARCHGEN = LIMITED
TITLEID_LO = MLEP TITLEID_LO = MLEP
TARGET_TAD = $(BINDIR)/$(TITLEID_LO).$(TWL_BUILD_DIR).tad
TARGET_BIN = main.srl TARGET_BIN = ExecPreLoadedApp.tad
LCFILE_SPEC = ARM9-TS.lsf LCFILE_SPEC = ARM9-TS.lsf
ROM_SPEC = main.rsf ROM_SPEC = main.rsf
MISC_DIR = $(SYSMENU_ROOT)/build/systemMenu_RED/misc SRCS = main.c ExecPreLoadedApp.c misc_simple.c data.c
SRCS = main.c ExecPreLoadedApp.c \ LINCLUDES = $(TWLSDK_ROOT)/build/demos/gx/UnitTours/DEMOLib/include
$(MISC_DIR)/src/misc.c $(MISC_DIR)/src/cmn.c
LINCLUDES = $(MISC_DIR)/include LLIBRARY_DIRS += $(TWLSDK_ROOT)/build/demos/gx/UnitTours/DEMOLib/lib/$(TWL_BUILDTYPE)
LLIBRARIES += libboc$(TWL_LIBSUFFIX).a \ LLIBRARIES += libboc$(TWL_LIBSUFFIX).a \
libes$(TWL_LIBSUFFIX).a \ libes$(TWL_LIBSUFFIX).a \
libnam$(TWL_LIBSUFFIX).a \ libnam$(TWL_LIBSUFFIX).a \
libreloc_info$(TWL_LIBSUFFIX).a libDEMO$(TWL_LIBSUFFIX).a
ADDRESS_DTCM = 0x0e000000 ADDRESS_DTCM = 0x0e000000
DEFAULT_COMP_ARM7 = hyena
MAKEROM_FLAGS += -F -DTITLEID_LO='$(TITLEID_LO)' MAKEROM_FLAGS += -F -DTITLEID_LO='$(TITLEID_LO)'
include $(TWLSDK_ROOT)/add-ins/es/commondefs.es include $(TWLSDK_ROOT)/add-ins/es/commondefs.es
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs include $(TWLSDK_ROOT)/build/buildtools/commondefs
LDIRT_CLEAN = $(TARGET_TAD) DEFAULT_COMP_ARM7 = my_racoon
INSTALL_TARGETS = $(TARGET_TAD) DEFAULT_MAKEROM_ARM7_BASE = ../ARM7/bin/$(TWL_BUILDTYPE_ARM7)/$(DEFAULT_COMP_ARM7)
DEFAULT_MAKEROM_ARM7 = $(DEFAULT_MAKEROM_ARM7_BASE).$(TWL_ELF_EXT)
SDK_NMENU_DATADIR = $(ROOT)/build/tools/TwlNMenu/data
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
INSTALL_DIR = $(SDK_NMENU_DATADIR) INSTALL_DIR = $(SDK_NMENU_DATADIR)
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@ -60,7 +59,7 @@ INSTALL_DIR = $(SDK_NMENU_DATADIR)
do-build : $(TARGETS) do-build : $(TARGETS)
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules include $(TWLSDK_ROOT)/build/buildtools/modulerules
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------

Binary file not shown.

View File

@ -173,7 +173,7 @@ RomSpec
{ {
Offset 0x00000000 Offset 0x00000000
Segment ALL Segment ALL
HostRoot $(TWL_IPL_RED_ROOT)/build/systemMenu_RED/data HostRoot data
Root /data Root /data
File NTR_IPL_font_m.NFTR File simpleapp.srl
} }

View File

@ -1,5 +1,5 @@
/*---------------------------------------------------------------------------* /*---------------------------------------------------------------------------*
Project: TwlIPL Project: TwlSDK - demos.TWL - nandApp - ExecPreLoadedApp
File: ExecPreLoadedApp.c File: ExecPreLoadedApp.c
Copyright 2007 Nintendo. All rights reserved. Copyright 2007 Nintendo. All rights reserved.
@ -16,19 +16,13 @@
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
#include <twl.h> #include <twl.h>
#include <sysmenu.h> #include <twl/nam.h>
#include "misc.h" #include "misc_simple.h"
#include "ExecPreLoadedApp.h" #include "ExecPreLoadedApp.h"
// define data------------------------------------------ // define data------------------------------------------
#define RETURN_BUTTON_TOP_X 2
#define RETURN_BUTTON_TOP_Y 21
#define RETURN_BUTTON_BOTTOM_X ( RETURN_BUTTON_TOP_X + 8 )
#define RETURN_BUTTON_BOTTOM_Y ( RETURN_BUTTON_TOP_Y + 2 )
#define MLEP_MENU_ELEMENT_NUM 7 // メニューの項目数 #define MLEP_MENU_ELEMENT_NUM 2 // メニューの項目数
#define PARAM_LENGTH 10
// extern data------------------------------------------ // extern data------------------------------------------
@ -37,32 +31,21 @@
static void MenuScene( void ); static void MenuScene( void );
// global variable ------------------------------------- // global variable -------------------------------------
extern RTCDrawProperty g_rtcDraw;
// static variable ------------------------------------- // static variable -------------------------------------
static u16 s_csr = 0; static u16 s_csr = 0;
static void(*s_pNowProcess)(void); static void(*s_pNowProcess)(void);
// const data ----------------------------------------- // const data -----------------------------------------
static const u16 *s_pStrMenu[ MLEP_MENU_ELEMENT_NUM ] = static const char *s_pStrMenu[ MLEP_MENU_ELEMENT_NUM ] =
{ {
L"再配置チェッカ0再配置無し", "load app and restart",
L"再配置チェッカ1エラー", "return to launcher",
L"再配置チェッカ2正順コピー1",
L"再配置チェッカ3正順コピー2",
L"再配置チェッカ4エラー",
L"再配置チェッカ5WRAMへ配置",
L"ランチャーに戻る",
}; };
static MenuPos s_menuPos[] = { static MenuPos s_menuPos[] = {
{ TRUE, 4 * 8, 8 * 8 }, { TRUE, 3, 6 },
{ TRUE, 4 * 8, 10 * 8 }, { TRUE, 3, 8 },
{ TRUE, 4 * 8, 12 * 8 },
{ TRUE, 4 * 8, 14 * 8 },
{ TRUE, 4 * 8, 16 * 8 },
{ TRUE, 4 * 8, 18 * 8 },
{ TRUE, 4 * 8, 20 * 8 },
}; };
static const MenuParam s_menuParam = { static const MenuParam s_menuParam = {
@ -71,7 +54,7 @@ static const MenuParam s_menuParam = {
TXT_COLOR_GREEN, TXT_COLOR_GREEN,
TXT_COLOR_RED, TXT_COLOR_RED,
&s_menuPos[ 0 ], &s_menuPos[ 0 ],
(const u16 **)&s_pStrMenu, (const char **)&s_pStrMenu,
}; };
//====================================================== //======================================================
@ -86,23 +69,18 @@ static const MenuParam s_menuParam = {
static void DrawMenuScene( void ) static void DrawMenuScene( void )
{ {
PutStringUTF16( 1 * 8, 0 * 8, TXT_COLOR_BLUE, (const u16 *)L"ExecPreLoadedApp"); myDp_Printf( 1, 0, TXT_COLOR_BLUE, MAIN_SCREEN, "ExecPreLoadedApp");
// メニュー項目 // メニュー項目
DrawMenu( s_csr, &s_menuParam ); myDp_DrawMenu( s_csr, MAIN_SCREEN, &s_menuParam );
} }
static void MenuInit( void ) static void MenuInit( void )
{ {
FS_Init(3);
GX_DispOff(); GX_DispOff();
GXS_DispOff(); GXS_DispOff();
NNS_G2dCharCanvasClear( &gCanvas, TXT_COLOR_WHITE );
PutStringUTF16( 1 * 8, 0 * 8, TXT_COLOR_BLUE, (const u16 *)L"ExecPreLoadedApp"); myDp_Printf( 1, 0, TXT_COLOR_BLUE, MAIN_SCREEN, "ExecPreLoadedApp");
GetAndDrawRTCData( &g_rtcDraw, TRUE );
SVC_CpuClear( 0x0000, &tpd, sizeof(TpWork), 16 );
GXS_SetVisiblePlane( GX_PLANEMASK_BG0 );
s_pNowProcess = MenuScene; s_pNowProcess = MenuScene;
@ -113,82 +91,46 @@ static void MenuInit( void )
} }
static BOOL LoadTitle( NAMTitleId bootTitleID ) static BOOL LoadTitle( void )
{ {
// ロード // ロード
char path[256]; if( !OS_SetRelocateInfoAndLoadApplication( "rom:/data/simpleapp.srl" ) )
FSFile file[1];
BOOL bSuccess;
BOOL isTwlApp = TRUE;
NAM_GetTitleBootContentPath(path, bootTitleID);
if( !OS_SetRelocateInfoAndLoadApplication( path ) )
{ {
return FALSE; return FALSE;
} }
SYSMi_GetWork()->flags.common.isLoadSucceeded = TRUE;
return TRUE; return TRUE;
} }
static void MenuScene(void) static void MenuScene(void)
{ {
BOOL tp_select = FALSE; LauncherBootFlags tempflag = {TRUE, LAUNCHER_BOOTTYPE_MEMORY, TRUE, FALSE, TRUE, FALSE, 0};
LauncherBootFlags tempflag = {TRUE, LAUNCHER_BOOTTYPE_NAND, TRUE, FALSE, TRUE, FALSE, 0};
ReadTP();
//-------------------------------------- //--------------------------------------
// キー入力処理 // キー入力処理
//-------------------------------------- //--------------------------------------
if( pad.trg & PAD_KEY_DOWN ){ // カーソルの移動 if( MYPAD_IS_TRIG(PAD_KEY_DOWN) ){ // カーソルの移動
if( ++s_csr == MLEP_MENU_ELEMENT_NUM ) { if( ++s_csr == MLEP_MENU_ELEMENT_NUM ) {
s_csr=0; s_csr=0;
} }
} }
if( pad.trg & PAD_KEY_UP ){ if( MYPAD_IS_TRIG(PAD_KEY_UP) ){
if( --s_csr & 0x80 ) { if( --s_csr & 0x80 ) {
s_csr=MLEP_MENU_ELEMENT_NUM - 1; s_csr=MLEP_MENU_ELEMENT_NUM - 1;
} }
} }
tp_select = SelectMenuByTP( &s_csr, &s_menuParam );
DrawMenuScene(); DrawMenuScene();
if( ( pad.trg & PAD_BUTTON_A ) || ( tp_select ) ) { // メニュー項目への分岐 if( MYPAD_IS_TRIG(PAD_BUTTON_A) ) { // メニュー項目への分岐
if( s_menuPos[ s_csr ].enable ) { if( s_menuPos[ s_csr ].enable ) {
switch( s_csr ) { switch( s_csr ) {
case 0: case 0:
//アプリ起動 //アプリ起動
if(LoadTitle(0x0003000452434b30)) if(LoadTitle())
OS_SetLauncherParamAndResetHardware( 0, 0x0003000452434b30, &tempflag ); // RCK0 OS_SetLauncherParamAndResetHardware( 0, 0x00030004534d504c, &tempflag ); // SMPL
break; break;
case 1: case 1:
//アプリ起動
if(LoadTitle(0x0003000452434b31))
OS_SetLauncherParamAndResetHardware( 0, 0x0003000452434b31, &tempflag ); // RCK1
break;
case 2:
//アプリ起動
if(LoadTitle(0x0003000452434b32))
OS_SetLauncherParamAndResetHardware( 0, 0x0003000452434b32, &tempflag ); // RCK2
break;
case 3:
//アプリ起動
if(LoadTitle(0x0003000452434b33))
OS_SetLauncherParamAndResetHardware( 0, 0x0003000452434b33, &tempflag ); // RCK3
break;
case 4:
//アプリ起動
if(LoadTitle(0x0003000452434b34))
OS_SetLauncherParamAndResetHardware( 0, 0x0003000452434b34, &tempflag ); // RCK4
break;
case 5:
//アプリ起動
if(LoadTitle(0x0003000452434b35))
OS_SetLauncherParamAndResetHardware( 0, 0x0003000452434b35, &tempflag ); // RCK5
break;
case 6:
OS_SetLauncherParamAndResetHardware( 0, NULL, &tempflag ); OS_SetLauncherParamAndResetHardware( 0, NULL, &tempflag );
//再起動 //再起動
break; break;
@ -200,7 +142,6 @@ static void MenuScene(void)
// 初期化 // 初期化
void ExecPreLoadedAppInit( void ) void ExecPreLoadedAppInit( void )
{ {
ChangeUserColor( LCFG_TSD_GetUserColor() );
MenuInit(); MenuInit();
} }

View File

@ -0,0 +1,620 @@
/*---------------------------------------------------------------------------*
Project: TwlSDK - demos.TWL - nandApp - ExecPreLoadedApp
File: data.c
Copyright 2007 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: 2007-08-29#$
$Rev: 640 $
$Author: kitase_hirotake $
*---------------------------------------------------------------------------*/
#include "data.h"
/*---------------------- Palette Data ---------------------------*/
const unsigned int d_64_256_bg_sclDT[8 * 16] = {
0x0000ffff, 0x00000000, 0x00000000, 0x00000000, // black
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x001f001e, 0x001d001c, 0x001b001a, 0x00190018, // red
0x00170016, 0x00150014, 0x00130012, 0x00110010,
0x03e00000, 0x00000000, 0x00000000, 0x00000000, // green
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x7c000000, 0x00000000, 0x00000000, 0x00000000, // blue
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x03ff0000, 0x00000000, 0x00000000, 0x00000000, // yellow
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x7c1f0000, 0x00000000, 0x00000000, 0x00000000, // purple
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x7fe00000, 0x00000000, 0x00000000, 0x00000000, // light blue
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x000f000e, 0x000d000c, 0x000b000a, 0x00090008, // dark red
0x00070006, 0x00050004, 0x00030002, 0x00010000,
0x03000000, 0x00000000, 0x00000000, 0x00000000, // dark green
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x60000000, 0x00000000, 0x00000000, 0x00000000, // dark blue
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x03180000, 0x00000000, 0x00000000, 0x00000000, // dark yellow
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x60180000, 0x00000000, 0x00000000, 0x00000000, // dark purple
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x63000000, 0x00000000, 0x00000000, 0x00000000, // dark light blue
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x56b50000, 0x00000000, 0x00000000, 0x00000000, // gray
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x2d6b0000, 0x00000000, 0x00000000, 0x00000000, // dark gray
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x7fff0000, 0x00000000, 0x00000000, 0x00000000, // white
0x00000000, 0x00000000, 0x00000000, 0x00000000
};
/*---------------------- Character Data -------------------------*/
const unsigned int d_64_256_bg_schDT[8 * 256] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0000h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01010010, 0x01010010, 0x00000110, // 0001h
0x00011010, 0x01100010, 0x00000010, 0x00000010,
0x00000000, 0x01011010, 0x01010010, 0x00010010, // 0002h
0x00100010, 0x00100010, 0x00100001, 0x00100001,
0x00000000, 0x01010001, 0x01010001, 0x01111111, // 0003h
0x00000001, 0x00000001, 0x00000001, 0x01111110,
0x00000000, 0x01010000, 0x01111111, 0x00100000, // 0004h
0x00100000, 0x00010000, 0x00001000, 0x00000110,
0x00000000, 0x01010000, 0x01010100, 0x00001010, // 0005h
0x00010001, 0x00100001, 0x01000000, 0x00000000,
0x00000000, 0x01011000, 0x01011000, 0x01111111, // 0006h
0x00001000, 0x00101010, 0x01001010, 0x01001001,
0x00000000, 0x01010010, 0x01101111, 0x01010010, // 0007h
0x00010010, 0x00010010, 0x00010010, 0x00001001,
0x00000000, 0x01010010, 0x01011111, 0x00000100, // 0008h
0x00011111, 0x00001000, 0x00000001, 0x00011110,
0x00000000, 0x01010000, 0x01011000, 0x00000110, // 0009h
0x00000001, 0x00000110, 0x00011000, 0x00100000,
0x00000000, 0x01010000, 0x01111101, 0x00010001, // 000ah
0x00010001, 0x00010001, 0x00010001, 0x00001010,
0x00000000, 0x01010000, 0x01011110, 0x00100000, // 000bh
0x00000000, 0x00000001, 0x00000001, 0x00111110,
0x00000000, 0x01010100, 0x01011111, 0x00001000, // 000ch
0x00010000, 0x00000001, 0x00000001, 0x00011110,
0x00000000, 0x01010001, 0x01010001, 0x00000001, // 000dh
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x01010000, 0x01111111, 0x00011000, // 000eh
0x00010100, 0x00010100, 0x00011000, 0x00001100,
0x00000000, 0x01010010, 0x01111111, 0x00010010, // 000fh
0x00010010, 0x00000010, 0x00000010, 0x00111100,
0x00000000, 0x00001110, 0x01010100, 0x01010010, // 0010h
0x00111111, 0x00000100, 0x00000100, 0x00011000,
0x00000000, 0x01010100, 0x01011111, 0x00000100, // 0011h
0x01110100, 0x00000010, 0x00001010, 0x01110010,
0x00000000, 0x01010100, 0x01011111, 0x00000010, // 0012h
0x00011110, 0x00100001, 0x00100000, 0x00011110,
0x00000000, 0x01010000, 0x01011100, 0x00100011, // 0013h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x01010000, 0x01111111, 0x00010000, // 0014h
0x00001000, 0x00001000, 0x00001000, 0x00110000,
0x00000000, 0x01010010, 0x01010010, 0x00001100, // 0015h
0x00000010, 0x00000001, 0x00000001, 0x00111110,
0x00000000, 0x01010001, 0x01111101, 0x00010001, // 0016h
0x00010001, 0x00111001, 0x01010101, 0x00011001,
0x00000000, 0x01010100, 0x01010011, 0x01110010, // 0017h
0x00010001, 0x00010001, 0x00001010, 0x00000100,
0x00000000, 0x01011110, 0x01011000, 0x00000100, // 0018h
0x00101001, 0x01010001, 0x01010001, 0x00001100,
0x00000000, 0x01010000, 0x01011100, 0x00010010, // 0019h
0x00010010, 0x00100001, 0x01000000, 0x00000000,
0x00000000, 0x01011101, 0x01010001, 0x00111101, // 001ah
0x00010001, 0x00011001, 0x00110101, 0x00001001,
0x00000000, 0x01110001, 0x01011101, 0x00110001, // 001bh
0x00010001, 0x00111001, 0x01010101, 0x00011001,
0x00000000, 0x01110100, 0x01010011, 0x00110010, // 001ch
0x00010001, 0x00010001, 0x00001010, 0x00000100,
0x00000000, 0x01101110, 0x01011000, 0x00100100, // 001dh
0x00101001, 0x01010001, 0x01010001, 0x00001100,
0x00000000, 0x01110000, 0x01011100, 0x00110010, // 001eh
0x00010010, 0x00100001, 0x01000000, 0x00000000,
0x00000000, 0x01111101, 0x01010001, 0x00111101, // 001fh
0x00010001, 0x00011001, 0x00110101, 0x00001001,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0020h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 0021h
0x00001000, 0x00001000, 0x00000000, 0x00001000,
0x00000000, 0x01101100, 0x01001000, 0x00100100, // 0022h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00100100, 0x01111111, 0x00100100, // 0023h
0x00100100, 0x01111111, 0x00010010, 0x00010010,
0x00000000, 0x00001000, 0x01111110, 0x00001001, // 0024h
0x00111110, 0x01001000, 0x00111111, 0x00001000,
0x00000000, 0x01000010, 0x00100101, 0x00010010, // 0025h
0x00001000, 0x00100100, 0x01010010, 0x00100001,
0x00000000, 0x00001110, 0x00010001, 0x00001001, // 0026h
0x01000110, 0x00101001, 0x00110001, 0x01001110,
0x00000000, 0x00011000, 0x00010000, 0x00001000, // 0027h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01110000, 0x00001000, 0x00000100, // 0028h
0x00000100, 0x00000100, 0x00001000, 0x01110000,
0x00000000, 0x00000111, 0x00001000, 0x00010000, // 0029h
0x00010000, 0x00010000, 0x00001000, 0x00000111,
0x00000000, 0x00001000, 0x01001001, 0x00101010, // 002ah
0x00011100, 0x00101010, 0x01001001, 0x00001000,
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 002bh
0x01111111, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002ch
0x00000000, 0x00001100, 0x00001000, 0x00000100,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002dh
0x01111111, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002eh
0x00000000, 0x00000000, 0x00000000, 0x00001100,
0x00000000, 0x01000000, 0x00100000, 0x00010000, // 002fh
0x00001000, 0x00000100, 0x00000010, 0x00000001,
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0030h
0x01000001, 0x01000001, 0x01000001, 0x00111110,
0x00000000, 0x00011100, 0x00010000, 0x00010000, // 0031h
0x00010000, 0x00010000, 0x00010000, 0x00010000,
0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0032h
0x00111110, 0x00000001, 0x00000001, 0x01111111,
0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0033h
0x00111110, 0x01000000, 0x01000001, 0x00111110,
0x00000000, 0x00100000, 0x00110000, 0x00101000, // 0034h
0x00100100, 0x00100010, 0x01111111, 0x00100000,
0x00000000, 0x01111111, 0x00000001, 0x00111111, // 0035h
0x01000000, 0x01000000, 0x01000001, 0x00111110,
0x00000000, 0x00111110, 0x00000001, 0x00111111, // 0036h
0x01000001, 0x01000001, 0x01000001, 0x00111110,
0x00000000, 0x01111111, 0x00100000, 0x00100000, // 0037h
0x00010000, 0x00010000, 0x00001000, 0x00001000,
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0038h
0x00111110, 0x01000001, 0x01000001, 0x00111110,
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0039h
0x01000001, 0x01111110, 0x01000000, 0x00111110,
0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003ah
0x00000000, 0x00000000, 0x00001100, 0x00000000,
0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003bh
0x00000000, 0x00001100, 0x00001000, 0x00000100,
0x00000000, 0x01100000, 0x00011000, 0x00000110, // 003ch
0x00000001, 0x00000110, 0x00011000, 0x01100000,
0x00000000, 0x00000000, 0x01111111, 0x00000000, // 003dh
0x00000000, 0x00000000, 0x01111111, 0x00000000,
0x00000000, 0x00000011, 0x00001100, 0x00110000, // 003eh
0x01000000, 0x00110000, 0x00001100, 0x00000011,
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 003fh
0x00110000, 0x00001000, 0x00000000, 0x00001000,
0x00000000, 0x00011100, 0x00100010, 0x01001001, // 0040h
0x01010101, 0x01010101, 0x01010101, 0x00111010,
0x00000000, 0x00001000, 0x00010100, 0x00010100, // 0041h
0x00100010, 0x00111110, 0x01000001, 0x01000001,
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0042h
0x00111111, 0x01000001, 0x01000001, 0x00111111,
0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0043h
0x00000001, 0x00000001, 0x01000010, 0x00111100,
0x00000000, 0x00011111, 0x00100001, 0x01000001, // 0044h
0x01000001, 0x01000001, 0x00100001, 0x00011111,
0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0045h
0x01111111, 0x00000001, 0x00000001, 0x01111111,
0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0046h
0x00111111, 0x00000001, 0x00000001, 0x00000001,
0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0047h
0x01111001, 0x01000001, 0x01000010, 0x00111100,
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0048h
0x01111111, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x00111110, 0x00001000, 0x00001000, // 0049h
0x00001000, 0x00001000, 0x00001000, 0x00111110,
0x00000000, 0x01000000, 0x01000000, 0x01000000, // 004ah
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x01100001, 0x00011001, 0x00000101, // 004bh
0x00000011, 0x00000101, 0x00011001, 0x01100001,
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 004ch
0x00000001, 0x00000001, 0x00000001, 0x01111111,
0x00000000, 0x01000001, 0x01100011, 0x01010101, // 004dh
0x01001001, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x01000001, 0x01000011, 0x01000101, // 004eh
0x01001001, 0x01010001, 0x01100001, 0x01000001,
0x00000000, 0x00011100, 0x00100010, 0x01000001, // 004fh
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0050h
0x00111111, 0x00000001, 0x00000001, 0x00000001,
0x00000000, 0x00011100, 0x00100010, 0x01000001, // 0051h
0x01000001, 0x01011001, 0x00100010, 0x01011100,
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0052h
0x00111111, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x00111110, 0x01000001, 0x00000001, // 0053h
0x00111110, 0x01000000, 0x01000001, 0x00111110,
0x00000000, 0x01111111, 0x00001000, 0x00001000, // 0054h
0x00001000, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0055h
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x01000001, 0x01000001, 0x00100010, // 0056h
0x00100010, 0x00010100, 0x00010100, 0x00001000,
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0057h
0x01001001, 0x01010101, 0x01100011, 0x01000001,
0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0058h
0x00001000, 0x00010100, 0x00100010, 0x01000001,
0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0059h
0x00001000, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x01111111, 0x00100000, 0x00010000, // 005ah
0x00001000, 0x00000100, 0x00000010, 0x01111111,
0x00000000, 0x01111100, 0x00000100, 0x00000100, // 005bh
0x00000100, 0x00000100, 0x00000100, 0x01111100,
0x00000000, 0x00100010, 0x00010100, 0x00111110, // 005ch
0x00001000, 0x00111110, 0x00001000, 0x00001000,
0x00000000, 0x00011111, 0x00010000, 0x00010000, // 005dh
0x00010000, 0x00010000, 0x00010000, 0x00011111,
0x00000000, 0x00001000, 0x00010100, 0x00100010, // 005eh
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 005fh
0x00000000, 0x00000000, 0x00000000, 0x01111111,
0x00000000, 0x00010000, 0x00001000, 0x00011000, // 0060h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00011110, 0x00100001, // 0061h
0x00111110, 0x00100001, 0x00100001, 0x01011110,
0x00000000, 0x00000001, 0x00000001, 0x00111111, // 0062h
0x01000001, 0x01000001, 0x01000001, 0x00111111,
0x00000000, 0x00000000, 0x00111100, 0x01000010, // 0063h
0x00000001, 0x00000001, 0x01000010, 0x00111100,
0x00000000, 0x01000000, 0x01000000, 0x01111110, // 0064h
0x01000001, 0x01000001, 0x01000001, 0x01111110,
0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0065h
0x01111111, 0x00000001, 0x01000001, 0x00111110,
0x00000000, 0x00110000, 0x00001000, 0x00001000, // 0066h
0x01111111, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x00000000, 0x01111110, 0x01000001, // 0067h
0x01000001, 0x01111110, 0x01000000, 0x00111110,
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0068h
0x00111111, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x00001000, 0x00000000, 0x00001000, // 0069h
0x00001000, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x00100000, 0x00000000, 0x00100000, // 006ah
0x00100000, 0x00100001, 0x00100001, 0x00011110,
0x00000000, 0x00000001, 0x00000001, 0x01100001, // 006bh
0x00011001, 0x00000111, 0x00011001, 0x01100001,
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 006ch
0x00001000, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x00000000, 0x00110111, 0x01001001, // 006dh
0x01001001, 0x01001001, 0x01001001, 0x01001001,
0x00000000, 0x00000000, 0x00111111, 0x01000001, // 006eh
0x01000001, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x00000000, 0x00011100, 0x00100010, // 006fh
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x00000000, 0x00111101, 0x01000011, // 0070h
0x01000001, 0x01000011, 0x00111101, 0x00000001,
0x00000000, 0x00000000, 0x01011110, 0x01100001, // 0071h
0x01000001, 0x01100001, 0x01011110, 0x01000000,
0x00000000, 0x00000000, 0x00110001, 0x00001101, // 0072h
0x00000011, 0x00000001, 0x00000001, 0x00000001,
0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0073h
0x00001110, 0x00110000, 0x01000001, 0x00111110,
0x00000000, 0x00000100, 0x00000100, 0x01111111, // 0074h
0x00000100, 0x00000100, 0x00000100, 0x01111000,
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0075h
0x01000001, 0x01000001, 0x01000001, 0x01111110,
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0076h
0x00100010, 0x00100010, 0x00010100, 0x00001000,
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0077h
0x01001001, 0x00101010, 0x00101010, 0x00010100,
0x00000000, 0x00000000, 0x00100001, 0x00010010, // 0078h
0x00001100, 0x00001100, 0x00010010, 0x00100001,
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0079h
0x00100010, 0x00011100, 0x00001000, 0x00000110,
0x00000000, 0x00000000, 0x00111111, 0x00010000, // 007ah
0x00001000, 0x00000100, 0x00000010, 0x00111111,
0x00000000, 0x00001000, 0x00011110, 0x01100100, // 007bh
0x00011000, 0x00100100, 0x00000100, 0x01111000,
0x00000000, 0x00000000, 0x00011110, 0x00000100, // 007ch
0x00011110, 0x00110101, 0x00101101, 0x00010010,
0x00000000, 0x00000000, 0x00000000, 0x00010001, // 007dh
0x00100001, 0x00100001, 0x00000001, 0x00000010,
0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007eh
0x00011110, 0x00100000, 0x00100000, 0x00011100,
0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007fh
0x00111110, 0x00010000, 0x00001100, 0x00110010,
0x00000000, 0x00000000, 0x00000100, 0x00101111, // 0080h
0x01000100, 0x00011110, 0x00100101, 0x00010110,
0x00000000, 0x00000000, 0x00001010, 0x00011110, // 0081h
0x00101011, 0x00100010, 0x00010100, 0x00000100,
0x00000000, 0x00000000, 0x00001000, 0x00011101, // 0082h
0x00101011, 0x00101001, 0x00011001, 0x00000100,
0x00000000, 0x00000000, 0x00001000, 0x00111000, // 0083h
0x00001000, 0x00011110, 0x00101001, 0x00000110,
0x00000000, 0x00000000, 0x00000000, 0x00011100, // 0084h
0x00100011, 0x00100000, 0x00100000, 0x00011100,
0x00000000, 0x00000110, 0x01001001, 0x00110000, // 0085h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000100, 0x00111111, 0x00000100, // 0086h
0x00111110, 0x01010101, 0x01001101, 0x00100110,
0x00000000, 0x00000000, 0x00100001, 0x01000001, // 0087h
0x01000001, 0x01000001, 0x00000001, 0x00000010,
0x00000000, 0x00111100, 0x00000000, 0x00111110, // 0088h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x00011100, 0x00000000, 0x00111110, // 0089h
0x00010000, 0x00001000, 0x00010100, 0x01100010,
0x00000000, 0x00100100, 0x01011111, 0x00000100, // 008ah
0x00111110, 0x01000101, 0x01000101, 0x00100010,
0x00000000, 0x00100010, 0x01001111, 0x01010010, // 008bh
0x01010010, 0x00010010, 0x00010010, 0x00001001,
0x00000000, 0x00000100, 0x00111110, 0x00001000, // 008ch
0x00111110, 0x00010000, 0x00000010, 0x00111100,
0x00000000, 0x00100000, 0x00011000, 0x00000110, // 008dh
0x00000001, 0x00000110, 0x00011000, 0x00100000,
0x00000000, 0x00100000, 0x01111101, 0x00100001, // 008eh
0x00100001, 0x00100001, 0x00100001, 0x00010010,
0x00000000, 0x00011110, 0x00100000, 0x00000000, // 008fh
0x00000000, 0x00000001, 0x00000001, 0x00111110,
0x00000000, 0x00001000, 0x01111111, 0x00010000, // 0090h
0x00100000, 0x00000010, 0x00000010, 0x00111100,
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0091h
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x00010000, 0x01111111, 0x00011000, // 0092h
0x00010100, 0x00010100, 0x00011000, 0x00001100,
0x00000000, 0x00100010, 0x01111111, 0x00100010, // 0093h
0x00100010, 0x00000010, 0x00000010, 0x01111100,
0x00000000, 0x00111100, 0x00010000, 0x00001100, // 0094h
0x01111111, 0x00001000, 0x00001000, 0x00110000,
0x00000000, 0x00000100, 0x00011111, 0x00000100, // 0095h
0x01110100, 0x00000010, 0x00001010, 0x01110010,
0x00000000, 0x00001000, 0x01111111, 0x00000100, // 0096h
0x00111100, 0x01000010, 0x01000000, 0x00111100,
0x00000000, 0x00000000, 0x00011100, 0x00100011, // 0097h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x01111111, 0x00010000, 0x00001000, // 0098h
0x00001000, 0x00001000, 0x00001000, 0x00110000,
0x00000000, 0x00000010, 0x00110010, 0x00001100, // 0099h
0x00000010, 0x00000001, 0x00000001, 0x00111110,
0x00000000, 0x00100100, 0x01001111, 0x01000010, // 009ah
0x00010001, 0x00111100, 0x00010010, 0x00001100,
0x00000000, 0x00000010, 0x01111010, 0x01000010, // 009bh
0x00000010, 0x00000010, 0x00001010, 0x01110010,
0x00000000, 0x00100010, 0x00111110, 0x01010010, // 009ch
0x01001011, 0x01101101, 0x01010101, 0x00110010,
0x00000000, 0x00110010, 0x01001011, 0x01000110, // 009dh
0x01000110, 0x01110010, 0x01001011, 0x00110010,
0x00000000, 0x00011100, 0x00101010, 0x01001001, // 009eh
0x01001001, 0x01000101, 0x01000101, 0x00110010,
0x00000000, 0x00100001, 0x01111101, 0x00100001, // 009fh
0x00100001, 0x00111001, 0x01100101, 0x00011001,
0x00000000, 0x00000100, 0x00100011, 0x01100010, // 00a0h
0x00100001, 0x00100001, 0x00010010, 0x00001100,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a1h
0x00000000, 0x00000100, 0x00001010, 0x00000100,
0x00000000, 0x01110000, 0x00010000, 0x00010000, // 00a2h
0x00010000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a3h
0x00001000, 0x00001000, 0x00001000, 0x00001110,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a4h
0x00000000, 0x00000010, 0x00000100, 0x00000100,
0x00000000, 0x00000000, 0x00000000, 0x00011000, // 00a5h
0x00011000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01111111, 0x01000000, 0x01111111, // 00a6h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x00000000, 0x00111111, 0x00100000, // 00a7h
0x00010100, 0x00001100, 0x00000100, 0x00000010,
0x00000000, 0x00000000, 0x00100000, 0x00100000, // 00a8h
0x00010000, 0x00001111, 0x00001000, 0x00001000,
0x00000000, 0x00000000, 0x00000100, 0x00111111, // 00a9h
0x00100001, 0x00100000, 0x00010000, 0x00001100,
0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00aah
0x00001000, 0x00001000, 0x00001000, 0x01111111,
0x00000000, 0x00000000, 0x00010000, 0x00111111, // 00abh
0x00011000, 0x00010100, 0x00010010, 0x00011001,
0x00000000, 0x00000000, 0x00000010, 0x00111111, // 00ach
0x00100010, 0x00010010, 0x00000100, 0x00000100,
0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00adh
0x00100000, 0x00100000, 0x00100000, 0x01111111,
0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00aeh
0x00111110, 0x00100000, 0x00100000, 0x00111110,
0x00000000, 0x00000000, 0x00100101, 0x00101010, // 00afh
0x00101010, 0x00100000, 0x00010000, 0x00001110,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00b0h
0x01111111, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01111111, 0x01000000, 0x00101000, // 00b1h
0x00011000, 0x00001000, 0x00001000, 0x00000100,
0x00000000, 0x01000000, 0x00100000, 0x00011000, // 00b2h
0x00010111, 0x00010000, 0x00010000, 0x00010000,
0x00000000, 0x00001000, 0x01111111, 0x01000001, // 00b3h
0x01000001, 0x01000000, 0x00100000, 0x00011000,
0x00000000, 0x00000000, 0x00111110, 0x00001000, // 00b4h
0x00001000, 0x00001000, 0x00001000, 0x01111111,
0x00000000, 0x00100000, 0x01111111, 0x00110000, // 00b5h
0x00101000, 0x00100100, 0x00100010, 0x00110001,
0x00000000, 0x00000100, 0x01111111, 0x01000100, // 00b6h
0x01000100, 0x01000100, 0x01000010, 0x00100001,
0x00000000, 0x00000100, 0x00111111, 0x00001000, // 00b7h
0x01111111, 0x00010000, 0x00010000, 0x00010000,
0x00000000, 0x01111100, 0x01000100, 0x01000100, // 00b8h
0x01000010, 0x01000000, 0x00100000, 0x00011000,
0x00000000, 0x00000010, 0x01111110, 0x00100010, // 00b9h
0x00100001, 0x00100000, 0x00010000, 0x00001100,
0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00bah
0x01000000, 0x01000000, 0x01000000, 0x01111110,
0x00000000, 0x00100010, 0x01111111, 0x00100010, // 00bbh
0x00100010, 0x00100000, 0x00010000, 0x00001100,
0x00000000, 0x00000011, 0x00000100, 0x01000011, // 00bch
0x01000100, 0x00100000, 0x00011000, 0x00000111,
0x00000000, 0x01111111, 0x01000000, 0x00100000, // 00bdh
0x00010000, 0x00011000, 0x00100100, 0x01000011,
0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00beh
0x00100010, 0x00000010, 0x00000010, 0x01111100,
0x00000000, 0x01000001, 0x01000010, 0x01000000, // 00bfh
0x00100000, 0x00100000, 0x00011000, 0x00000110,
0x00000000, 0x01111110, 0x01000010, 0x01001110, // 00c0h
0x01110001, 0x01000000, 0x00100000, 0x00011000,
0x00000000, 0x01100000, 0x00011110, 0x00010000, // 00c1h
0x01111111, 0x00010000, 0x00010000, 0x00001100,
0x00000000, 0x01000101, 0x01001010, 0x01001010, // 00c2h
0x01000000, 0x00100000, 0x00010000, 0x00001110,
0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00c3h
0x00010000, 0x00010000, 0x00001000, 0x00000110,
0x00000000, 0x00000010, 0x00000010, 0x00000110, // 00c4h
0x00011010, 0x01100010, 0x00000010, 0x00000010,
0x00000000, 0x00010000, 0x00010000, 0x01111111, // 00c5h
0x00010000, 0x00010000, 0x00001000, 0x00000110,
0x00000000, 0x00000000, 0x00111110, 0x00000000, // 00c6h
0x00000000, 0x00000000, 0x00000000, 0x01111111,
0x00000000, 0x01111110, 0x01000000, 0x01000100, // 00c7h
0x00101000, 0x00010000, 0x00101000, 0x01000110,
0x00000000, 0x00001000, 0x01111111, 0x00100000, // 00c8h
0x00010000, 0x00011100, 0x01101011, 0x00001000,
0x00000000, 0x01000000, 0x01000000, 0x01000000, // 00c9h
0x00100000, 0x00100000, 0x00011000, 0x00000111,
0x00000000, 0x00010010, 0x00100010, 0x00100010, // 00cah
0x01000010, 0x01000010, 0x01000001, 0x01000001,
0x00000000, 0x00000001, 0x00000001, 0x01111111, // 00cbh
0x00000001, 0x00000001, 0x00000001, 0x01111110,
0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cch
0x01000000, 0x00100000, 0x00010000, 0x00001110,
0x00000000, 0x00000000, 0x00000100, 0x00001010, // 00cdh
0x00010001, 0x00100001, 0x01000000, 0x00000000,
0x00000000, 0x00001000, 0x00001000, 0x01111111, // 00ceh
0x00001000, 0x00101010, 0x01001010, 0x01001001,
0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cfh
0x00100010, 0x00010100, 0x00001000, 0x00010000,
0x00000000, 0x00001110, 0x01110000, 0x00001110, // 00d0h
0x01110000, 0x00000110, 0x00011000, 0x01100000,
0x00000000, 0x00001000, 0x00001000, 0x00000100, // 00d1h
0x00000100, 0x00100010, 0x01000010, 0x01111111,
0x00000000, 0x01000000, 0x01000000, 0x00100100, // 00d2h
0x00101000, 0x00010000, 0x00101100, 0x01000011,
0x00000000, 0x01111111, 0x00000100, 0x01111111, // 00d3h
0x00000100, 0x00000100, 0x00000100, 0x01111000,
0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00d4h
0x00100010, 0x00010100, 0x00000100, 0x00000100,
0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00d5h
0x00100000, 0x00100000, 0x00100000, 0x01111111,
0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00d6h
0x01111110, 0x01000000, 0x01000000, 0x01111110,
0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00d7h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00d8h
0x01000010, 0x01000000, 0x00100000, 0x00011000,
0x00000000, 0x00001010, 0x00001010, 0x00001010, // 00d9h
0x01001010, 0x01001010, 0x00101010, 0x00011001,
0x00000000, 0x00000010, 0x00000010, 0x01000010, // 00dah
0x01000010, 0x00100010, 0x00010010, 0x00001110,
0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dbh
0x01000001, 0x01000001, 0x01000001, 0x01111111,
0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dch
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x01000011, 0x01000100, 0x01000000, // 00ddh
0x01000000, 0x00100000, 0x00010000, 0x00001111,
0x00000100, 0x00001000, 0x00000010, 0x00000100, // 00deh
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000100, 0x00001010, 0x00001010, 0x00000100, // 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,
};
/*---------------------- Character Data2 -------------------------*/
const unsigned int d_64_256_bg_schDT2[16 * 11] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0000h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xf1f1f1f1, 0xf1f1f1f1, 0x00000000, 0x00000000, // ‰¡
0xf1f1f1f1, 0xf1f1f1f1, 0x00000000, 0x00000000,
0xf1f1f1f1, 0xf1f1f1f1, 0x00000000, 0x00000000,
0xf1f1f1f1, 0xf1f1f1f1, 0x00000000, 0x00000000,
0xf100f100, 0xf100f100, 0xf100f100, 0xf100f100, // <20>c
0xf100f100, 0xf100f100, 0xf100f100, 0xf100f100,
0xf100f100, 0xf100f100, 0xf100f100, 0xf100f100,
0xf100f100, 0xf100f100, 0xf100f100, 0xf100f100,
0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, // w
0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1,
0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1,
0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // blk
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x11111111, 0x11111111, 0x11111111, 0x11111111, // r
0x11111111, 0x11111111, 0x11111111, 0x11111111,
0x11111111, 0x11111111, 0x11111111, 0x11111111,
0x11111111, 0x11111111, 0x11111111, 0x11111111,
0x21212121, 0x21212121, 0x21212121, 0x21212121, // g
0x21212121, 0x21212121, 0x21212121, 0x21212121,
0x21212121, 0x21212121, 0x21212121, 0x21212121,
0x21212121, 0x21212121, 0x21212121, 0x21212121,
0x31313131, 0x31313131, 0x31313131, 0x31313131, // b
0x31313131, 0x31313131, 0x31313131, 0x31313131,
0x31313131, 0x31313131, 0x31313131, 0x31313131,
0x31313131, 0x31313131, 0x31313131, 0x31313131,
0x41414141, 0x41414141, 0x41414141, 0x41414141, // y
0x41414141, 0x41414141, 0x41414141, 0x41414141,
0x41414141, 0x41414141, 0x41414141, 0x41414141,
0x41414141, 0x41414141, 0x41414141, 0x41414141,
0x51515151, 0x51515151, 0x51515151, 0x51515151, // m
0x51515151, 0x51515151, 0x51515151, 0x51515151,
0x51515151, 0x51515151, 0x51515151, 0x51515151,
0x51515151, 0x51515151, 0x51515151, 0x51515151,
0x61616161, 0x61616161, 0x61616161, 0x61616161, // c
0x61616161, 0x61616161, 0x61616161, 0x61616161,
0x61616161, 0x61616161, 0x61616161, 0x61616161,
0x61616161, 0x61616161, 0x61616161, 0x61616161,
};
/* EOF */

View File

@ -0,0 +1,29 @@
/*---------------------------------------------------------------------------*
Project: TwlSDK - GX - demos - UnitTours/2D_CharBg_1
File: data.h
Copyright 2003 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: 2007-08-29#$
$Rev: 640 $
$Author: kitase_hirotake $
*---------------------------------------------------------------------------*/
#ifndef BG_DATA_H_
#define BG_DATA_H_
#define SCREEN_SIZE (32 * 24)
/*-------------------------- Data -------------------------------*/
#define CHAR_SIZE (16 * 128 * sizeof(int))
extern const unsigned int d_64_256_bg_schDT[8 * 256];
extern const unsigned int d_64_256_bg_schDT2[16 * 11];
extern const unsigned int d_64_256_bg_sclDT[8 * 16];
#endif

View File

@ -16,7 +16,7 @@
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
#include <twl.h> #include <twl.h>
#include "misc.h" #include "misc_simple.h"
#include "ExecPreLoadedApp.h" #include "ExecPreLoadedApp.h"
// extern data----------------------------------------------------------------- // extern data-----------------------------------------------------------------
@ -30,9 +30,6 @@ static void INTR_VBlank( void );
// static variable------------------------------------------------------------- // static variable-------------------------------------------------------------
BOOL g_isValidTSD; BOOL g_isValidTSD;
RTCDrawProperty g_rtcDraw = {
TRUE, RTC_DATE_TOP_X, RTC_DATE_TOP_Y, RTC_TIME_TOP_X, RTC_TIME_TOP_Y
};
// const data------------------------------------------------------------------ // const data------------------------------------------------------------------
@ -42,57 +39,19 @@ RTCDrawProperty g_rtcDraw = {
// ============================================================================ // ============================================================================
void TwlMain(void) void TwlMain(void)
{ {
myInit();
// 初期化----------------------------------
OS_Init();
OS_InitTick();
(void)OS_EnableIrq();
(void)OS_EnableInterrupts();
GX_Init();
GX_SetPower(GX_POWER_ALL); // 各ロジック パワーON
FS_Init( 3 );
// 割り込み許可----------------------------
(void)OS_SetIrqFunction(OS_IE_V_BLANK, INTR_VBlank);
(void)OS_EnableIrqMask(OS_IE_V_BLANK);
(void)GX_VBlankIntr(TRUE);
// デバイス初期化-------------------------------
TP_Init();
(void)RTC_Init();
// システムの初期化------------------
InitAllocator();
// ※本来ならランチャーからのパラメータチェックを行い、
// 初回起動シーケンスに入るパスがある
// TWL設定のリード
SYSM_SetAllocFunc( Alloc, Free ); // SYSM_ReadTWLSettingsFile()の実行に必要。
// ::::::::::::::::::::::::::::::::::::::::::::::
// TWL設定データファイルの読み込み
// ::::::::::::::::::::::::::::::::::::::::::::::
(void)LCFG_ReadHWSecureInfo();
g_isValidTSD = LCFG_ReadTWLSettings();
if( g_isValidTSD ) {
SYSM_CaribrateTP();
}
InitBG();
GetAndDrawRTCData( &g_rtcDraw, TRUE );
ExecPreLoadedAppInit(); ExecPreLoadedAppInit();
// ƒ<>ƒCƒ“ƒ<C692>[ƒv---------------------------- // ƒ<>ƒCƒ“ƒ<C692>[ƒv----------------------------
while(1){ while(1){
OS_WaitIrq(1, OS_IE_V_BLANK); // Vブランク割り込み待ち
ReadKeyPad(); // キー入力の取得 myPreMain();
ReadTP(); // TP入力の取得
ExecPreLoadedAppMain(); ExecPreLoadedAppMain();
myProMain();
OS_WaitIrq(1, OS_IE_V_BLANK); // Vブランク割り込み待ち
} }
} }

View File

@ -0,0 +1,154 @@
/*---------------------------------------------------------------------------*
Project: TwlIPL
File: misc.c
Copyright 2007 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: 2008-01-30#$
$Rev: 547 $
$Author: yoshida_teruhisa $
*---------------------------------------------------------------------------*/
#include <twl.h>
#include "misc_simple.h"
#include "data.h"
// define data-----------------------------------------------------------------
// extern data-----------------------------------------------------------------
// define data-----------------------------------------------------------------
// function's prototype-------------------------------------------------------
// global variable-------------------------------------------------------------
// static variable-------------------------------------------------------------
static u16 sScrnBuf[2][SCREEN_SIZE]; // Buffer for screen data(BG #0)
// const data------------------------------------------------------------------
void myInit( void )
{
//---------------------------------------------------------------------------
// Initialize:
// They enable IRQ interrupts, initialize VRAM, and set BG #0 for text mode.
//---------------------------------------------------------------------------
DEMOInitCommon();
DEMOInitVRAM();
DEMOInitDisplayBG0Only();
DEMOInitDisplaySubBG0Only();
//---------------------------------------------------------------------------
// Transmitting the character data and the palette data
//---------------------------------------------------------------------------
G2_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256,
GX_BG_COLORMODE_16,
GX_BG_SCRBASE_0x0800, GX_BG_CHARBASE_0x04000, GX_BG_EXTPLTT_01);
GX_LoadBG0Char(d_64_256_bg_schDT, 0, sizeof(d_64_256_bg_schDT));
GX_LoadBGPltt(d_64_256_bg_sclDT, 0, sizeof(d_64_256_bg_sclDT));
G2S_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256,
GX_BG_COLORMODE_16,
GX_BG_SCRBASE_0x1000, GX_BG_CHARBASE_0x08000, GX_BG_EXTPLTT_01);
GXS_LoadBG0Char(d_64_256_bg_schDT, 0, sizeof(d_64_256_bg_schDT));
GXS_LoadBGPltt(d_64_256_bg_sclDT, 0, sizeof(d_64_256_bg_sclDT));
GX_SetVisiblePlane(GX_PLANEMASK_BG0|GX_PLANEMASK_BG2);
GXS_SetVisiblePlane(GX_PLANEMASK_BG0|GX_PLANEMASK_BG2);
G2_SetBG0Priority(0);
G2S_SetBG0Priority(0);
GX_SetDispSelect(GX_DISP_SELECT_SUB_MAIN);
DEMOStartDisplay();
}
void myPreMain( void )
{
// 描画前クリア処理。まぁどのシーンでも使うので。
myDp_Cls16(MAIN_SCREEN);
myDp_Cls16(SUB_SCREEN);
DEMOReadKey();
}
void myProMain( void )
{
// Store the data onto the main memory, and invalidate the cache.
// キャッシュONになってると、CPUとDMAの見てるメモリの値が違って、悲しい事が起きる
DC_FlushRange(sScrnBuf[0], sizeof(sScrnBuf[0]));
DC_FlushRange(sScrnBuf[1], sizeof(sScrnBuf[1]));
// 描画後フリップ処理。まぁどのシーンでも使うので。
OS_WaitVBlankIntr(); // Waiting the end of VBlank interrupt
GX_LoadBG0Scr(sScrnBuf[0], 0, sizeof(sScrnBuf[0]));
GXS_LoadBG0Scr(sScrnBuf[1], 0, sizeof(sScrnBuf[1]));
}
void myDp_Cls16(MyScreen scr)
{
if( !(scr < SCREEN_MAX) ) return;
MI_CpuClear8((void *)sScrnBuf[scr],SCREEN_SIZE * sizeof(u16));
}
void myDp_Cls8(MyScreen scr)
{
if( !(scr < SCREEN_MAX) ) return;
MI_CpuClear8((void *)sScrnBuf[scr],SCREEN_SIZE * sizeof(u8));
}
void myDp_Putchar(s32 x, s32 y, u8 color, MyScreen scr, u8 c)
{
if( !(scr < SCREEN_MAX) ) return;
sScrnBuf[scr][(y * 32) + x] = (u16)((color << 12) | c);
}
void myDp_Write(s32 x, s32 y, u8 color, MyScreen scr, char* str)
{
while (*str) {
while (x >= 32) {
x -= 32;
y++;
}
while (y >= 24) {
return; // out of range
}
myDp_Putchar(x, y, color, scr, (u8)*str++);
x++;
}
}
void myDp_Printf(s32 x, s32 y, u8 color, MyScreen scr, const char *s, ...)
{
va_list vlist;
char temp[SCREEN_SIZE+1];
temp[sizeof(temp)-1] = 0;
va_start(vlist, s);
vsnprintf(temp, sizeof(temp) - 1, s, vlist);
va_end(vlist);
myDp_Write(x, y, color, scr, temp);
}
void myDp_DrawMenu( u16 csr, MyScreen scr, const MenuParam *param )
{
int l;
for( l=0; l<param->num; l++)
{
myDp_Printf( param->pos[l].x, param->pos[l].y,
(u8)( param->pos[l].enable ? ( l==csr ? param->select_color : param->normal_color ) : param->disable_color ),
scr, ( l==csr ? "=>%s" : " %s" ), param->str_elem[l] );
}
}

View File

@ -0,0 +1,97 @@
/*---------------------------------------------------------------------------*
Project: TwlIPL
File: misc.h
Copyright 2007 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: 2007-11-15#$
$Rev: 188 $
$Author: yoshida_teruhisa $
*---------------------------------------------------------------------------*/
#ifndef __MISC_SIMPLE_H__
#define __MISC_SIMPLE_H__
#include <twl.h>
#include <DEMO.h>
#ifdef __cplusplus
extern "C" {
#endif
// define data----------------------------------------------------------
#define MYPAD_IS_TRIG DEMO_IS_TRIG
#define MYPAD_IS_PRESS DEMO_IS_PRESS
// TXTColorPalette の色名 256色パレットへのロードを想定
enum
{
TXT_COLOR_BLACK=0,
TXT_COLOR_RED,
TXT_COLOR_GREEN,
TXT_COLOR_BLUE,
TXT_COLOR_YELLOW,
TXT_COLOR_PURPLE,
TXT_COLOR_LIGHTBLUE,
TXT_COLOR_DARKRED,
TXT_COLOR_DARKGREEN,
TXT_COLOR_DARKBLUE,
TXT_COLOR_DARKYELLOW,
TXT_COLOR_DARKPURPLE,
TXT_COLOR_DARKLIGHTBLUE,
TXT_COLOR_GRAY,
TXT_COLOR_DARKGRAY,
TXT_COLOR_WHITE
};
typedef enum
{
MAIN_SCREEN = 0,
SUB_SCREEN,
SCREEN_MAX
}
MyScreen;
// メニュー要素座標
typedef struct MenuPos {
BOOL enable;
int x;
int y;
}MenuPos;
// メニュー構成パラメータ構造体
typedef struct MenuParam {
int num;
int normal_color;
int select_color;
int disable_color;
MenuPos *pos;
const char **str_elem;
}MenuParam;
// global variables--------------------------------------------------
// function-------------------------------------------------------------
void myInit( void );
void myPreMain( void );
void myProMain( void );
void myDp_Cls16(MyScreen scr);
void myDp_Cls8(MyScreen scr);
void myDp_Putchar(s32 x, s32 y, u8 color, MyScreen scr, u8 c);
void myDp_Write(s32 x, s32 y, u8 color, MyScreen scr, char* str);
void myDp_Printf(s32 x, s32 y, u8 color, MyScreen scr, const char *s, ...);
void myDp_DrawMenu( u16 csr, MyScreen scr, const MenuParam *param );
#ifdef __cplusplus
}
#endif
#endif // __MISC_H__

View File

@ -20,7 +20,7 @@ include $(TWLSDK_ROOT)/build/buildtools/commondefs
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
SUBDIRS = banner ARM9 SUBDIRS = banner ARM7 ARM9
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
#! make -f #! make -f
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Project: TwlSDK - demos - simpleShoot-1 # Project: TwlSDK - demos.TWL - nandApp - ExecTmpApp
# File: Makefile # File: Makefile
# #
# Copyright 2007 Nintendo. All rights reserved. # Copyright 2007 Nintendo. All rights reserved.
@ -16,35 +16,35 @@
# $Author: $ # $Author: $
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
SUBDIRS =
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
TARGET_FIRM = SYSTEMMENU
TARGET_PLATFORM = TWL TARGET_PLATFORM = TWL
TWL_ARCHGEN = LIMITED TWL_ARCHGEN = LIMITED
TITLEID_LO = ETFA TITLEID_LO = ETFA
TARGET_TAD = $(BINDIR)/$(TITLEID_LO).$(TWL_BUILD_DIR)$(CODEGEN_ARCH).tad
TARGET_BIN = main.srl TARGET_BIN = ExecTmpApp.tad
ROM_SPEC = main.rsf ROM_SPEC = main.rsf
MISC_DIR = $(SYSMENU_ROOT)/build/systemMenu_RED/misc SRCS = main.c ExecTmpApp.c misc_simple.c data.c
SRCS = main.c ExecTmpApp.c \ LINCLUDES = $(TWLSDK_ROOT)/build/demos/gx/UnitTours/DEMOLib/include
$(MISC_DIR)/src/misc.c $(MISC_DIR)/src/cmn.c
LINCLUDES = $(MISC_DIR)/include LLIBRARY_DIRS += $(TWLSDK_ROOT)/build/demos/gx/UnitTours/DEMOLib/lib/$(TWL_BUILDTYPE)
MAKEROM_FLAGS += -DTITLEID_LO='$(TITLEID_LO)' LLIBRARIES += libboc$(TWL_LIBSUFFIX).a \
libes$(TWL_LIBSUFFIX).a \
libnam$(TWL_LIBSUFFIX).a \
libDEMO$(TWL_LIBSUFFIX).a
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs MAKEROM_FLAGS += -F -DTITLEID_LO='$(TITLEID_LO)'
include $(TWLSDK_ROOT)/add-ins/es/commondefs.es
include $(TWLSDK_ROOT)/build/buildtools/commondefs
LDIRT_CLEAN = $(TARGET_TAD) SDK_NMENU_DATADIR = $(ROOT)/build/tools/TwlNMenu/data
INSTALL_TARGETS = $(TARGET_TAD) INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
INSTALL_DIR = $(SDK_NMENU_DATADIR) INSTALL_DIR = $(SDK_NMENU_DATADIR)
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@ -52,7 +52,7 @@ INSTALL_DIR = $(SDK_NMENU_DATADIR)
do-build : $(TARGETS) do-build : $(TARGETS)
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules include $(TWLSDK_ROOT)/build/buildtools/modulerules
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------

Binary file not shown.

View File

@ -10,9 +10,9 @@
# not be disclosed to third parties or copied or duplicated in any form, # 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. # in whole or in part, without the prior written consent of Nintendo.
# #
# $Date:: 2007-11-21#$ # $Date:: 2007-12-19#$
# $Rev: 240 $ # $Rev: 378 $
# $Author: yosiokat $ # $Author: yoshida_teruhisa $
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# #
# TWL ROM SPEC FILE # TWL ROM SPEC FILE
@ -59,8 +59,6 @@ Property
# #
#TitleName "YourAppName" #TitleName "YourAppName"
#_GameCode $(TITLEID_LO)
# #
# MAKER CODE: Your company ID# in 2 ascii words # MAKER CODE: Your company ID# in 2 ascii words
# issued by NINTENDO # issued by NINTENDO
@ -96,6 +94,7 @@ Property
# #
# BANNER FILE: generated from Banner Spec File # BANNER FILE: generated from Banner Spec File
# #
#BannerFile ./etc/myGameBanner.bnr
BannerFile ../banner/banner.bnr BannerFile ../banner/banner.bnr
### ###
@ -115,7 +114,8 @@ Property
# WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD] # WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD]
# don't have to edit # don't have to edit
# #
WramMapping $(MAKEROM_WRAM_MAPPING) # WramMapping $(MAKEROM_WRAM_MAPPING)
WramMappingDirect $(TWL_IPL_RED_ROOT)/build/components/hyena.TWL/wram_regs/wram_regs.rbin
# #
# Codec mode: # Codec mode:
@ -127,7 +127,6 @@ Property
#### END #### END
} }
AppendProperty AppendProperty
{ {
# #
@ -167,15 +166,14 @@ AppendProperty
# #
# Enable SaveBannerFile # Enable SaveBannerFile
SaveBannerFile FALSE #SaveBannerFile TRUE
} }
RomSpec RomSpec
{ {
Offset 0x00000000 Offset 0x00000000
Segment ALL Segment ALL
HostRoot ../data HostRoot data
Root /data Root /data
File NTR_IPL_font_m.NFTR simple.srl File simpleapp.srl
} }

View File

@ -16,15 +16,10 @@
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
#include <twl.h> #include <twl.h>
#include <sysmenu.h> #include "misc_simple.h"
#include "misc.h"
#include "ExecTmpApp.h" #include "ExecTmpApp.h"
// define data------------------------------------------ // define data------------------------------------------
#define RETURN_BUTTON_TOP_X 2
#define RETURN_BUTTON_TOP_Y 21
#define RETURN_BUTTON_BOTTOM_X ( RETURN_BUTTON_TOP_X + 8 )
#define RETURN_BUTTON_BOTTOM_Y ( RETURN_BUTTON_TOP_Y + 2 )
#define COPB_MENU_ELEMENT_NUM 2 // メニューの項目数 #define COPB_MENU_ELEMENT_NUM 2 // メニューの項目数
@ -35,22 +30,21 @@
static void MenuScene( void ); static void MenuScene( void );
// global variable ------------------------------------- // global variable -------------------------------------
extern RTCDrawProperty g_rtcDraw;
// static variable ------------------------------------- // static variable -------------------------------------
static u16 s_csr = 0; static u16 s_csr = 0;
static void(*s_pNowProcess)(void); static void(*s_pNowProcess)(void);
// const data ----------------------------------------- // const data -----------------------------------------
static const u16 *s_pStrMenu[ COPB_MENU_ELEMENT_NUM ] = static const char *s_pStrMenu[ COPB_MENU_ELEMENT_NUM ] =
{ {
L"tmpフォルダにアプリを保存し起動", "save app to tmp and restart",
L"ランチャーに戻る", "return to launcher",
}; };
static MenuPos s_menuPos[] = { static MenuPos s_menuPos[] = {
{ TRUE, 4 * 8, 8 * 8 }, { TRUE, 3, 6 },
{ TRUE, 4 * 8, 10 * 8 }, { TRUE, 3, 8 },
}; };
static const MenuParam s_menuParam = { static const MenuParam s_menuParam = {
@ -59,7 +53,7 @@ static const MenuParam s_menuParam = {
TXT_COLOR_GREEN, TXT_COLOR_GREEN,
TXT_COLOR_RED, TXT_COLOR_RED,
&s_menuPos[ 0 ], &s_menuPos[ 0 ],
(const u16 **)&s_pStrMenu, (const char **)&s_pStrMenu,
}; };
//====================================================== //======================================================
@ -68,25 +62,18 @@ static const MenuParam s_menuParam = {
static void DrawMenuScene( void ) static void DrawMenuScene( void )
{ {
PutStringUTF16( 1 * 8, 0 * 8, TXT_COLOR_BLUE, (const u16 *)L"ExecTmpApp"); myDp_Printf( 1, 0, TXT_COLOR_BLUE, MAIN_SCREEN, "ExecTmpApp");
GetAndDrawRTCData( &g_rtcDraw, TRUE );
// メニュー項目 // メニュー項目
DrawMenu( s_csr, &s_menuParam ); myDp_DrawMenu( s_csr, MAIN_SCREEN, &s_menuParam );
} }
static void MenuInit( void ) static void MenuInit( void )
{ {
FS_Init(3);
GX_DispOff(); GX_DispOff();
GXS_DispOff(); GXS_DispOff();
NNS_G2dCharCanvasClear( &gCanvas, TXT_COLOR_WHITE );
PutStringUTF16( 1 * 8, 0 * 8, TXT_COLOR_BLUE, (const u16 *)L"ExecTmpApp"); myDp_Printf( 1, 0, TXT_COLOR_BLUE, MAIN_SCREEN, "ExecTmpApp");
GetAndDrawRTCData( &g_rtcDraw, TRUE );
SVC_CpuClear( 0x0000, &tpd, sizeof(TpWork), 16 );
GXS_SetVisiblePlane( GX_PLANEMASK_BG0 );
s_pNowProcess = MenuScene; s_pNowProcess = MenuScene;
@ -98,29 +85,25 @@ static void MenuInit( void )
static void MenuScene(void) static void MenuScene(void)
{ {
BOOL tp_select = FALSE;
LauncherBootFlags tempflag = {TRUE, LAUNCHER_BOOTTYPE_TEMP, TRUE, FALSE, FALSE, FALSE, 0}; LauncherBootFlags tempflag = {TRUE, LAUNCHER_BOOTTYPE_TEMP, TRUE, FALSE, FALSE, FALSE, 0};
ReadTP();
//-------------------------------------- //--------------------------------------
// キー入力処理 // キー入力処理
//-------------------------------------- //--------------------------------------
if( pad.trg & PAD_KEY_DOWN ){ // カーソルの移動 if( MYPAD_IS_TRIG(PAD_KEY_DOWN) ){ // カーソルの移動
if( ++s_csr == COPB_MENU_ELEMENT_NUM ) { if( ++s_csr == COPB_MENU_ELEMENT_NUM ) {
s_csr=0; s_csr=0;
} }
} }
if( pad.trg & PAD_KEY_UP ){ if( MYPAD_IS_TRIG(PAD_KEY_UP) ){
if( --s_csr & 0x80 ) { if( --s_csr & 0x80 ) {
s_csr=COPB_MENU_ELEMENT_NUM - 1; s_csr=COPB_MENU_ELEMENT_NUM - 1;
} }
} }
tp_select = SelectMenuByTP( &s_csr, &s_menuParam );
DrawMenuScene(); DrawMenuScene();
if( ( pad.trg & PAD_BUTTON_A ) || ( tp_select ) ) { // メニュー項目への分岐 if( MYPAD_IS_TRIG(PAD_BUTTON_A) ) { // メニュー項目への分岐
if( s_menuPos[ s_csr ].enable ) { if( s_menuPos[ s_csr ].enable ) {
u64 targetApp = 0x00030004534d504c;// SMPL u64 targetApp = 0x00030004534d504c;// SMPL
static char destfilename[256]; static char destfilename[256];
@ -129,9 +112,6 @@ static void MenuScene(void)
BOOL success = TRUE; BOOL success = TRUE;
FSFile src,dest; FSFile src,dest;
void *buf; void *buf;
ROM_FAT *fat;
void *nstart, *nend;
u32 st,ed;
switch( s_csr ) { switch( s_csr ) {
case 0: case 0:
@ -141,25 +121,10 @@ static void MenuScene(void)
FS_CreateFile(destfilename, FS_PERMIT_R | FS_PERMIT_W); FS_CreateFile(destfilename, FS_PERMIT_R | FS_PERMIT_W);
FS_InitFile( &src ); FS_InitFile( &src );
FS_InitFile( &dest ); FS_InitFile( &dest );
if ( !FS_OpenFileEx( &src, "rom:/data/simple.srl", FS_FILEMODE_R ) ) success = FALSE; if ( !FS_OpenFileEx( &src, "rom:/data/simpleapp.srl", FS_FILEMODE_R ) ) success = FALSE;
//if ( !FS_OpenFileEx( &src, "rom:/data/NTR_IPL_font_m.NFTR", FS_FILEMODE_R ) ) success = FALSE;
len = (int)FS_GetFileLength( &src ); len = (int)FS_GetFileLength( &src );
nstart = OS_InitAlloc( OS_ARENA_MAIN, (void *)0x2800000, (void *)0x2b00000, 1 );
// アリーナの下位境界アドレス
OS_SetMainArenaLo( nstart );
// fat関係調査
nend = (void *)((int)nstart+FS_GetTableSize()+10000);
fat = OS_AllocFixed( OS_ARENA_MAIN, &nstart, &nend );
FS_UnloadTable();
FS_LoadTable( fat, FS_GetTableSize() );
//FS_ConvertPathToFileID( &fid, "rom:/data/simple.srl" );
st = fat[1].top.offset;
ed = fat[1].bottom.offset;
buf = (void *)0x2400000; buf = (void *)0x2400000;
PrintfSJIS( 1 * 8, 2 * 8, TXT_COLOR_RED, "fat:%x,%x,%x,%x",fat[0].top.offset,fat[0].bottom.offset,st,ed);
PrintfSJIS( 11 * 8, 0 * 8, TXT_COLOR_RED, "読み込み開始 %x",(int)len);
for(llen = 0; llen < len; ) for(llen = 0; llen < len; )
{ {
int rd; int rd;
@ -169,15 +134,12 @@ static void MenuScene(void)
success = FALSE; success = FALSE;
break; break;
} }
PrintfSJIS( 1 * 8, 4 * 8, TXT_COLOR_WHITE, "読み込み中... %xBYTES",(int)llen);
buf = (void *)((u32)buf + rd); buf = (void *)((u32)buf + rd);
llen += rd; llen += rd;
PrintfSJIS( 1 * 8, 4 * 8, TXT_COLOR_RED, "読み込み中... %xBYTES",(int)llen);
} }
buf = (void *)0x2400000; buf = (void *)0x2400000;
if ( !FS_CloseFile( &src ) ) success = FALSE; if ( !FS_CloseFile( &src ) ) success = FALSE;
if (len != llen) success = FALSE; if (len != llen) success = FALSE;
PrintfSJIS( 1 * 8, 6 * 8, TXT_COLOR_RED, "読み込み完了 %x",(int)llen);
if ( !FS_OpenFileEx( &dest, destfilename, FS_FILEMODE_W ) ) success = FALSE; if ( !FS_OpenFileEx( &dest, destfilename, FS_FILEMODE_W ) ) success = FALSE;
llen = FS_WriteFile( &dest, buf, len ); llen = FS_WriteFile( &dest, buf, len );
@ -201,7 +163,6 @@ static void MenuScene(void)
// 初期化 // 初期化
void ExecTmpAppInit( void ) void ExecTmpAppInit( void )
{ {
ChangeUserColor( LCFG_TSD_GetUserColor() );
MenuInit(); MenuInit();
} }

View File

@ -0,0 +1,620 @@
/*---------------------------------------------------------------------------*
Project: TwlSDK - demos.TWL - nandApp - ExecPreLoadedApp
File: data.c
Copyright 2007 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: 2007-08-29#$
$Rev: 640 $
$Author: kitase_hirotake $
*---------------------------------------------------------------------------*/
#include "data.h"
/*---------------------- Palette Data ---------------------------*/
const unsigned int d_64_256_bg_sclDT[8 * 16] = {
0x0000ffff, 0x00000000, 0x00000000, 0x00000000, // black
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x001f001e, 0x001d001c, 0x001b001a, 0x00190018, // red
0x00170016, 0x00150014, 0x00130012, 0x00110010,
0x03e00000, 0x00000000, 0x00000000, 0x00000000, // green
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x7c000000, 0x00000000, 0x00000000, 0x00000000, // blue
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x03ff0000, 0x00000000, 0x00000000, 0x00000000, // yellow
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x7c1f0000, 0x00000000, 0x00000000, 0x00000000, // purple
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x7fe00000, 0x00000000, 0x00000000, 0x00000000, // light blue
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x000f000e, 0x000d000c, 0x000b000a, 0x00090008, // dark red
0x00070006, 0x00050004, 0x00030002, 0x00010000,
0x03000000, 0x00000000, 0x00000000, 0x00000000, // dark green
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x60000000, 0x00000000, 0x00000000, 0x00000000, // dark blue
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x03180000, 0x00000000, 0x00000000, 0x00000000, // dark yellow
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x60180000, 0x00000000, 0x00000000, 0x00000000, // dark purple
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x63000000, 0x00000000, 0x00000000, 0x00000000, // dark light blue
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x56b50000, 0x00000000, 0x00000000, 0x00000000, // gray
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x2d6b0000, 0x00000000, 0x00000000, 0x00000000, // dark gray
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x7fff0000, 0x00000000, 0x00000000, 0x00000000, // white
0x00000000, 0x00000000, 0x00000000, 0x00000000
};
/*---------------------- Character Data -------------------------*/
const unsigned int d_64_256_bg_schDT[8 * 256] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0000h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01010010, 0x01010010, 0x00000110, // 0001h
0x00011010, 0x01100010, 0x00000010, 0x00000010,
0x00000000, 0x01011010, 0x01010010, 0x00010010, // 0002h
0x00100010, 0x00100010, 0x00100001, 0x00100001,
0x00000000, 0x01010001, 0x01010001, 0x01111111, // 0003h
0x00000001, 0x00000001, 0x00000001, 0x01111110,
0x00000000, 0x01010000, 0x01111111, 0x00100000, // 0004h
0x00100000, 0x00010000, 0x00001000, 0x00000110,
0x00000000, 0x01010000, 0x01010100, 0x00001010, // 0005h
0x00010001, 0x00100001, 0x01000000, 0x00000000,
0x00000000, 0x01011000, 0x01011000, 0x01111111, // 0006h
0x00001000, 0x00101010, 0x01001010, 0x01001001,
0x00000000, 0x01010010, 0x01101111, 0x01010010, // 0007h
0x00010010, 0x00010010, 0x00010010, 0x00001001,
0x00000000, 0x01010010, 0x01011111, 0x00000100, // 0008h
0x00011111, 0x00001000, 0x00000001, 0x00011110,
0x00000000, 0x01010000, 0x01011000, 0x00000110, // 0009h
0x00000001, 0x00000110, 0x00011000, 0x00100000,
0x00000000, 0x01010000, 0x01111101, 0x00010001, // 000ah
0x00010001, 0x00010001, 0x00010001, 0x00001010,
0x00000000, 0x01010000, 0x01011110, 0x00100000, // 000bh
0x00000000, 0x00000001, 0x00000001, 0x00111110,
0x00000000, 0x01010100, 0x01011111, 0x00001000, // 000ch
0x00010000, 0x00000001, 0x00000001, 0x00011110,
0x00000000, 0x01010001, 0x01010001, 0x00000001, // 000dh
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x01010000, 0x01111111, 0x00011000, // 000eh
0x00010100, 0x00010100, 0x00011000, 0x00001100,
0x00000000, 0x01010010, 0x01111111, 0x00010010, // 000fh
0x00010010, 0x00000010, 0x00000010, 0x00111100,
0x00000000, 0x00001110, 0x01010100, 0x01010010, // 0010h
0x00111111, 0x00000100, 0x00000100, 0x00011000,
0x00000000, 0x01010100, 0x01011111, 0x00000100, // 0011h
0x01110100, 0x00000010, 0x00001010, 0x01110010,
0x00000000, 0x01010100, 0x01011111, 0x00000010, // 0012h
0x00011110, 0x00100001, 0x00100000, 0x00011110,
0x00000000, 0x01010000, 0x01011100, 0x00100011, // 0013h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x01010000, 0x01111111, 0x00010000, // 0014h
0x00001000, 0x00001000, 0x00001000, 0x00110000,
0x00000000, 0x01010010, 0x01010010, 0x00001100, // 0015h
0x00000010, 0x00000001, 0x00000001, 0x00111110,
0x00000000, 0x01010001, 0x01111101, 0x00010001, // 0016h
0x00010001, 0x00111001, 0x01010101, 0x00011001,
0x00000000, 0x01010100, 0x01010011, 0x01110010, // 0017h
0x00010001, 0x00010001, 0x00001010, 0x00000100,
0x00000000, 0x01011110, 0x01011000, 0x00000100, // 0018h
0x00101001, 0x01010001, 0x01010001, 0x00001100,
0x00000000, 0x01010000, 0x01011100, 0x00010010, // 0019h
0x00010010, 0x00100001, 0x01000000, 0x00000000,
0x00000000, 0x01011101, 0x01010001, 0x00111101, // 001ah
0x00010001, 0x00011001, 0x00110101, 0x00001001,
0x00000000, 0x01110001, 0x01011101, 0x00110001, // 001bh
0x00010001, 0x00111001, 0x01010101, 0x00011001,
0x00000000, 0x01110100, 0x01010011, 0x00110010, // 001ch
0x00010001, 0x00010001, 0x00001010, 0x00000100,
0x00000000, 0x01101110, 0x01011000, 0x00100100, // 001dh
0x00101001, 0x01010001, 0x01010001, 0x00001100,
0x00000000, 0x01110000, 0x01011100, 0x00110010, // 001eh
0x00010010, 0x00100001, 0x01000000, 0x00000000,
0x00000000, 0x01111101, 0x01010001, 0x00111101, // 001fh
0x00010001, 0x00011001, 0x00110101, 0x00001001,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0020h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 0021h
0x00001000, 0x00001000, 0x00000000, 0x00001000,
0x00000000, 0x01101100, 0x01001000, 0x00100100, // 0022h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00100100, 0x01111111, 0x00100100, // 0023h
0x00100100, 0x01111111, 0x00010010, 0x00010010,
0x00000000, 0x00001000, 0x01111110, 0x00001001, // 0024h
0x00111110, 0x01001000, 0x00111111, 0x00001000,
0x00000000, 0x01000010, 0x00100101, 0x00010010, // 0025h
0x00001000, 0x00100100, 0x01010010, 0x00100001,
0x00000000, 0x00001110, 0x00010001, 0x00001001, // 0026h
0x01000110, 0x00101001, 0x00110001, 0x01001110,
0x00000000, 0x00011000, 0x00010000, 0x00001000, // 0027h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01110000, 0x00001000, 0x00000100, // 0028h
0x00000100, 0x00000100, 0x00001000, 0x01110000,
0x00000000, 0x00000111, 0x00001000, 0x00010000, // 0029h
0x00010000, 0x00010000, 0x00001000, 0x00000111,
0x00000000, 0x00001000, 0x01001001, 0x00101010, // 002ah
0x00011100, 0x00101010, 0x01001001, 0x00001000,
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 002bh
0x01111111, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002ch
0x00000000, 0x00001100, 0x00001000, 0x00000100,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002dh
0x01111111, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002eh
0x00000000, 0x00000000, 0x00000000, 0x00001100,
0x00000000, 0x01000000, 0x00100000, 0x00010000, // 002fh
0x00001000, 0x00000100, 0x00000010, 0x00000001,
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0030h
0x01000001, 0x01000001, 0x01000001, 0x00111110,
0x00000000, 0x00011100, 0x00010000, 0x00010000, // 0031h
0x00010000, 0x00010000, 0x00010000, 0x00010000,
0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0032h
0x00111110, 0x00000001, 0x00000001, 0x01111111,
0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0033h
0x00111110, 0x01000000, 0x01000001, 0x00111110,
0x00000000, 0x00100000, 0x00110000, 0x00101000, // 0034h
0x00100100, 0x00100010, 0x01111111, 0x00100000,
0x00000000, 0x01111111, 0x00000001, 0x00111111, // 0035h
0x01000000, 0x01000000, 0x01000001, 0x00111110,
0x00000000, 0x00111110, 0x00000001, 0x00111111, // 0036h
0x01000001, 0x01000001, 0x01000001, 0x00111110,
0x00000000, 0x01111111, 0x00100000, 0x00100000, // 0037h
0x00010000, 0x00010000, 0x00001000, 0x00001000,
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0038h
0x00111110, 0x01000001, 0x01000001, 0x00111110,
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0039h
0x01000001, 0x01111110, 0x01000000, 0x00111110,
0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003ah
0x00000000, 0x00000000, 0x00001100, 0x00000000,
0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003bh
0x00000000, 0x00001100, 0x00001000, 0x00000100,
0x00000000, 0x01100000, 0x00011000, 0x00000110, // 003ch
0x00000001, 0x00000110, 0x00011000, 0x01100000,
0x00000000, 0x00000000, 0x01111111, 0x00000000, // 003dh
0x00000000, 0x00000000, 0x01111111, 0x00000000,
0x00000000, 0x00000011, 0x00001100, 0x00110000, // 003eh
0x01000000, 0x00110000, 0x00001100, 0x00000011,
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 003fh
0x00110000, 0x00001000, 0x00000000, 0x00001000,
0x00000000, 0x00011100, 0x00100010, 0x01001001, // 0040h
0x01010101, 0x01010101, 0x01010101, 0x00111010,
0x00000000, 0x00001000, 0x00010100, 0x00010100, // 0041h
0x00100010, 0x00111110, 0x01000001, 0x01000001,
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0042h
0x00111111, 0x01000001, 0x01000001, 0x00111111,
0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0043h
0x00000001, 0x00000001, 0x01000010, 0x00111100,
0x00000000, 0x00011111, 0x00100001, 0x01000001, // 0044h
0x01000001, 0x01000001, 0x00100001, 0x00011111,
0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0045h
0x01111111, 0x00000001, 0x00000001, 0x01111111,
0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0046h
0x00111111, 0x00000001, 0x00000001, 0x00000001,
0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0047h
0x01111001, 0x01000001, 0x01000010, 0x00111100,
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0048h
0x01111111, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x00111110, 0x00001000, 0x00001000, // 0049h
0x00001000, 0x00001000, 0x00001000, 0x00111110,
0x00000000, 0x01000000, 0x01000000, 0x01000000, // 004ah
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x01100001, 0x00011001, 0x00000101, // 004bh
0x00000011, 0x00000101, 0x00011001, 0x01100001,
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 004ch
0x00000001, 0x00000001, 0x00000001, 0x01111111,
0x00000000, 0x01000001, 0x01100011, 0x01010101, // 004dh
0x01001001, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x01000001, 0x01000011, 0x01000101, // 004eh
0x01001001, 0x01010001, 0x01100001, 0x01000001,
0x00000000, 0x00011100, 0x00100010, 0x01000001, // 004fh
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0050h
0x00111111, 0x00000001, 0x00000001, 0x00000001,
0x00000000, 0x00011100, 0x00100010, 0x01000001, // 0051h
0x01000001, 0x01011001, 0x00100010, 0x01011100,
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0052h
0x00111111, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x00111110, 0x01000001, 0x00000001, // 0053h
0x00111110, 0x01000000, 0x01000001, 0x00111110,
0x00000000, 0x01111111, 0x00001000, 0x00001000, // 0054h
0x00001000, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0055h
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x01000001, 0x01000001, 0x00100010, // 0056h
0x00100010, 0x00010100, 0x00010100, 0x00001000,
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0057h
0x01001001, 0x01010101, 0x01100011, 0x01000001,
0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0058h
0x00001000, 0x00010100, 0x00100010, 0x01000001,
0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0059h
0x00001000, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x01111111, 0x00100000, 0x00010000, // 005ah
0x00001000, 0x00000100, 0x00000010, 0x01111111,
0x00000000, 0x01111100, 0x00000100, 0x00000100, // 005bh
0x00000100, 0x00000100, 0x00000100, 0x01111100,
0x00000000, 0x00100010, 0x00010100, 0x00111110, // 005ch
0x00001000, 0x00111110, 0x00001000, 0x00001000,
0x00000000, 0x00011111, 0x00010000, 0x00010000, // 005dh
0x00010000, 0x00010000, 0x00010000, 0x00011111,
0x00000000, 0x00001000, 0x00010100, 0x00100010, // 005eh
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 005fh
0x00000000, 0x00000000, 0x00000000, 0x01111111,
0x00000000, 0x00010000, 0x00001000, 0x00011000, // 0060h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00011110, 0x00100001, // 0061h
0x00111110, 0x00100001, 0x00100001, 0x01011110,
0x00000000, 0x00000001, 0x00000001, 0x00111111, // 0062h
0x01000001, 0x01000001, 0x01000001, 0x00111111,
0x00000000, 0x00000000, 0x00111100, 0x01000010, // 0063h
0x00000001, 0x00000001, 0x01000010, 0x00111100,
0x00000000, 0x01000000, 0x01000000, 0x01111110, // 0064h
0x01000001, 0x01000001, 0x01000001, 0x01111110,
0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0065h
0x01111111, 0x00000001, 0x01000001, 0x00111110,
0x00000000, 0x00110000, 0x00001000, 0x00001000, // 0066h
0x01111111, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x00000000, 0x01111110, 0x01000001, // 0067h
0x01000001, 0x01111110, 0x01000000, 0x00111110,
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0068h
0x00111111, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x00001000, 0x00000000, 0x00001000, // 0069h
0x00001000, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x00100000, 0x00000000, 0x00100000, // 006ah
0x00100000, 0x00100001, 0x00100001, 0x00011110,
0x00000000, 0x00000001, 0x00000001, 0x01100001, // 006bh
0x00011001, 0x00000111, 0x00011001, 0x01100001,
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 006ch
0x00001000, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x00000000, 0x00110111, 0x01001001, // 006dh
0x01001001, 0x01001001, 0x01001001, 0x01001001,
0x00000000, 0x00000000, 0x00111111, 0x01000001, // 006eh
0x01000001, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x00000000, 0x00011100, 0x00100010, // 006fh
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x00000000, 0x00111101, 0x01000011, // 0070h
0x01000001, 0x01000011, 0x00111101, 0x00000001,
0x00000000, 0x00000000, 0x01011110, 0x01100001, // 0071h
0x01000001, 0x01100001, 0x01011110, 0x01000000,
0x00000000, 0x00000000, 0x00110001, 0x00001101, // 0072h
0x00000011, 0x00000001, 0x00000001, 0x00000001,
0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0073h
0x00001110, 0x00110000, 0x01000001, 0x00111110,
0x00000000, 0x00000100, 0x00000100, 0x01111111, // 0074h
0x00000100, 0x00000100, 0x00000100, 0x01111000,
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0075h
0x01000001, 0x01000001, 0x01000001, 0x01111110,
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0076h
0x00100010, 0x00100010, 0x00010100, 0x00001000,
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0077h
0x01001001, 0x00101010, 0x00101010, 0x00010100,
0x00000000, 0x00000000, 0x00100001, 0x00010010, // 0078h
0x00001100, 0x00001100, 0x00010010, 0x00100001,
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0079h
0x00100010, 0x00011100, 0x00001000, 0x00000110,
0x00000000, 0x00000000, 0x00111111, 0x00010000, // 007ah
0x00001000, 0x00000100, 0x00000010, 0x00111111,
0x00000000, 0x00001000, 0x00011110, 0x01100100, // 007bh
0x00011000, 0x00100100, 0x00000100, 0x01111000,
0x00000000, 0x00000000, 0x00011110, 0x00000100, // 007ch
0x00011110, 0x00110101, 0x00101101, 0x00010010,
0x00000000, 0x00000000, 0x00000000, 0x00010001, // 007dh
0x00100001, 0x00100001, 0x00000001, 0x00000010,
0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007eh
0x00011110, 0x00100000, 0x00100000, 0x00011100,
0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007fh
0x00111110, 0x00010000, 0x00001100, 0x00110010,
0x00000000, 0x00000000, 0x00000100, 0x00101111, // 0080h
0x01000100, 0x00011110, 0x00100101, 0x00010110,
0x00000000, 0x00000000, 0x00001010, 0x00011110, // 0081h
0x00101011, 0x00100010, 0x00010100, 0x00000100,
0x00000000, 0x00000000, 0x00001000, 0x00011101, // 0082h
0x00101011, 0x00101001, 0x00011001, 0x00000100,
0x00000000, 0x00000000, 0x00001000, 0x00111000, // 0083h
0x00001000, 0x00011110, 0x00101001, 0x00000110,
0x00000000, 0x00000000, 0x00000000, 0x00011100, // 0084h
0x00100011, 0x00100000, 0x00100000, 0x00011100,
0x00000000, 0x00000110, 0x01001001, 0x00110000, // 0085h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000100, 0x00111111, 0x00000100, // 0086h
0x00111110, 0x01010101, 0x01001101, 0x00100110,
0x00000000, 0x00000000, 0x00100001, 0x01000001, // 0087h
0x01000001, 0x01000001, 0x00000001, 0x00000010,
0x00000000, 0x00111100, 0x00000000, 0x00111110, // 0088h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x00011100, 0x00000000, 0x00111110, // 0089h
0x00010000, 0x00001000, 0x00010100, 0x01100010,
0x00000000, 0x00100100, 0x01011111, 0x00000100, // 008ah
0x00111110, 0x01000101, 0x01000101, 0x00100010,
0x00000000, 0x00100010, 0x01001111, 0x01010010, // 008bh
0x01010010, 0x00010010, 0x00010010, 0x00001001,
0x00000000, 0x00000100, 0x00111110, 0x00001000, // 008ch
0x00111110, 0x00010000, 0x00000010, 0x00111100,
0x00000000, 0x00100000, 0x00011000, 0x00000110, // 008dh
0x00000001, 0x00000110, 0x00011000, 0x00100000,
0x00000000, 0x00100000, 0x01111101, 0x00100001, // 008eh
0x00100001, 0x00100001, 0x00100001, 0x00010010,
0x00000000, 0x00011110, 0x00100000, 0x00000000, // 008fh
0x00000000, 0x00000001, 0x00000001, 0x00111110,
0x00000000, 0x00001000, 0x01111111, 0x00010000, // 0090h
0x00100000, 0x00000010, 0x00000010, 0x00111100,
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0091h
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x00010000, 0x01111111, 0x00011000, // 0092h
0x00010100, 0x00010100, 0x00011000, 0x00001100,
0x00000000, 0x00100010, 0x01111111, 0x00100010, // 0093h
0x00100010, 0x00000010, 0x00000010, 0x01111100,
0x00000000, 0x00111100, 0x00010000, 0x00001100, // 0094h
0x01111111, 0x00001000, 0x00001000, 0x00110000,
0x00000000, 0x00000100, 0x00011111, 0x00000100, // 0095h
0x01110100, 0x00000010, 0x00001010, 0x01110010,
0x00000000, 0x00001000, 0x01111111, 0x00000100, // 0096h
0x00111100, 0x01000010, 0x01000000, 0x00111100,
0x00000000, 0x00000000, 0x00011100, 0x00100011, // 0097h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x01111111, 0x00010000, 0x00001000, // 0098h
0x00001000, 0x00001000, 0x00001000, 0x00110000,
0x00000000, 0x00000010, 0x00110010, 0x00001100, // 0099h
0x00000010, 0x00000001, 0x00000001, 0x00111110,
0x00000000, 0x00100100, 0x01001111, 0x01000010, // 009ah
0x00010001, 0x00111100, 0x00010010, 0x00001100,
0x00000000, 0x00000010, 0x01111010, 0x01000010, // 009bh
0x00000010, 0x00000010, 0x00001010, 0x01110010,
0x00000000, 0x00100010, 0x00111110, 0x01010010, // 009ch
0x01001011, 0x01101101, 0x01010101, 0x00110010,
0x00000000, 0x00110010, 0x01001011, 0x01000110, // 009dh
0x01000110, 0x01110010, 0x01001011, 0x00110010,
0x00000000, 0x00011100, 0x00101010, 0x01001001, // 009eh
0x01001001, 0x01000101, 0x01000101, 0x00110010,
0x00000000, 0x00100001, 0x01111101, 0x00100001, // 009fh
0x00100001, 0x00111001, 0x01100101, 0x00011001,
0x00000000, 0x00000100, 0x00100011, 0x01100010, // 00a0h
0x00100001, 0x00100001, 0x00010010, 0x00001100,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a1h
0x00000000, 0x00000100, 0x00001010, 0x00000100,
0x00000000, 0x01110000, 0x00010000, 0x00010000, // 00a2h
0x00010000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a3h
0x00001000, 0x00001000, 0x00001000, 0x00001110,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a4h
0x00000000, 0x00000010, 0x00000100, 0x00000100,
0x00000000, 0x00000000, 0x00000000, 0x00011000, // 00a5h
0x00011000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01111111, 0x01000000, 0x01111111, // 00a6h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x00000000, 0x00111111, 0x00100000, // 00a7h
0x00010100, 0x00001100, 0x00000100, 0x00000010,
0x00000000, 0x00000000, 0x00100000, 0x00100000, // 00a8h
0x00010000, 0x00001111, 0x00001000, 0x00001000,
0x00000000, 0x00000000, 0x00000100, 0x00111111, // 00a9h
0x00100001, 0x00100000, 0x00010000, 0x00001100,
0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00aah
0x00001000, 0x00001000, 0x00001000, 0x01111111,
0x00000000, 0x00000000, 0x00010000, 0x00111111, // 00abh
0x00011000, 0x00010100, 0x00010010, 0x00011001,
0x00000000, 0x00000000, 0x00000010, 0x00111111, // 00ach
0x00100010, 0x00010010, 0x00000100, 0x00000100,
0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00adh
0x00100000, 0x00100000, 0x00100000, 0x01111111,
0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00aeh
0x00111110, 0x00100000, 0x00100000, 0x00111110,
0x00000000, 0x00000000, 0x00100101, 0x00101010, // 00afh
0x00101010, 0x00100000, 0x00010000, 0x00001110,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00b0h
0x01111111, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01111111, 0x01000000, 0x00101000, // 00b1h
0x00011000, 0x00001000, 0x00001000, 0x00000100,
0x00000000, 0x01000000, 0x00100000, 0x00011000, // 00b2h
0x00010111, 0x00010000, 0x00010000, 0x00010000,
0x00000000, 0x00001000, 0x01111111, 0x01000001, // 00b3h
0x01000001, 0x01000000, 0x00100000, 0x00011000,
0x00000000, 0x00000000, 0x00111110, 0x00001000, // 00b4h
0x00001000, 0x00001000, 0x00001000, 0x01111111,
0x00000000, 0x00100000, 0x01111111, 0x00110000, // 00b5h
0x00101000, 0x00100100, 0x00100010, 0x00110001,
0x00000000, 0x00000100, 0x01111111, 0x01000100, // 00b6h
0x01000100, 0x01000100, 0x01000010, 0x00100001,
0x00000000, 0x00000100, 0x00111111, 0x00001000, // 00b7h
0x01111111, 0x00010000, 0x00010000, 0x00010000,
0x00000000, 0x01111100, 0x01000100, 0x01000100, // 00b8h
0x01000010, 0x01000000, 0x00100000, 0x00011000,
0x00000000, 0x00000010, 0x01111110, 0x00100010, // 00b9h
0x00100001, 0x00100000, 0x00010000, 0x00001100,
0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00bah
0x01000000, 0x01000000, 0x01000000, 0x01111110,
0x00000000, 0x00100010, 0x01111111, 0x00100010, // 00bbh
0x00100010, 0x00100000, 0x00010000, 0x00001100,
0x00000000, 0x00000011, 0x00000100, 0x01000011, // 00bch
0x01000100, 0x00100000, 0x00011000, 0x00000111,
0x00000000, 0x01111111, 0x01000000, 0x00100000, // 00bdh
0x00010000, 0x00011000, 0x00100100, 0x01000011,
0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00beh
0x00100010, 0x00000010, 0x00000010, 0x01111100,
0x00000000, 0x01000001, 0x01000010, 0x01000000, // 00bfh
0x00100000, 0x00100000, 0x00011000, 0x00000110,
0x00000000, 0x01111110, 0x01000010, 0x01001110, // 00c0h
0x01110001, 0x01000000, 0x00100000, 0x00011000,
0x00000000, 0x01100000, 0x00011110, 0x00010000, // 00c1h
0x01111111, 0x00010000, 0x00010000, 0x00001100,
0x00000000, 0x01000101, 0x01001010, 0x01001010, // 00c2h
0x01000000, 0x00100000, 0x00010000, 0x00001110,
0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00c3h
0x00010000, 0x00010000, 0x00001000, 0x00000110,
0x00000000, 0x00000010, 0x00000010, 0x00000110, // 00c4h
0x00011010, 0x01100010, 0x00000010, 0x00000010,
0x00000000, 0x00010000, 0x00010000, 0x01111111, // 00c5h
0x00010000, 0x00010000, 0x00001000, 0x00000110,
0x00000000, 0x00000000, 0x00111110, 0x00000000, // 00c6h
0x00000000, 0x00000000, 0x00000000, 0x01111111,
0x00000000, 0x01111110, 0x01000000, 0x01000100, // 00c7h
0x00101000, 0x00010000, 0x00101000, 0x01000110,
0x00000000, 0x00001000, 0x01111111, 0x00100000, // 00c8h
0x00010000, 0x00011100, 0x01101011, 0x00001000,
0x00000000, 0x01000000, 0x01000000, 0x01000000, // 00c9h
0x00100000, 0x00100000, 0x00011000, 0x00000111,
0x00000000, 0x00010010, 0x00100010, 0x00100010, // 00cah
0x01000010, 0x01000010, 0x01000001, 0x01000001,
0x00000000, 0x00000001, 0x00000001, 0x01111111, // 00cbh
0x00000001, 0x00000001, 0x00000001, 0x01111110,
0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cch
0x01000000, 0x00100000, 0x00010000, 0x00001110,
0x00000000, 0x00000000, 0x00000100, 0x00001010, // 00cdh
0x00010001, 0x00100001, 0x01000000, 0x00000000,
0x00000000, 0x00001000, 0x00001000, 0x01111111, // 00ceh
0x00001000, 0x00101010, 0x01001010, 0x01001001,
0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cfh
0x00100010, 0x00010100, 0x00001000, 0x00010000,
0x00000000, 0x00001110, 0x01110000, 0x00001110, // 00d0h
0x01110000, 0x00000110, 0x00011000, 0x01100000,
0x00000000, 0x00001000, 0x00001000, 0x00000100, // 00d1h
0x00000100, 0x00100010, 0x01000010, 0x01111111,
0x00000000, 0x01000000, 0x01000000, 0x00100100, // 00d2h
0x00101000, 0x00010000, 0x00101100, 0x01000011,
0x00000000, 0x01111111, 0x00000100, 0x01111111, // 00d3h
0x00000100, 0x00000100, 0x00000100, 0x01111000,
0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00d4h
0x00100010, 0x00010100, 0x00000100, 0x00000100,
0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00d5h
0x00100000, 0x00100000, 0x00100000, 0x01111111,
0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00d6h
0x01111110, 0x01000000, 0x01000000, 0x01111110,
0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00d7h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00d8h
0x01000010, 0x01000000, 0x00100000, 0x00011000,
0x00000000, 0x00001010, 0x00001010, 0x00001010, // 00d9h
0x01001010, 0x01001010, 0x00101010, 0x00011001,
0x00000000, 0x00000010, 0x00000010, 0x01000010, // 00dah
0x01000010, 0x00100010, 0x00010010, 0x00001110,
0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dbh
0x01000001, 0x01000001, 0x01000001, 0x01111111,
0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dch
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x01000011, 0x01000100, 0x01000000, // 00ddh
0x01000000, 0x00100000, 0x00010000, 0x00001111,
0x00000100, 0x00001000, 0x00000010, 0x00000100, // 00deh
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000100, 0x00001010, 0x00001010, 0x00000100, // 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,
};
/*---------------------- Character Data2 -------------------------*/
const unsigned int d_64_256_bg_schDT2[16 * 11] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0000h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xf1f1f1f1, 0xf1f1f1f1, 0x00000000, 0x00000000, // ‰¡
0xf1f1f1f1, 0xf1f1f1f1, 0x00000000, 0x00000000,
0xf1f1f1f1, 0xf1f1f1f1, 0x00000000, 0x00000000,
0xf1f1f1f1, 0xf1f1f1f1, 0x00000000, 0x00000000,
0xf100f100, 0xf100f100, 0xf100f100, 0xf100f100, // <20>c
0xf100f100, 0xf100f100, 0xf100f100, 0xf100f100,
0xf100f100, 0xf100f100, 0xf100f100, 0xf100f100,
0xf100f100, 0xf100f100, 0xf100f100, 0xf100f100,
0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, // w
0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1,
0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1,
0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // blk
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x11111111, 0x11111111, 0x11111111, 0x11111111, // r
0x11111111, 0x11111111, 0x11111111, 0x11111111,
0x11111111, 0x11111111, 0x11111111, 0x11111111,
0x11111111, 0x11111111, 0x11111111, 0x11111111,
0x21212121, 0x21212121, 0x21212121, 0x21212121, // g
0x21212121, 0x21212121, 0x21212121, 0x21212121,
0x21212121, 0x21212121, 0x21212121, 0x21212121,
0x21212121, 0x21212121, 0x21212121, 0x21212121,
0x31313131, 0x31313131, 0x31313131, 0x31313131, // b
0x31313131, 0x31313131, 0x31313131, 0x31313131,
0x31313131, 0x31313131, 0x31313131, 0x31313131,
0x31313131, 0x31313131, 0x31313131, 0x31313131,
0x41414141, 0x41414141, 0x41414141, 0x41414141, // y
0x41414141, 0x41414141, 0x41414141, 0x41414141,
0x41414141, 0x41414141, 0x41414141, 0x41414141,
0x41414141, 0x41414141, 0x41414141, 0x41414141,
0x51515151, 0x51515151, 0x51515151, 0x51515151, // m
0x51515151, 0x51515151, 0x51515151, 0x51515151,
0x51515151, 0x51515151, 0x51515151, 0x51515151,
0x51515151, 0x51515151, 0x51515151, 0x51515151,
0x61616161, 0x61616161, 0x61616161, 0x61616161, // c
0x61616161, 0x61616161, 0x61616161, 0x61616161,
0x61616161, 0x61616161, 0x61616161, 0x61616161,
0x61616161, 0x61616161, 0x61616161, 0x61616161,
};
/* EOF */

View File

@ -0,0 +1,29 @@
/*---------------------------------------------------------------------------*
Project: TwlSDK - GX - demos - UnitTours/2D_CharBg_1
File: data.h
Copyright 2003 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: 2007-08-29#$
$Rev: 640 $
$Author: kitase_hirotake $
*---------------------------------------------------------------------------*/
#ifndef BG_DATA_H_
#define BG_DATA_H_
#define SCREEN_SIZE (32 * 24)
/*-------------------------- Data -------------------------------*/
#define CHAR_SIZE (16 * 128 * sizeof(int))
extern const unsigned int d_64_256_bg_schDT[8 * 256];
extern const unsigned int d_64_256_bg_schDT2[16 * 11];
extern const unsigned int d_64_256_bg_sclDT[8 * 16];
#endif

View File

@ -16,7 +16,7 @@
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
#include <twl.h> #include <twl.h>
#include "misc.h" #include "misc_simple.h"
#include "ExecTmpApp.h" #include "ExecTmpApp.h"
// extern data----------------------------------------------------------------- // extern data-----------------------------------------------------------------
@ -30,9 +30,6 @@ static void INTR_VBlank( void );
// static variable------------------------------------------------------------- // static variable-------------------------------------------------------------
BOOL g_isValidTSD; BOOL g_isValidTSD;
RTCDrawProperty g_rtcDraw = {
TRUE, RTC_DATE_TOP_X, RTC_DATE_TOP_Y, RTC_TIME_TOP_X, RTC_TIME_TOP_Y
};
// const data------------------------------------------------------------------ // const data------------------------------------------------------------------
@ -42,57 +39,19 @@ RTCDrawProperty g_rtcDraw = {
// ============================================================================ // ============================================================================
void TwlMain(void) void TwlMain(void)
{ {
myInit();
// 初期化----------------------------------
OS_Init();
OS_InitTick();
(void)OS_EnableIrq();
(void)OS_EnableInterrupts();
GX_Init();
GX_SetPower(GX_POWER_ALL); // 各ロジック パワーON
FS_Init( 3 );
// 割り込み許可----------------------------
(void)OS_SetIrqFunction(OS_IE_V_BLANK, INTR_VBlank);
(void)OS_EnableIrqMask(OS_IE_V_BLANK);
(void)GX_VBlankIntr(TRUE);
// デバイス初期化-------------------------------
TP_Init();
(void)RTC_Init();
// システムの初期化------------------
InitAllocator();
// ※本来ならランチャーからのパラメータチェックを行い、
// 初回起動シーケンスに入るパスがある
// TWL設定のリード
SYSM_SetAllocFunc( Alloc, Free ); // SYSM_ReadTWLSettingsFile()の実行に必要。
// ::::::::::::::::::::::::::::::::::::::::::::::
// TWL設定データファイルの読み込み
// ::::::::::::::::::::::::::::::::::::::::::::::
(void)LCFG_ReadHWSecureInfo();
g_isValidTSD = LCFG_ReadTWLSettings();
if( g_isValidTSD ) {
SYSM_CaribrateTP();
}
InitBG();
GetAndDrawRTCData( &g_rtcDraw, TRUE );
ExecTmpAppInit(); ExecTmpAppInit();
// ƒ<>ƒCƒ“ƒ<C692>[ƒv---------------------------- // ƒ<>ƒCƒ“ƒ<C692>[ƒv----------------------------
while(1){ while(1){
OS_WaitIrq(1, OS_IE_V_BLANK); // Vブランク割り込み待ち
ReadKeyPad(); // キー入力の取得 myPreMain();
ReadTP(); // TP入力の取得
ExecTmpAppMain(); ExecTmpAppMain();
myProMain();
OS_WaitIrq(1, OS_IE_V_BLANK); // Vブランク割り込み待ち
} }
} }

View File

@ -0,0 +1,154 @@
/*---------------------------------------------------------------------------*
Project: TwlIPL
File: misc.c
Copyright 2007 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: 2008-01-30#$
$Rev: 547 $
$Author: yoshida_teruhisa $
*---------------------------------------------------------------------------*/
#include <twl.h>
#include "misc_simple.h"
#include "data.h"
// define data-----------------------------------------------------------------
// extern data-----------------------------------------------------------------
// define data-----------------------------------------------------------------
// function's prototype-------------------------------------------------------
// global variable-------------------------------------------------------------
// static variable-------------------------------------------------------------
static u16 sScrnBuf[2][SCREEN_SIZE]; // Buffer for screen data(BG #0)
// const data------------------------------------------------------------------
void myInit( void )
{
//---------------------------------------------------------------------------
// Initialize:
// They enable IRQ interrupts, initialize VRAM, and set BG #0 for text mode.
//---------------------------------------------------------------------------
DEMOInitCommon();
DEMOInitVRAM();
DEMOInitDisplayBG0Only();
DEMOInitDisplaySubBG0Only();
//---------------------------------------------------------------------------
// Transmitting the character data and the palette data
//---------------------------------------------------------------------------
G2_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256,
GX_BG_COLORMODE_16,
GX_BG_SCRBASE_0x0800, GX_BG_CHARBASE_0x04000, GX_BG_EXTPLTT_01);
GX_LoadBG0Char(d_64_256_bg_schDT, 0, sizeof(d_64_256_bg_schDT));
GX_LoadBGPltt(d_64_256_bg_sclDT, 0, sizeof(d_64_256_bg_sclDT));
G2S_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256,
GX_BG_COLORMODE_16,
GX_BG_SCRBASE_0x1000, GX_BG_CHARBASE_0x08000, GX_BG_EXTPLTT_01);
GXS_LoadBG0Char(d_64_256_bg_schDT, 0, sizeof(d_64_256_bg_schDT));
GXS_LoadBGPltt(d_64_256_bg_sclDT, 0, sizeof(d_64_256_bg_sclDT));
GX_SetVisiblePlane(GX_PLANEMASK_BG0|GX_PLANEMASK_BG2);
GXS_SetVisiblePlane(GX_PLANEMASK_BG0|GX_PLANEMASK_BG2);
G2_SetBG0Priority(0);
G2S_SetBG0Priority(0);
GX_SetDispSelect(GX_DISP_SELECT_SUB_MAIN);
DEMOStartDisplay();
}
void myPreMain( void )
{
// 描画前クリア処理。まぁどのシーンでも使うので。
myDp_Cls16(MAIN_SCREEN);
myDp_Cls16(SUB_SCREEN);
DEMOReadKey();
}
void myProMain( void )
{
// Store the data onto the main memory, and invalidate the cache.
// キャッシュONになってると、CPUとDMAの見てるメモリの値が違って、悲しい事が起きる
DC_FlushRange(sScrnBuf[0], sizeof(sScrnBuf[0]));
DC_FlushRange(sScrnBuf[1], sizeof(sScrnBuf[1]));
// 描画後フリップ処理。まぁどのシーンでも使うので。
OS_WaitVBlankIntr(); // Waiting the end of VBlank interrupt
GX_LoadBG0Scr(sScrnBuf[0], 0, sizeof(sScrnBuf[0]));
GXS_LoadBG0Scr(sScrnBuf[1], 0, sizeof(sScrnBuf[1]));
}
void myDp_Cls16(MyScreen scr)
{
if( !(scr < SCREEN_MAX) ) return;
MI_CpuClear8((void *)sScrnBuf[scr],SCREEN_SIZE * sizeof(u16));
}
void myDp_Cls8(MyScreen scr)
{
if( !(scr < SCREEN_MAX) ) return;
MI_CpuClear8((void *)sScrnBuf[scr],SCREEN_SIZE * sizeof(u8));
}
void myDp_Putchar(s32 x, s32 y, u8 color, MyScreen scr, u8 c)
{
if( !(scr < SCREEN_MAX) ) return;
sScrnBuf[scr][(y * 32) + x] = (u16)((color << 12) | c);
}
void myDp_Write(s32 x, s32 y, u8 color, MyScreen scr, char* str)
{
while (*str) {
while (x >= 32) {
x -= 32;
y++;
}
while (y >= 24) {
return; // out of range
}
myDp_Putchar(x, y, color, scr, (u8)*str++);
x++;
}
}
void myDp_Printf(s32 x, s32 y, u8 color, MyScreen scr, const char *s, ...)
{
va_list vlist;
char temp[SCREEN_SIZE+1];
temp[sizeof(temp)-1] = 0;
va_start(vlist, s);
vsnprintf(temp, sizeof(temp) - 1, s, vlist);
va_end(vlist);
myDp_Write(x, y, color, scr, temp);
}
void myDp_DrawMenu( u16 csr, MyScreen scr, const MenuParam *param )
{
int l;
for( l=0; l<param->num; l++)
{
myDp_Printf( param->pos[l].x, param->pos[l].y,
(u8)( param->pos[l].enable ? ( l==csr ? param->select_color : param->normal_color ) : param->disable_color ),
scr, ( l==csr ? "=>%s" : " %s" ), param->str_elem[l] );
}
}

View File

@ -0,0 +1,97 @@
/*---------------------------------------------------------------------------*
Project: TwlIPL
File: misc.h
Copyright 2007 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: 2007-11-15#$
$Rev: 188 $
$Author: yoshida_teruhisa $
*---------------------------------------------------------------------------*/
#ifndef __MISC_SIMPLE_H__
#define __MISC_SIMPLE_H__
#include <twl.h>
#include <DEMO.h>
#ifdef __cplusplus
extern "C" {
#endif
// define data----------------------------------------------------------
#define MYPAD_IS_TRIG DEMO_IS_TRIG
#define MYPAD_IS_PRESS DEMO_IS_PRESS
// TXTColorPalette の色名 256色パレットへのロードを想定
enum
{
TXT_COLOR_BLACK=0,
TXT_COLOR_RED,
TXT_COLOR_GREEN,
TXT_COLOR_BLUE,
TXT_COLOR_YELLOW,
TXT_COLOR_PURPLE,
TXT_COLOR_LIGHTBLUE,
TXT_COLOR_DARKRED,
TXT_COLOR_DARKGREEN,
TXT_COLOR_DARKBLUE,
TXT_COLOR_DARKYELLOW,
TXT_COLOR_DARKPURPLE,
TXT_COLOR_DARKLIGHTBLUE,
TXT_COLOR_GRAY,
TXT_COLOR_DARKGRAY,
TXT_COLOR_WHITE
};
typedef enum
{
MAIN_SCREEN = 0,
SUB_SCREEN,
SCREEN_MAX
}
MyScreen;
// メニュー要素座標
typedef struct MenuPos {
BOOL enable;
int x;
int y;
}MenuPos;
// メニュー構成パラメータ構造体
typedef struct MenuParam {
int num;
int normal_color;
int select_color;
int disable_color;
MenuPos *pos;
const char **str_elem;
}MenuParam;
// global variables--------------------------------------------------
// function-------------------------------------------------------------
void myInit( void );
void myPreMain( void );
void myProMain( void );
void myDp_Cls16(MyScreen scr);
void myDp_Cls8(MyScreen scr);
void myDp_Putchar(s32 x, s32 y, u8 color, MyScreen scr, u8 c);
void myDp_Write(s32 x, s32 y, u8 color, MyScreen scr, char* str);
void myDp_Printf(s32 x, s32 y, u8 color, MyScreen scr, const char *s, ...);
void myDp_DrawMenu( u16 csr, MyScreen scr, const MenuParam *param );
#ifdef __cplusplus
}
#endif
#endif // __MISC_H__

View File

@ -20,7 +20,7 @@ include $(TWLSDK_ROOT)/build/buildtools/commondefs
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
SUBDIRS = SimpleApp banner ARM9 SUBDIRS = banner ARM9
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------

View File

@ -20,37 +20,39 @@ SUBDIRS =
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
TARGET_FIRM = SYSTEMMENU
TARGET_PLATFORM = TWL TARGET_PLATFORM = TWL
TWL_ARCHGEN = LIMITED TWL_ARCHGEN = LIMITED
TITLEID_LO = SMPL TITLEID_LO = SMPL
TARGET_BIN = simple.srl TARGET_BIN = simpleapp.srl
ROM_SPEC = main.rsf ROM_SPEC = main.rsf
MISC_DIR = $(SYSMENU_ROOT)/build/systemMenu_RED/misc SRCS = main.c SimpleApp.c misc_simple.c data.c
SRCS = main.c SimpleApp.c \ LINCLUDES = $(TWLSDK_ROOT)/build/demos/gx/UnitTours/DEMOLib/include
$(MISC_DIR)/src/misc.c $(MISC_DIR)/src/cmn.c
LINCLUDES = $(MISC_DIR)/include LLIBRARY_DIRS += $(TWLSDK_ROOT)/build/demos/gx/UnitTours/DEMOLib/lib/$(TWL_BUILDTYPE)
MAKEROM_FLAGS += -DTITLEID_LO='$(TITLEID_LO)' LLIBRARIES += libboc$(TWL_LIBSUFFIX).a \
libes$(TWL_LIBSUFFIX).a \
libnam$(TWL_LIBSUFFIX).a \
libDEMO$(TWL_LIBSUFFIX).a
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs MAKEROM_FLAGS += -F -DTITLEID_LO='$(TITLEID_LO)'
include $(TWLSDK_ROOT)/add-ins/es/commondefs.es
include $(TWLSDK_ROOT)/build/buildtools/commondefs
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
INSTALL_DIR = ../../data
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
do-build : $(TARGETS) do-build : $(TARGETS)
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules include $(TWLSDK_ROOT)/build/buildtools/modulerules
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
#===== End of Makefile ===== #===== End of Makefile =====

View File

@ -16,15 +16,10 @@
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
#include <twl.h> #include <twl.h>
#include <sysmenu.h> #include "misc_simple.h"
#include "misc.h"
#include "SimpleApp.h" #include "SimpleApp.h"
// define data------------------------------------------ // define data------------------------------------------
#define RETURN_BUTTON_TOP_X 2
#define RETURN_BUTTON_TOP_Y 21
#define RETURN_BUTTON_BOTTOM_X ( RETURN_BUTTON_TOP_X + 8 )
#define RETURN_BUTTON_BOTTOM_Y ( RETURN_BUTTON_TOP_Y + 2 )
#define COPB_MENU_ELEMENT_NUM 1 // メニューの項目数 #define COPB_MENU_ELEMENT_NUM 1 // メニューの項目数
@ -35,20 +30,19 @@
static void MenuScene( void ); static void MenuScene( void );
// global variable ------------------------------------- // global variable -------------------------------------
extern RTCDrawProperty g_rtcDraw;
// static variable ------------------------------------- // static variable -------------------------------------
static u16 s_csr = 0; static u16 s_csr = 0;
static void(*s_pNowProcess)(void); static void(*s_pNowProcess)(void);
// const data ----------------------------------------- // const data -----------------------------------------
static const u16 *s_pStrMenu[ COPB_MENU_ELEMENT_NUM ] = static const char *s_pStrMenu[ COPB_MENU_ELEMENT_NUM ] =
{ {
L"ランチャーに戻る", "return to launcher",
}; };
static MenuPos s_menuPos[] = { static MenuPos s_menuPos[] = {
{ TRUE, 4 * 8, 8 * 8 }, { TRUE, 3, 8 },
}; };
static const MenuParam s_menuParam = { static const MenuParam s_menuParam = {
@ -57,7 +51,7 @@ static const MenuParam s_menuParam = {
TXT_COLOR_GREEN, TXT_COLOR_GREEN,
TXT_COLOR_RED, TXT_COLOR_RED,
&s_menuPos[ 0 ], &s_menuPos[ 0 ],
(const u16 **)&s_pStrMenu, (const char **)&s_pStrMenu,
}; };
//====================================================== //======================================================
@ -66,25 +60,17 @@ static const MenuParam s_menuParam = {
static void DrawMenuScene( void ) static void DrawMenuScene( void )
{ {
PutStringUTF16( 1 * 8, 0 * 8, TXT_COLOR_BLUE, (const u16 *)L"SimpleApp"); myDp_Printf( 1, 0, TXT_COLOR_BLUE, MAIN_SCREEN, "SimpleApp");
PutStringUTF16( 1*8, 18*8, TXT_COLOR_BLACK, (const u16 *)L"単純アプリ...");
GetAndDrawRTCData( &g_rtcDraw, TRUE );
// メニュー項目 // メニュー項目
DrawMenu( s_csr, &s_menuParam ); myDp_DrawMenu( s_csr, MAIN_SCREEN, &s_menuParam );
} }
static void MenuInit( void ) static void MenuInit( void )
{ {
GX_DispOff(); GX_DispOff();
GXS_DispOff(); GXS_DispOff();
NNS_G2dCharCanvasClear( &gCanvas, TXT_COLOR_WHITE );
PutStringUTF16( 1 * 8, 0 * 8, TXT_COLOR_BLUE, (const u16 *)L"SimpleApp"); myDp_Printf( 1, 0, TXT_COLOR_BLUE, MAIN_SCREEN, "SimpleApp");
GetAndDrawRTCData( &g_rtcDraw, TRUE );
SVC_CpuClear( 0x0000, &tpd, sizeof(TpWork), 16 );
GXS_SetVisiblePlane( GX_PLANEMASK_BG0 );
s_pNowProcess = MenuScene; s_pNowProcess = MenuScene;
@ -96,29 +82,25 @@ static void MenuInit( void )
static void MenuScene(void) static void MenuScene(void)
{ {
BOOL tp_select = FALSE;
LauncherBootFlags tempflag = {TRUE, OS_BOOTTYPE_NAND, TRUE, FALSE, FALSE, FALSE, 0}; LauncherBootFlags tempflag = {TRUE, OS_BOOTTYPE_NAND, TRUE, FALSE, FALSE, FALSE, 0};
ReadTP();
//-------------------------------------- //--------------------------------------
// キー入力処理 // キー入力処理
//-------------------------------------- //--------------------------------------
if( pad.trg & PAD_KEY_DOWN ){ // カーソルの移動 if( MYPAD_IS_TRIG(PAD_KEY_DOWN) ){ // カーソルの移動
if( ++s_csr == COPB_MENU_ELEMENT_NUM ) { if( ++s_csr == COPB_MENU_ELEMENT_NUM ) {
s_csr=0; s_csr=0;
} }
} }
if( pad.trg & PAD_KEY_UP ){ if( MYPAD_IS_TRIG(PAD_KEY_UP) ){
if( --s_csr & 0x80 ) { if( --s_csr & 0x80 ) {
s_csr=COPB_MENU_ELEMENT_NUM - 1; s_csr=COPB_MENU_ELEMENT_NUM - 1;
} }
} }
tp_select = SelectMenuByTP( &s_csr, &s_menuParam );
DrawMenuScene(); DrawMenuScene();
if( ( pad.trg & PAD_BUTTON_A ) || ( tp_select ) ) { // メニュー項目への分岐 if( MYPAD_IS_TRIG(PAD_BUTTON_A) ) { // メニュー項目への分岐
if( s_menuPos[ s_csr ].enable ) { if( s_menuPos[ s_csr ].enable ) {
switch( s_csr ) { switch( s_csr ) {
case 0: case 0:
@ -133,7 +115,6 @@ static void MenuScene(void)
// 初期化 // 初期化
void SimpleAppInit( void ) void SimpleAppInit( void )
{ {
ChangeUserColor( LCFG_TSD_GetUserColor() );
MenuInit(); MenuInit();
} }

View File

@ -0,0 +1,620 @@
/*---------------------------------------------------------------------------*
Project: TwlSDK - demos.TWL - nandApp - ExecPreLoadedApp
File: data.c
Copyright 2007 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: 2007-08-29#$
$Rev: 640 $
$Author: kitase_hirotake $
*---------------------------------------------------------------------------*/
#include "data.h"
/*---------------------- Palette Data ---------------------------*/
const unsigned int d_64_256_bg_sclDT[8 * 16] = {
0x0000ffff, 0x00000000, 0x00000000, 0x00000000, // black
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x001f001e, 0x001d001c, 0x001b001a, 0x00190018, // red
0x00170016, 0x00150014, 0x00130012, 0x00110010,
0x03e00000, 0x00000000, 0x00000000, 0x00000000, // green
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x7c000000, 0x00000000, 0x00000000, 0x00000000, // blue
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x03ff0000, 0x00000000, 0x00000000, 0x00000000, // yellow
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x7c1f0000, 0x00000000, 0x00000000, 0x00000000, // purple
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x7fe00000, 0x00000000, 0x00000000, 0x00000000, // light blue
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x000f000e, 0x000d000c, 0x000b000a, 0x00090008, // dark red
0x00070006, 0x00050004, 0x00030002, 0x00010000,
0x03000000, 0x00000000, 0x00000000, 0x00000000, // dark green
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x60000000, 0x00000000, 0x00000000, 0x00000000, // dark blue
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x03180000, 0x00000000, 0x00000000, 0x00000000, // dark yellow
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x60180000, 0x00000000, 0x00000000, 0x00000000, // dark purple
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x63000000, 0x00000000, 0x00000000, 0x00000000, // dark light blue
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x56b50000, 0x00000000, 0x00000000, 0x00000000, // gray
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x2d6b0000, 0x00000000, 0x00000000, 0x00000000, // dark gray
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x7fff0000, 0x00000000, 0x00000000, 0x00000000, // white
0x00000000, 0x00000000, 0x00000000, 0x00000000
};
/*---------------------- Character Data -------------------------*/
const unsigned int d_64_256_bg_schDT[8 * 256] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0000h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01010010, 0x01010010, 0x00000110, // 0001h
0x00011010, 0x01100010, 0x00000010, 0x00000010,
0x00000000, 0x01011010, 0x01010010, 0x00010010, // 0002h
0x00100010, 0x00100010, 0x00100001, 0x00100001,
0x00000000, 0x01010001, 0x01010001, 0x01111111, // 0003h
0x00000001, 0x00000001, 0x00000001, 0x01111110,
0x00000000, 0x01010000, 0x01111111, 0x00100000, // 0004h
0x00100000, 0x00010000, 0x00001000, 0x00000110,
0x00000000, 0x01010000, 0x01010100, 0x00001010, // 0005h
0x00010001, 0x00100001, 0x01000000, 0x00000000,
0x00000000, 0x01011000, 0x01011000, 0x01111111, // 0006h
0x00001000, 0x00101010, 0x01001010, 0x01001001,
0x00000000, 0x01010010, 0x01101111, 0x01010010, // 0007h
0x00010010, 0x00010010, 0x00010010, 0x00001001,
0x00000000, 0x01010010, 0x01011111, 0x00000100, // 0008h
0x00011111, 0x00001000, 0x00000001, 0x00011110,
0x00000000, 0x01010000, 0x01011000, 0x00000110, // 0009h
0x00000001, 0x00000110, 0x00011000, 0x00100000,
0x00000000, 0x01010000, 0x01111101, 0x00010001, // 000ah
0x00010001, 0x00010001, 0x00010001, 0x00001010,
0x00000000, 0x01010000, 0x01011110, 0x00100000, // 000bh
0x00000000, 0x00000001, 0x00000001, 0x00111110,
0x00000000, 0x01010100, 0x01011111, 0x00001000, // 000ch
0x00010000, 0x00000001, 0x00000001, 0x00011110,
0x00000000, 0x01010001, 0x01010001, 0x00000001, // 000dh
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x01010000, 0x01111111, 0x00011000, // 000eh
0x00010100, 0x00010100, 0x00011000, 0x00001100,
0x00000000, 0x01010010, 0x01111111, 0x00010010, // 000fh
0x00010010, 0x00000010, 0x00000010, 0x00111100,
0x00000000, 0x00001110, 0x01010100, 0x01010010, // 0010h
0x00111111, 0x00000100, 0x00000100, 0x00011000,
0x00000000, 0x01010100, 0x01011111, 0x00000100, // 0011h
0x01110100, 0x00000010, 0x00001010, 0x01110010,
0x00000000, 0x01010100, 0x01011111, 0x00000010, // 0012h
0x00011110, 0x00100001, 0x00100000, 0x00011110,
0x00000000, 0x01010000, 0x01011100, 0x00100011, // 0013h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x01010000, 0x01111111, 0x00010000, // 0014h
0x00001000, 0x00001000, 0x00001000, 0x00110000,
0x00000000, 0x01010010, 0x01010010, 0x00001100, // 0015h
0x00000010, 0x00000001, 0x00000001, 0x00111110,
0x00000000, 0x01010001, 0x01111101, 0x00010001, // 0016h
0x00010001, 0x00111001, 0x01010101, 0x00011001,
0x00000000, 0x01010100, 0x01010011, 0x01110010, // 0017h
0x00010001, 0x00010001, 0x00001010, 0x00000100,
0x00000000, 0x01011110, 0x01011000, 0x00000100, // 0018h
0x00101001, 0x01010001, 0x01010001, 0x00001100,
0x00000000, 0x01010000, 0x01011100, 0x00010010, // 0019h
0x00010010, 0x00100001, 0x01000000, 0x00000000,
0x00000000, 0x01011101, 0x01010001, 0x00111101, // 001ah
0x00010001, 0x00011001, 0x00110101, 0x00001001,
0x00000000, 0x01110001, 0x01011101, 0x00110001, // 001bh
0x00010001, 0x00111001, 0x01010101, 0x00011001,
0x00000000, 0x01110100, 0x01010011, 0x00110010, // 001ch
0x00010001, 0x00010001, 0x00001010, 0x00000100,
0x00000000, 0x01101110, 0x01011000, 0x00100100, // 001dh
0x00101001, 0x01010001, 0x01010001, 0x00001100,
0x00000000, 0x01110000, 0x01011100, 0x00110010, // 001eh
0x00010010, 0x00100001, 0x01000000, 0x00000000,
0x00000000, 0x01111101, 0x01010001, 0x00111101, // 001fh
0x00010001, 0x00011001, 0x00110101, 0x00001001,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0020h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 0021h
0x00001000, 0x00001000, 0x00000000, 0x00001000,
0x00000000, 0x01101100, 0x01001000, 0x00100100, // 0022h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00100100, 0x01111111, 0x00100100, // 0023h
0x00100100, 0x01111111, 0x00010010, 0x00010010,
0x00000000, 0x00001000, 0x01111110, 0x00001001, // 0024h
0x00111110, 0x01001000, 0x00111111, 0x00001000,
0x00000000, 0x01000010, 0x00100101, 0x00010010, // 0025h
0x00001000, 0x00100100, 0x01010010, 0x00100001,
0x00000000, 0x00001110, 0x00010001, 0x00001001, // 0026h
0x01000110, 0x00101001, 0x00110001, 0x01001110,
0x00000000, 0x00011000, 0x00010000, 0x00001000, // 0027h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01110000, 0x00001000, 0x00000100, // 0028h
0x00000100, 0x00000100, 0x00001000, 0x01110000,
0x00000000, 0x00000111, 0x00001000, 0x00010000, // 0029h
0x00010000, 0x00010000, 0x00001000, 0x00000111,
0x00000000, 0x00001000, 0x01001001, 0x00101010, // 002ah
0x00011100, 0x00101010, 0x01001001, 0x00001000,
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 002bh
0x01111111, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002ch
0x00000000, 0x00001100, 0x00001000, 0x00000100,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002dh
0x01111111, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002eh
0x00000000, 0x00000000, 0x00000000, 0x00001100,
0x00000000, 0x01000000, 0x00100000, 0x00010000, // 002fh
0x00001000, 0x00000100, 0x00000010, 0x00000001,
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0030h
0x01000001, 0x01000001, 0x01000001, 0x00111110,
0x00000000, 0x00011100, 0x00010000, 0x00010000, // 0031h
0x00010000, 0x00010000, 0x00010000, 0x00010000,
0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0032h
0x00111110, 0x00000001, 0x00000001, 0x01111111,
0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0033h
0x00111110, 0x01000000, 0x01000001, 0x00111110,
0x00000000, 0x00100000, 0x00110000, 0x00101000, // 0034h
0x00100100, 0x00100010, 0x01111111, 0x00100000,
0x00000000, 0x01111111, 0x00000001, 0x00111111, // 0035h
0x01000000, 0x01000000, 0x01000001, 0x00111110,
0x00000000, 0x00111110, 0x00000001, 0x00111111, // 0036h
0x01000001, 0x01000001, 0x01000001, 0x00111110,
0x00000000, 0x01111111, 0x00100000, 0x00100000, // 0037h
0x00010000, 0x00010000, 0x00001000, 0x00001000,
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0038h
0x00111110, 0x01000001, 0x01000001, 0x00111110,
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0039h
0x01000001, 0x01111110, 0x01000000, 0x00111110,
0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003ah
0x00000000, 0x00000000, 0x00001100, 0x00000000,
0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003bh
0x00000000, 0x00001100, 0x00001000, 0x00000100,
0x00000000, 0x01100000, 0x00011000, 0x00000110, // 003ch
0x00000001, 0x00000110, 0x00011000, 0x01100000,
0x00000000, 0x00000000, 0x01111111, 0x00000000, // 003dh
0x00000000, 0x00000000, 0x01111111, 0x00000000,
0x00000000, 0x00000011, 0x00001100, 0x00110000, // 003eh
0x01000000, 0x00110000, 0x00001100, 0x00000011,
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 003fh
0x00110000, 0x00001000, 0x00000000, 0x00001000,
0x00000000, 0x00011100, 0x00100010, 0x01001001, // 0040h
0x01010101, 0x01010101, 0x01010101, 0x00111010,
0x00000000, 0x00001000, 0x00010100, 0x00010100, // 0041h
0x00100010, 0x00111110, 0x01000001, 0x01000001,
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0042h
0x00111111, 0x01000001, 0x01000001, 0x00111111,
0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0043h
0x00000001, 0x00000001, 0x01000010, 0x00111100,
0x00000000, 0x00011111, 0x00100001, 0x01000001, // 0044h
0x01000001, 0x01000001, 0x00100001, 0x00011111,
0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0045h
0x01111111, 0x00000001, 0x00000001, 0x01111111,
0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0046h
0x00111111, 0x00000001, 0x00000001, 0x00000001,
0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0047h
0x01111001, 0x01000001, 0x01000010, 0x00111100,
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0048h
0x01111111, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x00111110, 0x00001000, 0x00001000, // 0049h
0x00001000, 0x00001000, 0x00001000, 0x00111110,
0x00000000, 0x01000000, 0x01000000, 0x01000000, // 004ah
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x01100001, 0x00011001, 0x00000101, // 004bh
0x00000011, 0x00000101, 0x00011001, 0x01100001,
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 004ch
0x00000001, 0x00000001, 0x00000001, 0x01111111,
0x00000000, 0x01000001, 0x01100011, 0x01010101, // 004dh
0x01001001, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x01000001, 0x01000011, 0x01000101, // 004eh
0x01001001, 0x01010001, 0x01100001, 0x01000001,
0x00000000, 0x00011100, 0x00100010, 0x01000001, // 004fh
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0050h
0x00111111, 0x00000001, 0x00000001, 0x00000001,
0x00000000, 0x00011100, 0x00100010, 0x01000001, // 0051h
0x01000001, 0x01011001, 0x00100010, 0x01011100,
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0052h
0x00111111, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x00111110, 0x01000001, 0x00000001, // 0053h
0x00111110, 0x01000000, 0x01000001, 0x00111110,
0x00000000, 0x01111111, 0x00001000, 0x00001000, // 0054h
0x00001000, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0055h
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x01000001, 0x01000001, 0x00100010, // 0056h
0x00100010, 0x00010100, 0x00010100, 0x00001000,
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0057h
0x01001001, 0x01010101, 0x01100011, 0x01000001,
0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0058h
0x00001000, 0x00010100, 0x00100010, 0x01000001,
0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0059h
0x00001000, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x01111111, 0x00100000, 0x00010000, // 005ah
0x00001000, 0x00000100, 0x00000010, 0x01111111,
0x00000000, 0x01111100, 0x00000100, 0x00000100, // 005bh
0x00000100, 0x00000100, 0x00000100, 0x01111100,
0x00000000, 0x00100010, 0x00010100, 0x00111110, // 005ch
0x00001000, 0x00111110, 0x00001000, 0x00001000,
0x00000000, 0x00011111, 0x00010000, 0x00010000, // 005dh
0x00010000, 0x00010000, 0x00010000, 0x00011111,
0x00000000, 0x00001000, 0x00010100, 0x00100010, // 005eh
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 005fh
0x00000000, 0x00000000, 0x00000000, 0x01111111,
0x00000000, 0x00010000, 0x00001000, 0x00011000, // 0060h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00011110, 0x00100001, // 0061h
0x00111110, 0x00100001, 0x00100001, 0x01011110,
0x00000000, 0x00000001, 0x00000001, 0x00111111, // 0062h
0x01000001, 0x01000001, 0x01000001, 0x00111111,
0x00000000, 0x00000000, 0x00111100, 0x01000010, // 0063h
0x00000001, 0x00000001, 0x01000010, 0x00111100,
0x00000000, 0x01000000, 0x01000000, 0x01111110, // 0064h
0x01000001, 0x01000001, 0x01000001, 0x01111110,
0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0065h
0x01111111, 0x00000001, 0x01000001, 0x00111110,
0x00000000, 0x00110000, 0x00001000, 0x00001000, // 0066h
0x01111111, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x00000000, 0x01111110, 0x01000001, // 0067h
0x01000001, 0x01111110, 0x01000000, 0x00111110,
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0068h
0x00111111, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x00001000, 0x00000000, 0x00001000, // 0069h
0x00001000, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x00100000, 0x00000000, 0x00100000, // 006ah
0x00100000, 0x00100001, 0x00100001, 0x00011110,
0x00000000, 0x00000001, 0x00000001, 0x01100001, // 006bh
0x00011001, 0x00000111, 0x00011001, 0x01100001,
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 006ch
0x00001000, 0x00001000, 0x00001000, 0x00001000,
0x00000000, 0x00000000, 0x00110111, 0x01001001, // 006dh
0x01001001, 0x01001001, 0x01001001, 0x01001001,
0x00000000, 0x00000000, 0x00111111, 0x01000001, // 006eh
0x01000001, 0x01000001, 0x01000001, 0x01000001,
0x00000000, 0x00000000, 0x00011100, 0x00100010, // 006fh
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x00000000, 0x00111101, 0x01000011, // 0070h
0x01000001, 0x01000011, 0x00111101, 0x00000001,
0x00000000, 0x00000000, 0x01011110, 0x01100001, // 0071h
0x01000001, 0x01100001, 0x01011110, 0x01000000,
0x00000000, 0x00000000, 0x00110001, 0x00001101, // 0072h
0x00000011, 0x00000001, 0x00000001, 0x00000001,
0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0073h
0x00001110, 0x00110000, 0x01000001, 0x00111110,
0x00000000, 0x00000100, 0x00000100, 0x01111111, // 0074h
0x00000100, 0x00000100, 0x00000100, 0x01111000,
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0075h
0x01000001, 0x01000001, 0x01000001, 0x01111110,
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0076h
0x00100010, 0x00100010, 0x00010100, 0x00001000,
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0077h
0x01001001, 0x00101010, 0x00101010, 0x00010100,
0x00000000, 0x00000000, 0x00100001, 0x00010010, // 0078h
0x00001100, 0x00001100, 0x00010010, 0x00100001,
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0079h
0x00100010, 0x00011100, 0x00001000, 0x00000110,
0x00000000, 0x00000000, 0x00111111, 0x00010000, // 007ah
0x00001000, 0x00000100, 0x00000010, 0x00111111,
0x00000000, 0x00001000, 0x00011110, 0x01100100, // 007bh
0x00011000, 0x00100100, 0x00000100, 0x01111000,
0x00000000, 0x00000000, 0x00011110, 0x00000100, // 007ch
0x00011110, 0x00110101, 0x00101101, 0x00010010,
0x00000000, 0x00000000, 0x00000000, 0x00010001, // 007dh
0x00100001, 0x00100001, 0x00000001, 0x00000010,
0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007eh
0x00011110, 0x00100000, 0x00100000, 0x00011100,
0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007fh
0x00111110, 0x00010000, 0x00001100, 0x00110010,
0x00000000, 0x00000000, 0x00000100, 0x00101111, // 0080h
0x01000100, 0x00011110, 0x00100101, 0x00010110,
0x00000000, 0x00000000, 0x00001010, 0x00011110, // 0081h
0x00101011, 0x00100010, 0x00010100, 0x00000100,
0x00000000, 0x00000000, 0x00001000, 0x00011101, // 0082h
0x00101011, 0x00101001, 0x00011001, 0x00000100,
0x00000000, 0x00000000, 0x00001000, 0x00111000, // 0083h
0x00001000, 0x00011110, 0x00101001, 0x00000110,
0x00000000, 0x00000000, 0x00000000, 0x00011100, // 0084h
0x00100011, 0x00100000, 0x00100000, 0x00011100,
0x00000000, 0x00000110, 0x01001001, 0x00110000, // 0085h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000100, 0x00111111, 0x00000100, // 0086h
0x00111110, 0x01010101, 0x01001101, 0x00100110,
0x00000000, 0x00000000, 0x00100001, 0x01000001, // 0087h
0x01000001, 0x01000001, 0x00000001, 0x00000010,
0x00000000, 0x00111100, 0x00000000, 0x00111110, // 0088h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x00011100, 0x00000000, 0x00111110, // 0089h
0x00010000, 0x00001000, 0x00010100, 0x01100010,
0x00000000, 0x00100100, 0x01011111, 0x00000100, // 008ah
0x00111110, 0x01000101, 0x01000101, 0x00100010,
0x00000000, 0x00100010, 0x01001111, 0x01010010, // 008bh
0x01010010, 0x00010010, 0x00010010, 0x00001001,
0x00000000, 0x00000100, 0x00111110, 0x00001000, // 008ch
0x00111110, 0x00010000, 0x00000010, 0x00111100,
0x00000000, 0x00100000, 0x00011000, 0x00000110, // 008dh
0x00000001, 0x00000110, 0x00011000, 0x00100000,
0x00000000, 0x00100000, 0x01111101, 0x00100001, // 008eh
0x00100001, 0x00100001, 0x00100001, 0x00010010,
0x00000000, 0x00011110, 0x00100000, 0x00000000, // 008fh
0x00000000, 0x00000001, 0x00000001, 0x00111110,
0x00000000, 0x00001000, 0x01111111, 0x00010000, // 0090h
0x00100000, 0x00000010, 0x00000010, 0x00111100,
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0091h
0x01000001, 0x01000001, 0x00100010, 0x00011100,
0x00000000, 0x00010000, 0x01111111, 0x00011000, // 0092h
0x00010100, 0x00010100, 0x00011000, 0x00001100,
0x00000000, 0x00100010, 0x01111111, 0x00100010, // 0093h
0x00100010, 0x00000010, 0x00000010, 0x01111100,
0x00000000, 0x00111100, 0x00010000, 0x00001100, // 0094h
0x01111111, 0x00001000, 0x00001000, 0x00110000,
0x00000000, 0x00000100, 0x00011111, 0x00000100, // 0095h
0x01110100, 0x00000010, 0x00001010, 0x01110010,
0x00000000, 0x00001000, 0x01111111, 0x00000100, // 0096h
0x00111100, 0x01000010, 0x01000000, 0x00111100,
0x00000000, 0x00000000, 0x00011100, 0x00100011, // 0097h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x01111111, 0x00010000, 0x00001000, // 0098h
0x00001000, 0x00001000, 0x00001000, 0x00110000,
0x00000000, 0x00000010, 0x00110010, 0x00001100, // 0099h
0x00000010, 0x00000001, 0x00000001, 0x00111110,
0x00000000, 0x00100100, 0x01001111, 0x01000010, // 009ah
0x00010001, 0x00111100, 0x00010010, 0x00001100,
0x00000000, 0x00000010, 0x01111010, 0x01000010, // 009bh
0x00000010, 0x00000010, 0x00001010, 0x01110010,
0x00000000, 0x00100010, 0x00111110, 0x01010010, // 009ch
0x01001011, 0x01101101, 0x01010101, 0x00110010,
0x00000000, 0x00110010, 0x01001011, 0x01000110, // 009dh
0x01000110, 0x01110010, 0x01001011, 0x00110010,
0x00000000, 0x00011100, 0x00101010, 0x01001001, // 009eh
0x01001001, 0x01000101, 0x01000101, 0x00110010,
0x00000000, 0x00100001, 0x01111101, 0x00100001, // 009fh
0x00100001, 0x00111001, 0x01100101, 0x00011001,
0x00000000, 0x00000100, 0x00100011, 0x01100010, // 00a0h
0x00100001, 0x00100001, 0x00010010, 0x00001100,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a1h
0x00000000, 0x00000100, 0x00001010, 0x00000100,
0x00000000, 0x01110000, 0x00010000, 0x00010000, // 00a2h
0x00010000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a3h
0x00001000, 0x00001000, 0x00001000, 0x00001110,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a4h
0x00000000, 0x00000010, 0x00000100, 0x00000100,
0x00000000, 0x00000000, 0x00000000, 0x00011000, // 00a5h
0x00011000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01111111, 0x01000000, 0x01111111, // 00a6h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x00000000, 0x00111111, 0x00100000, // 00a7h
0x00010100, 0x00001100, 0x00000100, 0x00000010,
0x00000000, 0x00000000, 0x00100000, 0x00100000, // 00a8h
0x00010000, 0x00001111, 0x00001000, 0x00001000,
0x00000000, 0x00000000, 0x00000100, 0x00111111, // 00a9h
0x00100001, 0x00100000, 0x00010000, 0x00001100,
0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00aah
0x00001000, 0x00001000, 0x00001000, 0x01111111,
0x00000000, 0x00000000, 0x00010000, 0x00111111, // 00abh
0x00011000, 0x00010100, 0x00010010, 0x00011001,
0x00000000, 0x00000000, 0x00000010, 0x00111111, // 00ach
0x00100010, 0x00010010, 0x00000100, 0x00000100,
0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00adh
0x00100000, 0x00100000, 0x00100000, 0x01111111,
0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00aeh
0x00111110, 0x00100000, 0x00100000, 0x00111110,
0x00000000, 0x00000000, 0x00100101, 0x00101010, // 00afh
0x00101010, 0x00100000, 0x00010000, 0x00001110,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00b0h
0x01111111, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01111111, 0x01000000, 0x00101000, // 00b1h
0x00011000, 0x00001000, 0x00001000, 0x00000100,
0x00000000, 0x01000000, 0x00100000, 0x00011000, // 00b2h
0x00010111, 0x00010000, 0x00010000, 0x00010000,
0x00000000, 0x00001000, 0x01111111, 0x01000001, // 00b3h
0x01000001, 0x01000000, 0x00100000, 0x00011000,
0x00000000, 0x00000000, 0x00111110, 0x00001000, // 00b4h
0x00001000, 0x00001000, 0x00001000, 0x01111111,
0x00000000, 0x00100000, 0x01111111, 0x00110000, // 00b5h
0x00101000, 0x00100100, 0x00100010, 0x00110001,
0x00000000, 0x00000100, 0x01111111, 0x01000100, // 00b6h
0x01000100, 0x01000100, 0x01000010, 0x00100001,
0x00000000, 0x00000100, 0x00111111, 0x00001000, // 00b7h
0x01111111, 0x00010000, 0x00010000, 0x00010000,
0x00000000, 0x01111100, 0x01000100, 0x01000100, // 00b8h
0x01000010, 0x01000000, 0x00100000, 0x00011000,
0x00000000, 0x00000010, 0x01111110, 0x00100010, // 00b9h
0x00100001, 0x00100000, 0x00010000, 0x00001100,
0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00bah
0x01000000, 0x01000000, 0x01000000, 0x01111110,
0x00000000, 0x00100010, 0x01111111, 0x00100010, // 00bbh
0x00100010, 0x00100000, 0x00010000, 0x00001100,
0x00000000, 0x00000011, 0x00000100, 0x01000011, // 00bch
0x01000100, 0x00100000, 0x00011000, 0x00000111,
0x00000000, 0x01111111, 0x01000000, 0x00100000, // 00bdh
0x00010000, 0x00011000, 0x00100100, 0x01000011,
0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00beh
0x00100010, 0x00000010, 0x00000010, 0x01111100,
0x00000000, 0x01000001, 0x01000010, 0x01000000, // 00bfh
0x00100000, 0x00100000, 0x00011000, 0x00000110,
0x00000000, 0x01111110, 0x01000010, 0x01001110, // 00c0h
0x01110001, 0x01000000, 0x00100000, 0x00011000,
0x00000000, 0x01100000, 0x00011110, 0x00010000, // 00c1h
0x01111111, 0x00010000, 0x00010000, 0x00001100,
0x00000000, 0x01000101, 0x01001010, 0x01001010, // 00c2h
0x01000000, 0x00100000, 0x00010000, 0x00001110,
0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00c3h
0x00010000, 0x00010000, 0x00001000, 0x00000110,
0x00000000, 0x00000010, 0x00000010, 0x00000110, // 00c4h
0x00011010, 0x01100010, 0x00000010, 0x00000010,
0x00000000, 0x00010000, 0x00010000, 0x01111111, // 00c5h
0x00010000, 0x00010000, 0x00001000, 0x00000110,
0x00000000, 0x00000000, 0x00111110, 0x00000000, // 00c6h
0x00000000, 0x00000000, 0x00000000, 0x01111111,
0x00000000, 0x01111110, 0x01000000, 0x01000100, // 00c7h
0x00101000, 0x00010000, 0x00101000, 0x01000110,
0x00000000, 0x00001000, 0x01111111, 0x00100000, // 00c8h
0x00010000, 0x00011100, 0x01101011, 0x00001000,
0x00000000, 0x01000000, 0x01000000, 0x01000000, // 00c9h
0x00100000, 0x00100000, 0x00011000, 0x00000111,
0x00000000, 0x00010010, 0x00100010, 0x00100010, // 00cah
0x01000010, 0x01000010, 0x01000001, 0x01000001,
0x00000000, 0x00000001, 0x00000001, 0x01111111, // 00cbh
0x00000001, 0x00000001, 0x00000001, 0x01111110,
0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cch
0x01000000, 0x00100000, 0x00010000, 0x00001110,
0x00000000, 0x00000000, 0x00000100, 0x00001010, // 00cdh
0x00010001, 0x00100001, 0x01000000, 0x00000000,
0x00000000, 0x00001000, 0x00001000, 0x01111111, // 00ceh
0x00001000, 0x00101010, 0x01001010, 0x01001001,
0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cfh
0x00100010, 0x00010100, 0x00001000, 0x00010000,
0x00000000, 0x00001110, 0x01110000, 0x00001110, // 00d0h
0x01110000, 0x00000110, 0x00011000, 0x01100000,
0x00000000, 0x00001000, 0x00001000, 0x00000100, // 00d1h
0x00000100, 0x00100010, 0x01000010, 0x01111111,
0x00000000, 0x01000000, 0x01000000, 0x00100100, // 00d2h
0x00101000, 0x00010000, 0x00101100, 0x01000011,
0x00000000, 0x01111111, 0x00000100, 0x01111111, // 00d3h
0x00000100, 0x00000100, 0x00000100, 0x01111000,
0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00d4h
0x00100010, 0x00010100, 0x00000100, 0x00000100,
0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00d5h
0x00100000, 0x00100000, 0x00100000, 0x01111111,
0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00d6h
0x01111110, 0x01000000, 0x01000000, 0x01111110,
0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00d7h
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00d8h
0x01000010, 0x01000000, 0x00100000, 0x00011000,
0x00000000, 0x00001010, 0x00001010, 0x00001010, // 00d9h
0x01001010, 0x01001010, 0x00101010, 0x00011001,
0x00000000, 0x00000010, 0x00000010, 0x01000010, // 00dah
0x01000010, 0x00100010, 0x00010010, 0x00001110,
0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dbh
0x01000001, 0x01000001, 0x01000001, 0x01111111,
0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dch
0x01000000, 0x01000000, 0x00100000, 0x00011100,
0x00000000, 0x01000011, 0x01000100, 0x01000000, // 00ddh
0x01000000, 0x00100000, 0x00010000, 0x00001111,
0x00000100, 0x00001000, 0x00000010, 0x00000100, // 00deh
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000100, 0x00001010, 0x00001010, 0x00000100, // 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,
};
/*---------------------- Character Data2 -------------------------*/
const unsigned int d_64_256_bg_schDT2[16 * 11] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0000h
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xf1f1f1f1, 0xf1f1f1f1, 0x00000000, 0x00000000, // ‰¡
0xf1f1f1f1, 0xf1f1f1f1, 0x00000000, 0x00000000,
0xf1f1f1f1, 0xf1f1f1f1, 0x00000000, 0x00000000,
0xf1f1f1f1, 0xf1f1f1f1, 0x00000000, 0x00000000,
0xf100f100, 0xf100f100, 0xf100f100, 0xf100f100, // <20>c
0xf100f100, 0xf100f100, 0xf100f100, 0xf100f100,
0xf100f100, 0xf100f100, 0xf100f100, 0xf100f100,
0xf100f100, 0xf100f100, 0xf100f100, 0xf100f100,
0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, // w
0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1,
0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1,
0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1, 0xf1f1f1f1,
0x00000000, 0x00000000, 0x00000000, 0x00000000, // blk
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x11111111, 0x11111111, 0x11111111, 0x11111111, // r
0x11111111, 0x11111111, 0x11111111, 0x11111111,
0x11111111, 0x11111111, 0x11111111, 0x11111111,
0x11111111, 0x11111111, 0x11111111, 0x11111111,
0x21212121, 0x21212121, 0x21212121, 0x21212121, // g
0x21212121, 0x21212121, 0x21212121, 0x21212121,
0x21212121, 0x21212121, 0x21212121, 0x21212121,
0x21212121, 0x21212121, 0x21212121, 0x21212121,
0x31313131, 0x31313131, 0x31313131, 0x31313131, // b
0x31313131, 0x31313131, 0x31313131, 0x31313131,
0x31313131, 0x31313131, 0x31313131, 0x31313131,
0x31313131, 0x31313131, 0x31313131, 0x31313131,
0x41414141, 0x41414141, 0x41414141, 0x41414141, // y
0x41414141, 0x41414141, 0x41414141, 0x41414141,
0x41414141, 0x41414141, 0x41414141, 0x41414141,
0x41414141, 0x41414141, 0x41414141, 0x41414141,
0x51515151, 0x51515151, 0x51515151, 0x51515151, // m
0x51515151, 0x51515151, 0x51515151, 0x51515151,
0x51515151, 0x51515151, 0x51515151, 0x51515151,
0x51515151, 0x51515151, 0x51515151, 0x51515151,
0x61616161, 0x61616161, 0x61616161, 0x61616161, // c
0x61616161, 0x61616161, 0x61616161, 0x61616161,
0x61616161, 0x61616161, 0x61616161, 0x61616161,
0x61616161, 0x61616161, 0x61616161, 0x61616161,
};
/* EOF */

View File

@ -0,0 +1,29 @@
/*---------------------------------------------------------------------------*
Project: TwlSDK - GX - demos - UnitTours/2D_CharBg_1
File: data.h
Copyright 2003 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: 2007-08-29#$
$Rev: 640 $
$Author: kitase_hirotake $
*---------------------------------------------------------------------------*/
#ifndef BG_DATA_H_
#define BG_DATA_H_
#define SCREEN_SIZE (32 * 24)
/*-------------------------- Data -------------------------------*/
#define CHAR_SIZE (16 * 128 * sizeof(int))
extern const unsigned int d_64_256_bg_schDT[8 * 256];
extern const unsigned int d_64_256_bg_schDT2[16 * 11];
extern const unsigned int d_64_256_bg_sclDT[8 * 16];
#endif

View File

@ -16,7 +16,7 @@
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
#include <twl.h> #include <twl.h>
#include "misc.h" #include "misc_simple.h"
#include "SimpleApp.h" #include "SimpleApp.h"
// extern data----------------------------------------------------------------- // extern data-----------------------------------------------------------------
@ -30,9 +30,6 @@ static void INTR_VBlank( void );
// static variable------------------------------------------------------------- // static variable-------------------------------------------------------------
BOOL g_isValidTSD; BOOL g_isValidTSD;
RTCDrawProperty g_rtcDraw = {
TRUE, RTC_DATE_TOP_X, RTC_DATE_TOP_Y, RTC_TIME_TOP_X, RTC_TIME_TOP_Y
};
// const data------------------------------------------------------------------ // const data------------------------------------------------------------------
@ -42,57 +39,19 @@ RTCDrawProperty g_rtcDraw = {
// ============================================================================ // ============================================================================
void TwlMain(void) void TwlMain(void)
{ {
myInit();
// 初期化----------------------------------
OS_Init();
OS_InitTick();
(void)OS_EnableIrq();
(void)OS_EnableInterrupts();
GX_Init();
GX_SetPower(GX_POWER_ALL); // 各ロジック パワーON
FS_Init( 3 );
// 割り込み許可----------------------------
(void)OS_SetIrqFunction(OS_IE_V_BLANK, INTR_VBlank);
(void)OS_EnableIrqMask(OS_IE_V_BLANK);
(void)GX_VBlankIntr(TRUE);
// デバイス初期化-------------------------------
TP_Init();
(void)RTC_Init();
// システムの初期化------------------
InitAllocator();
// ※本来ならランチャーからのパラメータチェックを行い、
// 初回起動シーケンスに入るパスがある
// TWL設定のリード
SYSM_SetAllocFunc( Alloc, Free ); // SYSM_ReadTWLSettingsFile()の実行に必要。
// ::::::::::::::::::::::::::::::::::::::::::::::
// TWL設定データファイルの読み込み
// ::::::::::::::::::::::::::::::::::::::::::::::
(void)LCFG_ReadHWSecureInfo();
g_isValidTSD = LCFG_ReadTWLSettings();
if( g_isValidTSD ) {
SYSM_CaribrateTP();
}
InitBG();
GetAndDrawRTCData( &g_rtcDraw, TRUE );
SimpleAppInit(); SimpleAppInit();
// ƒ<>ƒCƒ“ƒ<C692>[ƒv---------------------------- // ƒ<>ƒCƒ“ƒ<C692>[ƒv----------------------------
while(1){ while(1){
OS_WaitIrq(1, OS_IE_V_BLANK); // Vブランク割り込み待ち
ReadKeyPad(); // キー入力の取得 myPreMain();
ReadTP(); // TP入力の取得
SimpleAppMain(); SimpleAppMain();
myProMain();
OS_WaitIrq(1, OS_IE_V_BLANK); // Vブランク割り込み待ち
} }
} }

View File

@ -0,0 +1,154 @@
/*---------------------------------------------------------------------------*
Project: TwlIPL
File: misc.c
Copyright 2007 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: 2008-01-30#$
$Rev: 547 $
$Author: yoshida_teruhisa $
*---------------------------------------------------------------------------*/
#include <twl.h>
#include "misc_simple.h"
#include "data.h"
// define data-----------------------------------------------------------------
// extern data-----------------------------------------------------------------
// define data-----------------------------------------------------------------
// function's prototype-------------------------------------------------------
// global variable-------------------------------------------------------------
// static variable-------------------------------------------------------------
static u16 sScrnBuf[2][SCREEN_SIZE]; // Buffer for screen data(BG #0)
// const data------------------------------------------------------------------
void myInit( void )
{
//---------------------------------------------------------------------------
// Initialize:
// They enable IRQ interrupts, initialize VRAM, and set BG #0 for text mode.
//---------------------------------------------------------------------------
DEMOInitCommon();
DEMOInitVRAM();
DEMOInitDisplayBG0Only();
DEMOInitDisplaySubBG0Only();
//---------------------------------------------------------------------------
// Transmitting the character data and the palette data
//---------------------------------------------------------------------------
G2_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256,
GX_BG_COLORMODE_16,
GX_BG_SCRBASE_0x0800, GX_BG_CHARBASE_0x04000, GX_BG_EXTPLTT_01);
GX_LoadBG0Char(d_64_256_bg_schDT, 0, sizeof(d_64_256_bg_schDT));
GX_LoadBGPltt(d_64_256_bg_sclDT, 0, sizeof(d_64_256_bg_sclDT));
G2S_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256,
GX_BG_COLORMODE_16,
GX_BG_SCRBASE_0x1000, GX_BG_CHARBASE_0x08000, GX_BG_EXTPLTT_01);
GXS_LoadBG0Char(d_64_256_bg_schDT, 0, sizeof(d_64_256_bg_schDT));
GXS_LoadBGPltt(d_64_256_bg_sclDT, 0, sizeof(d_64_256_bg_sclDT));
GX_SetVisiblePlane(GX_PLANEMASK_BG0|GX_PLANEMASK_BG2);
GXS_SetVisiblePlane(GX_PLANEMASK_BG0|GX_PLANEMASK_BG2);
G2_SetBG0Priority(0);
G2S_SetBG0Priority(0);
GX_SetDispSelect(GX_DISP_SELECT_SUB_MAIN);
DEMOStartDisplay();
}
void myPreMain( void )
{
// 描画前クリア処理。まぁどのシーンでも使うので。
myDp_Cls16(MAIN_SCREEN);
myDp_Cls16(SUB_SCREEN);
DEMOReadKey();
}
void myProMain( void )
{
// Store the data onto the main memory, and invalidate the cache.
// キャッシュONになってると、CPUとDMAの見てるメモリの値が違って、悲しい事が起きる
DC_FlushRange(sScrnBuf[0], sizeof(sScrnBuf[0]));
DC_FlushRange(sScrnBuf[1], sizeof(sScrnBuf[1]));
// 描画後フリップ処理。まぁどのシーンでも使うので。
OS_WaitVBlankIntr(); // Waiting the end of VBlank interrupt
GX_LoadBG0Scr(sScrnBuf[0], 0, sizeof(sScrnBuf[0]));
GXS_LoadBG0Scr(sScrnBuf[1], 0, sizeof(sScrnBuf[1]));
}
void myDp_Cls16(MyScreen scr)
{
if( !(scr < SCREEN_MAX) ) return;
MI_CpuClear8((void *)sScrnBuf[scr],SCREEN_SIZE * sizeof(u16));
}
void myDp_Cls8(MyScreen scr)
{
if( !(scr < SCREEN_MAX) ) return;
MI_CpuClear8((void *)sScrnBuf[scr],SCREEN_SIZE * sizeof(u8));
}
void myDp_Putchar(s32 x, s32 y, u8 color, MyScreen scr, u8 c)
{
if( !(scr < SCREEN_MAX) ) return;
sScrnBuf[scr][(y * 32) + x] = (u16)((color << 12) | c);
}
void myDp_Write(s32 x, s32 y, u8 color, MyScreen scr, char* str)
{
while (*str) {
while (x >= 32) {
x -= 32;
y++;
}
while (y >= 24) {
return; // out of range
}
myDp_Putchar(x, y, color, scr, (u8)*str++);
x++;
}
}
void myDp_Printf(s32 x, s32 y, u8 color, MyScreen scr, const char *s, ...)
{
va_list vlist;
char temp[SCREEN_SIZE+1];
temp[sizeof(temp)-1] = 0;
va_start(vlist, s);
vsnprintf(temp, sizeof(temp) - 1, s, vlist);
va_end(vlist);
myDp_Write(x, y, color, scr, temp);
}
void myDp_DrawMenu( u16 csr, MyScreen scr, const MenuParam *param )
{
int l;
for( l=0; l<param->num; l++)
{
myDp_Printf( param->pos[l].x, param->pos[l].y,
(u8)( param->pos[l].enable ? ( l==csr ? param->select_color : param->normal_color ) : param->disable_color ),
scr, ( l==csr ? "=>%s" : " %s" ), param->str_elem[l] );
}
}

View File

@ -0,0 +1,97 @@
/*---------------------------------------------------------------------------*
Project: TwlIPL
File: misc.h
Copyright 2007 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: 2007-11-15#$
$Rev: 188 $
$Author: yoshida_teruhisa $
*---------------------------------------------------------------------------*/
#ifndef __MISC_SIMPLE_H__
#define __MISC_SIMPLE_H__
#include <twl.h>
#include <DEMO.h>
#ifdef __cplusplus
extern "C" {
#endif
// define data----------------------------------------------------------
#define MYPAD_IS_TRIG DEMO_IS_TRIG
#define MYPAD_IS_PRESS DEMO_IS_PRESS
// TXTColorPalette の色名 256色パレットへのロードを想定
enum
{
TXT_COLOR_BLACK=0,
TXT_COLOR_RED,
TXT_COLOR_GREEN,
TXT_COLOR_BLUE,
TXT_COLOR_YELLOW,
TXT_COLOR_PURPLE,
TXT_COLOR_LIGHTBLUE,
TXT_COLOR_DARKRED,
TXT_COLOR_DARKGREEN,
TXT_COLOR_DARKBLUE,
TXT_COLOR_DARKYELLOW,
TXT_COLOR_DARKPURPLE,
TXT_COLOR_DARKLIGHTBLUE,
TXT_COLOR_GRAY,
TXT_COLOR_DARKGRAY,
TXT_COLOR_WHITE
};
typedef enum
{
MAIN_SCREEN = 0,
SUB_SCREEN,
SCREEN_MAX
}
MyScreen;
// メニュー要素座標
typedef struct MenuPos {
BOOL enable;
int x;
int y;
}MenuPos;
// メニュー構成パラメータ構造体
typedef struct MenuParam {
int num;
int normal_color;
int select_color;
int disable_color;
MenuPos *pos;
const char **str_elem;
}MenuParam;
// global variables--------------------------------------------------
// function-------------------------------------------------------------
void myInit( void );
void myPreMain( void );
void myProMain( void );
void myDp_Cls16(MyScreen scr);
void myDp_Cls8(MyScreen scr);
void myDp_Putchar(s32 x, s32 y, u8 color, MyScreen scr, u8 c);
void myDp_Write(s32 x, s32 y, u8 color, MyScreen scr, char* str);
void myDp_Printf(s32 x, s32 y, u8 color, MyScreen scr, const char *s, ...);
void myDp_DrawMenu( u16 csr, MyScreen scr, const MenuParam *param );
#ifdef __cplusplus
}
#endif
#endif // __MISC_H__