mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
Delete build directory
This commit is contained in:
parent
beb6bcc435
commit
09c7b12b4e
@ -1,49 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlFirm - build
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
ifneq ($(TWL_KEYSDIR),)
|
||||
SUBDIRS = tools
|
||||
endif
|
||||
|
||||
SUBDIRS += libraries_sysmenu \
|
||||
components \
|
||||
systemMenu_RED
|
||||
|
||||
|
||||
ifneq ($(TWL_KEYSDIR),)
|
||||
SUBDIRS += libraries \
|
||||
nandfirm \
|
||||
gcdfirm \
|
||||
systemMenu_tools
|
||||
endif
|
||||
|
||||
ifdef TWL_IPL_WITH_TESTS
|
||||
SUBDIRS += tests
|
||||
endif
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,52 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL - commondefs - common definitions for build system
|
||||
# File: commondefs
|
||||
#
|
||||
# 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-09-06$
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
ifndef TWL_IPL_COMMONDEFS_
|
||||
TWL_IPL_COMMONDEFS_ = TRUE
|
||||
|
||||
#FIRM_USE_PRODUCT_KEYS = TRUE
|
||||
#SYSM_BUILD_FOR_DEBUGGER = TRUE
|
||||
|
||||
# 開発機で全ホワイトリストチェックを無視する場合TRUE (デフォルトはTRUE)
|
||||
SYSM_DEV_WHITELIST_CHECK_SKIP ?= TRUE
|
||||
|
||||
# バナーハッシュチェックを無視する場合TRUE (デフォルトは FALSE)
|
||||
#SYSM_IGNORE_DHT_PHASE_3 = TRUE
|
||||
|
||||
# 新ホワイトリストでなくてもFatalにならないようにしたい場合TRUE (デフォルトはTRUE)
|
||||
SYSM_IGNORE_DHT_EX_NOT_FOUND ?= TRUE
|
||||
|
||||
ifeq ($(TARGET_FIRM),SYSTEMMENU)
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs.sysmenu
|
||||
else
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs.firm
|
||||
endif
|
||||
|
||||
ifdef FIRM_USE_PRODUCT_KEYS
|
||||
MACRO_FLAGS += -DFIRM_USE_PRODUCT_KEYS=$(FIRM_USE_PRODUCT_KEYS)
|
||||
endif
|
||||
|
||||
ifneq ($(TWL_IPL_RED_PRIVATE_ROOT),)
|
||||
TWL_KEYSDIR := $(TWL_IPL_RED_PRIVATE_ROOT)/keys
|
||||
TWL_IPL_RED_PRIVATE_TOOLSDIR = $(call eupath,$(TWL_IPL_RED_PRIVATE_ROOT)/tools)
|
||||
endif
|
||||
|
||||
MAKEROM_FLAGS += -s
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
endif # TWL_IPL_COMMONDEFS_
|
||||
#----- End of commondefs -----
|
||||
@ -1,137 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlFirm - commondefs - common definitions for build system
|
||||
# File: commondefs
|
||||
#
|
||||
# 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-09-06$
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
ifndef TWLFIRM_COMMONDEFS_
|
||||
TWLFIRM_COMMONDEFS_ = TRUE
|
||||
|
||||
EMPTY ?=
|
||||
SPACE ?= $(EMPTY) $(EMPTY)
|
||||
|
||||
TARGET_BIN ?= $(TARGET_FIRM_BIN)
|
||||
|
||||
#
|
||||
# change default variables for product
|
||||
#
|
||||
override TARGET_PLATFORM := TWL
|
||||
override TWL_ARCHGEN := LIMITED
|
||||
override TWL_CODEGEN := ARM
|
||||
override TWL_MEMSIZE := 16M
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
### TWL-commondefs
|
||||
#
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
include $(TWLSDK_ROOT)/build/libraries/reboot/commondefs.reboot
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# TWL-FIRM path settings
|
||||
#
|
||||
|
||||
FIRM_ROOT := $(call eupath,$(TWL_IPL_RED_ROOT))
|
||||
FIRM_BUILDTOOLSDIR := $(FIRM_ROOT)/build/buildtools
|
||||
FIRM_BUILDSETUPDIR := $(FIRM_ROOT)/build/buildsetup
|
||||
FIRM_INCDIR := $(FIRM_ROOT)/include
|
||||
FIRM_TOOLSDIR := $(FIRM_ROOT)/tools
|
||||
FIRM_COMPONENTSDIR := $(FIRM_ROOT)/components
|
||||
FIRM_ADDINS ?= $(FIRM_ROOT)/add-ins
|
||||
|
||||
FIRM_LIBDIR = $(FIRM_ROOT)/lib/$(TWL_LIBTYPE)
|
||||
FIRM_LIBSUFFIX = .firm$(ARCHGEN_TYPE)$(CODEGEN_ARCH)
|
||||
|
||||
FIRM_SPECDIR := $(FIRM_INCDIR)/firm/specfiles
|
||||
FIRM_LSFARCH = $(TWL_LIBARCH)-FIRM
|
||||
FIRM_LCFARCH = $(FIRM_LSFARCH)
|
||||
DEFAULT_FIRM_LCFILE = $(FIRM_SPECDIR)/$(FIRM_LCFARCH).lcf
|
||||
DEFAULT_FIRM_LCFILE_TEMPLATE = $(FIRM_SPECDIR)/$(FIRM_LCFARCH).lcf.template
|
||||
DEFAULT_FIRM_LCFILE_SPEC = $(FIRM_SPECDIR)/$(FIRM_LSFARCH).lsf
|
||||
DEFAULT_FIRM_ROM_SPEC = $(FIRM_SPECDIR)/ROM-$(TWL_PLATFORM)-FIRM.rsf
|
||||
|
||||
### Compiler & Linker settings
|
||||
|
||||
# replace NitroSDK
|
||||
DEFAULT_LCFILE_TEMPLATE = $(DEFAULT_FIRM_LCFILE_TEMPLATE)
|
||||
DEFAULT_LCFILE_SPEC = $(DEFAULT_FIRM_LCFILE_SPEC)
|
||||
DEFAULT_ROM_SPEC = $(DEFAULT_FIRM_ROM_SPEC)
|
||||
|
||||
LDEPENDS_LCF += $(FIRM_BUILDTOOLSDIR)/commondefs
|
||||
LDEPENDS_RES += $(FIRM_BUILDTOOLSDIR)/commondefs
|
||||
|
||||
### SDK Library settings
|
||||
|
||||
ifeq ($(CODEGEN_PROC),ARM9)
|
||||
|
||||
FIRM_LIBS_BASE ?= \
|
||||
libos \
|
||||
libpxi \
|
||||
libfs \
|
||||
libfatfs \
|
||||
libmi \
|
||||
|
||||
else # ($(CODEGEN_PROC),ARM7)
|
||||
|
||||
FIRM_LIBS_BASE ?= \
|
||||
libos_sp \
|
||||
libpxi_sp \
|
||||
libfs_sp \
|
||||
libaes_sp \
|
||||
libpm_sp \
|
||||
libnvram_sp \
|
||||
|
||||
endif
|
||||
|
||||
FIRM_LIBS ?= $(addsuffix $(FIRM_LIBSUFFIX).a,$(FIRM_LIBS_BASE))
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# MY BUILD TOOLS
|
||||
#
|
||||
MAKENORFIRM = $(TWL_IPL_RED_PRIVATE_TOOLSDIR)/bin/makenorfirm.exe
|
||||
MAKENANDFIRM = $(TWL_IPL_RED_PRIVATE_TOOLSDIR)/bin/makenandfirm.exe
|
||||
MAKEGCDFIRM = $(TWL_IPL_RED_PRIVATE_TOOLSDIR)/bin/makegcdfirm.exe
|
||||
NTEXCONV := $(ROOT)/tools/bin/ntexconv.exe
|
||||
MAKEBANNER := $(TWL_TOOLSDIR)/bin/makebanner.TWL.exe
|
||||
|
||||
MAKEFIRM_FLAGS ?=
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
### Global Library resettings
|
||||
|
||||
GINCLUDES := $(FIRM_INCDIR) $(GINCLUDES)
|
||||
GLIBRARY_DIRS := $(FIRM_LIBDIR) $(GLIBRARY_DIRS)
|
||||
GLIBRARIES := $(FIRM_LIBS) $(GLIBRARIES)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# TWLFIRM_INSTALL_ROOT
|
||||
#
|
||||
|
||||
ifdef TWLFIRM_INSTALL_ROOT
|
||||
TWLFIRM_INSTALL_ROOT_ := $(TWLFIRM_INSTALL_ROOT)
|
||||
else
|
||||
TWLFIRM_INSTALL_ROOT_ := $(TWL_IPL_RED_ROOT)
|
||||
endif
|
||||
|
||||
FIRM_INSTALL_ROOT := $(subst $(SPACE),\ ,$(subst \,/,$(TWLFIRM_INSTALL_ROOT_)))
|
||||
FIRM_INSTALL_INCDIR := $(FIRM_INSTALL_ROOT)/include
|
||||
FIRM_INSTALL_TOOLSDIR := $(FIRM_INSTALL_ROOT)/tools
|
||||
FIRM_INSTALL_LIBDIR = $(FIRM_INSTALL_ROOT)/lib/$(TWL_LIBTYPE)
|
||||
FIRM_INSTALL_PROMDIR := $(FIRM_INSTALL_TOOLSDIR)/prom
|
||||
FIRM_INSTALL_COMPONENTSDIR := $(FIRM_INSTALL_ROOT)/components
|
||||
FIRM_INSTALL_ADDINS := $(FIRM_INSTALL_ROOT)/add-ins
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
endif # TWLFIRM_COMMONDEFS_
|
||||
#----- End of commondefs -----
|
||||
@ -1,119 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL - commondefs - common definitions for build system
|
||||
# File: commondefs
|
||||
#
|
||||
# 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-09-06$
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
ifndef TWL_SYSMENU_COMMONDEFS_
|
||||
TWL_SYSMENU_COMMONDEFS_ = TRUE
|
||||
|
||||
NITRO_NO_STD_PCHDR = TRUE # プリコンパイルヘッダ抑止
|
||||
|
||||
EMPTY ?=
|
||||
SPACE ?= $(EMPTY) $(EMPTY)
|
||||
|
||||
define toLower
|
||||
$(shell echo $(1) | tr '[A-Z]' '[a-z]' )
|
||||
endef # toLower
|
||||
|
||||
# デフォルトのCODEGENを指定(他のcommondefsの前で指定しておかないとダメ)
|
||||
TARGET_CODEGEN ?= THUMB
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
### TWL-commondefs
|
||||
#
|
||||
#include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
include $(NITROSYSTEM_ROOT)/build/buildtools/commondefs
|
||||
|
||||
# TwlSDK の TWLSYSTEM_* -> NITROSYSTEM_* 変更暫定対策
|
||||
# NitroSystemパッチが更新されれば不要のはず
|
||||
NITROSYSTEM_INCDIR ?= $(TWLSYSTEM_INCDIR)
|
||||
NITROSYSTEM_LIBDIR ?= $(TWLSYSTEM_LIBDIR)
|
||||
NITROSYSTEM_LIBS ?= $(TWLSYSTEM_LIBS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# TWL-SYSTEM-MENU path settings
|
||||
#
|
||||
|
||||
#SYSMENU_ROOT := $(subst $(SPACE),\ ,$(subst \,/,$(TWL_IPL_RED_ROOT)))
|
||||
SYSMENU_ROOT := $(call eupath,$(TWL_IPL_RED_ROOT))
|
||||
|
||||
SYSMENU_BUILDTOOLSDIR := $(SYSMENU_ROOT)/build/buildtools
|
||||
SYSMENU_INCDIR := $(SYSMENU_ROOT)/include \
|
||||
$(ROOT)/build/libraries/spi/ARM9/include \
|
||||
$(ROOT)/build/libraries/os/common/include \
|
||||
$(ROOT)/build/libraries/mb/common/include
|
||||
SYSMENU_TOOLSDIR := $(SYSMENU_ROOT)/tools
|
||||
SYSMENU_COMPONENTSDIR := $(SYSMENU_ROOT)/components
|
||||
|
||||
SYSMENU_ROM_HEADER_DIR = $(SYSMENU_ROOT)/RomHeader
|
||||
|
||||
|
||||
LDEPENDS_LCF += $(SYSMENU_BUILDTOOLSDIR)/commondefs.sysmenu
|
||||
LDEPENDS_RES += $(SYSMENU_BUILDTOOLSDIR)/commondefs.sysmenu
|
||||
|
||||
|
||||
ifneq ($(TARGET_TAD),)
|
||||
TARGETS += $(TARGET_TAD)
|
||||
endif
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
### SYSTEM_MENU Library settings
|
||||
|
||||
SYSMENU_LIBDIR := $(SYSMENU_ROOT)/lib/$(TWL_LIBTYPE)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# MY BUILD TOOLS
|
||||
#
|
||||
OPENSSL := $(SYSMENU_TOOLSDIR)/openssl/openssl.exe
|
||||
NTEXCONV := $(ROOT)/tools/bin/ntexconv.exe
|
||||
MAKEBANNER := $(TWL_TOOLSDIR)/bin/makebanner.TWL.exe
|
||||
|
||||
MAKESYSMENU_RSA_PRVKEY ?= $(SYSMENU_TOOLSDIR)/openssl/rsa_private.der
|
||||
MAKESYSMENU_RSA_PUBKEY ?= $(SYSMENU_TOOLSDIR)/openssl/rsa_public.der
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
### Global Library resettings
|
||||
|
||||
GINCLUDES := $(SYSMENU_INCDIR) $(GINCLUDES)
|
||||
ifneq ($(ES_ROOT),)
|
||||
GINCLUDES += $(ES_ROOT)/twl/include
|
||||
endif
|
||||
GLIBRARY_DIRS := $(SYSMENU_LIBDIR) $(GLIBRARY_DIRS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# TWLSYSMENU_INSTALL_ROOT
|
||||
#
|
||||
SYSMENU_INSTALL_ROOT := $(subst $(SPACE),\ ,$(subst \,/,$(TWL_IPL_RED_ROOT)))
|
||||
SYSMENU_INSTALL_INCDIR := $(SYSMENU_INSTALL_ROOT)/include
|
||||
SYSMENU_INSTALL_TOOLSDIR := $(SYSMENU_INSTALL_ROOT)/tools
|
||||
SYSMENU_INSTALL_LIBDIR := $(SYSMENU_INSTALL_ROOT)/lib/$(TWL_LIBTYPE)
|
||||
SYSMENU_INSTALL_COMPONENTSDIR := $(SYSMENU_INSTALL_ROOT)/components
|
||||
SDK_NMENU_DATADIR = $(ROOT)/build/tools/TwlNMenu/data
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
ifeq ($(SYSM_BUILD_FOR_DEBUGGER),TRUE)
|
||||
MACRO_FLAGS += -DSYSM_BUILD_FOR_DEBUGGER
|
||||
endif
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# ARM7コンポーネントにARMビルドを使用する
|
||||
|
||||
TWL_BUILDTYPE_ARM7 := $(subst $(CODEGEN_ARCH),,$(TWL_BUILDTYPE_ARM7))
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
endif # TWL_SYSMENU_COMMONDEFS_
|
||||
#----- End of commondefs -----
|
||||
@ -1,34 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL - modulerules - common rules for build system
|
||||
# File: modulerules
|
||||
#
|
||||
# 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-09-06$
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
ifndef TWL_IPL_MODULERULES_
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
### TWL-modulerules
|
||||
#
|
||||
|
||||
ifeq ($(TARGET_FIRM),SYSTEMMENU)
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules.sysmenu
|
||||
else
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules.firm
|
||||
endif
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
TWL_IPL_MODULERULES_ = TRUE
|
||||
endif # TWL_IPL_MODULERULES_
|
||||
#----- End of modulerules -----
|
||||
@ -1,92 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlFirm - modulerules - common rules for build system
|
||||
# File: modulerules
|
||||
#
|
||||
# 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-09-06$
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
ifndef TWLFIRM_MODULERULES_
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
### TWL-modulerules
|
||||
#
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# MAKEROM for IS-TWL-DEBUGGER
|
||||
#
|
||||
ifeq ($(filter $(MAKEROM_FLAGS),-F),)
|
||||
MAKEROM_FLAGS += -F
|
||||
endif
|
||||
|
||||
#
|
||||
# MAKENORFIRM / MAKENANDFIRM / MAKEGCDFIRM
|
||||
#
|
||||
MAKEFIRM_ARM7 ?= ARM7/bin/$(TWL_BUILDTYPE_ARM7)/main.tef
|
||||
MAKEFIRM_ARM9 ?= ARM9/bin/$(TWL_BUILDTYPE_ARM9)/main.tef
|
||||
MAKEFIRM_RSA_PRVKEY ?= $(TWL_KEYSDIR)/rsa/pubkey_nor.der
|
||||
|
||||
MAKEFIRM_ARM7_M := $(call empath,$(MAKEFIRM_ARM7))
|
||||
MAKEFIRM_ARM9_M := $(call empath,$(MAKEFIRM_ARM9))
|
||||
MAKEFIRM_RSA_PRVKEY_M := $(call empath,$(MAKEFIRM_RSA_PRVKEY))
|
||||
|
||||
MAKEFIRM_DEFS += -DFIRM_ROOT='$(FIRM_ROOT)' \
|
||||
-DMAKEFIRM_ARM9='$(basename $(MAKEFIRM_ARM9_M))' \
|
||||
-DMAKEFIRM_ARM7='$(basename $(MAKEFIRM_ARM7_M))' \
|
||||
-DMAKEFIRM_RSA_PRVKEY='$(MAKEFIRM_RSA_PRVKEY_M)' \
|
||||
|
||||
ifdef TWL_KEYSDIR
|
||||
ifeq ($(TWL_IPL_RED_PRIVATE_ROOT),)
|
||||
MAKEGCDFIRM_FLAGS += -t'$(TWLSDK_ROOT)/tools/bin/rom_header.template.sbin'
|
||||
else
|
||||
MAKEGCDFIRM_FLAGS += -t'$(TWL_KEYSDIR)/blowfish/gcdfirm_header_twlj.template.sbin'
|
||||
endif
|
||||
else
|
||||
MAKEGCDFIRM_FLAGS += -t'$(FIRM_ROOT)/build/tools/makegcdfirm/gcdfirm_header_twlj.template.sbin'
|
||||
endif
|
||||
|
||||
FIRM_SDEPENDS_BIN := \
|
||||
$(call eupath,$(MAKEFIRM_ARM9)) \
|
||||
$(call eupath,$(MAKEFIRM_ARM7))
|
||||
|
||||
|
||||
.PHONY: firmtop firmlib
|
||||
|
||||
firmtop:
|
||||
@$(MAKE) -C $(TWL_IPL_RED_ROOT)/build
|
||||
|
||||
firmlib:
|
||||
@$(MAKE) -C $(TWL_IPL_RED_ROOT)/build/libraries
|
||||
|
||||
# .nor
|
||||
$(BINDIR)/%.nor: $(FIRM_SDEPENDS_BIN) $(FIRM_SPEC) $(LDEPENDS_BIN) $(EDEPENDS_BIN) $(MAKEFILE)
|
||||
$(MAKENORFIRM) $(MAKEFIRM_FLAGS) $(MAKEFIRM_DEFS) $(FIRM_SPEC) $@
|
||||
|
||||
# .nand
|
||||
$(BINDIR)/%.nand: $(FIRM_SDEPENDS_BIN) $(FIRM_SPEC) $(LDEPENDS_BIN) $(EDEPENDS_BIN) $(MAKEFILE)
|
||||
$(MAKENANDFIRM) $(MAKEFIRM_FLAGS) $(MAKEFIRM_DEFS) $(FIRM_SPEC) $@
|
||||
|
||||
# .gcd
|
||||
$(BINDIR)/%.gcd: $(FIRM_SDEPENDS_BIN) $(FIRM_SPEC) $(LDEPENDS_BIN) $(EDEPENDS_BIN) $(MAKEFILE)
|
||||
$(MAKEGCDFIRM) $(MAKEFIRM_FLAGS) $(MAKEGCDFIRM_FLAGS) $(MAKEFIRM_DEFS) $(FIRM_SPEC) $@
|
||||
|
||||
# .rbin
|
||||
$(BINDIR)/$(TARGET_BIN_BASENAME).rbin: $(OBJS)
|
||||
objcopy -I elf32-little -O binary $< $@
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
TWLFIRM_MODULERULES_ = TRUE
|
||||
endif # TWLFIRM_MODULERULES_
|
||||
#----- End of modulerules -----
|
||||
@ -1,34 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL - modulerules - common rules for build system
|
||||
# File: modulerules
|
||||
#
|
||||
# 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-09-06$
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
ifndef TWL_SYSMENU_MODULERULES_
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
### TWL-modulerules
|
||||
#
|
||||
#include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
include $(NITROSYSTEM_ROOT)/build/buildtools/modulerules
|
||||
|
||||
|
||||
# .rbin
|
||||
$(BINDIR)/$(TARGET_BIN_BASENAME).rbin: $(OBJS)
|
||||
objcopy -I elf32-little -O binary $< $@
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
TWL_SYSMENU_MODULERULES_ = TRUE
|
||||
endif # TWL_SYSMENU_MODULERULES_
|
||||
#----- End of modulerules -----
|
||||
@ -1,33 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlFirm - build
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = \
|
||||
hyena.TWL \
|
||||
jackal.TWL
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,149 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# Main memory にコードを退避させたathdrvを使用。(for test)
|
||||
TMP_WL_MAIN ?= FALSE
|
||||
|
||||
TARGET_FIRM = SYSTEMMENU
|
||||
override TARGET_PLATFORM = TWL
|
||||
override TWL_PROC = ARM7
|
||||
override TWL_ARCHGEN = LIMITED
|
||||
TWL_NO_STD_PCHDR = True
|
||||
override TARGET_CODEGEN = ARM
|
||||
|
||||
FIRM_LIBSUFFIX = .firm$(ARCHGEN_TYPE)$(CODEGEN_ARCH)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = $(SYSMENU_ROOT)/build/libraries/aes \
|
||||
wram_regs
|
||||
|
||||
SRCS = crt0.LTD.c \
|
||||
main.c \
|
||||
initScfg.c
|
||||
|
||||
TARGET_NAME = hyena
|
||||
|
||||
TARGET_NEF = $(TARGET_NAME).tef
|
||||
|
||||
ifeq ($(TMP_WL_MAIN), TRUE)
|
||||
LCFILE_SPEC = $(TARGET_NAME)_wlmain.lsf
|
||||
else
|
||||
LCFILE_SPEC = $(TARGET_NAME).lsf
|
||||
endif
|
||||
|
||||
LCFILE_TEMPLATE = $(TARGET_NAME).lcf.template
|
||||
LDRES_TEMPLATE = $(ROOT)/build/components/racoon.TWL/racoon.response.template
|
||||
|
||||
# crt0.oは、ランチャー向けに特殊ビルドしたものを使用
|
||||
CRT0_O = $(OBJDIR)/crt0.LTD.o
|
||||
|
||||
# スタック不足防止の為、インライン展開せずにコンパイルする
|
||||
CCFLAGS_OPT = -O4 -inline off
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||
|
||||
# crt0.o 、 libpm_sp および libnwm_sp は、ローカルでビルドしたものを使用するので、除外する。
|
||||
ifeq ($(TMP_WL_MAIN), TRUE)
|
||||
GLIBRARIES := $(filter-out $(CRT0_O) libpm_sp$(TWL_LIBSUFFIX).a libnwm_sp$(TWL_LIBSUFFIX).a libathdrv_sp$(TWL_LIBSUFFIX).a,$(GLIBRARIES))
|
||||
else
|
||||
GLIBRARIES := $(filter-out $(CRT0_O) libpm_sp$(TWL_LIBSUFFIX).a libnwm_sp$(TWL_LIBSUFFIX).a,$(GLIBRARIES))
|
||||
endif
|
||||
|
||||
ifdef TWLSDK_NOCRYPTO
|
||||
CCFLAGS += -DSDK_NOCRYPTO
|
||||
endif
|
||||
|
||||
ifndef TWLSDK_NOCRYPTO
|
||||
MAKELCF_FLAGS += -DUSE_CRYPTO_LIBS='libsea_sp$(TWL_LIBSUFFIX).a libcrypto_sp$(TWL_LIBSUFFIX).a'
|
||||
MACRO_FLAGS += -DSDK_SEA
|
||||
endif
|
||||
|
||||
MACRO_FLAGS += -DSDK_NOINIT \
|
||||
-DSDK_SYSMENU_BUILD
|
||||
#MACRO_FLAGS += -DSDK_ARM7COMP_LTD
|
||||
|
||||
ifeq ($(DEFAULT_COMP_ARM7),hyena)
|
||||
MACRO_FLAGS += -DUSE_HYENA_COMPONENT
|
||||
endif
|
||||
|
||||
MAKELCF_FLAGS += -DADDRESS_LTDWRAM='0x037a0000' \
|
||||
-DADDRESS_FLXMAIN='0x02280200' \
|
||||
-DADDRESS_BOOTCORE='0x0380f000' \
|
||||
-DCRT0_O='$(CRT0_O)' \
|
||||
-DFIRM_LIBSUFFIX='$(FIRM_LIBSUFFIX)'
|
||||
|
||||
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 \
|
||||
$(ROOT)/build/libraries/spi/ARM7/pm/include \
|
||||
$(ROOT)/build/libraries/init/common/include \
|
||||
$(ROOT)/build/libraries/reboot/common/include \
|
||||
$(SYSMENU_ROOT)/build/libraries_sysmenu/sysmenu/common/include
|
||||
|
||||
SYSMENU_LIBS = \
|
||||
libsysmenu_sp$(TWL_LIBSUFFIX).a \
|
||||
libsysmmcu_sp$(TWL_LIBSUFFIX).a \
|
||||
libboot_sp$(TWL_LIBSUFFIX).a \
|
||||
libds_sp$(TWL_LIBSUFFIX).a \
|
||||
libhotsw_sp$(TWL_LIBSUFFIX).a \
|
||||
libdht_sp$(TWL_LIBSUFFIX).a \
|
||||
libpm_sp.SYSMENU$(TWL_LIBSUFFIX).a
|
||||
|
||||
ifeq ($(TMP_WL_MAIN), TRUE)
|
||||
SYSMENU_LIBS += \
|
||||
libathdrv_sp.SYSMENU$(TWL_LIBSUFFIX).a
|
||||
endif
|
||||
|
||||
SDK_APPEND_LIBS = \
|
||||
libwl_sp$(TWL_LIBSUFFIX).a \
|
||||
libaes_sp$(FIRM_LIBSUFFIX).a \
|
||||
libsea_sp$(TWL_LIBSUFFIX).a \
|
||||
libreboot_sp$(TWL_LIBSUFFIX).a
|
||||
|
||||
LLIBRARIES += $(SYSMENU_LIBS) $(SDK_APPEND_LIBS)
|
||||
|
||||
LLIBRARY_DIRS += ./
|
||||
|
||||
ifeq ($(TMP_WL_MAIN), TRUE)
|
||||
LLIBRARY_DIRS += $(SYSMENU_ROOT)/lib/TwlWireless/$(TWL_LIBTYPE)
|
||||
endif
|
||||
|
||||
LDEPENDS_NEF = $(TWL_LIBS) $(LLIBRARIES)
|
||||
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,932 +0,0 @@
|
||||
#---------------------------------------------------------------------------
|
||||
# Project: TwlIPL
|
||||
# File: hyena.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:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# check.XXX は、ランチャーがロード可能なサイズおよびautoload後のメモリマップに応じて制限サイズを設定する。
|
||||
|
||||
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 = 0x037a0000, LENGTH = 0x6a000 > 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 = 0x02280200, LENGTH = 0xf8000 > 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>
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.rsvwram>
|
||||
<AUTOLOAD.OBJECT=.rsvwram:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.rsvwram>
|
||||
<AUTOLOAD.LIBRARY=.rsvwram:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
. = 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>
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.rsvwram>
|
||||
<AUTOLOAD.OBJECT=.rsvwram.bss:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.rsvwram>
|
||||
<AUTOLOAD.LIBRARY=.rsvwram.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_MOUNT_INFO_TABLE = SDK_AUTOLOAD.WRAM.BSS_END;
|
||||
SDK_AUTOLOAD_WRAM_BSS_END = SDK_MOUNT_INFO_TABLE + 0x400;
|
||||
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_SEA_KEY_STORE = SDK_AUTOLOAD_WRAM_BSS_END;
|
||||
SDK_WRAM_ARENA_LO = SDK_AUTOLOAD_WRAM_BSS_END + 0x40;
|
||||
|
||||
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 = SDK_STATIC_BSS_END;
|
||||
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 SDK_MOUNT_INFO_TABLE; # address of the FS mount information table
|
||||
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
|
||||
|
||||
}
|
||||
@ -1,227 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL
|
||||
# File: hyena.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:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# Nitro LCF SPEC FILE
|
||||
#
|
||||
#--------
|
||||
Static $(TARGET_NAME)
|
||||
{
|
||||
Address $(ADDRESS_FLXMAIN)
|
||||
Library $(CRT0_O)
|
||||
Object $(OBJDIR)/initScfg.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.SYSMENU$(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)
|
||||
|
||||
#####
|
||||
# Sub-routines in TWL WIRELESS Driver , that should be on WRAM.
|
||||
Object OBJECT( BMILZData, libathdrv_sp$(LIBSUFFIX).a ) (.text)
|
||||
Object OBJECT( bmiBufferSend, libathdrv_sp$(LIBSUFFIX).a ) (.text)
|
||||
Object OBJECT( BMIWriteMemory, libathdrv_sp$(LIBSUFFIX).a ) (.text)
|
||||
|
||||
Library libboot_sp$(LIBSUFFIX).a \
|
||||
libreboot_sp$(LIBSUFFIX).a \
|
||||
libhotsw_sp$(LIBSUFFIX).a \
|
||||
libreloc_info_sp$(LIBSUFFIX).a \
|
||||
libsysmenu_sp$(LIBSUFFIX).a \
|
||||
libsysmmcu_sp$(LIBSUFFIX).a \
|
||||
libds_sp$(LIBSUFFIX).a \
|
||||
libaes_sp$(FIRM_LIBSUFFIX).a \
|
||||
libsea_sp$(LIBSUFFIX).a \
|
||||
libcrypto_sp$(LIBSUFFIX).a
|
||||
|
||||
|
||||
# FATFS core symbols
|
||||
Object OBJECT(FATFSi_lfi2text, libfatfs_sp$(LIBSUFFIX).a) (.text) # 360 BYTEs
|
||||
Object OBJECT(FATFSi_pc_findin, libfatfs_sp$(LIBSUFFIX).a) (.text) # 904 BYTEs
|
||||
Object OBJECT(FATFSi_pc_patcmp_vfat, libfatfs_sp$(LIBSUFFIX).a) (.text) # 436 BYTEs
|
||||
Object OBJECT(FATFSi_pc_ascii_mfile, libfatfs_sp$(LIBSUFFIX).a) (.text) # 160 BYTEs
|
||||
Object OBJECT(FATFSi_map_ascii_to_unicode, libfatfs_sp$(LIBSUFFIX).a) (.text) # 48 BYTEs
|
||||
Object OBJECT(SDCARD_Intr_Thread, libfatfs_sp$(LIBSUFFIX).a) (.text) # 520 BYTEs
|
||||
Object OBJECT(FATFSi_unicode_cmp_to_ascii_char, libfatfs_sp$(LIBSUFFIX).a) (.text) # 40 BYTEs
|
||||
Object OBJECT(FATFSi_pc_read_blk, libfatfs_sp$(LIBSUFFIX).a) (.text) # 352 BYTEs
|
||||
|
||||
#RTFS
|
||||
Object OBJECT(FATFSi_rtfs_memset, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x18 BYTEs
|
||||
Object OBJECT(FATFSi_faxx_check_free_space, libfatfs_sp$(LIBSUFFIX).a) (.text) # 108 BYTEs
|
||||
Object OBJECT(fat32_check_freespace, libfatfs_sp$(LIBSUFFIX).a) (.text) # 216 BYTEs
|
||||
Object OBJECT(fat16_check_freespace, libfatfs_sp$(LIBSUFFIX).a) (.text) # 216 BYTEs
|
||||
|
||||
#Driver
|
||||
Object OBJECT(SDCARDi_CpuReadFifoAes, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x70 BYTEs
|
||||
Object OBJECT(SDCARDi_DmaReadFifoAes, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x64 BYTEs
|
||||
Object OBJECT(SDCARDi_CpuWriteFifoAes, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x94 BYTEs
|
||||
Object OBJECT(SDCARDi_DmaWriteFifoAes, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x88 BYTEs
|
||||
Object OBJECT(SYSFPGA_irq, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x17C BYTEs
|
||||
Object OBJECT(SDCARDi_CpuRecvFast, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x40 BYTEs
|
||||
Object OBJECT(SDCARDi_CpuSendFast, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x40 BYTEs
|
||||
Object OBJECT(SD_OrFPGA, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x34 BYTEs
|
||||
Object OBJECT(SD_AndFPGA, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x34 BYTEs
|
||||
Object OBJECT(SD_SetFPGA, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x2C BYTEs
|
||||
Object OBJECT(SD_GetFPGA, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x30 BYTEs
|
||||
Object OBJECT(SD_CheckFPGAReg, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x10 BYTEs
|
||||
Object OBJECT(NDMA_irq_Handler, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x54 BYTEs
|
||||
Object OBJECT(SDCARD_irq_Handler, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0xD8 BYTEs
|
||||
|
||||
Object OBJECT(SDCARDi_ReadCore, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x194 BYTEs
|
||||
Object OBJECT(SDCARDi_WriteCore, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x34C BYTEs
|
||||
Object OBJECT(SDCARD_TimerStart, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x64 BYTEs
|
||||
Object OBJECT(SDCARD_TimerStop, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x30 BYTEs
|
||||
Object OBJECT(SDCARDi_Access, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x12C BYTEs
|
||||
|
||||
Object OBJECT(SD_Command, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0xF0 BYTEs
|
||||
Object OBJECT(SD_SendStatus, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x40 BYTEs
|
||||
Object OBJECT(SD_MultiReadBlock, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x7C BYTEs
|
||||
Object OBJECT(SD_MultiWriteBlock, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x7C BYTEs
|
||||
Object OBJECT(SD_TransCommand, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0xA8 BYTEs
|
||||
Object OBJECT(SD_TransReadyFPGA, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x8C BYTEs
|
||||
Object OBJECT(SD_TransEndFPGA, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x78 BYTEs
|
||||
Object OBJECT(SD_CheckStatus, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0xC0 BYTEs
|
||||
Object OBJECT(SD_EnableClock, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x18 BYTEs
|
||||
Object OBJECT(SD_DisableClock, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x1C BYTEs
|
||||
Object OBJECT(SD_EnableSeccnt, libfatfs_sp$(LIBSUFFIX).a) (.text) # 0x34 BYTEs
|
||||
|
||||
Object * (.rsvwram)
|
||||
}
|
||||
|
||||
#--------
|
||||
Ltdautoload LTDMAIN
|
||||
{
|
||||
After $(TARGET_NAME)
|
||||
|
||||
Object * (.ltdmain)
|
||||
Library libwm_sp$(LIBSUFFIX).a \
|
||||
libnwm_sp.SYSMENU$(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 \
|
||||
libdht_sp$(LIBSUFFIX).a \
|
||||
$(USE_CRYPTO_LIBS)
|
||||
Library $(ISDBG_LIBS_TWL)
|
||||
Library $(ISDBG_LIBS_NITRO)
|
||||
}
|
||||
|
||||
# BootROMの鍵データが0x0380c400~にあるので、hyenaのWRAM配置の上限はその値になることに注意。
|
||||
@ -1,185 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL
|
||||
# File: hyena.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:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# Nitro LCF SPEC FILE
|
||||
#
|
||||
#--------
|
||||
Static $(TARGET_NAME)
|
||||
{
|
||||
Address $(ADDRESS_FLXMAIN)
|
||||
Library $(CRT0_O)
|
||||
Object $(OBJDIR)/initScfg.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.SYSMENU$(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)
|
||||
|
||||
#####
|
||||
# Sub-routines in TWL WIRELESS Driver , that should be on WRAM.
|
||||
Object OBJECT( BMILZData, libathdrv_sp.SYSMENU$(LIBSUFFIX).a ) (.text)
|
||||
Object OBJECT( bmiBufferSend, libathdrv_sp.SYSMENU$(LIBSUFFIX).a ) (.text)
|
||||
Object OBJECT( BMIWriteMemory, libathdrv_sp.SYSMENU$(LIBSUFFIX).a ) (.text)
|
||||
|
||||
Library libboot_sp$(LIBSUFFIX).a \
|
||||
libreboot_sp$(LIBSUFFIX).a \
|
||||
libhotsw_sp$(LIBSUFFIX).a \
|
||||
libreloc_info_sp$(LIBSUFFIX).a \
|
||||
libsysmenu_sp$(LIBSUFFIX).a \
|
||||
libsysmmcu_sp$(LIBSUFFIX).a \
|
||||
libaes_sp.firm.LTD.a \
|
||||
libsea_sp$(LIBSUFFIX).a \
|
||||
libcrypto_sp$(LIBSUFFIX).a
|
||||
|
||||
# FATFS core symbols
|
||||
Object OBJECT(FATFSi_lfi2text, libfatfs_sp$(LIBSUFFIX).a) (.text) # 360 BYTEs
|
||||
Object OBJECT(FATFSi_pc_findin, libfatfs_sp$(LIBSUFFIX).a) (.text) # 904 BYTEs
|
||||
Object OBJECT(FATFSi_pc_patcmp_vfat, libfatfs_sp$(LIBSUFFIX).a) (.text) # 436 BYTEs
|
||||
Object OBJECT(FATFSi_pc_ascii_mfile, libfatfs_sp$(LIBSUFFIX).a) (.text) # 160 BYTEs
|
||||
Object OBJECT(FATFSi_map_ascii_to_unicode, libfatfs_sp$(LIBSUFFIX).a) (.text) # 48 BYTEs
|
||||
Object OBJECT(SDCARD_Intr_Thread, libfatfs_sp$(LIBSUFFIX).a) (.text) # 520 BYTEs
|
||||
Object OBJECT(FATFSi_unicode_cmp_to_ascii_char, libfatfs_sp$(LIBSUFFIX).a) (.text) # 40 BYTEs
|
||||
Object OBJECT(FATFSi_pc_read_blk, libfatfs_sp$(LIBSUFFIX).a) (.text) # 352 BYTEs
|
||||
|
||||
Object * (.rsvwram)
|
||||
}
|
||||
|
||||
#--------
|
||||
Ltdautoload LTDMAIN
|
||||
{
|
||||
After $(TARGET_NAME)
|
||||
|
||||
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.SYSMENU$(LIBSUFFIX).a
|
||||
|
||||
Library libfatfs_sp$(LIBSUFFIX).a \
|
||||
libdht_sp$(LIBSUFFIX).a \
|
||||
$(USE_CRYPTO_LIBS)
|
||||
Library $(ISDBG_LIBS_TWL)
|
||||
Library $(ISDBG_LIBS_NITRO)
|
||||
}
|
||||
|
||||
# BootROMの鍵データが0x0380c400~にあるので、hyenaのWRAM配置の上限はその値になることに注意。
|
||||
@ -1,736 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - libraries - init - ARM7.TWL
|
||||
File: crt0.LTD.c
|
||||
|
||||
Copyright 2007 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#include <nitro/types.h>
|
||||
#include <nitro/hw/common/armArch.h>
|
||||
#include <nitro/os/common/emulator.h>
|
||||
#include <nitro/os/common/printf.h>
|
||||
#include <twl/init/crt0.h>
|
||||
#include <twl/memorymap_sp.h>
|
||||
#include <twl/hw/common/mmap_wramEnv.h>
|
||||
#include <twl/os/common/format_rom.h>
|
||||
#include "boot_sync.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void _start(void);
|
||||
void _start_AutoloadDoneCallback(void* argv[]);
|
||||
void INIT_InitializeScfg(void);
|
||||
|
||||
#define SDK_NITROCODE_LE 0x2106c0de
|
||||
#define SDK_NITROCODE_BE 0xdec00621
|
||||
|
||||
#define SDK_TWLCODE_LE 0x6314c0de
|
||||
#define SDK_TWLCODE_BE 0xdec01463
|
||||
|
||||
/* 外部関数参照定義 */
|
||||
extern void OS_IrqHandler(void);
|
||||
extern void _fp_init(void);
|
||||
extern void __call_static_initializers(void);
|
||||
|
||||
/* 内部関数プロトタイプ定義 */
|
||||
static void INITi_DoAutoload(void);
|
||||
static BOOL INITi_IsRunOnTwl( void );
|
||||
static void INITi_CopySysConfig( void );
|
||||
static void INITi_DetectMainMemorySize(void);
|
||||
#ifndef SDK_NOINIT
|
||||
static void INITi_ShelterStaticInitializer(u32* ptr);
|
||||
static void INITi_CallStaticInitializers(void);
|
||||
#endif
|
||||
static void* INITi_Copy32(void* dst, void* src, u32 size);
|
||||
static void* INITi_Fill32(void* dst, u32 value, u32 size);
|
||||
|
||||
/* リンカスクリプトにより定義されるシンボル参照 */
|
||||
extern void SDK_AUTOLOAD_LIST(void);
|
||||
extern void SDK_AUTOLOAD_LIST_END(void);
|
||||
extern void SDK_AUTOLOAD_START(void);
|
||||
extern void SDK_STATIC_BSS_START(void);
|
||||
extern void SDK_STATIC_BSS_END(void);
|
||||
|
||||
#ifdef USE_HYENA_COMPONENT
|
||||
void* const _start_ModuleParams[] =
|
||||
{
|
||||
(void*)SDK_AUTOLOAD_LIST,
|
||||
(void*)SDK_AUTOLOAD_LIST_END,
|
||||
(void*)SDK_AUTOLOAD_START,
|
||||
(void*)SDK_STATIC_BSS_START,
|
||||
(void*)SDK_STATIC_BSS_END,
|
||||
(void*)0, // CompressedStaticEnd. This fixed number will be updated by compstatic tool.
|
||||
(void*)0, // SDK_VERSION_ID // SDK version info /* [TODO] ビルドを通すため */
|
||||
(void*)SDK_NITROCODE_BE,
|
||||
(void*)SDK_NITROCODE_LE,
|
||||
};
|
||||
#else
|
||||
void* const _start_ModuleParams[] =
|
||||
{
|
||||
(void*)0,
|
||||
(void*)0,
|
||||
(void*)0,
|
||||
(void*)SDK_STATIC_BSS_START,
|
||||
(void*)SDK_STATIC_BSS_END,
|
||||
(void*)0,
|
||||
(void*)0,
|
||||
(void*)SDK_NITROCODE_BE,
|
||||
(void*)SDK_NITROCODE_LE,
|
||||
};
|
||||
#endif
|
||||
|
||||
extern void SDK_LTDAUTOLOAD_LIST(void);
|
||||
extern void SDK_LTDAUTOLOAD_LIST_END(void);
|
||||
extern void SDK_LTDAUTOLOAD_START(void);
|
||||
|
||||
void* const _start_LtdModuleParams[] =
|
||||
{
|
||||
(void*)SDK_LTDAUTOLOAD_LIST,
|
||||
(void*)SDK_LTDAUTOLOAD_LIST_END,
|
||||
(void*)SDK_LTDAUTOLOAD_START,
|
||||
(void*)0, // CompressedLtdautoloadEnd. This fixed number will be updated by compstatic tool.
|
||||
(void*)SDK_TWLCODE_BE,
|
||||
(void*)SDK_TWLCODE_LE,
|
||||
};
|
||||
|
||||
|
||||
#ifdef DEBUG_WRAM_SETTING
|
||||
u32 const wramMapping[12] = {
|
||||
0x8d898581, 0x8c888480, 0x9c989490, 0x8c888480,
|
||||
0x9c989490, 0x00000000, 0x09403900, 0x09803940,
|
||||
0x080037c0, 0x09403900, 0x09803940, 0x0000000f
|
||||
};
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: ShakeHand
|
||||
Description: ARM9 の ShakeHand 関数と同期を取る。
|
||||
メインメモリでないメモリ空間で実行される必要がある。
|
||||
Arguments: r0 - ARM9 同期用変数へのポインタ。
|
||||
r1 - ARM7 同期用変数へのポインタ。
|
||||
Returns: なし。
|
||||
*---------------------------------------------------------------------------*/
|
||||
static const u32 microcode_ShakeHand[10] =
|
||||
{
|
||||
0xe1d020b0, /* ldrh r2, [r0] ; 同期変数9を共有メモリから読む */
|
||||
0xe1d130b0, /* ldrh r3, [r1] ; 同期変数7を共有メモリから読む */
|
||||
0xe2833001, /* @1: add r3, r3, #1 ; 同期変数7 ++ */
|
||||
0xe1c130b0, /* strh r3, [r1] ; 同期変数7を共有メモリに書く */
|
||||
0xe1d0c0b0, /* ldrh r12, [r0] ; 同期変数9の現状を共有メモリから読む */
|
||||
0xe152000c, /* cmp r2, r12 ; 同期変数9の変化を判定する */
|
||||
0x0afffffa, /* beq @1 ; 変化していなければループ */
|
||||
0xe2833001, /* add r3, r3, #1 ; 同期変数7 ++ */
|
||||
0xe1c130b0, /* strh r3, [r1] ; 同期変数7を共有メモリに書く */
|
||||
0xe12fff1e /* bx lr ; ハンドシェイク完了 */
|
||||
};
|
||||
|
||||
#ifdef DEBUG_WRAM_SETTING
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: WaitAgreement
|
||||
Description: ARM9 の起動ベクタが特定の状態になるまで待つ。
|
||||
メインメモリでないメモリ空間で実行される必要がある。
|
||||
Arguments: r0 - 同期用フェーズ管理変数へのポインタ。
|
||||
r1 - 待機するフェーズ番号。
|
||||
Returns: なし。
|
||||
*---------------------------------------------------------------------------*/
|
||||
static const u32 microcode_WaitAgreement[7] =
|
||||
{
|
||||
0xe1d020b0, /* @1: ldrh r2, [r0] ; フェーズ管理変数を共有メモリから読む */
|
||||
0xe1510002, /* cmp r1, r2 ; 待機フェーズ番号と比較 */
|
||||
0x012fff1e, /* bxeq lr ; 一致していれば待機完了 */
|
||||
0xe3a03010, /* mov r3, #16 ; 空ループ回数初期化 */
|
||||
0xe2533001, /* @2: subs r3, r3, #1 ; 空ループ回数 -- */
|
||||
0x1afffffd, /* bne @2 ; 16 回ループ */
|
||||
0xeafffff8 /* b @1 ; 先頭に戻る */
|
||||
};
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: GotoMain
|
||||
Description: ARM9 に特定の状態になったことを伝えた上で、Main 関数へジャンプ
|
||||
する。メインメモリでないメモリ空間で実行される必要がある。
|
||||
Arguments: r0 - Main 関数のポインタ。Main 関数が Thumb コードである場合
|
||||
には、bx 命令でジャンプするため最下位ビットが 1 になって
|
||||
いる必要がある。
|
||||
r1 - 同期用フェーズ管理変数へのポインタ。
|
||||
r2 - ARM9 に伝えるフェーズ番号。
|
||||
Returns: なし。
|
||||
*---------------------------------------------------------------------------*/
|
||||
static const u32 microcode_GotoMain[2] =
|
||||
{
|
||||
0xe1c120b0, /* strh r2, [r1] ; フェーズ管理変数を更新 */
|
||||
0xe12fff10 /* bx r0 ; Main 関数へジャンプ */
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include <twl/code32.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: _start
|
||||
Description: 起動ベクタ。
|
||||
Arguments: なし。
|
||||
Returns: なし。
|
||||
*---------------------------------------------------------------------------*/
|
||||
SDK_WEAK_SYMBOL asm void
|
||||
_start(void)
|
||||
{
|
||||
@000:
|
||||
/* 割り込み禁止 */
|
||||
mov r12, #HW_REG_BASE
|
||||
str r12, [r12, #REG_IME_OFFSET] // Use that LSB of HW_REG_BASE is 0b0
|
||||
|
||||
/* ハンドシェイク用マイクロコードを専用 WRAM にコピー */
|
||||
ldr r1, =microcode_ShakeHand
|
||||
ldr r2, =HW_PRV_WRAM
|
||||
add r3, r2, #40
|
||||
@001: ldr r0, [r1], #4
|
||||
str r0, [r2], #4
|
||||
cmp r2, r3
|
||||
blt @001
|
||||
|
||||
/* 専用 WRAM 上のコードで ARM9 とハンドシェイク */
|
||||
ldr r0, =HW_BOOT_SHAKEHAND_9
|
||||
ldr r1, =HW_BOOT_SHAKEHAND_7
|
||||
ldr r2, =HW_PRV_WRAM
|
||||
mov lr, pc
|
||||
bx r2
|
||||
|
||||
@010:
|
||||
/* スタックポインタ設定 */
|
||||
mov r0, #HW_PSR_SVC_MODE // SuperVisor mode
|
||||
msr cpsr_c, r0
|
||||
ldr sp, =HW_PRV_WRAM_SVC_STACK_END
|
||||
mov r0, #HW_PSR_IRQ_MODE // IRQ mode
|
||||
msr cpsr_c, r0
|
||||
ldr sp, =HW_PRV_WRAM_IRQ_STACK_END
|
||||
ldr r1, =SDK_IRQ_STACKSIZE
|
||||
sub r1, sp, r1
|
||||
sub sp, sp, #4 // 4 bytes for stack check code
|
||||
mov r0, #HW_PSR_SYS_MODE
|
||||
msr cpsr_csfx, r0
|
||||
sub sp, r1, #4 // 4 bytes for stack check code
|
||||
|
||||
/* スタック領域をクリア */
|
||||
ldr r0, =SDK_SYS_STACKSIZE
|
||||
sub r1, r1, r0
|
||||
ldr r2, =HW_PRV_WRAM_IRQ_STACK_END
|
||||
mov r0, #0
|
||||
@011: cmp r1, r2
|
||||
strlt r0, [r1], #4
|
||||
blt @011
|
||||
|
||||
/* SCFG を HW_SYS_CONF_BUF へコピー */
|
||||
bl INIT_InitializeScfg
|
||||
bl INITi_CopySysConfig
|
||||
|
||||
/* TWL ハードウェア上で動作しているかどうかを調査 */
|
||||
bl INITi_IsRunOnTwl
|
||||
/* TWL ハードウェア上で動作していない場合は永久ループ */
|
||||
@012: bne @012
|
||||
|
||||
/* プリロードパラメータアドレスが格納されていない場合は、デフォルト値をセット */
|
||||
ldr r0, =HW_PRELOAD_PARAMETER_ADDR
|
||||
ldr r1, [r0]
|
||||
cmp r1, #0
|
||||
ldreq r1, =HW_PARAM_TWL_SETTINGS_DATA_DEFAULT
|
||||
streq r1, [r0]
|
||||
|
||||
@020:
|
||||
/* Autoload を実施 */
|
||||
bl INITi_DoAutoload
|
||||
|
||||
/* STATIC ブロックの .bss セクションを 0 クリア */
|
||||
mov r1, #0 // r1 = clear value for STATIC bss section
|
||||
ldr r3, =_start_ModuleParams
|
||||
ldr r0, [r3, #12] // r0 = start address of STATIC bss section
|
||||
ldr r2, [r3, #16]
|
||||
subs r2, r2, r0 // r2 = size of STATIC bss section
|
||||
blgt INITi_Fill32
|
||||
|
||||
//---- detect main memory size
|
||||
bl INITi_DetectMainMemorySize
|
||||
|
||||
#ifndef SDK_FINALROM
|
||||
//---- set debug print window
|
||||
ldr r1, =HW_PRINT_OUTPUT_ARM9
|
||||
mov r0, #OS_PRINT_OUTPUT_DEFAULT_ARM9
|
||||
orr r0, r0, #(OS_PRINT_OUTPUT_DEFAULT_ARM7<<8)
|
||||
strh r0, [r1]
|
||||
mov r0, #OS_PRINT_OUTPUT_DEFAULT_ARM9ERR
|
||||
orr r0, r0, #(OS_PRINT_OUTPUT_DEFAULT_ARM7ERR<<8)
|
||||
strh r0, [r1, #2]
|
||||
#endif
|
||||
|
||||
/* 割り込みベクタ設定 */
|
||||
ldr r1, =HW_INTR_VECTOR_BUF
|
||||
ldr r0, =OS_IrqHandler
|
||||
str r0, [r1]
|
||||
|
||||
#ifndef SDK_NOINIT
|
||||
/* c++ 用初期化 */
|
||||
bl _fp_init
|
||||
bl TwlSpStartUp
|
||||
bl __call_static_initializers
|
||||
bl INITi_CallStaticInitializers
|
||||
#endif
|
||||
|
||||
@030:
|
||||
/* Main 関数へのジャンプ用マイクロコードをスタックの底にコピー */
|
||||
ldr r1, =microcode_GotoMain
|
||||
ldr r0, [r1], #4
|
||||
str r0, [sp, #-4]
|
||||
ldr r0, [r1]
|
||||
str r0, [sp]
|
||||
|
||||
/* マイクロコードを経由して Main 関数へジャンプ */
|
||||
ldr r0, =TwlSpMain
|
||||
ldr r1, =HW_BOOT_SYNC_PHASE
|
||||
mov r2, #BOOT_SYNC_PHASE_4
|
||||
ldr lr, =HW_RESET_VECTOR
|
||||
sub r3, sp, #4
|
||||
bx r3
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: INITi_DoAutoload
|
||||
Description: リンク情報に沿って、各オートロードブロックの固定データ部の展開
|
||||
及び変数部の 0 クリアを行う。
|
||||
Arguments: なし。
|
||||
Returns: なし。
|
||||
*---------------------------------------------------------------------------*/
|
||||
/*
|
||||
* < 二段階オートロード >
|
||||
* 0x02380000 に crt0 及び一段目ロード元バイナリが配置されている。
|
||||
* NITRO と共有可能な WRAM 上に配置されるべきバイナリデータを 0x037c0000 にロードする。
|
||||
* TWL でしか動作しない WRAM 上に配置されるべきバイナリデータを続きのアドレスにロードする。
|
||||
* 0x02400000 に ARM9 の二段目ロード元バイナリが配置されている。
|
||||
* 0x04000 バイト分はカード ROM から再読み出し不可なので、0x02f80000 - 0x02f84000 に退避する。
|
||||
* 0x02e80000 に二段目ロード元バイナリが配置されている。
|
||||
* 0x04000 バイト分はカード ROM から再読み出し不可なので、0x02f84000 - 0x02f88000 に退避する。
|
||||
* NITRO と共有可能な MAIN 上に配置されるべきバイナリデータを 0x02f88000 にロードする。
|
||||
* TWL でしか動作しない MAIN 上に配置されるべきバイナリデータを続きのアドレスにロードする。
|
||||
*/
|
||||
static asm void
|
||||
INITi_DoAutoload(void)
|
||||
{
|
||||
stmfd sp!, {lr}
|
||||
|
||||
@01_autoload:
|
||||
/* WRAM 用ブロックをオートロード */
|
||||
ldr r0, =_start_ModuleParams
|
||||
ldr r12, [r0] // r12 = SDK_AUTOLOAD_LIST
|
||||
ldr r3, [r0, #4] // r3 = SDK_AUTOLOAD_LIST_END
|
||||
ldr r1, [r0, #8] // r1 = SDK_AUTOLOAD_START
|
||||
@01_segments_loop:
|
||||
cmp r12, r3
|
||||
bge @02_start
|
||||
/* 固定セクション */
|
||||
ldr r0, [r12], #4 // r0 = start address of destination range of fixed section
|
||||
ldr r2, [r12], #4 // r2 = size of fixed section
|
||||
bl INITi_Copy32
|
||||
stmfd sp!, {r0, r1}
|
||||
/* static initializer テーブル */
|
||||
ldr r0, [r12], #4 // r0 = start address of source range of static initializers table
|
||||
#ifndef SDK_NOINIT
|
||||
stmfd sp!, {r3, r12}
|
||||
bl INITi_ShelterStaticInitializer
|
||||
ldmfd sp!, {r3, r12}
|
||||
#endif
|
||||
/* bss セクション */
|
||||
ldmfd sp!, {r0} // r0 = start address of destination range of bss section
|
||||
mov r1, #0 // r1 = clear value for bss section
|
||||
ldr r2, [r12], #4 // r2 = size of bss section
|
||||
bl INITi_Fill32
|
||||
ldmfd sp!, {r1} // r1 = end address of source range of the autoload segment
|
||||
b @01_segments_loop
|
||||
|
||||
@02_start:
|
||||
|
||||
/* メインメモリ用オートロードブロックの存在を確認 */
|
||||
ldr r1, =HW_TWL_ROM_HEADER_BUF
|
||||
ldr r0, [r1, #ROM_Header.s.sub_ltd_size]
|
||||
cmp r0, #0
|
||||
beq @03_start
|
||||
|
||||
@02_autoload:
|
||||
/* メインメモリ用ブロックをオートロード */
|
||||
ldr r0, =_start_LtdModuleParams
|
||||
ldr r12, [r0] // r12 = SDK_LTDAUTOLOAD_LIST
|
||||
ldr r3, [r0, #4] // r3 = SDK_LTDAUTOLOAD_LIST_END
|
||||
ldr r1, [r0, #8] // r1 = SDK_AUTOLOAD_START
|
||||
@02_segments_loop:
|
||||
cmp r12, r3
|
||||
bge @03_start
|
||||
/* 固定セクション */
|
||||
ldr r0, [r12], #4
|
||||
ldr r2, [r12], #4
|
||||
bl INITi_Copy32
|
||||
stmfd sp!, {r0, r1}
|
||||
/* static initializer テーブル */
|
||||
ldr r0, [r12], #4
|
||||
#ifndef SDK_NOINIT
|
||||
stmfd sp!, {r3, r12}
|
||||
bl INITi_ShelterStaticInitializer
|
||||
ldmfd sp!, {r3, r12}
|
||||
#endif
|
||||
/* bss セクション */
|
||||
ldmfd sp!, {r0}
|
||||
mov r1, #0
|
||||
ldr r2, [r12], #4
|
||||
bl INITi_Fill32
|
||||
ldmfd sp!, {r1}
|
||||
b @02_segments_loop
|
||||
|
||||
@03_start:
|
||||
/* オートロード完了コールバック関数呼び出し */
|
||||
ldr r0, =_start_ModuleParams
|
||||
ldr r1, =_start_LtdModuleParams
|
||||
ldmfd sp!, {lr}
|
||||
b _start_AutoloadDoneCallback
|
||||
}
|
||||
|
||||
|
||||
#ifndef SDK_NOINIT
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: INITi_ShelterStaticInitializer
|
||||
Description: 各オートロードセグメント内の static initializer へのポインタ
|
||||
テーブルを IRQ スタックの最上部に退避する。
|
||||
Arguments: ptr - セグメント内のポインタテーブルへのポインタ。
|
||||
テーブルは NULL で終端されている必要がある。
|
||||
Returns: なし。
|
||||
*---------------------------------------------------------------------------*/
|
||||
static asm void
|
||||
INITi_ShelterStaticInitializer(u32* ptr)
|
||||
{
|
||||
/* 引数確認 */
|
||||
cmp r0, #0
|
||||
bxeq lr
|
||||
|
||||
/* 退避場所先頭アドレスを計算 */
|
||||
ldr r1, =HW_PRV_WRAM_IRQ_STACK_END
|
||||
ldr r2, =SDK_IRQ_STACKSIZE
|
||||
sub r1, r1, r2
|
||||
add r1, r1, #4
|
||||
|
||||
/* 退避場所先頭から空き場所を調査 */
|
||||
@001: ldr r2, [r1]
|
||||
cmp r2, #0
|
||||
addne r1, r1, #4
|
||||
bne @001
|
||||
|
||||
/* 空き場所にテーブルをコピー */
|
||||
@002: ldr r2, [r0], #4
|
||||
str r2, [r1], #4
|
||||
cmp r2, #0
|
||||
bne @002
|
||||
|
||||
bx lr
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: INITi_CallStaticInitializers
|
||||
Description: 各オートロードセグメント内の static initializer を呼び出す。
|
||||
オートロード処理によって IRQ スタックの最上部に退避されている
|
||||
関数ポインタテーブルを一つずつ呼び出す。
|
||||
Arguments: なし。
|
||||
Returns: なし。
|
||||
*---------------------------------------------------------------------------*/
|
||||
static asm void
|
||||
INITi_CallStaticInitializers(void)
|
||||
{
|
||||
stmdb sp!, {lr}
|
||||
|
||||
/* テーブル退避場所先頭アドレスを計算 */
|
||||
ldr r1, =HW_PRV_WRAM_IRQ_STACK_END
|
||||
ldr r2, =SDK_IRQ_STACKSIZE
|
||||
sub r1, r1, r2
|
||||
add r1, r1, #4
|
||||
|
||||
/* テーブルに管理されているポインタを一つずつ呼び出し */
|
||||
@001: ldr r0, [r1]
|
||||
cmp r0, #0
|
||||
beq @002
|
||||
stmdb sp!, {r1}
|
||||
mov lr, pc
|
||||
bx r0
|
||||
ldmia sp!, {r1}
|
||||
/* 一旦呼び出したポインタはゼロクリア (IRQスタックを間借りしている為) */
|
||||
mov r0, #0
|
||||
str r0, [r1], #4
|
||||
b @001
|
||||
|
||||
@002: ldmia sp!, {lr}
|
||||
bx lr
|
||||
}
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: _start_AutoloadDoneCallback
|
||||
Description: オートロード完了コールバック。
|
||||
Arguments: argv - オートロードパラメータを保持している配列。
|
||||
argv[0] = SDK_AUTOLOAD_LIST
|
||||
argv[1] = SDK_AUTOLOAD_LIST_END
|
||||
argv[2] = SDK_AUTOLOAD_START
|
||||
argv[3] = SDK_STATIC_BSS_START
|
||||
argv[4] = SDK_STATIC_BSS_END
|
||||
Returns: なし。
|
||||
*---------------------------------------------------------------------------*/
|
||||
SDK_WEAK_SYMBOL asm void
|
||||
_start_AutoloadDoneCallback(void* argv[])
|
||||
{
|
||||
bx lr
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: NitroSpStartUp
|
||||
Description: Hook for user start up.
|
||||
Arguments: None.
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
SDK_WEAK_SYMBOL void
|
||||
NitroSpStartUp(void)
|
||||
{
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: INITi_IsRunOnTwl
|
||||
|
||||
Description: check running platform
|
||||
|
||||
This function is used in only Nitro-TWL hybrid mode.
|
||||
(In Nitro mode and TWL limited mode, treated as constant)
|
||||
|
||||
Arguments: None
|
||||
|
||||
Returns: TRUE : running on TWL
|
||||
FALSE : running on NITRO
|
||||
*---------------------------------------------------------------------------*/
|
||||
static asm BOOL INITi_IsRunOnTwl( void )
|
||||
{
|
||||
ldr r0, =HW_PRV_WRAM_SYSRV
|
||||
ldrb r0, [r0,#HWi_WSYS08_WRAMOFFSET]
|
||||
and r0, r0, #HWi_WSYS08_ROM_ARM9SEC_MASK | HWi_WSYS08_ROM_ARM9RSEL_MASK
|
||||
cmp r0, #HWi_WSYS08_ROM_ARM9SEC_MASK
|
||||
moveq r0, #TRUE
|
||||
movne r0, #FALSE
|
||||
|
||||
bx lr
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: INIT_InitializeScfg
|
||||
|
||||
Description: ローダーが行う SCFG ブロックへの設定処理を代行する為の関数。
|
||||
処理の実体は crt0 の外部に定義するため、弱シンボルとする。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
SDK_WEAK_SYMBOL asm void
|
||||
INIT_InitializeScfg(void)
|
||||
{
|
||||
bx lr
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: INITi_CopySysConfig
|
||||
|
||||
Description: copy SCFG registers to HW_SYS_CONF_BUF and HW_PRV_WRAM_SYSRV
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static asm void INITi_CopySysConfig( void )
|
||||
{
|
||||
//---- copy scfg setting
|
||||
ldr r2, =HW_PRV_WRAM_SYSRV
|
||||
ldr r3, =HW_SYS_CONF_BUF
|
||||
ldr r0, [r2, #HWi_WSYS04_WRAMOFFSET]
|
||||
str r0, [r3, #HWi_WSYS04_OFFSET]
|
||||
ldrh r0, [r2, #HWi_WSYS08_WRAMOFFSET]
|
||||
strh r0, [r3, #HWi_WSYS08_OFFSET]
|
||||
|
||||
bx lr
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: INITi_DetectMainMemorySize
|
||||
|
||||
Description: detect main memory size.
|
||||
result is written into (u32*)HW_MMEMCHECKER_SUB.
|
||||
value is [OS_CONSOLE_SIZE_4MB|OS_CONSOLE_SIZE_8MB|
|
||||
OS_CONSOLE_SIZE_16MB|OS_CONSOLE_SIZE_32MB]
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
#define OSi_IMAGE_DIFFERENCE 0x400000
|
||||
#define OSi_IMAGE_DIFFERENCE2 0xb000000
|
||||
#define OSi_DETECT_NITRO_MASK (REG_SND_SMX_CNT_E_MASK | REG_SND_SMX_CNT_FSEL_MASK)
|
||||
#define OSi_DETECT_NITRO_VAL (REG_SND_SMX_CNT_E_MASK)
|
||||
|
||||
#define OSi_CHECKNUM1 0x55
|
||||
#define OSi_CHECKNUM2 0xaa
|
||||
#define OSi_100usWAIT 3352 // 100us = 3351.4cycles(33.514MHz)
|
||||
|
||||
static asm void INITi_DetectMainMemorySize( void )
|
||||
{
|
||||
stmfd sp!, {lr}
|
||||
|
||||
//---- detect memory size
|
||||
mov r0, #OS_CONSOLE_SIZE_4MB
|
||||
mov r1, #0
|
||||
|
||||
ldr r2, =HW_MMEMCHECKER_SUB
|
||||
sub r3, r2, #OSi_IMAGE_DIFFERENCE
|
||||
@1:
|
||||
strh r1, [r2]
|
||||
ldrh r12, [r3]
|
||||
cmp r1, r12
|
||||
bne @2
|
||||
|
||||
add r1, r1, #1
|
||||
cmp r1, #2 // check 2 loop
|
||||
bne @1
|
||||
|
||||
//---- 4MB
|
||||
b @3
|
||||
|
||||
//---- 8MB or 16MB or 32MB
|
||||
@2:
|
||||
// check if running on twl/nitro
|
||||
bl INITi_IsRunOnTwl
|
||||
movne r0, #OS_CONSOLE_SIZE_8MB
|
||||
bne @3
|
||||
|
||||
//---- 16MB or 32MB
|
||||
add r3, r2, #OSi_IMAGE_DIFFERENCE2
|
||||
mov r0, #OS_CONSOLE_SIZE_16MB
|
||||
ldrb r2, [r3]
|
||||
|
||||
mov r1, #OSi_CHECKNUM1
|
||||
strb r1, [r3]
|
||||
|
||||
ldr r12, =OSi_100usWAIT
|
||||
@4 subs r12, r12, #4
|
||||
bcs @4
|
||||
|
||||
ldrb r1, [r3]
|
||||
cmp r1, #OSi_CHECKNUM1
|
||||
bne @3
|
||||
|
||||
mov r1, #OSi_CHECKNUM2
|
||||
strb r1, [r3]
|
||||
|
||||
ldr r12, =OSi_100usWAIT
|
||||
@5 subs r12, r12, #4
|
||||
bcs @5
|
||||
|
||||
ldrb r1, [r3]
|
||||
cmp r1, #OSi_CHECKNUM2
|
||||
moveq r0, #OS_CONSOLE_SIZE_32MB
|
||||
|
||||
@3:
|
||||
//---- check SMX_CNT
|
||||
strb r2, [r3]
|
||||
ldr r3, =REG_SMX_CNT_ADDR
|
||||
ldrh r1, [r3]
|
||||
and r1, r1, #OSi_DETECT_NITRO_MASK
|
||||
cmp r1, #OSi_DETECT_NITRO_VAL
|
||||
orreq r0, r0, #OS_CHIPTYPE_SMX_MASK
|
||||
|
||||
ldr r2, =HW_MMEMCHECKER_SUB
|
||||
strh r0, [r2]
|
||||
|
||||
ldmfd sp!, {lr}
|
||||
bx lr
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: INITi_Copy32
|
||||
Description: 32 bit 単位でコピーを行う。スタックを 36 バイト消費するが、
|
||||
レジスタ r3 - r12 は破壊しない。
|
||||
Arguments: r0 - コピー先へのポインタ ( 4 バイトアライン )。
|
||||
r1 - コピー元へのポインタ ( 4 バイトアライン )。
|
||||
r2 - コピーする長さをバイト単位で指定 ( 4 の倍数 )。
|
||||
Returns: r0 - コピー後のコピー先へのポインタ ( r0 + r2 )。
|
||||
r1 - コピー後のコピー元へのポインタ ( r1 + r2 )。
|
||||
*---------------------------------------------------------------------------*/
|
||||
static asm void*
|
||||
INITi_Copy32(void* dst, void* src, u32 size)
|
||||
{
|
||||
stmfd sp!, {r3-r11}
|
||||
bics r3, r2, #0x0000001f
|
||||
beq @next
|
||||
add r3, r0, r3
|
||||
@loop:
|
||||
ldmia r1!, {r4-r11}
|
||||
stmia r0!, {r4-r11}
|
||||
cmp r3, r0
|
||||
bgt @loop
|
||||
@next:
|
||||
tst r2, #0x00000010
|
||||
ldmneia r1!, {r4-r7}
|
||||
stmneia r0!, {r4-r7}
|
||||
tst r2, #0x00000008
|
||||
ldmneia r1!, {r4-r5}
|
||||
stmneia r0!, {r4-r5}
|
||||
tst r2, #0x00000004
|
||||
ldmneia r1!, {r4}
|
||||
stmneia r0!, {r4}
|
||||
ldmfd sp!, {r3-r11}
|
||||
bx lr
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: INITi_Fill32
|
||||
Description: 32 bit 単位でバッファ内容を指定データで埋める。スタックを 36
|
||||
バイト消費するが、レジスタ r3 - r12 は破壊しない。
|
||||
Arguments: r0 - バッファへのポインタ ( 4 バイトアライン )。
|
||||
r1 - バッファを埋める内容を 32 bit 値で指定。
|
||||
r2 - バッファを埋める長さをバイト単位で指定 ( 4 の倍数 )。
|
||||
Returns: r0 - 処理後のバッファへのポインタ ( r0 + r2 )。
|
||||
*---------------------------------------------------------------------------*/
|
||||
static asm void*
|
||||
INITi_Fill32(void* dst, u32 value, u32 size)
|
||||
{
|
||||
stmfd sp!, {r3-r11}
|
||||
mov r4, r1
|
||||
mov r5, r1
|
||||
mov r6, r1
|
||||
mov r7, r1
|
||||
mov r8, r1
|
||||
mov r9, r1
|
||||
mov r10, r1
|
||||
mov r11, r1
|
||||
bics r3, r2, #0x0000001f
|
||||
beq @next
|
||||
add r3, r0, r3
|
||||
@loop:
|
||||
stmia r0!, {r4-r11}
|
||||
cmp r3, r0
|
||||
bgt @loop
|
||||
@next:
|
||||
tst r2, #0x00000010
|
||||
stmneia r0!, {r4-r7}
|
||||
tst r2, #0x00000008
|
||||
stmneia r0!, {r4-r5}
|
||||
tst r2, #0x00000004
|
||||
stmneia r0!, {r4}
|
||||
ldmfd sp!, {r3-r11}
|
||||
bx lr
|
||||
}
|
||||
|
||||
#include <twl/codereset.h>
|
||||
@ -1,110 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - components - mongoose.TWL
|
||||
File: initScfg.c
|
||||
|
||||
Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: 2008-03-03#$
|
||||
$Rev: 4466 $
|
||||
$Author: terui $
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#include <twl/memorymap_sp.h>
|
||||
#include <twl/hw/common/mmap_wramEnv.h>
|
||||
|
||||
extern void INIT_InitializeScfg(void);
|
||||
|
||||
#include <twl/code32.h>
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: INIT_InitializeScfg
|
||||
|
||||
Description: ローダーが行う SCFG ブロックへの設定処理を代行する為の関数。
|
||||
crt0 内の弱シンボルを上書きする。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
asm void
|
||||
INIT_InitializeScfg(void)
|
||||
{
|
||||
// SCFG enable?
|
||||
ldr r2, =REG_EXT_ADDR
|
||||
ldr r0, [r2]
|
||||
tst r0, #REG_SCFG_EXT_CFG_MASK
|
||||
beq @end
|
||||
|
||||
/* NITRO 互換無線の送受信機能を動作 */
|
||||
ldr r1, =REG_WL_ADDR
|
||||
ldrh r0, [r1]
|
||||
orr r0, r0, #REG_SCFG_WL_OFFB_MASK
|
||||
strh r0, [r1]
|
||||
|
||||
/* 新規サウンドブロックへのクロック供給 */
|
||||
ldr r1, =REG_CLK_ADDR
|
||||
ldrh r0, [r1]
|
||||
orr r0, r0, #REG_SCFG_CLK_SNDMCLK_MASK
|
||||
strh r0, [r1]
|
||||
|
||||
/* ARM7 側の DMA には新 DMA 回路を採用 */
|
||||
ldr r1, =REG_EXT_ADDR
|
||||
ldr r0, [r1]
|
||||
orr r0, r0, #REG_SCFG_EXT_DMAC_MASK
|
||||
str r0, [r1]
|
||||
|
||||
ldr r2, =HW_PRV_WRAM_SYSRV
|
||||
//EXT(extentions)
|
||||
ldr r3, =REG_EXT_ADDR
|
||||
ldr r0, [r3]
|
||||
str r0, [r2, #HWi_WSYS04_WRAMOFFSET]
|
||||
//OPT(bonding option)
|
||||
ldr r3, =REG_OP_ADDR
|
||||
ldrb r0, [r3]
|
||||
//A9ROM(ARM9 ROM)
|
||||
ldr r3, =REG_A9ROM_ADDR
|
||||
ldrb r1, [r3]
|
||||
and r12,r1, #(REG_SCFG_A9ROM_RSEL_MASK | REG_SCFG_A9ROM_SEC_MASK)
|
||||
orr r0, r0, r12, LSL #(HWi_WSYS08_ROM_ARM9RSEL_SHIFT - REG_SCFG_A9ROM_RSEL_SHIFT)
|
||||
//A7ROM(ARM7 ROM)
|
||||
ldr r3, =REG_A7ROM_ADDR
|
||||
ldrb r1, [r3]
|
||||
and r12,r1, #(REG_SCFG_A7ROM_RSEL_MASK | REG_SCFG_A7ROM_FUSE_MASK)
|
||||
orr r0, r0, r12, LSL #(HWi_WSYS08_ROM_ARM7RSEL_SHIFT - REG_SCFG_A7ROM_RSEL_SHIFT)
|
||||
//DS-WL(DS wireless)
|
||||
ldr r3, =REG_WL_ADDR
|
||||
ldrb r1, [r3]
|
||||
and r12,r1, #REG_SCFG_WL_OFFB_MASK
|
||||
orr r0, r0, r12, LSL #(HWi_WSYS08_WL_OFFB_SHIFT - REG_SCFG_WL_OFFB_SHIFT)
|
||||
strb r0, [r2, #HWi_WSYS08_WRAMOFFSET]
|
||||
//OPT(JTAG info)
|
||||
ldr r3, =REG_JTAG_ADDR
|
||||
ldrh r0, [r3]
|
||||
and r12,r0, #REG_SCFG_JTAG_DSPJE_MASK
|
||||
orr r0, r0, r12, LSR #(REG_SCFG_JTAG_DSPJE_SHIFT - HWi_WSYS09_JTAG_DSPJE_SHIFT)
|
||||
//CLK(only wram clock)
|
||||
ldr r3, =REG_CLK_ADDR
|
||||
ldrh r1, [r3]
|
||||
and r12,r1, #(REG_SCFG_CLK_AESHCLK_MASK | REG_SCFG_CLK_SD2HCLK_MASK | REG_SCFG_CLK_SD1HCLK_MASK)
|
||||
orr r0, r0, r12, LSL #(HWi_WSYS09_CLK_SD1HCLK_SHIFT - REG_SCFG_CLK_SD1HCLK_SHIFT)
|
||||
and r12,r1, #(REG_SCFG_CLK_SNDMCLK_MASK | REG_SCFG_CLK_WRAMHCLK_MASK)
|
||||
orr r0, r0, r12, LSR #(REG_SCFG_CLK_WRAMHCLK_SHIFT - HWi_WSYS09_CLK_WRAMHCLK_SHIFT)
|
||||
strb r0, [r2, #HWi_WSYS09_WRAMOFFSET]
|
||||
|
||||
#if 0
|
||||
/* A7-SCFG ブロックへのアクセスを無効化 */
|
||||
ldr r1, =REG_EXT_ADDR
|
||||
ldr r0, [r1]
|
||||
bic r0, r0, #REG_SCFG_EXT_CFG_MASK
|
||||
str r0, [r1]
|
||||
#endif
|
||||
|
||||
@end:
|
||||
bx lr
|
||||
}
|
||||
#include <twl/codereset.h>
|
||||
@ -1,916 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlIPL - components - hyena.TWL
|
||||
File: main.c
|
||||
|
||||
Copyright 2007 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#include <nitro/types.h>
|
||||
#include <twl/init/crt0.h>
|
||||
#include <twl/memorymap_sp.h>
|
||||
#include <twl/os.h>
|
||||
#include <twl/spi.h>
|
||||
#include <twl/fatfs.h>
|
||||
#include <nitro/pad.h>
|
||||
#include <nitro/std.h>
|
||||
#include <nitro/snd.h>
|
||||
#include <nitro/wvr.h>
|
||||
#include <twl/nwm/ARM7/ForLauncher/nwm_sp_init_for_launcher.h>
|
||||
#include <twl/camera.h>
|
||||
#include <twl/rtc.h>
|
||||
#include <nitro/hw/common/lcd.h>
|
||||
#include <nitro/gx.h>
|
||||
#include <twl/os/common/codecmode.h>
|
||||
#include <twl/cdc.h>
|
||||
#include <twl/snd/ARM7/sndex_api.h>
|
||||
#include <twl/aes.h>
|
||||
#include <twl/mcu.h>
|
||||
#include <twl/hw/common/mmap_wramEnv.h>
|
||||
#include <sysmenu.h>
|
||||
#include <sysmenu/mcu.h>
|
||||
#include <firm/memorymap.h>
|
||||
#include "pm_pmic.h"
|
||||
#include "internal_api.h"
|
||||
#include "nvram_sp.h"
|
||||
#include "twl/sea.h"
|
||||
|
||||
// 未実装(現状ではデバッガ接続しないなら選択してもよい)
|
||||
//#define HYENA_ROMEMU_INFO_FROM_LNCR_PARAM
|
||||
//#define HYENA_RTC_DEBUG
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
定数定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
#define WM_WL_HEAP_SIZE 0x2100
|
||||
#define ATH_DRV_HEAP_SIZE 0x5800
|
||||
#define WPA_HEAP_SIZE 0x1C00
|
||||
|
||||
#define MEM_TYPE_WRAM 0
|
||||
#define MEM_TYPE_MAIN 1
|
||||
|
||||
/* Priorities of each threads */
|
||||
#define THREAD_PRIO_MCU 1 /* ハードウェアリセット時に他のスレッドに優先して動く必要アリ */
|
||||
#define THREAD_PRIO_SPI 2
|
||||
#define THREAD_PRIO_SYSMMCU 6
|
||||
#define THREAD_PRIO_SND 6
|
||||
#define THREAD_PRIO_FATFS 8
|
||||
#define THREAD_PRIO_HOTSW 11
|
||||
#define THREAD_PRIO_AES 12
|
||||
#define THREAD_PRIO_SEA 12
|
||||
#define THREAD_PRIO_RTC 12
|
||||
#define THREAD_PRIO_SNDEX 14
|
||||
#define THREAD_PRIO_FS 15
|
||||
/* OS_THREAD_LAUNCHER_PRIORITY 16 */
|
||||
|
||||
#define NWM_DMANO NWMSP_DMA_NOT_USE // NWMのNDMAは使用しない。
|
||||
#define THREAD_PRIO_NWM_COMMMAND 9
|
||||
#define THREAD_PRIO_NWM_EVENT 7
|
||||
#define THREAD_PRIO_NWM_SDIO 8
|
||||
#define THREAD_PRIO_NWM_WPA 10
|
||||
|
||||
// ROM 内登録エリアの拡張言語コード
|
||||
#define ROMHEADER_FOR_CHINA_BIT 0x80
|
||||
#define ROMHEADER_FOR_KOREA_BIT 0x40
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
内部関数定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void ResetRTC( void );
|
||||
static void ReadLauncherParameter( void );
|
||||
static void PrintDebugInfo(void);
|
||||
static OSHeapHandle InitializeAllocateSystem(u8 memType);
|
||||
static OSHeapHandle InitializeAllocateSystemCore(u8 memType);
|
||||
#ifdef SDK_TWLHYB
|
||||
static OSHeapHandle InitializeAllocateSystemCoreEx(u8 memType);
|
||||
#endif
|
||||
static void DummyThread(void* arg);
|
||||
static void ReadUserInfo(void);
|
||||
static void VBlankIntr(void);
|
||||
static void InitializeFatfs(void);
|
||||
static void InitializeNwm(OSArenaId drvArenaId, OSHeapHandle drvHeapHandle,
|
||||
OSArenaId wpaArenaId, OSHeapHandle wpaHeapHandle);
|
||||
static void InitializeCdc();
|
||||
static void AdjustVolume(void);
|
||||
/*---------------------------------------------------------------------------*
|
||||
外部シンボル参照
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifdef SDK_TWLHYB
|
||||
extern void SDK_LTDAUTOLOAD_LTDWRAM_BSS_END(void);
|
||||
extern void SDK_LTDAUTOLOAD_LTDMAIN_BSS_END(void);
|
||||
#endif
|
||||
extern void SDK_SEA_KEY_STORE(void);
|
||||
extern void SDK_STATIC_BSS_END(void);
|
||||
|
||||
extern BOOL sdmcGetNandLogFatal( void );
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: TwlSpMain
|
||||
Description: 起動ベクタ。
|
||||
Arguments: None.
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void
|
||||
TwlSpMain(void)
|
||||
{
|
||||
OSHeapHandle wramHeapHandle, mainHeapHandle;
|
||||
|
||||
// SYSMワークのクリア
|
||||
// MI_CpuClear32( SYSMi_GetWork(), sizeof(SYSM_work) ); // NANDファームでクリアしているので、いらない。
|
||||
// ※もしランチャー上でやるなら、crt0.o内でクリアの記述をしないとAutoloadセグメントに配置されてしまって、うまく動かない点に注意する。
|
||||
|
||||
// バックライトON
|
||||
while ( (reg_GX_DISPSTAT & REG_GX_DISPSTAT_INI_MASK) == FALSE )
|
||||
{
|
||||
}
|
||||
PMi_SetControl( PMIC_CTL_BKLT1 | PMIC_CTL_BKLT2 );
|
||||
|
||||
#ifdef INITIAL_KEYTABLE_PRELOAD
|
||||
HOTSW_CopyInitialKeyTable();
|
||||
#endif
|
||||
|
||||
// OS 初期化
|
||||
OS_Init();
|
||||
PrintDebugInfo();
|
||||
|
||||
// ランチャーバージョンを格納(今のところ、最低でもマウント情報登録前には格納する必要あり)
|
||||
*(u8 *)HW_TWL_RED_LAUNCHER_VER = (u8)SYSM_LAUNCHER_VER;
|
||||
|
||||
// ランチャーのマウント情報登録
|
||||
SYSMi_SetLauncherMountInfo();
|
||||
|
||||
// ランチャーパラメター取得(Cold/Hotスタート判定含む)
|
||||
ReadLauncherParameter();
|
||||
|
||||
// RTCリセット
|
||||
ResetRTC(); // 330usくらい
|
||||
|
||||
// NVRAM からユーザー情報読み出し
|
||||
ReadUserInfo();
|
||||
|
||||
// NANDのFATALエラー検出
|
||||
if( sdmcGetNandLogFatal() != FALSE) {
|
||||
/* 故障扱い処理 */
|
||||
SYSMi_GetWork()->flags.arm7.isNANDFatalError = TRUE;
|
||||
}
|
||||
|
||||
SYSMi_GetWork()->flags.arm7.isARM9Start = TRUE;
|
||||
|
||||
// ヒープ領域設定
|
||||
#ifndef USE_HYENA_COMPONENT
|
||||
OS_SetSubPrivArenaLo( (void*)SDK_STATIC_BSS_END );
|
||||
#endif
|
||||
OS_SetSubPrivArenaHi( (void*)SYSM_OWN_ARM7_MMEM_ADDR_END ); // メモリ配置をいじっているので、アリーナHiも変更しないとダメ!!
|
||||
OS_SetWramSubPrivArenaHi( (void*)(SYSM_OWN_ARM7_WRAM_ADDR_END - HW_FIRM_FROM_FIRM_BUF_SIZE) ); // この時点では鍵をつぶさないように
|
||||
OS_TPrintf( "MMEM SUBPRV ARENA HI : %08x -> %08x\n", OS_GetSubPrivArenaHi(), OS_GetSubPrivArenaHi() );
|
||||
OS_TPrintf( "WRAM SUBPRV ARENA HI : %08x -> %08x\n", OS_GetWramSubPrivArenaHi(), OS_GetWramSubPrivArenaHi() );
|
||||
wramHeapHandle = InitializeAllocateSystem(MEM_TYPE_WRAM);
|
||||
mainHeapHandle = InitializeAllocateSystem(MEM_TYPE_MAIN);
|
||||
|
||||
// ボタン入力サーチ初期化
|
||||
(void)PAD_InitXYButton();
|
||||
|
||||
// 割り込み許可
|
||||
(void)OS_SetIrqFunction(OS_IE_V_BLANK, VBlankIntr);
|
||||
(void)OS_EnableIrqMask(OS_IE_V_BLANK);
|
||||
(void)GX_VBlankIntr(TRUE);
|
||||
(void)OS_EnableIrq();
|
||||
(void)OS_EnableInterrupts();
|
||||
|
||||
// PXIコールバックの設定
|
||||
SYSM_InitPXI(THREAD_PRIO_SYSMMCU);
|
||||
|
||||
// ファイルシステム初期化
|
||||
FS_Init(FS_DMA_NOT_USE);
|
||||
FS_CreateReadServerThread(THREAD_PRIO_FS);
|
||||
|
||||
if (OS_IsRunOnTwl() == TRUE)
|
||||
{
|
||||
InitializeFatfs(); // FATFS 初期化
|
||||
// NWM 初期化
|
||||
InitializeNwm(OS_ARENA_MAIN_SUBPRIV, mainHeapHandle, // heap setting for TWL wireless host driver
|
||||
OS_ARENA_MAIN_SUBPRIV, mainHeapHandle // heap setting for wpa
|
||||
);
|
||||
#ifndef SDK_NOCRYPTO
|
||||
AES_Init(THREAD_PRIO_AES); // AES 初期化
|
||||
|
||||
{
|
||||
// JPEGエンコード用の鍵セット
|
||||
SYSMi_SetAESKeysForSignJPEG( (ROM_Header *)HW_TWL_ROM_HEADER_BUF, NULL, NULL );
|
||||
// NANDファームがHW_LAUNCHER_DELIVER_PARAM_BUFへのAES_SEEDセットを行ってくれるので、ISデバッガ接続に関係なくSDK_SEA_KEY_STOREへのコピーを行えばよい
|
||||
MI_CpuCopyFast( (void *)HW_LAUNCHER_DELIVER_PARAM_BUF, (void *)SDK_SEA_KEY_STORE, HW_LAUNCHER_DELIVER_PARAM_BUF_SIZE );
|
||||
}
|
||||
|
||||
#ifdef SDK_SEA
|
||||
SEA_Init(THREAD_PRIO_SEA);
|
||||
#endif // ifdef SDK_SEA
|
||||
#endif
|
||||
MCU_InitIrq(THREAD_PRIO_MCU); // MCU 初期化
|
||||
|
||||
// ボリューム設定の調整
|
||||
AdjustVolume();
|
||||
}
|
||||
|
||||
if (OSi_IsCodecTwlMode() == TRUE)
|
||||
{
|
||||
// CODEC 初期化
|
||||
// ランチャーのみCDC_InitForFirstBootで実際にCODECの初期化を行う。
|
||||
// アプリ起動時にはCODECは既に初期化されているためmongooseなどでは
|
||||
// 簡易的な初期化CDC_InitLibで良い。 2008/07/14
|
||||
InitializeCdc();
|
||||
|
||||
// カメラ初期化
|
||||
CAMERA_Init();
|
||||
/* CODEC が TWL モードでないとシャッター音を強制的に鳴らす
|
||||
機能が使用できません。この為、CODEC が TWL モードの場合
|
||||
にのみカメラライブラリを使用可能な状態にします。 */
|
||||
}
|
||||
|
||||
// サウンド初期化
|
||||
SND_Init(THREAD_PRIO_SND);
|
||||
if (OS_IsRunOnTwl() == TRUE)
|
||||
{
|
||||
SNDEX_Init(THREAD_PRIO_SNDEX);
|
||||
}
|
||||
|
||||
// RTC 初期化
|
||||
RTC_Init(THREAD_PRIO_RTC);
|
||||
|
||||
// ランチャーでは、旧無線の初期化はmain loopで行う。
|
||||
|
||||
// SPI 初期化
|
||||
// ※ARM9側のOS_Init内のPM_InitでPMのPXIコールバック待ちをしており、ここでARM9と同期が取られる。
|
||||
SPI_Init(THREAD_PRIO_SPI);
|
||||
|
||||
BOOT_Init();
|
||||
|
||||
// 活栓挿抜機能初期化
|
||||
if( ( SYSM_GetLauncherParamBody()->v1.flags.isValid ) &&
|
||||
( SYSM_GetLauncherParamBody()->v1.flags.bootType != LAUNCHER_BOOTTYPE_ROM ) &&
|
||||
( SYSM_GetLauncherParamBody()->v1.bootTitleID )
|
||||
)
|
||||
#ifdef HYENA_ROMEMU_INFO_FROM_LNCR_PARAM
|
||||
{
|
||||
// ランチャーパラメータでダイレクトカードブート以外の指定がある時は、活線挿抜をOFFにする。
|
||||
SYSMi_GetWork()->flags.hotsw.isEnableHotSW = 0;
|
||||
}else {
|
||||
// それ以外の時は活線挿抜ON
|
||||
SYSMi_GetWork()->flags.hotsw.isEnableHotSW = 1;
|
||||
}
|
||||
#else
|
||||
{
|
||||
// ランチャーパラメータでダイレクトカードブート以外の指定がある時は、ROMエミュレーション情報のみ必要。
|
||||
SYSMi_GetWork()->flags.hotsw.isLoadRomEmuOnly = 1;
|
||||
}else {
|
||||
// それ以外の時は普通にロード
|
||||
SYSMi_GetWork()->flags.hotsw.isLoadRomEmuOnly = 0;
|
||||
}
|
||||
SYSMi_GetWork()->flags.hotsw.isEnableHotSW = 1;
|
||||
#endif
|
||||
|
||||
HOTSW_Init(THREAD_PRIO_HOTSW);
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
OS_Halt();
|
||||
// 無線ファームのロード完了をチェック。
|
||||
if (TRUE == NWMSPi_CheckInstalledNotification())
|
||||
{
|
||||
/* M&M chipでは無線ファームのDL完了 → 旧無線初期化の順序を守る必要あり。
|
||||
そのため、新無線のファームDL完了通知をmain loopでチェックし、
|
||||
完了が通知されたら旧無線初期化を行った後、NWMに確認通知を送る。[twl-dev:0980] */
|
||||
WVR_Begin(wramHeapHandle);
|
||||
#if 1
|
||||
// [TODO:] RC plus branchでは、NWMSPi_NotifyConfirmation()の返り値がないため、返り値評価を行わない。
|
||||
// 次期リリースで返り値評価を行うよう変更予定。
|
||||
NWMSPi_NotifyConfirmation();
|
||||
#else
|
||||
if (FALSE == NWMSPi_NotifyConfirmation())
|
||||
{
|
||||
// NWMへのConfirmation通知のためのSendMessageにENQできない状態.
|
||||
// (ここに来ることはありえない筈.)
|
||||
OS_Panic("ARM7: Failed to complete wireless firmare install.\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
BOOT_WaitStart();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// RTCのリセットチェック
|
||||
static void ResetRTC( void )
|
||||
{
|
||||
SYSM_work* sw = SYSMi_GetWork();
|
||||
|
||||
// ランチャーでリセットを検出するためにこの処理をしているが、RTC_Init内でも同じことをしているので、ちょっと無駄。
|
||||
RTCRawStatus1 stat1;
|
||||
RTCRawStatus2 stat2;
|
||||
RTC_ReadStatus1( &stat1 );
|
||||
RTC_ReadStatus2( &stat2 );
|
||||
|
||||
// リセット、電源投入、電源電圧低下、ICテストの各フラグを確認
|
||||
if ( stat1.reset || stat1.poc || stat1.bld || stat2.test )
|
||||
{
|
||||
// リセット実行
|
||||
stat1.reset = 1;
|
||||
RTC_WriteStatus1( &stat1 );
|
||||
sw->flags.arm7.isResetRTC = TRUE;
|
||||
}
|
||||
|
||||
// FOUTが32KHz出力でない場合は、32KHz出力に修正設定する。(無線で使用している)
|
||||
{
|
||||
RTCRawFout fout;
|
||||
RTC_ReadFout(&fout);
|
||||
if( fout.fout != RTC_FOUT_DUTY_32KHZ ) {
|
||||
fout.fout = RTC_FOUT_DUTY_32KHZ;
|
||||
RTC_WriteFout(&fout);
|
||||
}
|
||||
}
|
||||
|
||||
// RTC初回データ読み込み
|
||||
RTC_ReadDateTime(&sw->Rtc1stData);
|
||||
|
||||
// NTR-IPL同様にアラーム時間をクリア
|
||||
//(割り込みイネーブルでないとアクセスできない)
|
||||
{
|
||||
static RTCRawAlarm alarm = {0,0,0,0,0,0,0,0,0};
|
||||
|
||||
stat2.intr_mode = RTC_INTERRUPT_MODE_ALARM; // アラーム割り込みイネーブル
|
||||
stat2.intr2_mode = TRUE;
|
||||
RTC_WriteStatus2( &stat2 );
|
||||
|
||||
(void)RTC_WriteAlarm1( &alarm );
|
||||
(void)RTC_WriteAlarm2( &alarm );
|
||||
#ifdef HYENA_RTC_DEBUG
|
||||
{
|
||||
static RTCRawAlarm rd_alarm = {1,1,1,1,1,1,1,1,1};
|
||||
(void)RTC_ReadAlarm1( &rd_alarm );
|
||||
(void)RTC_ReadAlarm2( &rd_alarm );
|
||||
}
|
||||
#endif
|
||||
stat2.intr_mode = RTC_INTERRUPT_MODE_NONE; // アラーム割り込みディセーブル
|
||||
stat2.intr2_mode = RTC_INTERRUPT_MODE_NONE;
|
||||
RTC_WriteStatus2( &stat2 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ランチャーパラメータのリードおよびHot/Coldスタート判定
|
||||
void ReadLauncherParameter( void )
|
||||
{
|
||||
BOOL hot;
|
||||
SYSMi_GetWork()->flags.arm7.isValidLauncherParam = OS_ReadLauncherParameter( (LauncherParam *)&(SYSMi_GetWork()->launcherParam), &hot );
|
||||
SYSMi_GetWork()->flags.arm7.isHotStart = hot;
|
||||
// メインメモリのランチャーパラメータをクリアしておく
|
||||
MI_CpuClearFast( (void*)HW_PARAM_LAUNCH_PARAM, HW_PARAM_LAUNCH_PARAM_SIZE );
|
||||
// Coldスタート時はアプリパラメータもクリア
|
||||
if ( ! hot )
|
||||
{
|
||||
MI_CpuClearFast( (void*)HW_PARAM_DELIVER_ARG, HW_PARAM_DELIVER_ARG_SIZE );
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: PrintDebugInfo
|
||||
Description: ARM7 コンポーネントの情報をデバッグ出力する。
|
||||
Arguments: None.
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
PrintDebugInfo(void)
|
||||
{
|
||||
if(OS_IsRunOnTwl())
|
||||
{
|
||||
OS_TPrintf("ARM7: This component is running on TWL.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
OS_TPrintf("ARM7: This component is running on NITRO.\n");
|
||||
}
|
||||
#ifdef USE_HYENA_COMPONENT
|
||||
OS_TPrintf("ARM7: This component is \"hyena.TWL\"\n");
|
||||
#else
|
||||
OS_TPrintf("ARM7: This component is \"jackal.TWL\"\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
#include <twl/ltdwram_begin.h>
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitializeFatfs
|
||||
Description: FATFSライブラリを初期化する。
|
||||
Arguments: None.
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
InitializeFatfs(void)
|
||||
{
|
||||
// FATFSライブラリの初期化
|
||||
if(!FATFS_Init( FATFS_DMA_4, FATFS_DMA_5, THREAD_PRIO_FATFS))
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
#include <twl/ltdwram_end.h>
|
||||
|
||||
#include <twl/ltdwram_begin.h>
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitializeNwm
|
||||
Description: NWMライブラリを初期化する。
|
||||
Arguments: None.
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
InitializeNwm(OSArenaId drvArenaId, OSHeapHandle drvHeapHandle,
|
||||
OSArenaId wpaArenaId, OSHeapHandle wpaHeapHandle)
|
||||
{
|
||||
NwmspInit nwmInit;
|
||||
|
||||
nwmInit.dmaNo = NWM_DMANO;
|
||||
nwmInit.cmdPrio = THREAD_PRIO_NWM_COMMMAND;
|
||||
nwmInit.evtPrio = THREAD_PRIO_NWM_EVENT;
|
||||
nwmInit.sdioPrio = THREAD_PRIO_NWM_SDIO;
|
||||
nwmInit.drvHeap.id = drvArenaId;
|
||||
nwmInit.drvHeap.handle = drvHeapHandle;
|
||||
|
||||
nwmInit.wpaPrio = THREAD_PRIO_NWM_WPA;
|
||||
nwmInit.wpaHeap.id = wpaArenaId;
|
||||
nwmInit.wpaHeap.handle = wpaHeapHandle;
|
||||
|
||||
/* 新無線初期化(ランチャー専用) */
|
||||
NWMSP_InitForLauncher(&nwmInit);
|
||||
|
||||
}
|
||||
#include <twl/ltdwram_end.h>
|
||||
|
||||
#include <twl/ltdwram_begin.h>
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitializeCdc
|
||||
Description: CDCライブラリを初期化する。
|
||||
Arguments: None.
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
InitializeCdc(void)
|
||||
{
|
||||
u32 spiLockId;
|
||||
|
||||
// CODECアクセス用のSPIロックIDを取得する
|
||||
spiLockId = (u32)OS_GetLockID();
|
||||
if (spiLockId == OS_LOCK_ID_ERROR)
|
||||
{
|
||||
OS_Warning("OS_GetLockID failed.\n");
|
||||
}
|
||||
|
||||
SPI_Lock(spiLockId); // CODEC用SPI排他ロック
|
||||
CDC_InitForFirstBoot(); // ※ランチャー特殊処理。
|
||||
SPI_Unlock(spiLockId); // CODEC用SPI排他ロック
|
||||
|
||||
OS_Sleep(50); // CDC_InitForFirstBootでのPowerOnTime+デポップ期間
|
||||
|
||||
SPI_Lock(spiLockId); // CODEC用SPI排他ロック
|
||||
CDC_DisableExternalDepop(); // 外部デポップ回路を無効にします
|
||||
SPI_Unlock(spiLockId); // CODEC用SPI排他ロック
|
||||
}
|
||||
#include <twl/ltdwram_end.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitializeAllocateSystem
|
||||
Description: メモリ割当てシステムを初期化する。
|
||||
Arguments: None.
|
||||
Returns: OSHeapHandle - WRAM アリーナ上に確保されたヒープのハンドルを返す。
|
||||
*---------------------------------------------------------------------------*/
|
||||
static OSHeapHandle InitializeAllocateSystem(u8 memType)
|
||||
{
|
||||
|
||||
OSHeapHandle hh;
|
||||
|
||||
#ifdef SDK_TWLHYB
|
||||
if( OS_IsRunOnTwl() == TRUE)
|
||||
{
|
||||
hh = InitializeAllocateSystemCoreEx(memType); /* Hybrid を TWL で動作させる */
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
hh = InitializeAllocateSystemCore(memType); /* Hybrid を DS で動作させる or Limited */
|
||||
}
|
||||
|
||||
return hh;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitializeAllocateSystemCore
|
||||
Description: メモリ割当てシステムを初期化する。
|
||||
Hybrid を DS で動作させた場合、Limited を TWL で動作させた場合に動作
|
||||
Arguments: None.
|
||||
Returns: OSHeapHandle - WRAM アリーナ上に確保されたヒープのハンドルを返す。
|
||||
*---------------------------------------------------------------------------*/
|
||||
static OSHeapHandle InitializeAllocateSystemCore(u8 memType)
|
||||
{
|
||||
OSHeapHandle hh;
|
||||
|
||||
/* MAIN */
|
||||
if(memType == MEM_TYPE_MAIN)
|
||||
{
|
||||
{
|
||||
void* lo = (void*)OS_GetSubPrivArenaLo();
|
||||
void* hi = (void*)OS_GetSubPrivArenaHi();
|
||||
|
||||
// アリーナを 0 クリア
|
||||
MI_CpuClear8(lo, (u32)hi - (u32)lo);
|
||||
|
||||
// メモリ割り当て初期化
|
||||
lo = OS_InitAlloc(OS_ARENA_MAIN_SUBPRIV, lo, hi, 1);
|
||||
// アリーナ下位アドレスを設定
|
||||
OS_SetArenaLo(OS_ARENA_MAIN_SUBPRIV, lo);
|
||||
|
||||
// ヒープ作成
|
||||
hh = OS_CreateHeap(OS_ARENA_MAIN_SUBPRIV, lo, hi);
|
||||
|
||||
if (hh < 0)
|
||||
{
|
||||
OS_Panic("ARM7: Failed to MAIN create heap.\n");
|
||||
}
|
||||
}
|
||||
// カレントヒープに設定
|
||||
(void)OS_SetCurrentHeap(OS_ARENA_MAIN_SUBPRIV, hh);
|
||||
// ヒープサイズの確認
|
||||
{
|
||||
u32 heapSize;
|
||||
|
||||
heapSize = (u32)OS_CheckHeap(OS_ARENA_MAIN_SUBPRIV, hh);
|
||||
|
||||
if( heapSize <= 0) /* ヒープ領域の確保に失敗 */
|
||||
{
|
||||
OS_Panic("ARM7: Failed to MAIN create heap.\n");
|
||||
}
|
||||
|
||||
#ifdef SDK_TWLLTD
|
||||
{
|
||||
if ((ATH_DRV_HEAP_SIZE + WPA_HEAP_SIZE) > heapSize)
|
||||
{
|
||||
OS_Panic("Insufficient heap size. (0x%x < 0x%x)\n", heapSize, ATH_DRV_HEAP_SIZE + WPA_HEAP_SIZE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
OS_TPrintf("ARM7: MAIN heap size is %d\n", heapSize);
|
||||
}
|
||||
}
|
||||
|
||||
/* WRAM */
|
||||
if( memType == MEM_TYPE_WRAM)
|
||||
{
|
||||
{
|
||||
void* lo = (void*)OS_GetWramSubPrivArenaLo();
|
||||
void* hi = (void*)OS_GetWramSubPrivArenaHi();
|
||||
|
||||
// アリーナを 0 クリア
|
||||
MI_CpuClear8(lo, (u32)hi - (u32)lo);
|
||||
|
||||
// メモリ割り当て初期化
|
||||
lo = OS_InitAlloc(OS_ARENA_WRAM_SUBPRIV, lo, hi, 1);
|
||||
// アリーナ下位アドレスを設定
|
||||
OS_SetArenaLo(OS_ARENA_WRAM_SUBPRIV, lo);
|
||||
|
||||
// ヒープ作成
|
||||
hh = OS_CreateHeap(OS_ARENA_WRAM_SUBPRIV, lo, hi);
|
||||
|
||||
if (hh < 0)
|
||||
{
|
||||
OS_Panic("ARM7: Failed to WRAM create heap.\n");
|
||||
}
|
||||
}
|
||||
|
||||
// カレントヒープに設定
|
||||
(void)OS_SetCurrentHeap(OS_ARENA_WRAM_SUBPRIV, hh);
|
||||
|
||||
// ヒープサイズの確認
|
||||
{
|
||||
u32 heapSize;
|
||||
|
||||
heapSize = (u32)OS_CheckHeap(OS_ARENA_WRAM_SUBPRIV, hh);
|
||||
|
||||
if( heapSize <= 0) /* ヒープ領域の確保に失敗 */
|
||||
{
|
||||
OS_Panic("ARM7: Failed to MAIN create heap.\n");
|
||||
}
|
||||
|
||||
if (WM_WL_HEAP_SIZE > heapSize)
|
||||
{
|
||||
OS_Panic("Insufficient heap size. (0x%x < 0x%x)\n", heapSize, WM_WL_HEAP_SIZE);
|
||||
}
|
||||
OS_TPrintf("ARM7: WRAM heap size is %d\n", heapSize);
|
||||
}
|
||||
}
|
||||
return hh;
|
||||
}
|
||||
|
||||
#ifdef SDK_TWLHYB
|
||||
#include <twl/ltdwram_begin.h>
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitializeAllocateSystemCoreEx
|
||||
Description: メモリ割当てシステムを初期化する。
|
||||
Hybrid を TWL で動作させた場合に動作
|
||||
Arguments: None.
|
||||
Returns: OSHeapHandle - WRAM アリーナ上に確保されたヒープのハンドルを返す。
|
||||
*---------------------------------------------------------------------------*/
|
||||
static OSHeapHandle InitializeAllocateSystemCoreEx(u8 memType)
|
||||
{
|
||||
OSHeapHandle hh;
|
||||
|
||||
if(memType == MEM_TYPE_MAIN)
|
||||
{
|
||||
{
|
||||
void* basicLo = (void*)OS_GetSubPrivArenaLo();
|
||||
void* basicHi = (void*)OS_GetSubPrivArenaHi();
|
||||
void* extraLo = (void*)MATH_ROUNDUP((u32)SDK_LTDAUTOLOAD_LTDMAIN_BSS_END, 32);
|
||||
void* extraHi = (void*)MATH_ROUNDDOWN(HW_MAIN_MEM_SUB, 32);
|
||||
|
||||
#if SDK_DEBUG
|
||||
// debug information
|
||||
OS_TPrintf("ARM7: MAIN arena basicLo = %p\n", basicLo);
|
||||
OS_TPrintf("ARM7: MAIN arena basicHi = %p\n", basicHi);
|
||||
OS_TPrintf("ARM7: MAIN arena extraLo = %p\n", extraLo);
|
||||
OS_TPrintf("ARM7: MAIN arena extraHi = %p\n", extraHi);
|
||||
#endif
|
||||
// アリーナを 0 クリア
|
||||
MI_CpuClear8(basicLo, (u32)basicHi - (u32)basicLo);
|
||||
MI_CpuClear8(extraLo, (u32)extraHi - (u32)extraLo);
|
||||
|
||||
// メモリ割り当て初期化
|
||||
if ((u32)basicLo < (u32)extraLo)
|
||||
{
|
||||
basicLo = OS_InitAlloc(OS_ARENA_MAIN_SUBPRIV, basicLo, extraHi, 1);
|
||||
// アリーナ下位アドレスを設定
|
||||
OS_SetArenaLo(OS_ARENA_MAIN_SUBPRIV, basicLo);
|
||||
}
|
||||
else
|
||||
{
|
||||
extraLo = OS_InitAlloc(OS_ARENA_MAIN_SUBPRIV, extraLo, basicHi, 1);
|
||||
}
|
||||
|
||||
// ヒープ作成
|
||||
hh = OS_CreateHeap(OS_ARENA_MAIN_SUBPRIV, basicLo, basicHi);
|
||||
|
||||
if (hh < 0)
|
||||
{
|
||||
OS_Panic("ARM7: Failed to create MAIN heap.\n");
|
||||
}
|
||||
|
||||
// ヒープサイズの確認
|
||||
{
|
||||
u32 heapSize;
|
||||
|
||||
heapSize = (u32)OS_CheckHeap(OS_ARENA_MAIN_SUBPRIV, hh);
|
||||
|
||||
if( heapSize <= 0) /* ヒープ領域の確保に失敗 */
|
||||
{
|
||||
OS_Panic("ARM7: Failed to MAIN create heap.\n");
|
||||
}
|
||||
|
||||
OS_TPrintf("ARM7: MAIN heap size is %d (before AddToHead)\n", heapSize);
|
||||
}
|
||||
|
||||
// ヒープに拡張ブロックを追加
|
||||
OS_AddToHeap(OS_ARENA_MAIN_SUBPRIV, hh, extraLo, extraHi);
|
||||
}
|
||||
// カレントヒープに設定
|
||||
(void)OS_SetCurrentHeap(OS_ARENA_MAIN_SUBPRIV, hh);
|
||||
// ヒープサイズの確認
|
||||
{
|
||||
u32 heapSize;
|
||||
|
||||
heapSize = (u32)OS_CheckHeap(OS_ARENA_MAIN_SUBPRIV, hh);
|
||||
|
||||
if( heapSize <= 0) /* ヒープ領域の確保に失敗 */
|
||||
{
|
||||
OS_Panic("ARM7: Failed to MAIN create heap.\n");
|
||||
}
|
||||
|
||||
if ((ATH_DRV_HEAP_SIZE + WPA_HEAP_SIZE) > heapSize)
|
||||
{
|
||||
OS_Panic("Insufficient heap size. (0x%x < 0x%x)\n", heapSize, ATH_DRV_HEAP_SIZE + WPA_HEAP_SIZE);
|
||||
}
|
||||
OS_TPrintf("ARM7: MAIN heap size is %d\n", heapSize);
|
||||
}
|
||||
}
|
||||
|
||||
if(memType == MEM_TYPE_WRAM)
|
||||
{
|
||||
{
|
||||
void* basicLo = (void*)OS_GetWramSubPrivArenaLo();
|
||||
void* basicHi = (void*)OS_GetWramSubPrivArenaHi();
|
||||
void* extraLo = (void*)MATH_ROUNDUP((u32)SDK_LTDAUTOLOAD_LTDWRAM_BSS_END, 32);
|
||||
void* extraHi = (void*)MATH_ROUNDDOWN(HW_WRAM_A_HYB_END, 32);
|
||||
|
||||
#if SDK_DEBUG
|
||||
// debug information
|
||||
OS_TPrintf("ARM7: WRAM arena basicLo = %p\n", basicLo);
|
||||
OS_TPrintf("ARM7: WRAM arena basicHi = %p\n", basicHi);
|
||||
OS_TPrintf("ARM7: WRAM arena extraLo = %p\n", extraLo);
|
||||
OS_TPrintf("ARM7: WRAM arena extraHi = %p\n", extraHi);
|
||||
#endif
|
||||
|
||||
// アリーナを 0 クリア
|
||||
MI_CpuClear8(basicLo, (u32)basicHi - (u32)basicLo);
|
||||
MI_CpuClear8(extraLo, (u32)extraHi - (u32)extraLo);
|
||||
|
||||
// メモリ割り当て初期化
|
||||
if ((u32)basicLo < (u32)extraLo)
|
||||
{
|
||||
basicLo = OS_InitAlloc(OS_ARENA_WRAM_SUBPRIV, basicLo, extraHi, 1);
|
||||
// アリーナ下位アドレスを設定
|
||||
OS_SetArenaLo(OS_ARENA_WRAM_SUBPRIV, basicLo);
|
||||
}
|
||||
else
|
||||
{
|
||||
extraLo = OS_InitAlloc(OS_ARENA_WRAM_SUBPRIV, extraLo, basicHi, 1);
|
||||
}
|
||||
|
||||
// ヒープ作成
|
||||
hh = OS_CreateHeap(OS_ARENA_WRAM_SUBPRIV, basicLo, basicHi);
|
||||
|
||||
if (hh < 0)
|
||||
{
|
||||
OS_Panic("ARM7: Failed to WRAM create heap.\n");
|
||||
}
|
||||
|
||||
// ヒープサイズの確認
|
||||
{
|
||||
u32 heapSize;
|
||||
|
||||
heapSize = (u32)OS_CheckHeap(OS_ARENA_WRAM_SUBPRIV, hh);
|
||||
|
||||
if( heapSize <= 0) /* ヒープ領域の確保に失敗 */
|
||||
{
|
||||
OS_Panic("ARM7: Failed to WRAM create heap.\n");
|
||||
}
|
||||
|
||||
if (WM_WL_HEAP_SIZE > heapSize)
|
||||
{
|
||||
OS_Panic("Insufficient heap size. (0x%x < 0x%x)\n", heapSize, WM_WL_HEAP_SIZE);
|
||||
}
|
||||
OS_TPrintf("ARM7: WRAM heap size is %d (before AddToHeap)\n", heapSize);
|
||||
}
|
||||
|
||||
// ヒープに拡張ブロックを追加
|
||||
OS_AddToHeap(OS_ARENA_WRAM_SUBPRIV, hh, extraLo, extraHi);
|
||||
}
|
||||
|
||||
// カレントヒープに設定
|
||||
(void)OS_SetCurrentHeap(OS_ARENA_WRAM_SUBPRIV, hh);
|
||||
|
||||
// ヒープサイズの確認
|
||||
{
|
||||
u32 heapSize;
|
||||
|
||||
heapSize = (u32)OS_CheckHeap(OS_ARENA_WRAM_SUBPRIV, hh);
|
||||
|
||||
if( heapSize <= 0) /* ヒープ領域の確保に失敗 */
|
||||
{
|
||||
OS_Panic("ARM7: Failed to WRAM create heap.\n");
|
||||
}
|
||||
|
||||
if (WM_WL_HEAP_SIZE > heapSize)
|
||||
{
|
||||
OS_Panic("Insufficient heap size. (0x%x < 0x%x)\n", heapSize, WM_WL_HEAP_SIZE);
|
||||
}
|
||||
OS_TPrintf("ARM7: WRAM heap size is %d\n", heapSize);
|
||||
}
|
||||
}
|
||||
|
||||
return hh;
|
||||
}
|
||||
#include <twl/ltdwram_end.h>
|
||||
#endif
|
||||
|
||||
#ifdef WM_PRECALC_ALLOWEDCHANNEL
|
||||
extern u16 WMSP_GetAllowedChannel(u16 bitField);
|
||||
#endif
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: ReadUserInfo
|
||||
|
||||
Description: NVRAMからユーザー情報を読み出し、共有領域に展開する。
|
||||
ミラーリングされているバッファが両方壊れている場合は、
|
||||
共有領域のユーザー情報格納場所をクリアする。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void ReadUserInfo(void)
|
||||
{
|
||||
// ※hyenaでは、NITRO本体設定データはリードしない。
|
||||
|
||||
u8 *p = OS_GetSystemWork()->nvramUserInfo;
|
||||
|
||||
// 無線MACアドレスをユーザー情報の後ろに展開
|
||||
{
|
||||
u8 wMac[6];
|
||||
|
||||
// NVRAMからMACアドレスを読み出し
|
||||
NVRAM_ReadDataBytes(NVRAM_CONFIG_MACADDRESS_ADDRESS, 6, wMac);
|
||||
// 展開先アドレスを計算
|
||||
p = (u8 *)((u32)p + ((sizeof(NVRAMConfig) + 3) & ~0x00000003));
|
||||
// 共有領域に展開
|
||||
MI_CpuCopy8(wMac, p, 6);
|
||||
}
|
||||
|
||||
#ifdef WM_PRECALC_ALLOWEDCHANNEL
|
||||
// 使用可能チャンネルから使用許可チャンネルを計算
|
||||
{
|
||||
u16 enableChannel;
|
||||
u16 allowedChannel;
|
||||
|
||||
// 使用可能チャンネルを読み出し
|
||||
NVRAM_ReadDataBytes(NVRAM_CONFIG_ENABLECHANNEL_ADDRESS, 2, (u8 *)(&enableChannel));
|
||||
// 使用許可チャンネルを計算
|
||||
allowedChannel = WMSP_GetAllowedChannel((u16)(enableChannel >> 1));
|
||||
// 展開先アドレスを計算(MACアドレスの後ろの2バイト)
|
||||
p = (u8 *)((u32)p + 6);
|
||||
// 共有領域に展開
|
||||
*((u16 *)p) = allowedChannel;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: AdjustVolume
|
||||
|
||||
Description: 32段階のボリュームを8段階に量子化する
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void AdjustVolume(void)
|
||||
{
|
||||
u8 volume = MCU_GetVolume();
|
||||
u8 adjust;
|
||||
if ( volume < 2 )
|
||||
{
|
||||
adjust = 0;
|
||||
}
|
||||
else if ( volume < 5 )
|
||||
{
|
||||
adjust = 2;
|
||||
}
|
||||
else if ( volume < 9 )
|
||||
{
|
||||
adjust = 6;
|
||||
}
|
||||
else if ( volume < 14 )
|
||||
{
|
||||
adjust = 11;
|
||||
}
|
||||
else if ( volume < 19 )
|
||||
{
|
||||
adjust = 16;
|
||||
}
|
||||
else if ( volume < 24 )
|
||||
{
|
||||
adjust = 21;
|
||||
}
|
||||
else if ( volume < 29 )
|
||||
{
|
||||
adjust = 26;
|
||||
}
|
||||
else
|
||||
{
|
||||
adjust = 31;
|
||||
}
|
||||
OS_TPrintf("Current volume: %d.\n", volume);
|
||||
if ( volume != adjust )
|
||||
{
|
||||
OS_TPrintf("Volume adjusts to %d.\n", adjust);
|
||||
MCU_SetVolume(adjust);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: VBlankIntr
|
||||
Description: V ブランク割り込みベクタ。
|
||||
Arguments: None.
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
extern BOOL PMi_Initialized;
|
||||
void PM_SelfBlinkProc(void);
|
||||
|
||||
static void
|
||||
VBlankIntr(void)
|
||||
{
|
||||
if (PMi_Initialized)
|
||||
{
|
||||
PM_SelfBlinkProc();
|
||||
}
|
||||
}
|
||||
@ -1,49 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlFirm - tools - nandfirm-ds-launcher
|
||||
# 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.
|
||||
#
|
||||
# $Log: $
|
||||
# $NoKeywords: $
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TWL_PROC = ARM7
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
LINCLUDES = ../include
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_BIN = wram_regs.rbin
|
||||
|
||||
SRCS = \
|
||||
wram_regs.c \
|
||||
|
||||
#SRCDIR = # using default
|
||||
#LCFILE = # using default
|
||||
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||
|
||||
INSTALL_DIR = .
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,123 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlIPL - wram_regs
|
||||
File: wram_regs.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-12-11#$
|
||||
$Rev: 2990 $
|
||||
$Author: nakasima $
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include <twl/mi.h>
|
||||
|
||||
#define HW_HYENA_WRAM_A_OFS (HW_WRAM_A_LTD - HW_WRAM_BASE)
|
||||
#define HW_HYENA_WRAM_A_OFS_END (HW_HYENA_WRAM_A_OFS + HW_WRAM_A_SIZE)
|
||||
#define HW_HYENA_WRAM_B_OFS (HW_WRAM_B - HW_WRAM_BASE)
|
||||
#define HW_HYENA_WRAM_B_OFS_END (HW_HYENA_WRAM_B_OFS + HW_WRAM_B_SIZE * 2)
|
||||
#define HW_HYENA_WRAM_C_OFS (HW_WRAM_C - HW_WRAM_BASE)
|
||||
#define HW_HYENA_WRAM_C_OFS_END (HW_HYENA_WRAM_C_OFS + HW_WRAM_C_SIZE)
|
||||
|
||||
// MAP_TS_LTD for hyena
|
||||
// WRAM-A Lock:ON, Master:ARM7, Enable:Slot0-3(256Kbytes), Address(7):0x037c0000-0x037fffff, Address(9):None
|
||||
// WRAM-B Lock:ON, Master:ARM7, Enable:Slot4-7(128Kbytes), Address(7):0x03760000-0x0377ffff, Address(9):None
|
||||
// Address(7):0x037a0000-0x037bffff, Address(9):None
|
||||
// WRAM-B Lock:OFF, Master:ARM9, Enable:Slot0-3(128Kbytes), Address(7):0x03740000-0x0375ffff, Address(9):0x03740000-0x0375ffff
|
||||
// Address(7):0x03780000-0x0379ffff, Address(9):0x03780000-0x0379ffff
|
||||
// WRAM-C Lock:OFF, Msster:ARM9, Enable:Slot0-7(256Kbytes), Address(7):0x03700000-0x0373ffff, Address(9):0x03700000-0x0373ffff
|
||||
// WRAM-0 Master:ARM9, (16Kbytes), Address(7):0x03040000-0x03043fff, Address(9):0x03040000-0x03043fff
|
||||
// WRAM-1 Master:ARM9, (16Kbytes), Address(7):0x03044000-0x03047fff, Address(9):0x03044000-0x03047fff
|
||||
|
||||
// MAP_TS_LTD original
|
||||
// WRAM-A Lock:ON, Master:ARM7, Enable:Slot0-3(256Kbytes), Address(7):0x037c0000-0x037fffff, Address(9):None
|
||||
// WRAM-B Lock:OFF, Master:ARM9, Enable:Slot0-7(256Kbytes), Address(7):0x03740000-0x037bffff, Address(9):0x03740000-0x037bffff
|
||||
// WRAM-C Lock:OFF, Msster:ARM9, Enable:Slot0-7(256Kbytes), Address(7):0x03700000-0x0373ffff, Address(9):0x03700000-0x0373ffff
|
||||
// WRAM-0 Master:ARM9, (16Kbytes), Address(7):0x03040000-0x03043fff, Address(9):0x03040000-0x03043fff
|
||||
// WRAM-1 Master:ARM9, (16Kbytes), Address(7):0x03044000-0x03047fff, Address(9):0x03044000-0x03047fff
|
||||
|
||||
u32 HYENA_WramReg[0x30/sizeof(u32)] =
|
||||
{
|
||||
// ARM9
|
||||
|
||||
// WRAM-A
|
||||
REG_MI_MBK1_FIELD(
|
||||
TRUE, MI_WRAM_OFFSET_192KB/2, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_128KB/2, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_64KB/2, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_0KB/2, MI_WRAM_ARM7
|
||||
),
|
||||
// WRAM-B
|
||||
REG_MI_MBK2_FIELD(
|
||||
TRUE, MI_WRAM_OFFSET_96KB, MI_WRAM_ARM9,
|
||||
TRUE, MI_WRAM_OFFSET_64KB, MI_WRAM_ARM9,
|
||||
TRUE, MI_WRAM_OFFSET_32KB, MI_WRAM_ARM9,
|
||||
TRUE, MI_WRAM_OFFSET_0KB, MI_WRAM_ARM9
|
||||
),
|
||||
REG_MI_MBK3_FIELD(
|
||||
TRUE, MI_WRAM_OFFSET_224KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_192KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_160KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_128KB, MI_WRAM_ARM7
|
||||
),
|
||||
// WRAM-C
|
||||
REG_MI_MBK4_FIELD(
|
||||
TRUE, MI_WRAM_OFFSET_96KB, MI_WRAM_ARM9,
|
||||
TRUE, MI_WRAM_OFFSET_64KB, MI_WRAM_ARM9,
|
||||
TRUE, MI_WRAM_OFFSET_32KB, MI_WRAM_ARM9,
|
||||
TRUE, MI_WRAM_OFFSET_0KB, MI_WRAM_ARM9
|
||||
),
|
||||
REG_MI_MBK5_FIELD(
|
||||
TRUE, MI_WRAM_OFFSET_224KB, MI_WRAM_ARM9,
|
||||
TRUE, MI_WRAM_OFFSET_192KB, MI_WRAM_ARM9,
|
||||
TRUE, MI_WRAM_OFFSET_160KB, MI_WRAM_ARM9,
|
||||
TRUE, MI_WRAM_OFFSET_128KB, MI_WRAM_ARM9
|
||||
),
|
||||
|
||||
REG_MI_MBK6_FIELD( NULL >> 16,
|
||||
MI_WRAM_IMAGE_256KB,
|
||||
NULL >> 16
|
||||
),
|
||||
REG_MI_MBK7_FIELD( HW_HYENA_WRAM_B_OFS_END >> 15,
|
||||
MI_WRAM_IMAGE_256KB,
|
||||
HW_HYENA_WRAM_B_OFS >> 15
|
||||
),
|
||||
REG_MI_MBK8_FIELD( HW_HYENA_WRAM_C_OFS_END >> 15,
|
||||
MI_WRAM_IMAGE_256KB,
|
||||
HW_HYENA_WRAM_C_OFS >> 15
|
||||
),
|
||||
|
||||
// ARM7
|
||||
REG_MI_MBK6_FIELD( HW_HYENA_WRAM_A_OFS_END >> 16,
|
||||
MI_WRAM_IMAGE_256KB,
|
||||
HW_HYENA_WRAM_A_OFS >> 16
|
||||
),
|
||||
REG_MI_MBK7_FIELD( HW_HYENA_WRAM_B_OFS_END >> 15,
|
||||
MI_WRAM_IMAGE_256KB,
|
||||
HW_HYENA_WRAM_B_OFS >> 15
|
||||
),
|
||||
REG_MI_MBK8_FIELD( HW_HYENA_WRAM_C_OFS_END >> 15,
|
||||
MI_WRAM_IMAGE_256KB,
|
||||
HW_HYENA_WRAM_C_OFS >> 15
|
||||
),
|
||||
|
||||
// WRAM Lock
|
||||
(u32)(
|
||||
(0x0F << 0) |
|
||||
(0xF0 << 8) |
|
||||
(0x00 << 16) |
|
||||
|
||||
// WRAM-0/1
|
||||
(0 << 24) |
|
||||
|
||||
// VRAM-C
|
||||
(7 << 26) |
|
||||
// VRAM-D
|
||||
(7 << 29)
|
||||
),
|
||||
};
|
||||
|
||||
@ -1,132 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlIPL - components - jackal.TWL
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# Main memory にコードを退避させたathdrvを使用。(for test)
|
||||
TMP_WL_MAIN ?= FALSE
|
||||
|
||||
TARGET_FIRM = SYSTEMMENU
|
||||
override TARGET_PLATFORM = TWL
|
||||
override TWL_PROC = ARM7
|
||||
override TWL_ARCHGEN = LIMITED
|
||||
override TWL_PLATFORM = TS
|
||||
TWL_NO_STD_PCHDR = True
|
||||
override TARGET_CODEGEN = ARM
|
||||
|
||||
FIRM_LIBSUFFIX = .firm$(ARCHGEN_TYPE)$(CODEGEN_ARCH)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = $(SYSMENU_ROOT)/build/libraries/aes \
|
||||
wram_regs
|
||||
|
||||
HYENA_SRCDIR = ../hyena.TWL/src
|
||||
SRCS = $(HYENA_SRCDIR)/crt0.LTD.c \
|
||||
$(HYENA_SRCDIR)/main.c \
|
||||
$(HYENA_SRCDIR)/initScfg.c
|
||||
|
||||
TARGET_NAME = jackal
|
||||
|
||||
TARGET_NEF = $(TARGET_NAME).tef
|
||||
LCFILE_SPEC = $(TARGET_NAME)$(CODEGEN_ARCH).lsf
|
||||
LCFILE_TEMPLATE = $(TARGET_NAME).lcf.template
|
||||
LDRES_TEMPLATE = $(ROOT)/build/components/armadillo.TWL/armadillo.response.template
|
||||
|
||||
CRT0_O = $(OBJDIR)/crt0.LTD.o
|
||||
|
||||
# スタック不足防止の為、インライン展開せずにコンパイルする
|
||||
CCFLAGS_OPT = -O4 -inline off
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||
|
||||
# crt0.o 、 libpm_sp および libnwm_sp は、ローカルでビルドしたものを使用するので、除外する。
|
||||
ifeq ($(TMP_WL_MAIN), TRUE)
|
||||
GLIBRARIES := $(filter-out $(CRT0_O) libpm_sp$(TWL_LIBSUFFIX).a libnwm_sp$(TWL_LIBSUFFIX).a libathdrv_sp$(TWL_LIBSUFFIX).a,$(GLIBRARIES))
|
||||
else
|
||||
GLIBRARIES := $(filter-out $(CRT0_O) libpm_sp$(TWL_LIBSUFFIX).a libnwm_sp$(TWL_LIBSUFFIX).a,$(GLIBRARIES))
|
||||
endif
|
||||
|
||||
MACRO_FLAGS += -DSDK_ARM7COMP_LTD -DSDK_SEA \
|
||||
-DSDK_NOINIT \
|
||||
-DSDK_SYSMENU_BUILD
|
||||
|
||||
MAKELCF_FLAGS += -DADDRESS_FLXMAIN='0x02280200' \
|
||||
-DADDRESS_BOOTCORE='0x0380f000' \
|
||||
-DCRT0_O='$(CRT0_O)' \
|
||||
-DFIRM_LIBSUFFIX='$(FIRM_LIBSUFFIX)'
|
||||
|
||||
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 \
|
||||
$(ROOT)/build/libraries/spi/ARM7/pm/include \
|
||||
$(ROOT)/build/libraries/init/common/include \
|
||||
$(ROOT)/build/libraries/reboot/common/include \
|
||||
$(SYSMENU_ROOT)/build/libraries_sysmenu/sysmenu/common/include
|
||||
|
||||
SYSMENU_LIBS = \
|
||||
libsysmenu_sp$(TWL_LIBSUFFIX).a \
|
||||
libsysmmcu_sp$(TWL_LIBSUFFIX).a \
|
||||
libboot_sp$(TWL_LIBSUFFIX).a \
|
||||
libds_sp$(TWL_LIBSUFFIX).a \
|
||||
libhotsw_sp$(TWL_LIBSUFFIX).a \
|
||||
libdht_sp$(TWL_LIBSUFFIX).a \
|
||||
libpm_sp.SYSMENU$(TWL_LIBSUFFIX).a \
|
||||
libnwm_sp.SYSMENU$(TWL_LIBSUFFIX).a
|
||||
|
||||
ifeq ($(TMP_WL_MAIN), TRUE)
|
||||
SYSMENU_LIBS += \
|
||||
libathdrv_sp.SYSMENU$(TWL_LIBSUFFIX).a
|
||||
endif
|
||||
|
||||
SDK_APPEND_LIBS = \
|
||||
libwl_sp$(TWL_LIBSUFFIX).a \
|
||||
libaes_sp$(FIRM_LIBSUFFIX).a \
|
||||
libsea_sp$(TWL_LIBSUFFIX).a \
|
||||
libreboot_sp$(TWL_LIBSUFFIX).a
|
||||
|
||||
LLIBRARIES += $(SYSMENU_LIBS) $(SDK_APPEND_LIBS)
|
||||
|
||||
LLIBRARY_DIRS += ./
|
||||
|
||||
ifeq ($(TMP_WL_MAIN), TRUE)
|
||||
LLIBRARY_DIRS += $(SYSMENU_ROOT)/lib/TwlWireless/$(TWL_LIBTYPE)
|
||||
endif
|
||||
|
||||
LDEPENDS_NEF = $(TWL_LIBS) $(LLIBRARIES)
|
||||
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,400 +0,0 @@
|
||||
#---------------------------------------------------------------------------
|
||||
# Project: TwlSDK - components - armadillo.TWL
|
||||
# File: armadillo.lcf.template
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#---------------------------------------------------------------------------
|
||||
MEMORY
|
||||
{
|
||||
<STATIC.NAME> (RWX) : ORIGIN = <STATIC.ADDRESS>, 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>
|
||||
|
||||
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>
|
||||
|
||||
check.WORKRAM (RWX) : ORIGIN = 0x03740000, LENGTH = 0xd0000 > workram.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 =.;
|
||||
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 =.;
|
||||
<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;
|
||||
|
||||
#
|
||||
# DATA BLOCK: READ WRITE
|
||||
#
|
||||
. = ALIGN(4);
|
||||
<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>
|
||||
. = ALIGN(4);
|
||||
SDK_STATIC_END =.;
|
||||
|
||||
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 =.;
|
||||
<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>
|
||||
. = ALIGN(4);
|
||||
SDK_STATIC_BSS_END = .;
|
||||
|
||||
SDK_STATIC_BSS_SIZE = SDK_STATIC_BSS_END - SDK_STATIC_BSS_START;
|
||||
|
||||
} >> <STATIC.NAME>
|
||||
|
||||
############################ 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
|
||||
|
||||
############################ OVERLAYDEFS ############################
|
||||
.<PROPERTY.OVERLAYDEFS>F:
|
||||
{
|
||||
### <STATIC.NAME> module information
|
||||
WRITEW ADDR(.<STATIC.NAME>); # load address
|
||||
WRITEW _start; # entry address
|
||||
WRITEW SDK_STATIC_SIZE; # size of module
|
||||
WRITEW _start_AutoloadDoneCallback; # callback autoload done
|
||||
|
||||
} > <PROPERTY.OVERLAYDEFS>F
|
||||
|
||||
########################### LTDAUTOLOADS ############################
|
||||
SDK_LTDAUTOLOAD_TOP_START = 0x02f00000;
|
||||
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_BSS_END = 0x03740000;
|
||||
|
||||
.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>
|
||||
|
||||
#
|
||||
# TEXT BLOCK: READ ONLY
|
||||
#
|
||||
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.START =.;
|
||||
<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=.etable>
|
||||
<LTDAUTOLOAD.OBJECT=.exception:t>
|
||||
. = ALIGN(4);
|
||||
SDK_STATIC_ETABLE_START =.;
|
||||
__exception_table_start__ =.;
|
||||
EXCEPTION
|
||||
__exception_table_end__ =.;
|
||||
SDK_STATIC_ETABLE_END =.;
|
||||
<END.LTDAUTOLOAD.OBJECTS>
|
||||
<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 =.;
|
||||
<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;
|
||||
|
||||
#
|
||||
# DATA BLOCK: READ WRITE BLOCK
|
||||
#
|
||||
. = ALIGN(4);
|
||||
<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=.wram>
|
||||
<LTDAUTOLOAD.OBJECT=.wram:t>
|
||||
<END.LTDAUTOLOAD.OBJECTS>
|
||||
<FOREACH.LTDAUTOLOAD.LIBRARIES=.wram>
|
||||
<LTDAUTOLOAD.LIBRARY=.wram:t>
|
||||
<END.LTDAUTOLOAD.LIBRARIES>
|
||||
<FOREACH.LTDAUTOLOAD.OBJECTS=.ltdwram>
|
||||
<LTDAUTOLOAD.OBJECT=.ltdwram:t>
|
||||
<END.LTDAUTOLOAD.OBJECTS>
|
||||
<FOREACH.LTDAUTOLOAD.LIBRARIES=.ltdwram>
|
||||
<LTDAUTOLOAD.LIBRARY=.ltdwram:t>
|
||||
<END.LTDAUTOLOAD.LIBRARIES>
|
||||
<FOREACH.LTDAUTOLOAD.OBJECTS=.rsvwram>
|
||||
<LTDAUTOLOAD.OBJECT=.rsvwram:t>
|
||||
<END.LTDAUTOLOAD.OBJECTS>
|
||||
<FOREACH.LTDAUTOLOAD.LIBRARIES=.rsvwram>
|
||||
<LTDAUTOLOAD.LIBRARY=.rsvwram: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>
|
||||
. = ALIGN(4);
|
||||
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.END =.;
|
||||
|
||||
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 =.;
|
||||
<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=.wram>
|
||||
<LTDAUTOLOAD.OBJECT=.wram.bss:t>
|
||||
<END.LTDAUTOLOAD.OBJECTS>
|
||||
<FOREACH.LTDAUTOLOAD.LIBRARIES=.wram>
|
||||
<LTDAUTOLOAD.LIBRARY=.wram.bss:t>
|
||||
<END.LTDAUTOLOAD.LIBRARIES>
|
||||
<FOREACH.LTDAUTOLOAD.OBJECTS=.ltdwram>
|
||||
<LTDAUTOLOAD.OBJECT=.ltdwram.bss:t>
|
||||
<END.LTDAUTOLOAD.OBJECTS>
|
||||
<FOREACH.LTDAUTOLOAD.LIBRARIES=.ltdwram>
|
||||
<LTDAUTOLOAD.LIBRARY=.ltdwram.bss:t>
|
||||
<END.LTDAUTOLOAD.LIBRARIES>
|
||||
<FOREACH.LTDAUTOLOAD.OBJECTS=.rsvwram>
|
||||
<LTDAUTOLOAD.OBJECT=.rsvwram.bss:t>
|
||||
<END.LTDAUTOLOAD.OBJECTS>
|
||||
<FOREACH.LTDAUTOLOAD.LIBRARIES=.rsvwram>
|
||||
<LTDAUTOLOAD.LIBRARY=.rsvwram.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>
|
||||
. = ALIGN(4);
|
||||
SDK_LTDAUTOLOAD.<LTDAUTOLOAD.NAME>.BSS_END =.;
|
||||
SDK_LTDAUTOLOAD_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_MOUNT_INFO_TABLE = SDK_LTDAUTOLOAD_BSS_END;
|
||||
SDK_LTDAUTOLOAD_BSS_END = SDK_MOUNT_INFO_TABLE + 0x400;
|
||||
|
||||
######################### 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);
|
||||
|
||||
########################## LTDOVERLAYDEFS ###########################
|
||||
.<PROPERTY.LTDOVERLAYDEFS>L:
|
||||
{
|
||||
### TWL limited extended static module information
|
||||
WRITEW SDK_LTDAUTOLOAD_TOP_START; # load address
|
||||
WRITEW SDK_MOUNT_INFO_TABLE; # address of the FS mount information table
|
||||
WRITEW SDK_LTDAUTOLOAD_SIZE + SDK_LTDAUTOLOAD_TOP_SIZE; # size of module
|
||||
WRITEW 0; # padding
|
||||
|
||||
} > <PROPERTY.LTDOVERLAYDEFS>L
|
||||
|
||||
############################ OTHERS #################################
|
||||
SDK_SUBPRIV_ARENA_LO = 0x02ffc000; # メインメモリアリーナはサイズ 0
|
||||
SDK_SEA_KEY_STORE = SDK_LTDAUTOLOAD_BSS_END;
|
||||
SDK_WRAM_ARENA_LO = SDK_LTDAUTOLOAD_BSS_END + 0x40;
|
||||
|
||||
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_WRAM_ARENA_LO + 0x80 + SDK_IRQ_STACKSIZE + SDK_SYS_STACKSIZE * SDK_SYS_STACKSIZE_SIGN;
|
||||
|
||||
} > check.WORKRAM
|
||||
}
|
||||
@ -1,106 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - components - armadillo.TWL
|
||||
# File: armadillo.lsf
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# Nitro LCF SPEC FILE
|
||||
#
|
||||
#--------
|
||||
Static $(TARGET_NAME)
|
||||
{
|
||||
Address $(ADDRESS_FLXMAIN)
|
||||
StackSize 1024 1024
|
||||
|
||||
Library $(CRT0_O)
|
||||
Object $(OBJDIR)/initScfg.o
|
||||
# Library libwpa_sp$(LIBSUFFIX).a
|
||||
Library libwm_sp$(LIBSUFFIX).a (.text)
|
||||
Library libwm_sp$(LIBSUFFIX).a (.rodata)
|
||||
Library libwm_sp$(LIBSUFFIX).a (.data)
|
||||
Library libmic_sp$(LIBSUFFIX).a (.text)
|
||||
Library libmic_sp$(LIBSUFFIX).a (.rodata)
|
||||
Library libmic_sp$(LIBSUFFIX).a (.data)
|
||||
Library libmicex_sp$(LIBSUFFIX).a (.text)
|
||||
Library libmicex_sp$(LIBSUFFIX).a (.rodata)
|
||||
Library libmicex_sp$(LIBSUFFIX).a (.data)
|
||||
}
|
||||
|
||||
#--------
|
||||
Ltdautoload SCRWRAM
|
||||
{
|
||||
Address 0x03758000
|
||||
|
||||
Library libsubpsyscall.a
|
||||
Library libsyscall_sp.twl.a
|
||||
Library $(CW_LIBS)
|
||||
Library $(ISDBG_LIBS_TWL)
|
||||
Library $(ISDBG_LIBS_NITRO)
|
||||
|
||||
Object * (.etable)
|
||||
Object $(OBJDIR)/main.o
|
||||
|
||||
Library libsea_sp$(LIBSUFFIX).a
|
||||
Library libcrypto_sp$(LIBSUFFIX).a
|
||||
|
||||
Library libos_sp$(LIBSUFFIX).a
|
||||
Library libmi_sp$(LIBSUFFIX).a
|
||||
Library libstd_sp$(LIBSUFFIX).a
|
||||
Library libmath_sp$(LIBSUFFIX).a
|
||||
Library libpxi_sp$(LIBSUFFIX).a
|
||||
Library libexi_sp$(LIBSUFFIX).a
|
||||
Library libi2c_sp$(LIBSUFFIX).a
|
||||
Library libsdio_sp$(LIBSUFFIX).a
|
||||
Library libpad_sp$(LIBSUFFIX).a
|
||||
Library libscfg_sp$(LIBSUFFIX).a
|
||||
Library libmcu_sp$(LIBSUFFIX).a
|
||||
Library libcdc_sp$(LIBSUFFIX).a
|
||||
Library libsnd_sp$(LIBSUFFIX).a
|
||||
Library libsndex_sp$(LIBSUFFIX).a
|
||||
Library libspi_sp$(LIBSUFFIX).a
|
||||
Library libpm_sp.SYSMENU$(LIBSUFFIX).a
|
||||
Library libtp_sp$(LIBSUFFIX).a
|
||||
Library libtpex_sp$(LIBSUFFIX).a
|
||||
Library libnvram_sp$(LIBSUFFIX).a
|
||||
Library librtc_sp$(LIBSUFFIX).a
|
||||
Library libfatfs_sp$(LIBSUFFIX).a
|
||||
Library libwl_sp$(LIBSUFFIX).a
|
||||
Library libathdrv_sp$(LIBSUFFIX).a
|
||||
Library libfs_sp$(LIBSUFFIX).a
|
||||
Library libcard_sp$(LIBSUFFIX).a
|
||||
Library libcamera_sp$(LIBSUFFIX).a
|
||||
Library libnwm_sp.SYSMENU$(LIBSUFFIX).a
|
||||
Library libwvr_sp$(LIBSUFFIX).a
|
||||
Library libwm_sp$(LIBSUFFIX).a (.bss)
|
||||
Library libmic_sp$(LIBSUFFIX).a (.bss)
|
||||
Library libmicex_sp$(LIBSUFFIX).a (.bss)
|
||||
|
||||
Library libboot_sp$(LIBSUFFIX).a
|
||||
Library libreboot_sp$(LIBSUFFIX).a
|
||||
Library libhotsw_sp$(LIBSUFFIX).a
|
||||
Library libreloc_info_sp$(LIBSUFFIX).a
|
||||
Library libsysmenu_sp$(LIBSUFFIX).a
|
||||
Library libsysmmcu_sp$(LIBSUFFIX).a
|
||||
Library libds_sp$(LIBSUFFIX).a
|
||||
Library libaes_sp$(FIRM_LIBSUFFIX).a
|
||||
Library libdht_sp$(LIBSUFFIX).a
|
||||
|
||||
Object * (.wram)
|
||||
Object * (.ltdwram)
|
||||
Object * (.rsvwram)
|
||||
Object * (.main)
|
||||
Object * (.ltdmain)
|
||||
}
|
||||
|
||||
# BootROMの鍵データが0x0380c400~にあるので、jackalのWRAM配置の上限はその値になることに注意。
|
||||
@ -1,107 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - components - armadillo.TWL
|
||||
# File: armadillo.lsf
|
||||
#
|
||||
# Copyright 2008 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-07-24#$
|
||||
# $Rev: 1974 $
|
||||
# $Author: yosiokat $
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# Nitro LCF SPEC FILE
|
||||
#
|
||||
#--------
|
||||
Static $(TARGET_NAME)
|
||||
{
|
||||
Address $(ADDRESS_FLXMAIN)
|
||||
StackSize 1024 1024
|
||||
|
||||
Library $(CRT0_O)
|
||||
Object $(OBJDIR)/initScfg.o
|
||||
}
|
||||
|
||||
#--------
|
||||
Ltdautoload SCRWRAM
|
||||
{
|
||||
Address 0x03758000
|
||||
|
||||
Library libsubpsyscall.a
|
||||
Library libsyscall_sp.twl.a
|
||||
Library $(CW_LIBS)
|
||||
Library $(ISDBG_LIBS_TWL)
|
||||
Library $(ISDBG_LIBS_NITRO)
|
||||
|
||||
Object * (.etable)
|
||||
Object $(OBJDIR)/main.o
|
||||
|
||||
Library libsea_sp$(LIBSUFFIX).a
|
||||
Library libcrypto_sp$(LIBSUFFIX).a
|
||||
|
||||
Library libos_sp$(LIBSUFFIX).a
|
||||
Library libmi_sp$(LIBSUFFIX).a
|
||||
Library libstd_sp$(LIBSUFFIX).a
|
||||
Library libmath_sp$(LIBSUFFIX).a
|
||||
Library libpxi_sp$(LIBSUFFIX).a
|
||||
Library libexi_sp$(LIBSUFFIX).a
|
||||
Library libi2c_sp$(LIBSUFFIX).a
|
||||
Library libsdio_sp$(LIBSUFFIX).a
|
||||
Library libpad_sp$(LIBSUFFIX).a
|
||||
Library libscfg_sp$(LIBSUFFIX).a
|
||||
Library libmcu_sp$(LIBSUFFIX).a
|
||||
Library libcdc_sp$(LIBSUFFIX).a
|
||||
Library libsnd_sp$(LIBSUFFIX).a
|
||||
Library libsndex_sp$(LIBSUFFIX).a
|
||||
Library libspi_sp$(LIBSUFFIX).a
|
||||
Library libpm_sp.SYSMENU$(LIBSUFFIX).a
|
||||
Library libtp_sp$(LIBSUFFIX).a
|
||||
Library libtpex_sp$(LIBSUFFIX).a
|
||||
Library libnvram_sp$(LIBSUFFIX).a
|
||||
Library librtc_sp$(LIBSUFFIX).a
|
||||
Library libfatfs_sp$(LIBSUFFIX).a
|
||||
Library libwl_sp$(LIBSUFFIX).a
|
||||
Library libathdrv_sp$(LIBSUFFIX).a
|
||||
Library libfs_sp$(LIBSUFFIX).a
|
||||
Library libcard_sp$(LIBSUFFIX).a
|
||||
Library libcamera_sp$(LIBSUFFIX).a
|
||||
Library libnwm_sp.SYSMENU$(LIBSUFFIX).a
|
||||
Library libwvr_sp$(LIBSUFFIX).a
|
||||
Library libwm_sp$(LIBSUFFIX).a (.bss)
|
||||
Library libmic_sp$(LIBSUFFIX).a (.bss)
|
||||
Library libmicex_sp$(LIBSUFFIX).a (.bss)
|
||||
|
||||
Library libboot_sp$(LIBSUFFIX).a
|
||||
Library libreboot_sp$(LIBSUFFIX).a
|
||||
Library libhotsw_sp$(LIBSUFFIX).a
|
||||
Library libreloc_info_sp$(LIBSUFFIX).a
|
||||
Library libsysmenu_sp$(LIBSUFFIX).a
|
||||
Library libsysmmcu_sp$(LIBSUFFIX).a
|
||||
Library libds_sp$(LIBSUFFIX).a
|
||||
Library libaes_sp$(FIRM_LIBSUFFIX).a
|
||||
Library libdht_sp$(LIBSUFFIX).a
|
||||
|
||||
# Library libwpa_sp$(LIBSUFFIX).a
|
||||
Library libwm_sp$(LIBSUFFIX).a (.text)
|
||||
Library libwm_sp$(LIBSUFFIX).a (.rodata)
|
||||
Library libwm_sp$(LIBSUFFIX).a (.data)
|
||||
Library libmic_sp$(LIBSUFFIX).a (.text)
|
||||
Library libmic_sp$(LIBSUFFIX).a (.rodata)
|
||||
Library libmic_sp$(LIBSUFFIX).a (.data)
|
||||
Library libmicex_sp$(LIBSUFFIX).a (.text)
|
||||
Library libmicex_sp$(LIBSUFFIX).a (.rodata)
|
||||
Library libmicex_sp$(LIBSUFFIX).a (.data)
|
||||
|
||||
Object * (.wram)
|
||||
Object * (.ltdwram)
|
||||
Object * (.rsvwram)
|
||||
Object * (.main)
|
||||
Object * (.ltdmain)
|
||||
}
|
||||
|
||||
# BootROMの鍵データが0x0380c400~にあるので、jackalのWRAM配置の上限はその値になることに注意。
|
||||
@ -1,49 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlFirm - tools - nandfirm-ds-launcher
|
||||
# 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.
|
||||
#
|
||||
# $Log: $
|
||||
# $NoKeywords: $
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TWL_PROC = ARM7
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
LINCLUDES = ../include
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_BIN = wram_regs.rbin
|
||||
|
||||
SRCS = \
|
||||
wram_regs.c \
|
||||
|
||||
#SRCDIR = # using default
|
||||
#LCFILE = # using default
|
||||
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||
|
||||
INSTALL_DIR = .
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
|
||||
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,121 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlIPL - wram_regs
|
||||
File: wram_regs.c
|
||||
|
||||
Copyright 2007 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include <twl/mi.h>
|
||||
|
||||
#define COMPONENT_WRAM_A_OFS (HW_WRAM_A_LTD - HW_WRAM_BASE)
|
||||
#define COMPONENT_WRAM_A_OFS_END (COMPONENT_WRAM_A_OFS + HW_WRAM_A_SIZE)
|
||||
#define COMPONENT_WRAM_B_OFS (COMPONENT_WRAM_A_OFS - HW_WRAM_B_SIZE)
|
||||
#define COMPONENT_WRAM_B_OFS_END (COMPONENT_WRAM_A_OFS)
|
||||
#define COMPONENT_WRAM_C_OFS (COMPONENT_WRAM_B_OFS - HW_WRAM_C_SIZE * 2)
|
||||
#define COMPONENT_WRAM_C_OFS_END (COMPONENT_WRAM_B_OFS)
|
||||
|
||||
// MAP_TS_LTD for jackal
|
||||
// WRAM-A Lock:ON, Master:ARM7, Enable:Slot0-3(256Kbytes), Address(7):0x037c0000-0x037fffff, Address(9):None
|
||||
// WRAM-B Lock:ON, Master:ARM7, Enable:Slot5-7(256Kbytes), Address(7):0x03780000-0x037bffff, Address(9):None
|
||||
// WRAM-C Lock:ON, Master:ARM7, Enable:Slot3-7(160Kbytes), Address(7):0x03758000-0x037bffff, Address(9):None
|
||||
// WRAM-C Lock:OFF, Msster:ARM9, Enable:Slot0-2( 96Kbytes), Address(7):0x03700000-0x03717fff, Address(9):0x03700000-0x0317ffff
|
||||
// WRAM-0 Master:ARM9, (16Kbytes), Address(7):0x03040000-0x03043fff, Address(9):0x03040000-0x03043fff
|
||||
// WRAM-1 Master:ARM9, (16Kbytes), Address(7):0x03044000-0x03047fff, Address(9):0x03044000-0x03047fff
|
||||
|
||||
// MAP_TS_LTD original
|
||||
// WRAM-A Lock:ON, Master:ARM7, Enable:Slot0-3(256Kbytes), Address(7):0x037c0000-0x037fffff, Address(9):None
|
||||
// WRAM-B Lock:OFF, Master:ARM9, Enable:Slot0-7(256Kbytes), Address(7):0x03740000-0x037bffff, Address(9):0x03740000-0x037bffff
|
||||
// WRAM-C Lock:OFF, Msster:ARM9, Enable:Slot0-7(256Kbytes), Address(7):0x03700000-0x0373ffff, Address(9):0x03700000-0x0373ffff
|
||||
// WRAM-0 Master:ARM9, (16Kbytes), Address(7):0x03040000-0x03043fff, Address(9):0x03040000-0x03043fff
|
||||
// WRAM-1 Master:ARM9, (16Kbytes), Address(7):0x03044000-0x03047fff, Address(9):0x03044000-0x03047fff
|
||||
|
||||
u32 HYENA_WramReg[0x30/sizeof(u32)] =
|
||||
{
|
||||
// ARM9
|
||||
|
||||
// WRAM-A
|
||||
REG_MI_MBK1_FIELD(
|
||||
TRUE, MI_WRAM_OFFSET_192KB/2, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_128KB/2, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_64KB/2, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_0KB/2, MI_WRAM_ARM7
|
||||
),
|
||||
// WRAM-B
|
||||
REG_MI_MBK2_FIELD(
|
||||
TRUE, MI_WRAM_OFFSET_96KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_64KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_32KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_0KB, MI_WRAM_ARM7
|
||||
),
|
||||
REG_MI_MBK3_FIELD(
|
||||
TRUE, MI_WRAM_OFFSET_224KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_192KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_160KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_128KB, MI_WRAM_ARM7
|
||||
),
|
||||
// WRAM-C
|
||||
REG_MI_MBK4_FIELD(
|
||||
TRUE, MI_WRAM_OFFSET_96KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_64KB, MI_WRAM_ARM9,
|
||||
TRUE, MI_WRAM_OFFSET_32KB, MI_WRAM_ARM9,
|
||||
TRUE, MI_WRAM_OFFSET_0KB, MI_WRAM_ARM9
|
||||
),
|
||||
REG_MI_MBK5_FIELD(
|
||||
TRUE, MI_WRAM_OFFSET_224KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_192KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_160KB, MI_WRAM_ARM7,
|
||||
TRUE, MI_WRAM_OFFSET_128KB, MI_WRAM_ARM7
|
||||
),
|
||||
|
||||
REG_MI_MBK6_FIELD( NULL >> 16,
|
||||
MI_WRAM_IMAGE_256KB,
|
||||
NULL >> 16
|
||||
),
|
||||
REG_MI_MBK7_FIELD( NULL >> 15,
|
||||
MI_WRAM_IMAGE_256KB,
|
||||
NULL >> 15
|
||||
),
|
||||
REG_MI_MBK8_FIELD( ( COMPONENT_WRAM_C_OFS_END + 0x18000 ) >> 15,
|
||||
MI_WRAM_IMAGE_128KB,
|
||||
COMPONENT_WRAM_C_OFS >> 15
|
||||
),
|
||||
|
||||
// ARM7
|
||||
REG_MI_MBK6_FIELD( COMPONENT_WRAM_A_OFS_END >> 16,
|
||||
MI_WRAM_IMAGE_256KB,
|
||||
COMPONENT_WRAM_A_OFS >> 16
|
||||
),
|
||||
REG_MI_MBK7_FIELD( COMPONENT_WRAM_B_OFS_END >> 15,
|
||||
MI_WRAM_IMAGE_256KB,
|
||||
COMPONENT_WRAM_B_OFS >> 15
|
||||
),
|
||||
REG_MI_MBK8_FIELD( COMPONENT_WRAM_C_OFS_END >> 15,
|
||||
MI_WRAM_IMAGE_256KB,
|
||||
COMPONENT_WRAM_C_OFS >> 15
|
||||
),
|
||||
|
||||
// WRAM Lock
|
||||
(u32)(
|
||||
(0x0F << 0) |
|
||||
(0xFF << 8) |
|
||||
(0xF8 << 16) |
|
||||
|
||||
// WRAM-0/1
|
||||
(0 << 24) |
|
||||
|
||||
// VRAM-C
|
||||
(7 << 26) |
|
||||
// VRAM-D
|
||||
(7 << 29)
|
||||
),
|
||||
};
|
||||
|
||||
@ -1,80 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - debugsoft - ApplicationJump
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
override TARGET_PLATFORM = TWL
|
||||
override TARGET_CODEGEN = ARM
|
||||
override TWL_ARCHGEN = LIMITED
|
||||
|
||||
TWL_NANDAPP = TRUE
|
||||
TARGET_BIN = appJumpChecker.tad
|
||||
|
||||
INCDIR = ./include $(ROOT)/build/libraries/os/common/include
|
||||
SRCDIR = ./src
|
||||
|
||||
SRCS = main.c screen.c font.c common.c
|
||||
|
||||
LLIBRARIES += libes$(TWL_LIBSUFFIX).a \
|
||||
libboc$(TWL_LIBSUFFIX).a \
|
||||
libsfs$(TWL_LIBSUFFIX).a
|
||||
|
||||
#----------------------------------
|
||||
# sea ‚ðŽg—p
|
||||
|
||||
LLIBRARIES += libsea$(TWL_LIBSUFFIX).a
|
||||
|
||||
#----------------------------------
|
||||
# nam ‚ðŽg—p
|
||||
|
||||
LLIBRARIES += libnam$(TWL_LIBSUFFIX).a
|
||||
|
||||
|
||||
ROM_SPEC = appJumpChecker.autogen.rsf
|
||||
ROM_SPEC_TEMPLATE = $(ROOT)/include/twl/specfiles/ROM-TS_sys.rsf
|
||||
|
||||
ROM_SPEC_PARAM = MakerCode=01 \
|
||||
NANDAccess=TRUE \
|
||||
Media=NAND \
|
||||
Secure=TRUE \
|
||||
BannerFile=appjumpchecker.bnr \
|
||||
PermitLandingNormalJump=TRUE \
|
||||
WramMapping=MAP_TS_SCR
|
||||
|
||||
# GameCode=456A \
|
||||
|
||||
COMPONENT_NAME = armadillo
|
||||
MAKEROM_ARM7_BASE = $(TWL_COMPONENTSDIR)/$(COMPONENT_NAME)/$(TWL_BUILDTYPE_ARM7)/$(COMPONENT_NAME)
|
||||
MAKEROM_ARM7 = $(MAKEROM_ARM7_BASE).$(TWL_ELF_EXT)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
MAKEROM := $(TWL_TOOLSDIR)/bin/makerom.TWL.secure.exe
|
||||
MAKETAD_OPTION := -s
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
INSTALL_DIR = ./roms
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
#===== End of Makefile =====
|
||||
|
||||
|
||||
Binary file not shown.
@ -1,67 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest
|
||||
File: common.h
|
||||
|
||||
Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef COMMON_H_
|
||||
#define COMMON_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
#include <twl.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
定数定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#define KEY_REPEAT_START 25 // キーリピート開始までのフレーム数
|
||||
#define KEY_REPEAT_SPAN 10 // キーリピートの間隔フレーム数
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
構造体 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
// キー入力情報
|
||||
typedef struct KeyInfo
|
||||
{
|
||||
u16 cnt; // 未加工入力値
|
||||
u16 trg; // 押しトリガ入力
|
||||
u16 up; // 離しトリガ入力
|
||||
u16 rep; // 押し維持リピート入力
|
||||
} KeyInfo;
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Prototype
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitCommon(void);
|
||||
|
||||
void ReadKey(KeyInfo* pKey);
|
||||
|
||||
void VBlankIntr(void);
|
||||
|
||||
/*===========================================================================*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* COMMON_H_ */
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,41 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - WCM - demos - wcm-list-2
|
||||
File: font.h
|
||||
|
||||
Copyright 2007 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef FONT_H_
|
||||
#define FONT_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
#include <nitro/types.h>
|
||||
|
||||
extern const u32 d_CharData[8 * 256];
|
||||
extern const u32 d_PaletteData[8 * 16];
|
||||
|
||||
/*===========================================================================*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* FONT_H_ */
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,49 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - WCM - demos - wcm-list-2
|
||||
File: screen.h
|
||||
|
||||
Copyright 2007 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef SCREEN_H_
|
||||
#define SCREEN_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
#include <nitro/types.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
ŠÖ<EFBFBD>” ’è‹`
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitScreen(void);
|
||||
void ClearScreen(void);
|
||||
void ClearMainScreen(void);
|
||||
void ClearSubScreen(void);
|
||||
void PutMainScreen(s32 x, s32 y, u8 palette, char* text, ...);
|
||||
void PutSubScreen(s32 x, s32 y, u8 palette, char* text, ...);
|
||||
void UpdateScreen(void);
|
||||
|
||||
/*===========================================================================*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* SCREEN_H_ */
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,153 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest
|
||||
File: common.c
|
||||
|
||||
Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include "common.h"
|
||||
|
||||
static void InitInterrupts(void);
|
||||
static void InitHeap(void);
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
関数定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitCommon
|
||||
|
||||
Description: 基本的な初期化関数をここで呼ぶ。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitCommon(void)
|
||||
{
|
||||
OS_Init();
|
||||
OS_InitTick();
|
||||
OS_InitAlarm();
|
||||
GX_Init();
|
||||
GX_DispOff();
|
||||
GXS_DispOff();
|
||||
|
||||
InitHeap();
|
||||
InitInterrupts();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: ReadKey
|
||||
|
||||
Description: キー入力情報を取得し、入力情報構造体を編集する。
|
||||
押しトリガ、離しトリガ、押し継続リピートトリガ を検出する。
|
||||
|
||||
Arguments: pKey - 編集するキー入力情報構造体を指定する。
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void ReadKey(KeyInfo* pKey)
|
||||
{
|
||||
static u16 repeat_count[12];
|
||||
int i;
|
||||
u16 r;
|
||||
|
||||
r = PAD_Read();
|
||||
pKey->trg = 0x0000;
|
||||
pKey->up = 0x0000;
|
||||
pKey->rep = 0x0000;
|
||||
|
||||
for (i = 0; i < 12; i++)
|
||||
{
|
||||
if (r & (0x0001 << i))
|
||||
{
|
||||
if (!(pKey->cnt & (0x0001 << i)))
|
||||
{
|
||||
pKey->trg |= (0x0001 << i); // 押しトリガ
|
||||
repeat_count[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (repeat_count[i] > KEY_REPEAT_START)
|
||||
{
|
||||
pKey->rep |= (0x0001 << i); // 押し継続リピート
|
||||
repeat_count[i] = (u16) (KEY_REPEAT_START - KEY_REPEAT_SPAN);
|
||||
}
|
||||
else
|
||||
{
|
||||
repeat_count[i]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pKey->cnt & (0x0001 << i))
|
||||
{
|
||||
pKey->up |= (0x0001 << i); // 離しトリガ
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pKey->cnt = r; // 未加工キー入力
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitInterrupts
|
||||
|
||||
Description: 割り込み設定を初期化する。
|
||||
V ブランク割り込みを許可し、割り込みハンドラを設定する。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void InitInterrupts(void)
|
||||
{
|
||||
// V ブランク割り込み設定
|
||||
OS_SetIrqFunction(OS_IE_V_BLANK, VBlankIntr);
|
||||
(void)OS_EnableIrqMask(OS_IE_V_BLANK);
|
||||
(void)GX_VBlankIntr(TRUE);
|
||||
|
||||
// 割り込み許可
|
||||
(void)OS_EnableIrq();
|
||||
(void)OS_EnableInterrupts();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitHeap
|
||||
|
||||
Description: メインメモリ上のアリーナにてメモリ割当てシステムを初期化する。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void InitHeap(void)
|
||||
{
|
||||
void* tempLo;
|
||||
OSHeapHandle hh;
|
||||
|
||||
// メインメモリ上のアリーナにヒープをひとつ作成
|
||||
tempLo = OS_InitAlloc(OS_ARENA_MAIN, OS_GetMainArenaLo(), OS_GetMainArenaHi(), 1);
|
||||
OS_SetArenaLo(OS_ARENA_MAIN, tempLo);
|
||||
hh = OS_CreateHeap(OS_ARENA_MAIN, OS_GetMainArenaLo(), OS_GetMainArenaHi());
|
||||
if (hh < 0)
|
||||
{
|
||||
// ヒープ作成に失敗した場合は異常終了
|
||||
OS_Panic("ARM9: Fail to create heap...\n");
|
||||
}
|
||||
(void)OS_SetCurrentHeap(OS_ARENA_MAIN, hh);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,585 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: NitroWiFi - WCM - demos - wcm-list
|
||||
File: font.c
|
||||
|
||||
Copyright 2005,2006 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Log: font.c,v $
|
||||
Revision 1.2 2006/03/10 09:22:43 kitase_hirotake
|
||||
INDENT SOURCE
|
||||
|
||||
Revision 1.1 2005/07/21 08:21:06 adachi_hiroaki
|
||||
<EFBFBD>V‹K’ljÁ
|
||||
|
||||
|
||||
$NoKeywords: $
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include "font.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Character data
|
||||
*---------------------------------------------------------------------------*/
|
||||
const u32 d_CharData[8 * 256] =
|
||||
{
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0000h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x01010010, 0x01010010, 0x00000110, // 0001h
|
||||
0x00011010, 0x01100010, 0x00000010, 0x00000010,
|
||||
0x00000000, 0x01011010, 0x01010010, 0x00010010, // 0002h
|
||||
0x00100010, 0x00100010, 0x00100001, 0x00100001,
|
||||
0x00000000, 0x01010001, 0x01010001, 0x01111111, // 0003h
|
||||
0x00000001, 0x00000001, 0x00000001, 0x01111110,
|
||||
0x00000000, 0x01010000, 0x01111111, 0x00100000, // 0004h
|
||||
0x00100000, 0x00010000, 0x00001000, 0x00000110,
|
||||
0x00000000, 0x01010000, 0x01010100, 0x00001010, // 0005h
|
||||
0x00010001, 0x00100001, 0x01000000, 0x00000000,
|
||||
0x00000000, 0x01011000, 0x01011000, 0x01111111, // 0006h
|
||||
0x00001000, 0x00101010, 0x01001010, 0x01001001,
|
||||
0x00000000, 0x01010010, 0x01101111, 0x01010010, // 0007h
|
||||
0x00010010, 0x00010010, 0x00010010, 0x00001001,
|
||||
0x00000000, 0x01010010, 0x01011111, 0x00000100, // 0008h
|
||||
0x00011111, 0x00001000, 0x00000001, 0x00011110,
|
||||
0x00000000, 0x01010000, 0x01011000, 0x00000110, // 0009h
|
||||
0x00000001, 0x00000110, 0x00011000, 0x00100000,
|
||||
0x00000000, 0x01010000, 0x01111101, 0x00010001, // 000ah
|
||||
0x00010001, 0x00010001, 0x00010001, 0x00001010,
|
||||
0x00000000, 0x01010000, 0x01011110, 0x00100000, // 000bh
|
||||
0x00000000, 0x00000001, 0x00000001, 0x00111110,
|
||||
0x00000000, 0x01010100, 0x01011111, 0x00001000, // 000ch
|
||||
0x00010000, 0x00000001, 0x00000001, 0x00011110,
|
||||
0x00000000, 0x01010001, 0x01010001, 0x00000001, // 000dh
|
||||
0x01000001, 0x01000001, 0x00100010, 0x00011100,
|
||||
0x00000000, 0x01010000, 0x01111111, 0x00011000, // 000eh
|
||||
0x00010100, 0x00010100, 0x00011000, 0x00001100,
|
||||
0x00000000, 0x01010010, 0x01111111, 0x00010010, // 000fh
|
||||
0x00010010, 0x00000010, 0x00000010, 0x00111100,
|
||||
0x00000000, 0x00001110, 0x01010100, 0x01010010, // 0010h
|
||||
0x00111111, 0x00000100, 0x00000100, 0x00011000,
|
||||
0x00000000, 0x01010100, 0x01011111, 0x00000100, // 0011h
|
||||
0x01110100, 0x00000010, 0x00001010, 0x01110010,
|
||||
0x00000000, 0x01010100, 0x01011111, 0x00000010, // 0012h
|
||||
0x00011110, 0x00100001, 0x00100000, 0x00011110,
|
||||
0x00000000, 0x01010000, 0x01011100, 0x00100011, // 0013h
|
||||
0x01000000, 0x01000000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x01010000, 0x01111111, 0x00010000, // 0014h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00110000,
|
||||
0x00000000, 0x01010010, 0x01010010, 0x00001100, // 0015h
|
||||
0x00000010, 0x00000001, 0x00000001, 0x00111110,
|
||||
0x00000000, 0x01010001, 0x01111101, 0x00010001, // 0016h
|
||||
0x00010001, 0x00111001, 0x01010101, 0x00011001,
|
||||
0x00000000, 0x01010100, 0x01010011, 0x01110010, // 0017h
|
||||
0x00010001, 0x00010001, 0x00001010, 0x00000100,
|
||||
0x00000000, 0x01011110, 0x01011000, 0x00000100, // 0018h
|
||||
0x00101001, 0x01010001, 0x01010001, 0x00001100,
|
||||
0x00000000, 0x01010000, 0x01011100, 0x00010010, // 0019h
|
||||
0x00010010, 0x00100001, 0x01000000, 0x00000000,
|
||||
0x00000000, 0x01011101, 0x01010001, 0x00111101, // 001ah
|
||||
0x00010001, 0x00011001, 0x00110101, 0x00001001,
|
||||
0x00000000, 0x01110001, 0x01011101, 0x00110001, // 001bh
|
||||
0x00010001, 0x00111001, 0x01010101, 0x00011001,
|
||||
0x00000000, 0x01110100, 0x01010011, 0x00110010, // 001ch
|
||||
0x00010001, 0x00010001, 0x00001010, 0x00000100,
|
||||
0x00000000, 0x01101110, 0x01011000, 0x00100100, // 001dh
|
||||
0x00101001, 0x01010001, 0x01010001, 0x00001100,
|
||||
0x00000000, 0x01110000, 0x01011100, 0x00110010, // 001eh
|
||||
0x00010010, 0x00100001, 0x01000000, 0x00000000,
|
||||
0x00000000, 0x01111101, 0x01010001, 0x00111101, // 001fh
|
||||
0x00010001, 0x00011001, 0x00110101, 0x00001001,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0020h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 0021h
|
||||
0x00001000, 0x00001000, 0x00000000, 0x00001000,
|
||||
0x00000000, 0x01101100, 0x01001000, 0x00100100, // 0022h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00100100, 0x01111111, 0x00100100, // 0023h
|
||||
0x00100100, 0x01111111, 0x00010010, 0x00010010,
|
||||
0x00000000, 0x00001000, 0x01111110, 0x00001001, // 0024h
|
||||
0x00111110, 0x01001000, 0x00111111, 0x00001000,
|
||||
0x00000000, 0x01000010, 0x00100101, 0x00010010, // 0025h
|
||||
0x00001000, 0x00100100, 0x01010010, 0x00100001,
|
||||
0x00000000, 0x00001110, 0x00010001, 0x00001001, // 0026h
|
||||
0x01000110, 0x00101001, 0x00110001, 0x01001110,
|
||||
0x00000000, 0x00011000, 0x00010000, 0x00001000, // 0027h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x01110000, 0x00001000, 0x00000100, // 0028h
|
||||
0x00000100, 0x00000100, 0x00001000, 0x01110000,
|
||||
0x00000000, 0x00000111, 0x00001000, 0x00010000, // 0029h
|
||||
0x00010000, 0x00010000, 0x00001000, 0x00000111,
|
||||
0x00000000, 0x00001000, 0x01001001, 0x00101010, // 002ah
|
||||
0x00011100, 0x00101010, 0x01001001, 0x00001000,
|
||||
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 002bh
|
||||
0x01111111, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002ch
|
||||
0x00000000, 0x00001100, 0x00001000, 0x00000100,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002dh
|
||||
0x01111111, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002eh
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00001100,
|
||||
0x00000000, 0x01000000, 0x00100000, 0x00010000, // 002fh
|
||||
0x00001000, 0x00000100, 0x00000010, 0x00000001,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0030h
|
||||
0x01000001, 0x01000001, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x00011100, 0x00010000, 0x00010000, // 0031h
|
||||
0x00010000, 0x00010000, 0x00010000, 0x00010000,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0032h
|
||||
0x00111110, 0x00000001, 0x00000001, 0x01111111,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0033h
|
||||
0x00111110, 0x01000000, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x00100000, 0x00110000, 0x00101000, // 0034h
|
||||
0x00100100, 0x00100010, 0x01111111, 0x00100000,
|
||||
0x00000000, 0x01111111, 0x00000001, 0x00111111, // 0035h
|
||||
0x01000000, 0x01000000, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x00111110, 0x00000001, 0x00111111, // 0036h
|
||||
0x01000001, 0x01000001, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x01111111, 0x00100000, 0x00100000, // 0037h
|
||||
0x00010000, 0x00010000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0038h
|
||||
0x00111110, 0x01000001, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0039h
|
||||
0x01000001, 0x01111110, 0x01000000, 0x00111110,
|
||||
0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003ah
|
||||
0x00000000, 0x00000000, 0x00001100, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003bh
|
||||
0x00000000, 0x00001100, 0x00001000, 0x00000100,
|
||||
0x00000000, 0x01100000, 0x00011000, 0x00000110, // 003ch
|
||||
0x00000001, 0x00000110, 0x00011000, 0x01100000,
|
||||
0x00000000, 0x00000000, 0x01111111, 0x00000000, // 003dh
|
||||
0x00000000, 0x00000000, 0x01111111, 0x00000000,
|
||||
0x00000000, 0x00000011, 0x00001100, 0x00110000, // 003eh
|
||||
0x01000000, 0x00110000, 0x00001100, 0x00000011,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 003fh
|
||||
0x00110000, 0x00001000, 0x00000000, 0x00001000,
|
||||
0x00000000, 0x00011100, 0x00100010, 0x01001001, // 0040h
|
||||
0x01010101, 0x01010101, 0x01010101, 0x00111010,
|
||||
0x00000000, 0x00001000, 0x00010100, 0x00010100, // 0041h
|
||||
0x00100010, 0x00111110, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0042h
|
||||
0x00111111, 0x01000001, 0x01000001, 0x00111111,
|
||||
0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0043h
|
||||
0x00000001, 0x00000001, 0x01000010, 0x00111100,
|
||||
0x00000000, 0x00011111, 0x00100001, 0x01000001, // 0044h
|
||||
0x01000001, 0x01000001, 0x00100001, 0x00011111,
|
||||
0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0045h
|
||||
0x01111111, 0x00000001, 0x00000001, 0x01111111,
|
||||
0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0046h
|
||||
0x00111111, 0x00000001, 0x00000001, 0x00000001,
|
||||
0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0047h
|
||||
0x01111001, 0x01000001, 0x01000010, 0x00111100,
|
||||
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0048h
|
||||
0x01111111, 0x01000001, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x00111110, 0x00001000, 0x00001000, // 0049h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00111110,
|
||||
0x00000000, 0x01000000, 0x01000000, 0x01000000, // 004ah
|
||||
0x01000001, 0x01000001, 0x00100010, 0x00011100,
|
||||
0x00000000, 0x01100001, 0x00011001, 0x00000101, // 004bh
|
||||
0x00000011, 0x00000101, 0x00011001, 0x01100001,
|
||||
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 004ch
|
||||
0x00000001, 0x00000001, 0x00000001, 0x01111111,
|
||||
0x00000000, 0x01000001, 0x01100011, 0x01010101, // 004dh
|
||||
0x01001001, 0x01000001, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x01000001, 0x01000011, 0x01000101, // 004eh
|
||||
0x01001001, 0x01010001, 0x01100001, 0x01000001,
|
||||
0x00000000, 0x00011100, 0x00100010, 0x01000001, // 004fh
|
||||
0x01000001, 0x01000001, 0x00100010, 0x00011100,
|
||||
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0050h
|
||||
0x00111111, 0x00000001, 0x00000001, 0x00000001,
|
||||
0x00000000, 0x00011100, 0x00100010, 0x01000001, // 0051h
|
||||
0x01000001, 0x01011001, 0x00100010, 0x01011100,
|
||||
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0052h
|
||||
0x00111111, 0x01000001, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x00000001, // 0053h
|
||||
0x00111110, 0x01000000, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x01111111, 0x00001000, 0x00001000, // 0054h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0055h
|
||||
0x01000001, 0x01000001, 0x00100010, 0x00011100,
|
||||
0x00000000, 0x01000001, 0x01000001, 0x00100010, // 0056h
|
||||
0x00100010, 0x00010100, 0x00010100, 0x00001000,
|
||||
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0057h
|
||||
0x01001001, 0x01010101, 0x01100011, 0x01000001,
|
||||
0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0058h
|
||||
0x00001000, 0x00010100, 0x00100010, 0x01000001,
|
||||
0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0059h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x01111111, 0x00100000, 0x00010000, // 005ah
|
||||
0x00001000, 0x00000100, 0x00000010, 0x01111111,
|
||||
0x00000000, 0x01111100, 0x00000100, 0x00000100, // 005bh
|
||||
0x00000100, 0x00000100, 0x00000100, 0x01111100,
|
||||
0x00000000, 0x00100010, 0x00010100, 0x00111110, // 005ch
|
||||
0x00001000, 0x00111110, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00011111, 0x00010000, 0x00010000, // 005dh
|
||||
0x00010000, 0x00010000, 0x00010000, 0x00011111,
|
||||
0x00000000, 0x00001000, 0x00010100, 0x00100010, // 005eh
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 005fh
|
||||
0x00000000, 0x00000000, 0x00000000, 0x01111111,
|
||||
0x00000000, 0x00010000, 0x00001000, 0x00011000, // 0060h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00011110, 0x00100001, // 0061h
|
||||
0x00111110, 0x00100001, 0x00100001, 0x01011110,
|
||||
0x00000000, 0x00000001, 0x00000001, 0x00111111, // 0062h
|
||||
0x01000001, 0x01000001, 0x01000001, 0x00111111,
|
||||
0x00000000, 0x00000000, 0x00111100, 0x01000010, // 0063h
|
||||
0x00000001, 0x00000001, 0x01000010, 0x00111100,
|
||||
0x00000000, 0x01000000, 0x01000000, 0x01111110, // 0064h
|
||||
0x01000001, 0x01000001, 0x01000001, 0x01111110,
|
||||
0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0065h
|
||||
0x01111111, 0x00000001, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x00110000, 0x00001000, 0x00001000, // 0066h
|
||||
0x01111111, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00000000, 0x01111110, 0x01000001, // 0067h
|
||||
0x01000001, 0x01111110, 0x01000000, 0x00111110,
|
||||
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0068h
|
||||
0x00111111, 0x01000001, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x00001000, 0x00000000, 0x00001000, // 0069h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00100000, 0x00000000, 0x00100000, // 006ah
|
||||
0x00100000, 0x00100001, 0x00100001, 0x00011110,
|
||||
0x00000000, 0x00000001, 0x00000001, 0x01100001, // 006bh
|
||||
0x00011001, 0x00000111, 0x00011001, 0x01100001,
|
||||
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 006ch
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00000000, 0x00110111, 0x01001001, // 006dh
|
||||
0x01001001, 0x01001001, 0x01001001, 0x01001001,
|
||||
0x00000000, 0x00000000, 0x00111111, 0x01000001, // 006eh
|
||||
0x01000001, 0x01000001, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x00000000, 0x00011100, 0x00100010, // 006fh
|
||||
0x01000001, 0x01000001, 0x00100010, 0x00011100,
|
||||
0x00000000, 0x00000000, 0x00111101, 0x01000011, // 0070h
|
||||
0x01000001, 0x01000011, 0x00111101, 0x00000001,
|
||||
0x00000000, 0x00000000, 0x01011110, 0x01100001, // 0071h
|
||||
0x01000001, 0x01100001, 0x01011110, 0x01000000,
|
||||
0x00000000, 0x00000000, 0x00110001, 0x00001101, // 0072h
|
||||
0x00000011, 0x00000001, 0x00000001, 0x00000001,
|
||||
0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0073h
|
||||
0x00001110, 0x00110000, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x00000100, 0x00000100, 0x01111111, // 0074h
|
||||
0x00000100, 0x00000100, 0x00000100, 0x01111000,
|
||||
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0075h
|
||||
0x01000001, 0x01000001, 0x01000001, 0x01111110,
|
||||
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0076h
|
||||
0x00100010, 0x00100010, 0x00010100, 0x00001000,
|
||||
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0077h
|
||||
0x01001001, 0x00101010, 0x00101010, 0x00010100,
|
||||
0x00000000, 0x00000000, 0x00100001, 0x00010010, // 0078h
|
||||
0x00001100, 0x00001100, 0x00010010, 0x00100001,
|
||||
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0079h
|
||||
0x00100010, 0x00011100, 0x00001000, 0x00000110,
|
||||
0x00000000, 0x00000000, 0x00111111, 0x00010000, // 007ah
|
||||
0x00001000, 0x00000100, 0x00000010, 0x00111111,
|
||||
0x00000000, 0x00001000, 0x00011110, 0x01100100, // 007bh
|
||||
0x00011000, 0x00100100, 0x00000100, 0x01111000,
|
||||
0x00000000, 0x00000000, 0x00011110, 0x00000100, // 007ch
|
||||
0x00011110, 0x00110101, 0x00101101, 0x00010010,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00010001, // 007dh
|
||||
0x00100001, 0x00100001, 0x00000001, 0x00000010,
|
||||
0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007eh
|
||||
0x00011110, 0x00100000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007fh
|
||||
0x00111110, 0x00010000, 0x00001100, 0x00110010,
|
||||
0x00000000, 0x00000000, 0x00000100, 0x00101111, // 0080h
|
||||
0x01000100, 0x00011110, 0x00100101, 0x00010110,
|
||||
0x00000000, 0x00000000, 0x00001010, 0x00011110, // 0081h
|
||||
0x00101011, 0x00100010, 0x00010100, 0x00000100,
|
||||
0x00000000, 0x00000000, 0x00001000, 0x00011101, // 0082h
|
||||
0x00101011, 0x00101001, 0x00011001, 0x00000100,
|
||||
0x00000000, 0x00000000, 0x00001000, 0x00111000, // 0083h
|
||||
0x00001000, 0x00011110, 0x00101001, 0x00000110,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00011100, // 0084h
|
||||
0x00100011, 0x00100000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x00000110, 0x01001001, 0x00110000, // 0085h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000100, 0x00111111, 0x00000100, // 0086h
|
||||
0x00111110, 0x01010101, 0x01001101, 0x00100110,
|
||||
0x00000000, 0x00000000, 0x00100001, 0x01000001, // 0087h
|
||||
0x01000001, 0x01000001, 0x00000001, 0x00000010,
|
||||
0x00000000, 0x00111100, 0x00000000, 0x00111110, // 0088h
|
||||
0x01000000, 0x01000000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x00011100, 0x00000000, 0x00111110, // 0089h
|
||||
0x00010000, 0x00001000, 0x00010100, 0x01100010,
|
||||
0x00000000, 0x00100100, 0x01011111, 0x00000100, // 008ah
|
||||
0x00111110, 0x01000101, 0x01000101, 0x00100010,
|
||||
0x00000000, 0x00100010, 0x01001111, 0x01010010, // 008bh
|
||||
0x01010010, 0x00010010, 0x00010010, 0x00001001,
|
||||
0x00000000, 0x00000100, 0x00111110, 0x00001000, // 008ch
|
||||
0x00111110, 0x00010000, 0x00000010, 0x00111100,
|
||||
0x00000000, 0x00100000, 0x00011000, 0x00000110, // 008dh
|
||||
0x00000001, 0x00000110, 0x00011000, 0x00100000,
|
||||
0x00000000, 0x00100000, 0x01111101, 0x00100001, // 008eh
|
||||
0x00100001, 0x00100001, 0x00100001, 0x00010010,
|
||||
0x00000000, 0x00011110, 0x00100000, 0x00000000, // 008fh
|
||||
0x00000000, 0x00000001, 0x00000001, 0x00111110,
|
||||
0x00000000, 0x00001000, 0x01111111, 0x00010000, // 0090h
|
||||
0x00100000, 0x00000010, 0x00000010, 0x00111100,
|
||||
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0091h
|
||||
0x01000001, 0x01000001, 0x00100010, 0x00011100,
|
||||
0x00000000, 0x00010000, 0x01111111, 0x00011000, // 0092h
|
||||
0x00010100, 0x00010100, 0x00011000, 0x00001100,
|
||||
0x00000000, 0x00100010, 0x01111111, 0x00100010, // 0093h
|
||||
0x00100010, 0x00000010, 0x00000010, 0x01111100,
|
||||
0x00000000, 0x00111100, 0x00010000, 0x00001100, // 0094h
|
||||
0x01111111, 0x00001000, 0x00001000, 0x00110000,
|
||||
0x00000000, 0x00000100, 0x00011111, 0x00000100, // 0095h
|
||||
0x01110100, 0x00000010, 0x00001010, 0x01110010,
|
||||
0x00000000, 0x00001000, 0x01111111, 0x00000100, // 0096h
|
||||
0x00111100, 0x01000010, 0x01000000, 0x00111100,
|
||||
0x00000000, 0x00000000, 0x00011100, 0x00100011, // 0097h
|
||||
0x01000000, 0x01000000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x01111111, 0x00010000, 0x00001000, // 0098h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00110000,
|
||||
0x00000000, 0x00000010, 0x00110010, 0x00001100, // 0099h
|
||||
0x00000010, 0x00000001, 0x00000001, 0x00111110,
|
||||
0x00000000, 0x00100100, 0x01001111, 0x01000010, // 009ah
|
||||
0x00010001, 0x00111100, 0x00010010, 0x00001100,
|
||||
0x00000000, 0x00000010, 0x01111010, 0x01000010, // 009bh
|
||||
0x00000010, 0x00000010, 0x00001010, 0x01110010,
|
||||
0x00000000, 0x00100010, 0x00111110, 0x01010010, // 009ch
|
||||
0x01001011, 0x01101101, 0x01010101, 0x00110010,
|
||||
0x00000000, 0x00110010, 0x01001011, 0x01000110, // 009dh
|
||||
0x01000110, 0x01110010, 0x01001011, 0x00110010,
|
||||
0x00000000, 0x00011100, 0x00101010, 0x01001001, // 009eh
|
||||
0x01001001, 0x01000101, 0x01000101, 0x00110010,
|
||||
0x00000000, 0x00100001, 0x01111101, 0x00100001, // 009fh
|
||||
0x00100001, 0x00111001, 0x01100101, 0x00011001,
|
||||
0x00000000, 0x00000100, 0x00100011, 0x01100010, // 00a0h
|
||||
0x00100001, 0x00100001, 0x00010010, 0x00001100,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a1h
|
||||
0x00000000, 0x00000100, 0x00001010, 0x00000100,
|
||||
0x00000000, 0x01110000, 0x00010000, 0x00010000, // 00a2h
|
||||
0x00010000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a3h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00001110,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a4h
|
||||
0x00000000, 0x00000010, 0x00000100, 0x00000100,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00011000, // 00a5h
|
||||
0x00011000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x01111111, 0x01000000, 0x01111111, // 00a6h
|
||||
0x01000000, 0x01000000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x00000000, 0x00111111, 0x00100000, // 00a7h
|
||||
0x00010100, 0x00001100, 0x00000100, 0x00000010,
|
||||
0x00000000, 0x00000000, 0x00100000, 0x00100000, // 00a8h
|
||||
0x00010000, 0x00001111, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00000000, 0x00000100, 0x00111111, // 00a9h
|
||||
0x00100001, 0x00100000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00aah
|
||||
0x00001000, 0x00001000, 0x00001000, 0x01111111,
|
||||
0x00000000, 0x00000000, 0x00010000, 0x00111111, // 00abh
|
||||
0x00011000, 0x00010100, 0x00010010, 0x00011001,
|
||||
0x00000000, 0x00000000, 0x00000010, 0x00111111, // 00ach
|
||||
0x00100010, 0x00010010, 0x00000100, 0x00000100,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00adh
|
||||
0x00100000, 0x00100000, 0x00100000, 0x01111111,
|
||||
0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00aeh
|
||||
0x00111110, 0x00100000, 0x00100000, 0x00111110,
|
||||
0x00000000, 0x00000000, 0x00100101, 0x00101010, // 00afh
|
||||
0x00101010, 0x00100000, 0x00010000, 0x00001110,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00b0h
|
||||
0x01111111, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x01111111, 0x01000000, 0x00101000, // 00b1h
|
||||
0x00011000, 0x00001000, 0x00001000, 0x00000100,
|
||||
0x00000000, 0x01000000, 0x00100000, 0x00011000, // 00b2h
|
||||
0x00010111, 0x00010000, 0x00010000, 0x00010000,
|
||||
0x00000000, 0x00001000, 0x01111111, 0x01000001, // 00b3h
|
||||
0x01000001, 0x01000000, 0x00100000, 0x00011000,
|
||||
0x00000000, 0x00000000, 0x00111110, 0x00001000, // 00b4h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x01111111,
|
||||
0x00000000, 0x00100000, 0x01111111, 0x00110000, // 00b5h
|
||||
0x00101000, 0x00100100, 0x00100010, 0x00110001,
|
||||
0x00000000, 0x00000100, 0x01111111, 0x01000100, // 00b6h
|
||||
0x01000100, 0x01000100, 0x01000010, 0x00100001,
|
||||
0x00000000, 0x00000100, 0x00111111, 0x00001000, // 00b7h
|
||||
0x01111111, 0x00010000, 0x00010000, 0x00010000,
|
||||
0x00000000, 0x01111100, 0x01000100, 0x01000100, // 00b8h
|
||||
0x01000010, 0x01000000, 0x00100000, 0x00011000,
|
||||
0x00000000, 0x00000010, 0x01111110, 0x00100010, // 00b9h
|
||||
0x00100001, 0x00100000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00bah
|
||||
0x01000000, 0x01000000, 0x01000000, 0x01111110,
|
||||
0x00000000, 0x00100010, 0x01111111, 0x00100010, // 00bbh
|
||||
0x00100010, 0x00100000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x00000011, 0x00000100, 0x01000011, // 00bch
|
||||
0x01000100, 0x00100000, 0x00011000, 0x00000111,
|
||||
0x00000000, 0x01111111, 0x01000000, 0x00100000, // 00bdh
|
||||
0x00010000, 0x00011000, 0x00100100, 0x01000011,
|
||||
0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00beh
|
||||
0x00100010, 0x00000010, 0x00000010, 0x01111100,
|
||||
0x00000000, 0x01000001, 0x01000010, 0x01000000, // 00bfh
|
||||
0x00100000, 0x00100000, 0x00011000, 0x00000110,
|
||||
0x00000000, 0x01111110, 0x01000010, 0x01001110, // 00c0h
|
||||
0x01110001, 0x01000000, 0x00100000, 0x00011000,
|
||||
0x00000000, 0x01100000, 0x00011110, 0x00010000, // 00c1h
|
||||
0x01111111, 0x00010000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x01000101, 0x01001010, 0x01001010, // 00c2h
|
||||
0x01000000, 0x00100000, 0x00010000, 0x00001110,
|
||||
0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00c3h
|
||||
0x00010000, 0x00010000, 0x00001000, 0x00000110,
|
||||
0x00000000, 0x00000010, 0x00000010, 0x00000110, // 00c4h
|
||||
0x00011010, 0x01100010, 0x00000010, 0x00000010,
|
||||
0x00000000, 0x00010000, 0x00010000, 0x01111111, // 00c5h
|
||||
0x00010000, 0x00010000, 0x00001000, 0x00000110,
|
||||
0x00000000, 0x00000000, 0x00111110, 0x00000000, // 00c6h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x01111111,
|
||||
0x00000000, 0x01111110, 0x01000000, 0x01000100, // 00c7h
|
||||
0x00101000, 0x00010000, 0x00101000, 0x01000110,
|
||||
0x00000000, 0x00001000, 0x01111111, 0x00100000, // 00c8h
|
||||
0x00010000, 0x00011100, 0x01101011, 0x00001000,
|
||||
0x00000000, 0x01000000, 0x01000000, 0x01000000, // 00c9h
|
||||
0x00100000, 0x00100000, 0x00011000, 0x00000111,
|
||||
0x00000000, 0x00010010, 0x00100010, 0x00100010, // 00cah
|
||||
0x01000010, 0x01000010, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x00000001, 0x00000001, 0x01111111, // 00cbh
|
||||
0x00000001, 0x00000001, 0x00000001, 0x01111110,
|
||||
0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cch
|
||||
0x01000000, 0x00100000, 0x00010000, 0x00001110,
|
||||
0x00000000, 0x00000000, 0x00000100, 0x00001010, // 00cdh
|
||||
0x00010001, 0x00100001, 0x01000000, 0x00000000,
|
||||
0x00000000, 0x00001000, 0x00001000, 0x01111111, // 00ceh
|
||||
0x00001000, 0x00101010, 0x01001010, 0x01001001,
|
||||
0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cfh
|
||||
0x00100010, 0x00010100, 0x00001000, 0x00010000,
|
||||
0x00000000, 0x00001110, 0x01110000, 0x00001110, // 00d0h
|
||||
0x01110000, 0x00000110, 0x00011000, 0x01100000,
|
||||
0x00000000, 0x00001000, 0x00001000, 0x00000100, // 00d1h
|
||||
0x00000100, 0x00100010, 0x01000010, 0x01111111,
|
||||
0x00000000, 0x01000000, 0x01000000, 0x00100100, // 00d2h
|
||||
0x00101000, 0x00010000, 0x00101100, 0x01000011,
|
||||
0x00000000, 0x01111111, 0x00000100, 0x01111111, // 00d3h
|
||||
0x00000100, 0x00000100, 0x00000100, 0x01111000,
|
||||
0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00d4h
|
||||
0x00100010, 0x00010100, 0x00000100, 0x00000100,
|
||||
0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00d5h
|
||||
0x00100000, 0x00100000, 0x00100000, 0x01111111,
|
||||
0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00d6h
|
||||
0x01111110, 0x01000000, 0x01000000, 0x01111110,
|
||||
0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00d7h
|
||||
0x01000000, 0x01000000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00d8h
|
||||
0x01000010, 0x01000000, 0x00100000, 0x00011000,
|
||||
0x00000000, 0x00001010, 0x00001010, 0x00001010, // 00d9h
|
||||
0x01001010, 0x01001010, 0x00101010, 0x00011001,
|
||||
0x00000000, 0x00000010, 0x00000010, 0x01000010, // 00dah
|
||||
0x01000010, 0x00100010, 0x00010010, 0x00001110,
|
||||
0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dbh
|
||||
0x01000001, 0x01000001, 0x01000001, 0x01111111,
|
||||
0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dch
|
||||
0x01000000, 0x01000000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x01000011, 0x01000100, 0x01000000, // 00ddh
|
||||
0x01000000, 0x00100000, 0x00010000, 0x00001111,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00deh
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00dfh
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00011110, 0x00001000, 0x00000100, // 00e0h
|
||||
0x00101001, 0x01010001, 0x01010001, 0x00001100,
|
||||
0x00000000, 0x00000000, 0x00001100, 0x00010010, // 00e1h
|
||||
0x00010010, 0x00100001, 0x01000000, 0x00000000,
|
||||
0x00000000, 0x01111101, 0x00100001, 0x01111101, // 00e2h
|
||||
0x00100001, 0x00111001, 0x01100101, 0x00011001,
|
||||
0x00000000, 0x00111100, 0x00010000, 0x00111100, // 00e3h
|
||||
0x00010000, 0x00011100, 0x00110010, 0x00001100,
|
||||
0x00000000, 0x00001110, 0x00101000, 0x00101000, // 00e4h
|
||||
0x00111110, 0x01100101, 0x00100101, 0x00010010,
|
||||
0x00000000, 0x00000100, 0x00101111, 0x01000100, // 00e5h
|
||||
0x00000110, 0x01000101, 0x01000101, 0x00111110,
|
||||
0x00000000, 0x00100010, 0x00100010, 0x00111110, // 00e6h
|
||||
0x01010010, 0x01010101, 0x01001101, 0x00100110,
|
||||
0x00000000, 0x00000100, 0x00011111, 0x00000010, // 00e7h
|
||||
0x00011111, 0x01000010, 0x01000010, 0x00111100,
|
||||
0x00000000, 0x00010010, 0x00111110, 0x01010011, // 00e8h
|
||||
0x01000010, 0x00100100, 0x00000100, 0x00000100,
|
||||
0x00000000, 0x00001000, 0x00111101, 0x01001011, // 00e9h
|
||||
0x01001001, 0x01001001, 0x00111000, 0x00000100,
|
||||
0x00000000, 0x00001000, 0x00111000, 0x00001000, // 00eah
|
||||
0x00001000, 0x00011110, 0x00101001, 0x00000110,
|
||||
0x00000000, 0x00011000, 0x00100000, 0x00000100, // 00ebh
|
||||
0x00111010, 0x01000110, 0x01000000, 0x00111000,
|
||||
0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00ech
|
||||
0x01000110, 0x01000000, 0x00100000, 0x00011000,
|
||||
0x00000000, 0x00111110, 0x00010000, 0x00111100, // 00edh
|
||||
0x01000011, 0x01001100, 0x01010010, 0x00111100,
|
||||
0x00000000, 0x00100010, 0x00110011, 0x00101010, // 00eeh
|
||||
0x00100110, 0x00100010, 0x00100011, 0x01000010,
|
||||
0x00000000, 0x00111110, 0x00010000, 0x00111100, // 00efh
|
||||
0x01000011, 0x01000000, 0x01000010, 0x00111100,
|
||||
0x00000000, 0x00000010, 0x00111011, 0x01000110, // 00f0h
|
||||
0x01000010, 0x01000011, 0x01000010, 0x00110010,
|
||||
0x00000000, 0x00000100, 0x00000100, 0x00000010, // 00f1h
|
||||
0x01000110, 0x01000101, 0x01000101, 0x00111001,
|
||||
0x00000000, 0x01010100, 0x01111111, 0x00100100, // 00f2h
|
||||
0x00100100, 0x00100100, 0x00100010, 0x00010001,
|
||||
0x00000000, 0x01010100, 0x01011111, 0x00000100, // 00f3h
|
||||
0x00111111, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x01011110, 0x01100010, 0x00100010, // 00f4h
|
||||
0x00100001, 0x00100000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x01010010, 0x01111110, 0x00100010, // 00f5h
|
||||
0x00100001, 0x00100000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x01010000, 0x01111111, 0x00100000, // 00f6h
|
||||
0x00100000, 0x00100000, 0x00100000, 0x00111111,
|
||||
0x00000000, 0x01010010, 0x01010010, 0x00111111, // 00f7h
|
||||
0x00010010, 0x00010000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x01010011, 0x01010100, 0x00100011, // 00f8h
|
||||
0x00100100, 0x00010000, 0x00001000, 0x00000111,
|
||||
0x00000000, 0x01010000, 0x01011111, 0x00010000, // 00f9h
|
||||
0x00001000, 0x00001100, 0x00010010, 0x00100001,
|
||||
0x00000000, 0x01010010, 0x01111111, 0x00100010, // 00fah
|
||||
0x00010010, 0x00000010, 0x00000010, 0x00111100,
|
||||
0x00000000, 0x01010001, 0x01010010, 0x00100000, // 00fbh
|
||||
0x00100000, 0x00010000, 0x00001000, 0x00000110,
|
||||
0x00000000, 0x01011110, 0x01010010, 0x00100110, // 00fch
|
||||
0x00111001, 0x00100000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x01010000, 0x01011110, 0x00010000, // 00fdh
|
||||
0x01111111, 0x00010000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x00100101, 0x01001010, 0x00101010, // 00feh
|
||||
0x00100000, 0x00010000, 0x00001000, 0x00000111,
|
||||
0x00000000, 0x01011110, 0x01010000, 0x00111111, // 00ffh
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00000110
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Palette data
|
||||
*---------------------------------------------------------------------------*/
|
||||
const u32 d_PaletteData[8 * 16] =
|
||||
{
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // black
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x001f0000, 0x00000000, 0x00000000, 0x00000000, // red
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x03e00000, 0x00000000, 0x00000000, 0x00000000, // green
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x7c000000, 0x00000000, 0x00000000, 0x00000000, // blue
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x03ff0000, 0x00000000, 0x00000000, 0x00000000, // yellow
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x7c1f0000, 0x00000000, 0x00000000, 0x00000000, // purple
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x7fe00000, 0x00000000, 0x00000000, 0x00000000, // light blue
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00180000, 0x00000000, 0x00000000, 0x00000000, // dark red
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x03000000, 0x00000000, 0x00000000, 0x00000000, // dark green
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x60000000, 0x00000000, 0x00000000, 0x00000000, // dark blue
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x03180000, 0x00000000, 0x00000000, 0x00000000, // dark yellow
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x60180000, 0x00000000, 0x00000000, 0x00000000, // dark purple
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x63000000, 0x00000000, 0x00000000, 0x00000000, // dark light blue
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x56b50000, 0x00000000, 0x00000000, 0x00000000, // gray
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x2d6b0000, 0x00000000, 0x00000000, 0x00000000, // dark gray
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x7fff0000, 0x00000000, 0x00000000, 0x00000000, // white
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,493 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest - Nand-2
|
||||
File: main.c
|
||||
|
||||
Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include <twl/nam.h>
|
||||
#include <twl/os/common/format_rom.h>
|
||||
|
||||
#include "application_jump_private.h"
|
||||
#include "common.h"
|
||||
#include "screen.h"
|
||||
|
||||
#define DMA_NO_FS 1
|
||||
#define TITLE_NUM_CUL 18
|
||||
#define TITLE_NUM_PAGE (TITLE_NUM_CUL * 2)
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
変数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
// キー入力
|
||||
static KeyInfo gKey;
|
||||
|
||||
// インストールされている NAND アプリの数
|
||||
static s32 gNandAppNum;
|
||||
|
||||
// カーソル位置
|
||||
static s32 gCurPos = 0;
|
||||
|
||||
static BOOL gIsExistCard = FALSE;
|
||||
|
||||
// エラー表示用バッファ
|
||||
static char gErrBuf[33];
|
||||
|
||||
// エラー表示時間計測用
|
||||
static OSTick gErrTick = 0;
|
||||
|
||||
typedef struct DataStruct
|
||||
{
|
||||
NAMTitleId id;
|
||||
BOOL normaljmp_flag;
|
||||
} DataStruct;
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Prototype
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void PrintErrMsg(const char* msg);
|
||||
|
||||
static BOOL GetDataStruct(DataStruct* list);
|
||||
static void DrawScene(DataStruct* list);
|
||||
|
||||
static void ConvertTitleIdLo(u8* code, u8* titleid_lo);
|
||||
static void ConvertGameCode(u8* code, u32 game_code);
|
||||
static void ConvertInitialCode(u8* code, u32 titleid_lo);
|
||||
|
||||
static void* AllocForNAM(u32 size);
|
||||
static void FreeForNAM(void* ptr);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
static void PrintErrMsg(const char* msg)
|
||||
{
|
||||
if ( STD_StrLen(msg) > 32 )
|
||||
{
|
||||
OS_Warning("err msg is too long.");
|
||||
return;
|
||||
}
|
||||
|
||||
STD_StrCpy( gErrBuf, msg );
|
||||
gErrTick = OS_GetTick();
|
||||
}
|
||||
|
||||
void TwlMain(void)
|
||||
{
|
||||
DataStruct dataList[TITLE_NUM_PAGE];
|
||||
|
||||
InitCommon();
|
||||
InitScreen();
|
||||
|
||||
GX_DispOn();
|
||||
GXS_DispOn();
|
||||
|
||||
FS_Init(DMA_NO_FS);
|
||||
NAM_Init(AllocForNAM, FreeForNAM);
|
||||
|
||||
ClearScreen();
|
||||
|
||||
// NAND にインポートされているNAND アプリの数を取得する
|
||||
if ( (gNandAppNum = NAM_GetNumTitles()) < 0)
|
||||
{
|
||||
OS_Panic("NAM_GetNumTitles() failed.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
// キー入力情報取得の空呼び出し(IPL での A ボタン押下対策)
|
||||
ReadKey(&gKey);
|
||||
|
||||
// 情報の取得
|
||||
if ( !GetDataStruct(dataList) )
|
||||
{
|
||||
PrintErrMsg("Failed to get dataList.");
|
||||
}
|
||||
|
||||
while(TRUE)
|
||||
{
|
||||
// キー入力情報取得
|
||||
ReadKey(&gKey);
|
||||
|
||||
// カーソルの移動
|
||||
if (gKey.trg & PAD_KEY_DOWN)
|
||||
{
|
||||
gCurPos++;
|
||||
if ( gCurPos >= ( gNandAppNum < TITLE_NUM_PAGE ? gNandAppNum : TITLE_NUM_PAGE) )
|
||||
{
|
||||
gCurPos = 0;
|
||||
}
|
||||
}
|
||||
if (gKey.trg & PAD_KEY_UP)
|
||||
{
|
||||
if ( gCurPos == 0)
|
||||
{
|
||||
if ( gNandAppNum < TITLE_NUM_PAGE )
|
||||
{
|
||||
gCurPos = gNandAppNum - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
gCurPos = TITLE_NUM_PAGE - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gCurPos--;
|
||||
}
|
||||
}
|
||||
|
||||
// 列の移動
|
||||
if ( (gKey.trg & PAD_KEY_RIGHT || gKey.trg & PAD_KEY_LEFT) && gNandAppNum >= TITLE_NUM_CUL )
|
||||
{
|
||||
if ( gCurPos > TITLE_NUM_CUL )
|
||||
{
|
||||
if ( gCurPos - TITLE_NUM_CUL < gNandAppNum )
|
||||
{
|
||||
gCurPos -= TITLE_NUM_CUL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( gCurPos + TITLE_NUM_CUL < gNandAppNum )
|
||||
{
|
||||
gCurPos += TITLE_NUM_CUL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// アプリジャンプの実行
|
||||
if (gKey.trg & PAD_BUTTON_A)
|
||||
{
|
||||
OS_DoApplicationJump(dataList[gCurPos].id, OS_APP_JUMP_NORMAL);
|
||||
// 成功時はここ以降は実行されない
|
||||
PrintErrMsg("Failed to App Jump.");
|
||||
}
|
||||
// 内部関数を使用したアプリジャンプの実行
|
||||
if (gKey.trg & PAD_BUTTON_B)
|
||||
{
|
||||
LauncherBootFlags flag;
|
||||
|
||||
flag.bootType = LAUNCHER_BOOTTYPE_NAND;
|
||||
flag.isValid = TRUE;
|
||||
flag.isLogoSkip = TRUE;
|
||||
flag.isInitialShortcutSkip = FALSE;
|
||||
flag.isAppLoadCompleted = FALSE;
|
||||
flag.isAppRelocate = FALSE;
|
||||
flag.rsv = 0;
|
||||
OS_SetLauncherParamAndResetHardware(dataList[gCurPos].id, &flag);
|
||||
// 成功時はここ以降は実行されない
|
||||
PrintErrMsg("Failed to App Jump(force).");
|
||||
}
|
||||
|
||||
// カードアプリへのアプリジャンプ試行
|
||||
if (gKey.trg & PAD_BUTTON_Y)
|
||||
{
|
||||
CARDRomHeader* rh;
|
||||
// u64 titleId;
|
||||
rh = (CARDRomHeader*)CARD_GetRomHeader();
|
||||
|
||||
// TWL アプリの場合
|
||||
if ( rh->product_id & 0x03 || rh->product_id & 0x02 ) // 刺さっているカードのロムが TWLアプリ
|
||||
{
|
||||
ROM_Header* rh2;
|
||||
rh2 = (ROM_Header*)HW_TWL_CARD_ROM_HEADER_BUF;
|
||||
|
||||
OS_DoApplicationJump( rh2->s.titleID, OS_APP_JUMP_NORMAL);
|
||||
}
|
||||
|
||||
// titleId = (0x00030000 << 32) | rh->game_code;
|
||||
// NITRO カードアプリなら失敗(特殊なものでない限り TitleID が設定されていないため)
|
||||
|
||||
PrintErrMsg("Failed to App Jump.");
|
||||
}
|
||||
|
||||
// エラー表示判定
|
||||
if ( OS_TicksToSeconds(OS_GetTick() - gErrTick) > 3 )
|
||||
{
|
||||
PrintErrMsg(" ");
|
||||
}
|
||||
|
||||
// 画面描画
|
||||
DrawScene(dataList);
|
||||
|
||||
// Vブランク待ち
|
||||
OS_WaitVBlankIntr();
|
||||
|
||||
// 画面クリア
|
||||
ClearScreen();
|
||||
}
|
||||
|
||||
// Vブランク待ち 最後に画面を更新してから終了
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
static BOOL GetDataStruct(DataStruct* list)
|
||||
{
|
||||
// 36個分のタイトルIDリストバッファ
|
||||
NAMTitleId titleIdList[TITLE_NUM_PAGE];
|
||||
s32 i;
|
||||
FSFile fp;
|
||||
|
||||
if ( NAM_GetTitleList(titleIdList, TITLE_NUM_PAGE) != NAM_OK )
|
||||
{
|
||||
PrintErrMsg("NAM_GetTitleList failed.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// データリストの作成(1ページ分)
|
||||
for ( i=0; i<TITLE_NUM_PAGE; i++, list++)
|
||||
{
|
||||
ROM_Header_Short rh;
|
||||
char pathbuf[FS_ENTRY_LONGNAME_MAX + 32];
|
||||
|
||||
// そもそも NAND アプリの数が 1ページにも満たない場合は途中で終了する
|
||||
if ( i >= gNandAppNum )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// TitleID の格納
|
||||
list->id = titleIdList[i];
|
||||
|
||||
// ノーマルジャンプをされるのを許可するかを表すフラグの取得
|
||||
// TitleID を見て、タイトル種別がデータタイトルならば
|
||||
// そもそも ROMヘッダが存在しない、アプリジャンプをする必要もない
|
||||
if ( !NAM_IsDataTitle(list->id) )
|
||||
{
|
||||
// アプリ本体へのパスを取得
|
||||
if ( NAM_GetTitleBootContentPath(pathbuf, list->id) != NAM_OK )
|
||||
{
|
||||
PrintErrMsg("GetContentPath failed.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// アプリのファイルオープン
|
||||
FS_InitFile(&fp);
|
||||
if ( !FS_OpenFileEx(&fp, pathbuf, FS_FILEMODE_R) )
|
||||
{
|
||||
// 失敗時はエラーコード出力で終了
|
||||
PrintErrMsg("FS_OpenFileEx failed.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( -1 == FS_ReadFile(&fp, &rh, sizeof(ROM_Header_Short) ))
|
||||
{
|
||||
PrintErrMsg("FS_ReadFile failed.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
list->normaljmp_flag = rh.permit_landing_normal_jump;
|
||||
|
||||
FS_CloseFile(&fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
list->normaljmp_flag = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
PrintErrMsg(" ");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void DrawScene(DataStruct* list)
|
||||
{
|
||||
s32 i;
|
||||
u8 init_code[5], titleid_lo[5];
|
||||
|
||||
// 上画面
|
||||
PutMainScreen( 0, 1, 0xff, " ------ App Jump Checker ------ ");
|
||||
|
||||
PutMainScreen( 0, 3, 0xff, " total app : %d", gNandAppNum);
|
||||
|
||||
PutMainScreen( 0, 5, 0xff, " ------------------------------ ");
|
||||
|
||||
PutMainScreen( 0, 7, 0xff, " A : try App Jump (to NAND)" );
|
||||
PutMainScreen( 0, 8, 0xfe, " B : try App Jump (force) " );
|
||||
PutMainScreen( 0, 9, 0xff, " Y : try App Jump (to CARD)" );
|
||||
PutMainScreen( 0, 11, 0xff, " UP ,DOWN ,LEFT ,RIGHT KEY :" );
|
||||
PutMainScreen( 0, 12, 0xff, " move * (cursor) ");
|
||||
PutMainScreen( 0, 14, 0xff, " ------------------------------ ");
|
||||
|
||||
PutMainScreen( 0, 16, 0xf1, "%s", gErrBuf);
|
||||
|
||||
// 下画面
|
||||
PutSubScreen( 0, 0, 0xf4, " NAND ( max 36 )");
|
||||
PutSubScreen( 0, 1, 0xff, "--- ID ---------------- ID -------");
|
||||
|
||||
|
||||
// 下画面に1行ずつ、カーソル用スペース、イニシャルコード、ノーマルジャンプ可否フラグを表示
|
||||
for ( i=0; i < TITLE_NUM_PAGE; i++, list++)
|
||||
{
|
||||
// そもそも NAND アプリの数が 1ページにも満たない場合は途中で終了する
|
||||
if ( i >= gNandAppNum )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
ConvertInitialCode(init_code, NAM_GetTitleIdLo(list->id));
|
||||
|
||||
if ( list->normaljmp_flag )
|
||||
{
|
||||
PutSubScreen( (i >= TITLE_NUM_CUL ? 18 : 0), 2 + (i >= TITLE_NUM_CUL ? i-18 : i), 0xf2, " %s : o", init_code );
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen( (i >= TITLE_NUM_CUL ? 18 : 0), 2 + (i >= TITLE_NUM_CUL ? i-18 : i), 0xff, " %s : -", init_code );
|
||||
}
|
||||
}
|
||||
|
||||
// カードアプリチェック
|
||||
PutSubScreen( 0, 2 + TITLE_NUM_CUL + 1, 0xf4, " CARD: Init. Code, TitleID_Lo");
|
||||
{
|
||||
CARDRomHeader* rh;
|
||||
rh = (CARDRomHeader*)CARD_GetRomHeader();
|
||||
|
||||
if ( rh->game_code != 0 )
|
||||
{
|
||||
// イニシャルコードの取得
|
||||
if ( rh->product_id & 0x03 || rh->product_id & 0x02 ) // 刺さっているカードのロムが TWLアプリ
|
||||
{
|
||||
ROM_Header* rh2;
|
||||
rh2 = (ROM_Header*)HW_TWL_CARD_ROM_HEADER_BUF;
|
||||
|
||||
// ROM ヘッダの拡張領域まで TitleID_Lo を見に行く
|
||||
// ROM ヘッダ(共通部)のイニシャルコードは基本的に製品版に入れられる
|
||||
// ConvertTitleIdLo(titleid_lo, rh2->s.titleID_Lo);
|
||||
MI_CpuCopy8( rh2->s.titleID_Lo, titleid_lo, 4 );
|
||||
titleid_lo[4] = 0x00;
|
||||
MI_CpuCopy8( rh2->s.game_code, init_code, 4 );
|
||||
}
|
||||
else // 刺さっているカードのロムが NTRアプリ
|
||||
{
|
||||
// 未マスタリング状態のロムでは、ROM ヘッダ(共通部)のイニシャルコードへ
|
||||
// 設定が反映されない
|
||||
|
||||
// 特別に設定された NTRアプリなら TitleID_Lo が設定されている可能性があるので読み込んでみる
|
||||
MI_CpuClear8( titleid_lo, 5 );
|
||||
MI_CpuCopy8( ((ROM_Header*)rh)->s.titleID_Lo, titleid_lo, 4 );
|
||||
titleid_lo[4] = 0x00;
|
||||
ConvertGameCode(init_code, rh->game_code);
|
||||
}
|
||||
|
||||
// ノーマルジャンプを許可しているかどうかを取得
|
||||
if ( rh->reserved_A[8] & 0x01 )
|
||||
{
|
||||
PutSubScreen( 0, 2 + TITLE_NUM_CUL + 2, 0xf2, " %s, %s : o", init_code, titleid_lo );
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen( 0, 2 + TITLE_NUM_CUL + 2, 0xff, " %s, %s : -", init_code, titleid_lo );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen( 0, 2 + TITLE_NUM_CUL + 2, 0xfe, " not exist");
|
||||
}
|
||||
|
||||
ConvertGameCode(init_code, rh->game_code);
|
||||
}
|
||||
|
||||
|
||||
// カーソル描画
|
||||
PutSubScreen( 1 + (gCurPos >= TITLE_NUM_CUL ? 18 : 0), 2 + (gCurPos >= TITLE_NUM_CUL ? gCurPos - 18 : gCurPos), 0xf4, "*");
|
||||
}
|
||||
|
||||
static void ConvertTitleIdLo(u8* code, u8* titleid_lo)
|
||||
{
|
||||
u8 tmp[5];
|
||||
s32 i;
|
||||
|
||||
// for ( titleid_lo += 3, i=0 ; i<4; i++, code++, titleid_lo--)
|
||||
for ( i=3; i>=0; i--, titleid_lo++ )
|
||||
{
|
||||
tmp[i] = *titleid_lo;
|
||||
*code = tmp[i];
|
||||
}
|
||||
|
||||
// *code = tmp;
|
||||
|
||||
// NULL 終端
|
||||
*code = 0x00;
|
||||
}
|
||||
|
||||
static void ConvertGameCode(u8* code, u32 game_code)
|
||||
{
|
||||
u8 tmp[5];
|
||||
s32 i;
|
||||
|
||||
ConvertInitialCode(tmp, game_code);
|
||||
|
||||
for ( i=3; i>=0; i--, code++)
|
||||
{
|
||||
*code = tmp[i];
|
||||
}
|
||||
|
||||
// NULL 文字終端
|
||||
*code = 0x00;
|
||||
}
|
||||
|
||||
static void ConvertInitialCode(u8* code, u32 titleid_lo)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for ( i=0; i<4; i++, code++)
|
||||
{
|
||||
*code = (u8)(titleid_lo >> (8 * (3-i)));
|
||||
}
|
||||
|
||||
// NULL文字終端
|
||||
*code = 0x00;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: VBlankIntr
|
||||
|
||||
Description: Vブランク割込みハンドラ。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void VBlankIntr(void)
|
||||
{
|
||||
// テキスト表示を更新
|
||||
UpdateScreen();
|
||||
|
||||
// IRQ チェックフラグ47をセット
|
||||
OS_SetIrqCheckFlag(OS_IE_V_BLANK);
|
||||
}
|
||||
|
||||
static void* AllocForNAM(u32 size)
|
||||
{
|
||||
void* ptr;
|
||||
ptr = OS_AllocFromMain(size);
|
||||
|
||||
if (ptr == NULL)
|
||||
{
|
||||
OS_Panic("alloc failed.");
|
||||
}
|
||||
|
||||
return ptr;
|
||||
|
||||
}
|
||||
|
||||
static void FreeForNAM(void* ptr)
|
||||
{
|
||||
OS_FreeToMain(ptr);
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,194 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - WCM - demos - wcm-list-2
|
||||
File: screen.c
|
||||
|
||||
Copyright 2007 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include <nitro.h>
|
||||
#include "screen.h"
|
||||
#include "font.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
定数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
#define TEXT_SCREEN_SIZE 2048
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
内部変数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
// 仮想スクリーン[ 上下画面 ][ BG 枚数 ][ キャラクタ数 ]
|
||||
static u16 gScreen[2 ][ 1 ][ TEXT_SCREEN_SIZE / sizeof(u16) ] ATTRIBUTE_ALIGN(32);
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitScreen
|
||||
|
||||
Description: 文字表示システムのために、表示設定を初期化する。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitScreen(void)
|
||||
{
|
||||
// 各 V-RAM 初期化
|
||||
GX_SetBankForLCDC(GX_VRAM_LCDC_ALL);
|
||||
MI_CpuClearFast((void*)HW_LCDC_VRAM, HW_LCDC_VRAM_SIZE);
|
||||
(void)GX_DisableBankForLCDC();
|
||||
|
||||
// OAM 初期化
|
||||
MI_CpuFillFast((void*)HW_OAM, 0xc0, HW_OAM_SIZE);
|
||||
MI_CpuFillFast((void*)HW_DB_OAM, 0xc0, HW_DB_OAM_SIZE);
|
||||
|
||||
// パレット初期化
|
||||
MI_CpuClearFast((void*)HW_PLTT, HW_PLTT_SIZE);
|
||||
MI_CpuClearFast((void*)HW_DB_PLTT, HW_DB_PLTT_SIZE);
|
||||
|
||||
// 上画面設定
|
||||
GX_SetGraphicsMode(GX_DISPMODE_GRAPHICS, GX_BGMODE_0, GX_BG0_AS_2D);
|
||||
|
||||
GX_SetBankForBG(GX_VRAM_BG_128_A);
|
||||
G2_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256, GX_BG_COLORMODE_16, GX_BG_SCRBASE_0x0000, GX_BG_CHARBASE_0x04000,
|
||||
GX_BG_EXTPLTT_01);
|
||||
G2_SetBG0Priority(0);
|
||||
|
||||
GX_SetVisiblePlane(GX_PLANEMASK_BG0);
|
||||
GX_LoadBG0Char(d_CharData, 0, sizeof(d_CharData));
|
||||
GX_LoadBGPltt(d_PaletteData, 0, sizeof(d_PaletteData));
|
||||
((u16*)HW_PLTT)[0] = 0x0000; // black
|
||||
MI_CpuFillFast(gScreen[0][0], 0, TEXT_SCREEN_SIZE);
|
||||
DC_StoreRange(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
GX_LoadBG0Scr(gScreen[0][0], 0, TEXT_SCREEN_SIZE);
|
||||
|
||||
// 下画面設定
|
||||
GX_SetBankForSubBG(GX_VRAM_SUB_BG_32_H);
|
||||
G2S_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256, GX_BG_COLORMODE_16, GX_BG_SCRBASE_0x0000, GX_BG_CHARBASE_0x04000,
|
||||
GX_BG_EXTPLTT_01);
|
||||
G2S_SetBG0Priority(0);
|
||||
GXS_SetGraphicsMode(GX_BGMODE_0);
|
||||
GXS_SetVisiblePlane(GX_PLANEMASK_BG0);
|
||||
GXS_LoadBG0Char(d_CharData, 0, sizeof(d_CharData));
|
||||
GXS_LoadBGPltt(d_PaletteData, 0, sizeof(d_PaletteData));
|
||||
((u16*)HW_DB_PLTT)[0] = 0x0000; // black
|
||||
MI_CpuFillFast(gScreen[1][0], 0, TEXT_SCREEN_SIZE);
|
||||
DC_StoreRange(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
GXS_LoadBG0Scr(gScreen[1][0], 0, TEXT_SCREEN_SIZE);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: ClearScreen
|
||||
|
||||
Description: 画面のテキスト表示をクリアする。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void ClearScreen(void)
|
||||
{
|
||||
MI_CpuClearFast(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
MI_CpuClearFast(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
}
|
||||
void ClearMainScreen(void)
|
||||
{
|
||||
MI_CpuClearFast(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
|
||||
}
|
||||
void ClearSubScreen(void)
|
||||
{
|
||||
MI_CpuClearFast(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: PutMainScreen
|
||||
|
||||
Description: メイン画面にテキスト出力する。
|
||||
|
||||
Arguments: text - 出力する文字列。
|
||||
... - 仮想引数。
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void PutMainScreen(s32 x, s32 y, u8 palette, char* text, ...)
|
||||
{
|
||||
va_list vlist;
|
||||
char temp[33];
|
||||
s32 i;
|
||||
|
||||
va_start(vlist, text);
|
||||
(void)vsnprintf(temp, 33, text, vlist);
|
||||
va_end(vlist);
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
if (temp[i] == 0x00)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
gScreen[0][0][((y * 32) + x + i) % (32 * 32)] = (u16) (palette << 12 | temp[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: PrintSubScreen
|
||||
|
||||
Description: サブ画面にテキスト出力する。
|
||||
|
||||
Arguments: text - 出力する文字列。
|
||||
... - 仮想引数。
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void PutSubScreen(s32 x, s32 y, u8 palette, char* text, ...)
|
||||
{
|
||||
va_list vlist;
|
||||
char temp[33];
|
||||
s32 i;
|
||||
|
||||
va_start(vlist, text);
|
||||
(void)vsnprintf(temp, 33, text, vlist);
|
||||
va_end(vlist);
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
if (temp[i] == 0x00)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
gScreen[1][0][((y * 32) + x + i) % (32 * 32)] = (u16) (palette << 12 | temp[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: UpdateScreen
|
||||
|
||||
Description: 仮想スクリーンを V-RAM に反映する。
|
||||
V ブランク期間中での呼び出しを想定。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void UpdateScreen(void)
|
||||
{
|
||||
// 仮想スクリーンを V-RAM に反映
|
||||
DC_StoreRange(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
GX_LoadBG0Scr(gScreen[0][0], 0, TEXT_SCREEN_SIZE);
|
||||
DC_StoreRange(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
GXS_LoadBG0Scr(gScreen[1][0], 0, TEXT_SCREEN_SIZE);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,49 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Card
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM := TWL
|
||||
|
||||
TARGET_BIN = appjumpTestForCard_AID.srl
|
||||
INCDIR = ../include
|
||||
SRCDIR = ./src ../src
|
||||
SRCS = main.c screen.c font.c common.c
|
||||
|
||||
ROM_SPEC = appjumptest_card.rsf
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/ApplicationJumpTest
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
endif
|
||||
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
LIBSYSCALL = ./461A/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,243 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - include
|
||||
# File: ROM-TS.rsf
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# TWL ROM SPEC FILE
|
||||
#
|
||||
|
||||
Arm9
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
Elf "$(MAKEROM_ARM9:r).tef"
|
||||
}
|
||||
|
||||
Arm7
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
Elf "$(MAKEROM_ARM7_BASE:r).tef"
|
||||
}
|
||||
|
||||
Arm9.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
}
|
||||
|
||||
Arm7.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
}
|
||||
|
||||
Property
|
||||
{
|
||||
###
|
||||
### Settings for FinalROM
|
||||
###
|
||||
#### BEGIN
|
||||
#
|
||||
# TITLE NAME: Your product name within 12bytes
|
||||
#
|
||||
TitleName "AppJmpTestC"
|
||||
|
||||
#
|
||||
# MAKER CODE: Your company ID# in 2 ascii words
|
||||
# issued by NINTENDO
|
||||
#
|
||||
MakerCode 01
|
||||
|
||||
#
|
||||
# REMASTER VERSION: Mastering version
|
||||
#
|
||||
RomVersion 0
|
||||
|
||||
#
|
||||
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||
#
|
||||
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||
|
||||
#
|
||||
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||
#
|
||||
#RomSize 256M
|
||||
|
||||
#
|
||||
# ROM PADDING: TRUE if finalrom
|
||||
#
|
||||
#RomFootPadding TRUE
|
||||
|
||||
#
|
||||
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderTemplate ./461A/rom_header_461a.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile $(TWLSDK_ROOT)/include/twl/specfiles/default.bnr
|
||||
|
||||
#
|
||||
# Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
PermitLandingNormalJump TRUE
|
||||
|
||||
#
|
||||
# Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
#PermitLandingTmpJump FALSE
|
||||
|
||||
###
|
||||
### Setting for TWL
|
||||
###
|
||||
|
||||
#
|
||||
# ROM HEADER Ltd: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderLtd $(TWLSDK_ROOT)/tools/bin/rom_header.LTD.sbin
|
||||
|
||||
#
|
||||
# Digest parameters:
|
||||
#
|
||||
DigestParam 1024 32
|
||||
|
||||
#
|
||||
# WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD
|
||||
# MAP2_BB_HYB/MAP2_BB_LTD/MAP2_TS_HYB/MAP2_TS_LTD]
|
||||
# don't have to edit
|
||||
#
|
||||
WramMapping $(MAKEROM_WRAM_MAPPING)
|
||||
|
||||
#
|
||||
# CardRegion: card region [Japan/America/Europe/Australia/China/Korea]
|
||||
#
|
||||
CardRegion ALL
|
||||
|
||||
#
|
||||
# Codec mode:
|
||||
# don't have to edit
|
||||
#
|
||||
CodecMode $(MAKEROM_CODEC_MODE)
|
||||
|
||||
#
|
||||
# Disp WiFiConnection Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#WiFiConnectionIcon FALSE
|
||||
|
||||
#
|
||||
# Disp DSWireless Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#DSWirelessIcon FALSE
|
||||
|
||||
#
|
||||
# Agree EULA [TRUE/FALSE]
|
||||
#
|
||||
#AgreeEULA FALSE
|
||||
|
||||
#
|
||||
# Agree EULA version [1 - 255]
|
||||
#
|
||||
#AgreeEULAVersion 1
|
||||
|
||||
###
|
||||
#### END
|
||||
}
|
||||
|
||||
AppendProperty
|
||||
{
|
||||
#
|
||||
# Boot allowed Media: [GameCard]
|
||||
#
|
||||
Media GameCard
|
||||
|
||||
#
|
||||
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||
#
|
||||
GameCode 461A
|
||||
|
||||
#
|
||||
# Public save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PublicSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Private save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PrivateSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Enable SubBannerFile
|
||||
#SubBannerFile TRUE
|
||||
|
||||
#
|
||||
# Game card power on: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardOn FALSE
|
||||
|
||||
#
|
||||
# Game card transferd to nitro mode: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardNitroMode FALSE
|
||||
}
|
||||
|
||||
RomSpec
|
||||
{
|
||||
Offset 0x00000000
|
||||
Segment ALL
|
||||
HostRoot $(MAKEROM_ROMROOT)
|
||||
Root /
|
||||
File $(MAKEROM_ROMFILES)
|
||||
}
|
||||
|
||||
Rating
|
||||
{
|
||||
#
|
||||
# Permited age to play for each rating organization
|
||||
#
|
||||
# Supported organization
|
||||
# - CERO (OGN0) : for Japan
|
||||
# - ESRB (OGN1) : for North America
|
||||
# - BBFC (OGN2) : obsolete organization
|
||||
# - USK (OGN3) : for German
|
||||
# - PEGI_GEN (OGN4) : for Europe
|
||||
# - PEGI_FINLAND (OGN5) : obsolete organization
|
||||
# - PEGI_PRT (OGN6) : for Portugal
|
||||
# - PEGI_BBFC (OGN7) : for UK
|
||||
# - OFLC (OGN8) : for Australia and NewZealand
|
||||
# - GRB (OGN9) : for Korea
|
||||
# - OGN10 : reserved
|
||||
# - OGN11 : reserved
|
||||
# - OGN12 : reserved
|
||||
# - OGN13 : reserved
|
||||
# - OGN14 : reserved
|
||||
# - OGN15 : reserved
|
||||
#
|
||||
# Available age [ 0 - 31 / PENDING / FREE ]
|
||||
|
||||
CERO FREE
|
||||
# ESRB FREE
|
||||
# USK FREE
|
||||
# PEGI_GEN FREE
|
||||
# PEGI_PRT FREE
|
||||
# PEGI_BBFC FREE
|
||||
# OFLC FREE
|
||||
# GRB FREE
|
||||
}
|
||||
Binary file not shown.
@ -1,313 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest - Card
|
||||
File: main.c
|
||||
|
||||
Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include "common.h"
|
||||
#include "screen.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
変数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
// キー入力
|
||||
static KeyInfo gKey;
|
||||
|
||||
// アプリ間パラメータ
|
||||
static AppParam gAppParam;
|
||||
// アプリ間パラメータとして文字列をセットするかどうか
|
||||
static BOOL gIsSetDelArg = TRUE;
|
||||
// アプリ間パラメータとして引き渡された文字列を格納するバッファ(6つまで)
|
||||
static char gStrAppParam[6][APPJUMP_STRING_LENGTH + 1] ATTRIBUTE_ALIGN(32);
|
||||
// アプリ間パラメータとして引き渡された文字列の個数
|
||||
static int gArgc;
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Prototype
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
void TwlMain(void)
|
||||
{
|
||||
OSDeliverArgInfo argInfo;
|
||||
|
||||
int result;
|
||||
int argSize =sizeof(u32);
|
||||
|
||||
InitCommon();
|
||||
InitScreen();
|
||||
|
||||
GX_DispOn();
|
||||
GXS_DispOn();
|
||||
|
||||
ClearScreen();
|
||||
|
||||
// キー入力情報取得の空呼び出し(IPL での A ボタン押下対策)
|
||||
ReadKey(&gKey);
|
||||
|
||||
OS_InitDeliverArgInfo(&argInfo, sizeof(AppParam));
|
||||
OS_DecodeDeliverArg();
|
||||
|
||||
/* アプリ間パラメータ(バイナリデータの取得) */
|
||||
if ( OS_DELIVER_ARG_SUCCESS != (result = OS_GetBinaryFromDeliverArg( &gAppParam, &argSize, sizeof(AppParam))) )
|
||||
{
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: READ_ERROR (%d)", result);
|
||||
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
/* アプリ間パラメータ(文字列)の取得 */
|
||||
if ((gArgc = OS_GetDeliverArgc()) > 0)
|
||||
{
|
||||
int i;
|
||||
|
||||
OS_TPrintf("argc = %d\n", gArgc);
|
||||
|
||||
for (i=0; i < gArgc-1 && i < 6; i++)
|
||||
{
|
||||
STD_StrLCpy(gStrAppParam[i], (const char*)OS_GetDeliverArgv(i+1), APPJUMP_STRING_LENGTH);
|
||||
gStrAppParam[i][APPJUMP_STRING_LENGTH] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
while(TRUE)
|
||||
{
|
||||
int i;
|
||||
|
||||
// 自動テスト中に、ユーザのキー入力による終了指示を受け付けるためにウエイトを入れる
|
||||
if (gAppParam.isAutoJump == 1)
|
||||
{
|
||||
OSTick tick = OS_GetTick();
|
||||
|
||||
PutMainScreen(1, 9, 0xf8, "executing auto app jump...");
|
||||
PutMainScreen(1, 11, 0xff, "wait 2 seconds...");
|
||||
PutMainScreen(1, 13, 0xff, "START: quit auto app jump");
|
||||
do {
|
||||
ReadKey(&gKey);
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_START)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
OS_WaitVBlankIntr();
|
||||
} while (OS_TicksToSeconds(OS_GetTick() - tick) < 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
// キー入力情報取得
|
||||
ReadKey(&gKey);
|
||||
}
|
||||
|
||||
// 画面クリア
|
||||
ClearScreen();
|
||||
|
||||
// メイン画面描画
|
||||
PutMainScreen(0, 2, 0xf4, " ****** This APP is CARD ****** ");
|
||||
PutMainScreen(0, 5, 0xff, " APP JUMP : %u times ", gAppParam.jumpCount);
|
||||
PutMainScreen(0, 7, 0xff, " DELIVERED PARAM (recent 6 app)");
|
||||
|
||||
for (i=0; i<gArgc-1; i++)
|
||||
{
|
||||
if ( i==0 )
|
||||
{
|
||||
PutMainScreen(2, 8, 0xf2, "%d : %s", i+1, gStrAppParam[i]); // 最新の履歴のみ色をつける
|
||||
}
|
||||
else
|
||||
{
|
||||
PutMainScreen(2, 8+i, 0xff, "%d : %s", i+1, gStrAppParam[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// サブ画面描画
|
||||
PutSubScreen(0, 0, 0xf4, " ------- APP JUMP TEST -------- ");
|
||||
|
||||
if (gIsSetDelArg)
|
||||
{
|
||||
PutSubScreen(0, 2, 0xf8, " DELIVER ARG: ON");
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen(0, 2, 0xff, " DELIVER ARG: OFF");
|
||||
}
|
||||
|
||||
if (gAppParam.isAutoJump)
|
||||
{
|
||||
PutSubScreen(0, 4, 0xf8, " AUTO JUMP TEST: ON");
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen(0, 4, 0xff, " AUTO JUMP TEST: OFF");
|
||||
}
|
||||
|
||||
PutSubScreen(0, 14, 0xf4, " ------------------------------- ");
|
||||
PutSubScreen(0, 16, 0xff, " A: JUMP TO NAND-1 APP");
|
||||
PutSubScreen(0, 17, 0xff, " Y: JUMP TO NAND-2 APP");
|
||||
PutSubScreen(0, 18, 0xff, " X: JUMP TO SELF");
|
||||
PutSubScreen(0, 19, 0xff, " B: RETURN JUMP");
|
||||
|
||||
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
||||
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
||||
|
||||
if (gKey.trg & PAD_KEY_DOWN)
|
||||
{
|
||||
}
|
||||
else if (gKey.trg & PAD_KEY_UP)
|
||||
{
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_START)
|
||||
{
|
||||
// 自動テストフラグをスイッチ
|
||||
gAppParam.isAutoJump ^= 1;
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_A)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
// NAND-1 アプリへジャンプ
|
||||
if( !OS_DoApplicationJump( NANDAPP1_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_Y)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
|
||||
// NAND-2 アプリへジャンプ
|
||||
if ( !OS_DoApplicationJump( NANDAPP2_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_X || gAppParam.isAutoJump == 1)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
// 自分自身へジャンプ
|
||||
if( !OS_DoApplicationJump( OS_GetTitleId(), OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_B)
|
||||
{
|
||||
AddDeliverArg(&argInfo, TRUE);
|
||||
// ジャンプ元のアプリへ戻る
|
||||
if ( !OS_ReturnToPrevApplication() )
|
||||
{
|
||||
OS_TPrintf("Failed to Return Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
||||
{
|
||||
// アプリ間パラメータとして文字列を引き渡すかどうかのフラグを ON/OFF する
|
||||
gIsSetDelArg = !gIsSetDelArg;
|
||||
}
|
||||
|
||||
// Vブランク待ち
|
||||
OS_WaitVBlankIntr();
|
||||
}
|
||||
|
||||
// Vブランク待ち 最後に画面を更新してから終了
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: AddDeliverArg
|
||||
|
||||
Description: アプリジャンプ先へ引き渡すパラメータを追加。
|
||||
|
||||
Arguments: argInfo :
|
||||
isReturn : ジャンプ元への復帰ならば TRUE
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn)
|
||||
{
|
||||
int result;
|
||||
char argument[APPJUMP_STRING_LENGTH + 1];
|
||||
gAppParam.jumpCount++;
|
||||
|
||||
OS_InitDeliverArgInfo(argInfo, sizeof(AppParam));
|
||||
|
||||
// アプリジャンプ回数を +1 してセット
|
||||
result = OS_SetBinaryToDeliverArg( &(gAppParam), sizeof(AppParam) );
|
||||
|
||||
if(result != OS_DELIVER_ARG_SUCCESS)
|
||||
{
|
||||
OS_Warning("Failed to Set DeliverArgument.");
|
||||
}
|
||||
|
||||
if (gIsSetDelArg)
|
||||
{
|
||||
int i;
|
||||
|
||||
// 文字列をセット
|
||||
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||
if (isReturn)
|
||||
{
|
||||
STD_TSPrintf(argument, "Returned from CARD");
|
||||
}
|
||||
else
|
||||
{
|
||||
STD_TSPrintf(argument, "Jumped from CARD");
|
||||
}
|
||||
OS_SetStringToDeliverArg(argument);
|
||||
|
||||
// 今まで引き渡されたパラメータ文字列を引き継がせる
|
||||
for (i=0; i <= 4 && i < gArgc; i++)
|
||||
{
|
||||
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||
STD_StrLCpy( argument, gStrAppParam[i], APPJUMP_STRING_LENGTH );
|
||||
result = OS_SetStringToDeliverArg(argument);
|
||||
OS_TPrintf("arg = %s : result = %d\n", argument, result);
|
||||
}
|
||||
}
|
||||
OS_EncodeDeliverArg();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: VBlankIntr
|
||||
|
||||
Description: Vブランク割込みハンドラ。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void VBlankIntr(void)
|
||||
{
|
||||
// テキスト表示を更新
|
||||
UpdateScreen();
|
||||
|
||||
// IRQ チェックフラグをセット
|
||||
OS_SetIrqCheckFlag(OS_IE_V_BLANK);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,47 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Card
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM := TWL
|
||||
|
||||
TARGET_BIN = appjumpTestForCard_Fail.srl
|
||||
INCDIR = ../include
|
||||
SRCDIR = ./src ../src
|
||||
SRCS = main.c screen.c font.c common.c
|
||||
|
||||
ROM_SPEC = appjumptest_card.rsf
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/ApplicationJumpTest
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
endif
|
||||
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
LIBSYSCALL = ./460A/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,243 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - include
|
||||
# File: ROM-TS.rsf
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# TWL ROM SPEC FILE
|
||||
#
|
||||
|
||||
Arm9
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
Elf "$(MAKEROM_ARM9:r).tef"
|
||||
}
|
||||
|
||||
Arm7
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
Elf "$(MAKEROM_ARM7_BASE:r).tef"
|
||||
}
|
||||
|
||||
Arm9.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
}
|
||||
|
||||
Arm7.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
}
|
||||
|
||||
Property
|
||||
{
|
||||
###
|
||||
### Settings for FinalROM
|
||||
###
|
||||
#### BEGIN
|
||||
#
|
||||
# TITLE NAME: Your product name within 12bytes
|
||||
#
|
||||
TitleName "AppJmpTestC"
|
||||
|
||||
#
|
||||
# MAKER CODE: Your company ID# in 2 ascii words
|
||||
# issued by NINTENDO
|
||||
#
|
||||
MakerCode 01
|
||||
|
||||
#
|
||||
# REMASTER VERSION: Mastering version
|
||||
#
|
||||
RomVersion 0
|
||||
|
||||
#
|
||||
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||
#
|
||||
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||
|
||||
#
|
||||
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||
#
|
||||
#RomSize 256M
|
||||
|
||||
#
|
||||
# ROM PADDING: TRUE if finalrom
|
||||
#
|
||||
#RomFootPadding TRUE
|
||||
|
||||
#
|
||||
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderTemplate ./460A/rom_header_460a.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile $(TWLSDK_ROOT)/include/twl/specfiles/default.bnr
|
||||
|
||||
#
|
||||
# Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
PermitLandingNormalJump FALSE
|
||||
|
||||
#
|
||||
# Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
#PermitLandingTmpJump FALSE
|
||||
|
||||
###
|
||||
### Setting for TWL
|
||||
###
|
||||
|
||||
#
|
||||
# ROM HEADER Ltd: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderLtd $(TWLSDK_ROOT)/tools/bin/rom_header.LTD.sbin
|
||||
|
||||
#
|
||||
# Digest parameters:
|
||||
#
|
||||
DigestParam 1024 32
|
||||
|
||||
#
|
||||
# WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD
|
||||
# MAP2_BB_HYB/MAP2_BB_LTD/MAP2_TS_HYB/MAP2_TS_LTD]
|
||||
# don't have to edit
|
||||
#
|
||||
WramMapping $(MAKEROM_WRAM_MAPPING)
|
||||
|
||||
#
|
||||
# CardRegion: card region [Japan/America/Europe/Australia/China/Korea]
|
||||
#
|
||||
CardRegion ALL
|
||||
|
||||
#
|
||||
# Codec mode:
|
||||
# don't have to edit
|
||||
#
|
||||
CodecMode $(MAKEROM_CODEC_MODE)
|
||||
|
||||
#
|
||||
# Disp WiFiConnection Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#WiFiConnectionIcon FALSE
|
||||
|
||||
#
|
||||
# Disp DSWireless Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#DSWirelessIcon FALSE
|
||||
|
||||
#
|
||||
# Agree EULA [TRUE/FALSE]
|
||||
#
|
||||
#AgreeEULA FALSE
|
||||
|
||||
#
|
||||
# Agree EULA version [1 - 255]
|
||||
#
|
||||
#AgreeEULAVersion 1
|
||||
|
||||
###
|
||||
#### END
|
||||
}
|
||||
|
||||
AppendProperty
|
||||
{
|
||||
#
|
||||
# Boot allowed Media: [GameCard]
|
||||
#
|
||||
Media GameCard
|
||||
|
||||
#
|
||||
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||
#
|
||||
GameCode 460A
|
||||
|
||||
#
|
||||
# Public save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PublicSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Private save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PrivateSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Enable SubBannerFile
|
||||
#SubBannerFile TRUE
|
||||
|
||||
#
|
||||
# Game card power on: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardOn FALSE
|
||||
|
||||
#
|
||||
# Game card transferd to nitro mode: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardNitroMode FALSE
|
||||
}
|
||||
|
||||
RomSpec
|
||||
{
|
||||
Offset 0x00000000
|
||||
Segment ALL
|
||||
HostRoot $(MAKEROM_ROMROOT)
|
||||
Root /
|
||||
File $(MAKEROM_ROMFILES)
|
||||
}
|
||||
|
||||
Rating
|
||||
{
|
||||
#
|
||||
# Permited age to play for each rating organization
|
||||
#
|
||||
# Supported organization
|
||||
# - CERO (OGN0) : for Japan
|
||||
# - ESRB (OGN1) : for North America
|
||||
# - BBFC (OGN2) : obsolete organization
|
||||
# - USK (OGN3) : for German
|
||||
# - PEGI_GEN (OGN4) : for Europe
|
||||
# - PEGI_FINLAND (OGN5) : obsolete organization
|
||||
# - PEGI_PRT (OGN6) : for Portugal
|
||||
# - PEGI_BBFC (OGN7) : for UK
|
||||
# - OFLC (OGN8) : for Australia and NewZealand
|
||||
# - GRB (OGN9) : for Korea
|
||||
# - OGN10 : reserved
|
||||
# - OGN11 : reserved
|
||||
# - OGN12 : reserved
|
||||
# - OGN13 : reserved
|
||||
# - OGN14 : reserved
|
||||
# - OGN15 : reserved
|
||||
#
|
||||
# Available age [ 0 - 31 / PENDING / FREE ]
|
||||
|
||||
CERO FREE
|
||||
# ESRB FREE
|
||||
# USK FREE
|
||||
# PEGI_GEN FREE
|
||||
# PEGI_PRT FREE
|
||||
# PEGI_BBFC FREE
|
||||
# OFLC FREE
|
||||
# GRB FREE
|
||||
}
|
||||
Binary file not shown.
@ -1,313 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest - Card
|
||||
File: main.c
|
||||
|
||||
Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include "common.h"
|
||||
#include "screen.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
変数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
// キー入力
|
||||
static KeyInfo gKey;
|
||||
|
||||
// アプリ間パラメータ
|
||||
static AppParam gAppParam;
|
||||
// アプリ間パラメータとして文字列をセットするかどうか
|
||||
static BOOL gIsSetDelArg = TRUE;
|
||||
// アプリ間パラメータとして引き渡された文字列を格納するバッファ(6つまで)
|
||||
static char gStrAppParam[6][APPJUMP_STRING_LENGTH + 1] ATTRIBUTE_ALIGN(32);
|
||||
// アプリ間パラメータとして引き渡された文字列の個数
|
||||
static int gArgc;
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Prototype
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
void TwlMain(void)
|
||||
{
|
||||
OSDeliverArgInfo argInfo;
|
||||
|
||||
int result;
|
||||
int argSize =sizeof(u32);
|
||||
|
||||
InitCommon();
|
||||
InitScreen();
|
||||
|
||||
GX_DispOn();
|
||||
GXS_DispOn();
|
||||
|
||||
ClearScreen();
|
||||
|
||||
// キー入力情報取得の空呼び出し(IPL での A ボタン押下対策)
|
||||
ReadKey(&gKey);
|
||||
|
||||
OS_InitDeliverArgInfo(&argInfo, sizeof(AppParam));
|
||||
OS_DecodeDeliverArg();
|
||||
|
||||
/* アプリ間パラメータ(バイナリデータの取得) */
|
||||
if ( OS_DELIVER_ARG_SUCCESS != (result = OS_GetBinaryFromDeliverArg( &gAppParam, &argSize, sizeof(AppParam))) )
|
||||
{
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: READ_ERROR (%d)", result);
|
||||
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
/* アプリ間パラメータ(文字列)の取得 */
|
||||
if ((gArgc = OS_GetDeliverArgc()) > 0)
|
||||
{
|
||||
int i;
|
||||
|
||||
OS_TPrintf("argc = %d\n", gArgc);
|
||||
|
||||
for (i=0; i < gArgc-1 && i < 6; i++)
|
||||
{
|
||||
STD_StrLCpy(gStrAppParam[i], (const char*)OS_GetDeliverArgv(i+1), APPJUMP_STRING_LENGTH);
|
||||
gStrAppParam[i][APPJUMP_STRING_LENGTH] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
while(TRUE)
|
||||
{
|
||||
int i;
|
||||
|
||||
// 自動テスト中に、ユーザのキー入力による終了指示を受け付けるためにウエイトを入れる
|
||||
if (gAppParam.isAutoJump == 1)
|
||||
{
|
||||
OSTick tick = OS_GetTick();
|
||||
|
||||
PutMainScreen(1, 9, 0xf8, "executing auto app jump...");
|
||||
PutMainScreen(1, 11, 0xff, "wait 2 seconds...");
|
||||
PutMainScreen(1, 13, 0xff, "START: quit auto app jump");
|
||||
do {
|
||||
ReadKey(&gKey);
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_START)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
OS_WaitVBlankIntr();
|
||||
} while (OS_TicksToSeconds(OS_GetTick() - tick) < 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
// キー入力情報取得
|
||||
ReadKey(&gKey);
|
||||
}
|
||||
|
||||
// 画面クリア
|
||||
ClearScreen();
|
||||
|
||||
// メイン画面描画
|
||||
PutMainScreen(0, 2, 0xf4, " ****** This APP is CARD ****** ");
|
||||
PutMainScreen(0, 5, 0xff, " APP JUMP : %u times ", gAppParam.jumpCount);
|
||||
PutMainScreen(0, 7, 0xff, " DELIVERED PARAM (recent 6 app)");
|
||||
|
||||
for (i=0; i<gArgc-1; i++)
|
||||
{
|
||||
if ( i==0 )
|
||||
{
|
||||
PutMainScreen(2, 8, 0xf2, "%d : %s", i+1, gStrAppParam[i]); // 最新の履歴のみ色をつける
|
||||
}
|
||||
else
|
||||
{
|
||||
PutMainScreen(2, 8+i, 0xff, "%d : %s", i+1, gStrAppParam[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// サブ画面描画
|
||||
PutSubScreen(0, 0, 0xf4, " ------- APP JUMP TEST -------- ");
|
||||
|
||||
if (gIsSetDelArg)
|
||||
{
|
||||
PutSubScreen(0, 2, 0xf8, " DELIVER ARG: ON");
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen(0, 2, 0xff, " DELIVER ARG: OFF");
|
||||
}
|
||||
|
||||
if (gAppParam.isAutoJump)
|
||||
{
|
||||
PutSubScreen(0, 4, 0xf8, " AUTO JUMP TEST: ON");
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen(0, 4, 0xff, " AUTO JUMP TEST: OFF");
|
||||
}
|
||||
|
||||
PutSubScreen(0, 14, 0xf4, " ------------------------------- ");
|
||||
PutSubScreen(0, 16, 0xff, " A: JUMP TO NAND-1 APP");
|
||||
PutSubScreen(0, 17, 0xff, " Y: JUMP TO NAND-2 APP");
|
||||
PutSubScreen(0, 18, 0xff, " X: JUMP TO SELF");
|
||||
PutSubScreen(0, 19, 0xff, " B: RETURN JUMP");
|
||||
|
||||
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
||||
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
||||
|
||||
if (gKey.trg & PAD_KEY_DOWN)
|
||||
{
|
||||
}
|
||||
else if (gKey.trg & PAD_KEY_UP)
|
||||
{
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_START)
|
||||
{
|
||||
// 自動テストフラグをスイッチ
|
||||
gAppParam.isAutoJump ^= 1;
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_A)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
// NAND-1 アプリへジャンプ
|
||||
if( !OS_DoApplicationJump( NANDAPP1_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_Y)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
|
||||
// NAND-2 アプリへジャンプ
|
||||
if ( !OS_DoApplicationJump( NANDAPP2_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_X || gAppParam.isAutoJump == 1)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
// 自分自身へジャンプ
|
||||
if( !OS_DoApplicationJump( OS_GetTitleId(), OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_B)
|
||||
{
|
||||
AddDeliverArg(&argInfo, TRUE);
|
||||
// ジャンプ元のアプリへ戻る
|
||||
if ( !OS_ReturnToPrevApplication() )
|
||||
{
|
||||
OS_TPrintf("Failed to Return Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
||||
{
|
||||
// アプリ間パラメータとして文字列を引き渡すかどうかのフラグを ON/OFF する
|
||||
gIsSetDelArg = !gIsSetDelArg;
|
||||
}
|
||||
|
||||
// Vブランク待ち
|
||||
OS_WaitVBlankIntr();
|
||||
}
|
||||
|
||||
// Vブランク待ち 最後に画面を更新してから終了
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: AddDeliverArg
|
||||
|
||||
Description: アプリジャンプ先へ引き渡すパラメータを追加。
|
||||
|
||||
Arguments: argInfo :
|
||||
isReturn : ジャンプ元への復帰ならば TRUE
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn)
|
||||
{
|
||||
int result;
|
||||
char argument[APPJUMP_STRING_LENGTH + 1];
|
||||
gAppParam.jumpCount++;
|
||||
|
||||
OS_InitDeliverArgInfo(argInfo, sizeof(AppParam));
|
||||
|
||||
// アプリジャンプ回数を +1 してセット
|
||||
result = OS_SetBinaryToDeliverArg( &(gAppParam), sizeof(AppParam) );
|
||||
|
||||
if(result != OS_DELIVER_ARG_SUCCESS)
|
||||
{
|
||||
OS_Warning("Failed to Set DeliverArgument.");
|
||||
}
|
||||
|
||||
if (gIsSetDelArg)
|
||||
{
|
||||
int i;
|
||||
|
||||
// 文字列をセット
|
||||
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||
if (isReturn)
|
||||
{
|
||||
STD_TSPrintf(argument, "Returned from CARD");
|
||||
}
|
||||
else
|
||||
{
|
||||
STD_TSPrintf(argument, "Jumped from CARD");
|
||||
}
|
||||
OS_SetStringToDeliverArg(argument);
|
||||
|
||||
// 今まで引き渡されたパラメータ文字列を引き継がせる
|
||||
for (i=0; i <= 4 && i < gArgc; i++)
|
||||
{
|
||||
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||
STD_StrLCpy( argument, gStrAppParam[i], APPJUMP_STRING_LENGTH );
|
||||
result = OS_SetStringToDeliverArg(argument);
|
||||
OS_TPrintf("arg = %s : result = %d\n", argument, result);
|
||||
}
|
||||
}
|
||||
OS_EncodeDeliverArg();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: VBlankIntr
|
||||
|
||||
Description: Vブランク割込みハンドラ。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void VBlankIntr(void)
|
||||
{
|
||||
// テキスト表示を更新
|
||||
UpdateScreen();
|
||||
|
||||
// IRQ チェックフラグをセット
|
||||
OS_SetIrqCheckFlag(OS_IE_V_BLANK);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,49 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Card
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM := TWL
|
||||
|
||||
TARGET_BIN = appjumpTestForCard.srl
|
||||
INCDIR = ../include
|
||||
SRCDIR = ./src ../src
|
||||
SRCS = main.c screen.c font.c common.c
|
||||
|
||||
ROM_SPEC = appjumptest_card.rsf
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/ApplicationJumpTest
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
endif
|
||||
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
LIBSYSCALL = ./430A/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,243 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - include
|
||||
# File: ROM-TS.rsf
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# TWL ROM SPEC FILE
|
||||
#
|
||||
|
||||
Arm9
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
Elf "$(MAKEROM_ARM9:r).tef"
|
||||
}
|
||||
|
||||
Arm7
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
Elf "$(MAKEROM_ARM7_BASE:r).tef"
|
||||
}
|
||||
|
||||
Arm9.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
}
|
||||
|
||||
Arm7.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
}
|
||||
|
||||
Property
|
||||
{
|
||||
###
|
||||
### Settings for FinalROM
|
||||
###
|
||||
#### BEGIN
|
||||
#
|
||||
# TITLE NAME: Your product name within 12bytes
|
||||
#
|
||||
TitleName "AppJmpTestC"
|
||||
|
||||
#
|
||||
# MAKER CODE: Your company ID# in 2 ascii words
|
||||
# issued by NINTENDO
|
||||
#
|
||||
MakerCode 01
|
||||
|
||||
#
|
||||
# REMASTER VERSION: Mastering version
|
||||
#
|
||||
RomVersion 0
|
||||
|
||||
#
|
||||
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||
#
|
||||
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||
|
||||
#
|
||||
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||
#
|
||||
#RomSize 256M
|
||||
|
||||
#
|
||||
# ROM PADDING: TRUE if finalrom
|
||||
#
|
||||
#RomFootPadding TRUE
|
||||
|
||||
#
|
||||
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderTemplate ./430A/rom_header_430a.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile $(TWLSDK_ROOT)/include/twl/specfiles/default.bnr
|
||||
|
||||
#
|
||||
# Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
PermitLandingNormalJump TRUE
|
||||
|
||||
#
|
||||
# Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
#PermitLandingTmpJump FALSE
|
||||
|
||||
###
|
||||
### Setting for TWL
|
||||
###
|
||||
|
||||
#
|
||||
# ROM HEADER Ltd: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderLtd $(TWLSDK_ROOT)/tools/bin/rom_header.LTD.sbin
|
||||
|
||||
#
|
||||
# Digest parameters:
|
||||
#
|
||||
DigestParam 1024 32
|
||||
|
||||
#
|
||||
# WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD
|
||||
# MAP2_BB_HYB/MAP2_BB_LTD/MAP2_TS_HYB/MAP2_TS_LTD]
|
||||
# don't have to edit
|
||||
#
|
||||
WramMapping $(MAKEROM_WRAM_MAPPING)
|
||||
|
||||
#
|
||||
# CardRegion: card region [Japan/America/Europe/Australia/China/Korea]
|
||||
#
|
||||
CardRegion ALL
|
||||
|
||||
#
|
||||
# Codec mode:
|
||||
# don't have to edit
|
||||
#
|
||||
CodecMode $(MAKEROM_CODEC_MODE)
|
||||
|
||||
#
|
||||
# Disp WiFiConnection Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#WiFiConnectionIcon FALSE
|
||||
|
||||
#
|
||||
# Disp DSWireless Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#DSWirelessIcon FALSE
|
||||
|
||||
#
|
||||
# Agree EULA [TRUE/FALSE]
|
||||
#
|
||||
#AgreeEULA FALSE
|
||||
|
||||
#
|
||||
# Agree EULA version [1 - 255]
|
||||
#
|
||||
#AgreeEULAVersion 1
|
||||
|
||||
###
|
||||
#### END
|
||||
}
|
||||
|
||||
AppendProperty
|
||||
{
|
||||
#
|
||||
# Boot allowed Media: [GameCard]
|
||||
#
|
||||
Media GameCard
|
||||
|
||||
#
|
||||
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||
#
|
||||
GameCode 430A
|
||||
|
||||
#
|
||||
# Public save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PublicSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Private save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PrivateSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Enable SubBannerFile
|
||||
#SubBannerFile TRUE
|
||||
|
||||
#
|
||||
# Game card power on: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardOn FALSE
|
||||
|
||||
#
|
||||
# Game card transferd to nitro mode: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardNitroMode FALSE
|
||||
}
|
||||
|
||||
RomSpec
|
||||
{
|
||||
Offset 0x00000000
|
||||
Segment ALL
|
||||
HostRoot $(MAKEROM_ROMROOT)
|
||||
Root /
|
||||
File $(MAKEROM_ROMFILES)
|
||||
}
|
||||
|
||||
Rating
|
||||
{
|
||||
#
|
||||
# Permited age to play for each rating organization
|
||||
#
|
||||
# Supported organization
|
||||
# - CERO (OGN0) : for Japan
|
||||
# - ESRB (OGN1) : for North America
|
||||
# - BBFC (OGN2) : obsolete organization
|
||||
# - USK (OGN3) : for German
|
||||
# - PEGI_GEN (OGN4) : for Europe
|
||||
# - PEGI_FINLAND (OGN5) : obsolete organization
|
||||
# - PEGI_PRT (OGN6) : for Portugal
|
||||
# - PEGI_BBFC (OGN7) : for UK
|
||||
# - OFLC (OGN8) : for Australia and NewZealand
|
||||
# - GRB (OGN9) : for Korea
|
||||
# - OGN10 : reserved
|
||||
# - OGN11 : reserved
|
||||
# - OGN12 : reserved
|
||||
# - OGN13 : reserved
|
||||
# - OGN14 : reserved
|
||||
# - OGN15 : reserved
|
||||
#
|
||||
# Available age [ 0 - 31 / PENDING / FREE ]
|
||||
|
||||
CERO FREE
|
||||
# ESRB FREE
|
||||
# USK FREE
|
||||
# PEGI_GEN FREE
|
||||
# PEGI_PRT FREE
|
||||
# PEGI_BBFC FREE
|
||||
# OFLC FREE
|
||||
# GRB FREE
|
||||
}
|
||||
Binary file not shown.
@ -1,344 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest - Card
|
||||
File: main.c
|
||||
|
||||
Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include "common.h"
|
||||
#include "screen.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
変数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
// キー入力
|
||||
static KeyInfo gKey;
|
||||
|
||||
// B ボタンジャンプ先の切りかえフラグ
|
||||
static u8 gJumpTypeForB = JUMPTYPE_RETURN;
|
||||
// アプリ間パラメータ
|
||||
static AppParam gAppParam;
|
||||
// アプリ間パラメータとして文字列をセットするかどうか
|
||||
static BOOL gIsSetDelArg = TRUE;
|
||||
// アプリ間パラメータとして引き渡された文字列を格納するバッファ(6つまで)
|
||||
static char gStrAppParam[6][APPJUMP_STRING_LENGTH + 1] ATTRIBUTE_ALIGN(32);
|
||||
// アプリ間パラメータとして引き渡された文字列の個数
|
||||
static int gArgc;
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Prototype
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
void TwlMain(void)
|
||||
{
|
||||
OSDeliverArgInfo argInfo;
|
||||
|
||||
int result;
|
||||
int argSize =sizeof(u32);
|
||||
|
||||
InitCommon();
|
||||
InitScreen();
|
||||
|
||||
GX_DispOn();
|
||||
GXS_DispOn();
|
||||
|
||||
ClearScreen();
|
||||
|
||||
// キー入力情報取得の空呼び出し(IPL での A ボタン押下対策)
|
||||
ReadKey(&gKey);
|
||||
|
||||
OS_InitDeliverArgInfo(&argInfo, sizeof(AppParam));
|
||||
OS_DecodeDeliverArg();
|
||||
|
||||
/* アプリ間パラメータ(バイナリデータの取得) */
|
||||
if ( OS_DELIVER_ARG_SUCCESS != (result = OS_GetBinaryFromDeliverArg( &gAppParam, &argSize, sizeof(AppParam))) )
|
||||
{
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: READ_ERROR (%d)", result);
|
||||
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
/* アプリ間パラメータ(文字列)の取得 */
|
||||
if ((gArgc = OS_GetDeliverArgc()) > 0)
|
||||
{
|
||||
int i;
|
||||
|
||||
OS_TPrintf("argc = %d\n", gArgc);
|
||||
|
||||
for (i=0; i < gArgc-1 && i < 6; i++)
|
||||
{
|
||||
STD_StrLCpy(gStrAppParam[i], (const char*)OS_GetDeliverArgv(i+1), APPJUMP_STRING_LENGTH);
|
||||
gStrAppParam[i][APPJUMP_STRING_LENGTH] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
while(TRUE)
|
||||
{
|
||||
int i;
|
||||
|
||||
// 自動テスト中に、ユーザのキー入力による終了指示を受け付けるためにウエイトを入れる
|
||||
if (gAppParam.isAutoJump == 1)
|
||||
{
|
||||
OSTick tick = OS_GetTick();
|
||||
|
||||
PutMainScreen(1, 9, 0xf8, "executing auto app jump...");
|
||||
PutMainScreen(1, 11, 0xff, "wait 2 seconds...");
|
||||
PutMainScreen(1, 13, 0xff, "START: quit auto app jump");
|
||||
do {
|
||||
ReadKey(&gKey);
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_START)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
OS_WaitVBlankIntr();
|
||||
} while (OS_TicksToSeconds(OS_GetTick() - tick) < 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
// キー入力情報取得
|
||||
ReadKey(&gKey);
|
||||
}
|
||||
|
||||
// 画面クリア
|
||||
ClearScreen();
|
||||
|
||||
// メイン画面描画
|
||||
PutMainScreen(0, 2, 0xf4, " ****** This APP is CARD ****** ");
|
||||
PutMainScreen(0, 5, 0xff, " APP JUMP : %u times ", gAppParam.jumpCount);
|
||||
PutMainScreen(0, 7, 0xff, " DELIVERED PARAM (recent 6 app)");
|
||||
|
||||
for (i=0; i<gArgc-1; i++)
|
||||
{
|
||||
if ( i==0 )
|
||||
{
|
||||
PutMainScreen(2, 8, 0xf2, "%d : %s", i+1, gStrAppParam[i]); // 最新の履歴のみ色をつける
|
||||
}
|
||||
else
|
||||
{
|
||||
PutMainScreen(2, 8+i, 0xff, "%d : %s", i+1, gStrAppParam[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// サブ画面描画
|
||||
PutSubScreen(0, 0, 0xf4, " ------- APP JUMP TEST -------- ");
|
||||
|
||||
if (gIsSetDelArg)
|
||||
{
|
||||
PutSubScreen(0, 2, 0xf8, " DELIVER ARG: ON");
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen(0, 2, 0xff, " DELIVER ARG: OFF");
|
||||
}
|
||||
|
||||
if (gAppParam.isAutoJump)
|
||||
{
|
||||
PutSubScreen(0, 4, 0xf8, " AUTO JUMP TEST: ON");
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen(0, 4, 0xff, " AUTO JUMP TEST: OFF");
|
||||
}
|
||||
|
||||
PutSubScreen(0, 13, 0xf4, " ------------------------------- ");
|
||||
PutSubScreen(0, 15, 0xff, " A: JUMP TO NAND-1 APP");
|
||||
PutSubScreen(0, 16, 0xff, " Y: JUMP TO NAND-2 APP");
|
||||
PutSubScreen(0, 17, 0xff, " X: JUMP TO SELF");
|
||||
switch (gJumpTypeForB)
|
||||
{
|
||||
case JUMPTYPE_RETURN:
|
||||
PutSubScreen(0, 18, 0xff, " B: RETURN JUMP");
|
||||
break;
|
||||
case JUMPTYPE_ANOTHER_CARD:
|
||||
break;
|
||||
case JUMPTYPE_SYSMENU:
|
||||
PutSubScreen(0, 18, 0xff, " B: JUMP TO SYSMENU");
|
||||
break;
|
||||
}
|
||||
|
||||
PutSubScreen(0, 20, 0xff, " UP DOWN: SWITCH JUMP TYPE (B) ");
|
||||
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
||||
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
||||
|
||||
if (gKey.trg & PAD_KEY_DOWN)
|
||||
{
|
||||
if ( gJumpTypeForB == JUMPTYPE_RETURN )
|
||||
{
|
||||
gJumpTypeForB = JUMPTYPE_NUM - 1;
|
||||
}
|
||||
else
|
||||
gJumpTypeForB--;
|
||||
}
|
||||
else if (gKey.trg & PAD_KEY_UP)
|
||||
{
|
||||
if ( ++gJumpTypeForB >= JUMPTYPE_NUM )
|
||||
{
|
||||
gJumpTypeForB = JUMPTYPE_RETURN;
|
||||
}
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_START)
|
||||
{
|
||||
// 自動テストフラグをスイッチ
|
||||
gAppParam.isAutoJump ^= 1;
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_A)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
// NAND-1 アプリへジャンプ
|
||||
if( !OS_DoApplicationJump( NANDAPP1_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_Y)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
|
||||
// NAND-2 アプリへジャンプ
|
||||
if ( !OS_DoApplicationJump( NANDAPP2_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_X || gAppParam.isAutoJump == 1)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
// 自分自身へジャンプ
|
||||
if( !OS_DoApplicationJump( OS_GetTitleId(), OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_B)
|
||||
{
|
||||
AddDeliverArg(&argInfo, TRUE);
|
||||
switch (gJumpTypeForB)
|
||||
{
|
||||
case JUMPTYPE_RETURN:
|
||||
if ( !OS_ReturnToPrevApplication() )
|
||||
{
|
||||
OS_TPrintf("Failed to Return Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
||||
}
|
||||
break;
|
||||
case JUMPTYPE_ANOTHER_CARD:
|
||||
break;
|
||||
case JUMPTYPE_SYSMENU:
|
||||
OS_JumpToSystemMenu();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
||||
{
|
||||
// アプリ間パラメータとして文字列を引き渡すかどうかのフラグを ON/OFF する
|
||||
gIsSetDelArg = !gIsSetDelArg;
|
||||
}
|
||||
|
||||
// Vブランク待ち
|
||||
OS_WaitVBlankIntr();
|
||||
}
|
||||
|
||||
// Vブランク待ち 最後に画面を更新してから終了
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: AddDeliverArg
|
||||
|
||||
Description: アプリジャンプ先へ引き渡すパラメータを追加。
|
||||
|
||||
Arguments: argInfo :
|
||||
isReturn : ジャンプ元への復帰ならば TRUE
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn)
|
||||
{
|
||||
int result;
|
||||
char argument[APPJUMP_STRING_LENGTH + 1];
|
||||
gAppParam.jumpCount++;
|
||||
|
||||
OS_InitDeliverArgInfo(argInfo, sizeof(AppParam));
|
||||
|
||||
// アプリジャンプ回数を +1 してセット
|
||||
result = OS_SetBinaryToDeliverArg( &(gAppParam), sizeof(AppParam) );
|
||||
|
||||
if(result != OS_DELIVER_ARG_SUCCESS)
|
||||
{
|
||||
OS_Warning("Failed to Set DeliverArgument.");
|
||||
}
|
||||
|
||||
if (gIsSetDelArg)
|
||||
{
|
||||
int i;
|
||||
|
||||
// 文字列をセット
|
||||
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||
if (isReturn)
|
||||
{
|
||||
STD_TSPrintf(argument, "Returned from CARD");
|
||||
}
|
||||
else
|
||||
{
|
||||
STD_TSPrintf(argument, "Jumped from CARD");
|
||||
}
|
||||
OS_SetStringToDeliverArg(argument);
|
||||
|
||||
// 今まで引き渡されたパラメータ文字列を引き継がせる
|
||||
for (i=0; i <= 4 && i < gArgc; i++)
|
||||
{
|
||||
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||
STD_StrLCpy( argument, gStrAppParam[i], APPJUMP_STRING_LENGTH );
|
||||
result = OS_SetStringToDeliverArg(argument);
|
||||
OS_TPrintf("arg = %s : result = %d\n", argument, result);
|
||||
}
|
||||
}
|
||||
OS_EncodeDeliverArg();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: VBlankIntr
|
||||
|
||||
Description: Vブランク割込みハンドラ。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void VBlankIntr(void)
|
||||
{
|
||||
// テキスト表示を更新
|
||||
UpdateScreen();
|
||||
|
||||
// IRQ チェックフラグをセット
|
||||
OS_SetIrqCheckFlag(OS_IE_V_BLANK);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,38 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - debugsoft - ApplicationJump
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
TARGET_PLATFORM = TWL
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = Card \
|
||||
Nand-1 \
|
||||
Nand-2 \
|
||||
Card-fail \
|
||||
Card-anotherID
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
#===== End of Makefile =====
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,47 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Nand-1
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM := TWL
|
||||
TWL_NANDAPP := TRUE
|
||||
|
||||
TARGET_BIN = appjumpTestForNand1.tad
|
||||
INCDIR = ../include
|
||||
SRCDIR = ./src ../src
|
||||
SRCS = main.c screen.c font.c common.c
|
||||
|
||||
ROM_SPEC = main_nand1.rsf
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/ApplicationJumpTest
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
endif
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
LIBSYSCALL = ./431A/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
Binary file not shown.
@ -1,243 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - include
|
||||
# File: ROM-TS.rsf
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# TWL ROM SPEC FILE
|
||||
#
|
||||
|
||||
Arm9
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
Elf "$(MAKEROM_ARM9:r).tef"
|
||||
}
|
||||
|
||||
Arm7
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
Elf "$(MAKEROM_ARM7_BASE:r).tef"
|
||||
}
|
||||
|
||||
Arm9.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
}
|
||||
|
||||
Arm7.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
}
|
||||
|
||||
Property
|
||||
{
|
||||
###
|
||||
### Settings for FinalROM
|
||||
###
|
||||
#### BEGIN
|
||||
#
|
||||
# TITLE NAME: Your product name within 12bytes
|
||||
#
|
||||
TitleName AppJmpTestN1
|
||||
|
||||
#
|
||||
# MAKER CODE: Your company ID# in 2 ascii words
|
||||
# issued by NINTENDO
|
||||
#
|
||||
MakerCode 01
|
||||
|
||||
#
|
||||
# REMASTER VERSION: Mastering version
|
||||
#
|
||||
RomVersion 0
|
||||
|
||||
#
|
||||
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||
#
|
||||
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||
|
||||
#
|
||||
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||
#
|
||||
#RomSize 256M
|
||||
|
||||
#
|
||||
# ROM PADDING: TRUE if finalrom
|
||||
#
|
||||
#RomFootPadding TRUE
|
||||
|
||||
#
|
||||
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderTemplate ./431A/rom_header_431a.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile "./banner/banner.bnr"
|
||||
|
||||
#
|
||||
# Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
PermitLandingNormalJump TRUE
|
||||
|
||||
#
|
||||
# Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
#PermitLandingTmpJump FALSE
|
||||
|
||||
###
|
||||
### Setting for TWL
|
||||
###
|
||||
|
||||
#
|
||||
# ROM HEADER Ltd: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderLtd $(TWLSDK_ROOT)/tools/bin/rom_header.LTD.sbin
|
||||
|
||||
#
|
||||
# Digest parameters:
|
||||
#
|
||||
DigestParam 1024 32
|
||||
|
||||
#
|
||||
# WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD
|
||||
# MAP2_BB_HYB/MAP2_BB_LTD/MAP2_TS_HYB/MAP2_TS_LTD]
|
||||
# don't have to edit
|
||||
#
|
||||
WramMapping $(MAKEROM_WRAM_MAPPING)
|
||||
|
||||
#
|
||||
# CardRegion: card region [Japan/America/Europe/Australia/China/Korea]
|
||||
#
|
||||
CardRegion ALL
|
||||
|
||||
#
|
||||
# Codec mode:
|
||||
# don't have to edit
|
||||
#
|
||||
CodecMode $(MAKEROM_CODEC_MODE)
|
||||
|
||||
#
|
||||
# Disp WiFiConnection Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#WiFiConnectionIcon FALSE
|
||||
|
||||
#
|
||||
# Disp DSWireless Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#DSWirelessIcon FALSE
|
||||
|
||||
#
|
||||
# Agree EULA [TRUE/FALSE]
|
||||
#
|
||||
#AgreeEULA FALSE
|
||||
|
||||
#
|
||||
# Agree EULA version [1 - 255]
|
||||
#
|
||||
#AgreeEULAVersion 1
|
||||
|
||||
###
|
||||
#### END
|
||||
}
|
||||
|
||||
AppendProperty
|
||||
{
|
||||
#
|
||||
# Boot allowed Media: [GameCard]
|
||||
#
|
||||
Media NAND
|
||||
|
||||
#
|
||||
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||
#
|
||||
GameCode 431A
|
||||
|
||||
#
|
||||
# Public save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PublicSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Private save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PrivateSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Enable SubBannerFile
|
||||
#SubBannerFile TRUE
|
||||
|
||||
#
|
||||
# Game card power on: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardOn FALSE
|
||||
|
||||
#
|
||||
# Game card transferd to nitro mode: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardNitroMode FALSE
|
||||
}
|
||||
|
||||
RomSpec
|
||||
{
|
||||
Offset 0x00000000
|
||||
Segment ALL
|
||||
HostRoot $(MAKEROM_ROMROOT)
|
||||
Root /
|
||||
File $(MAKEROM_ROMFILES)
|
||||
}
|
||||
|
||||
Rating
|
||||
{
|
||||
#
|
||||
# Permited age to play for each rating organization
|
||||
#
|
||||
# Supported organization
|
||||
# - CERO (OGN0) : for Japan
|
||||
# - ESRB (OGN1) : for North America
|
||||
# - BBFC (OGN2) : obsolete organization
|
||||
# - USK (OGN3) : for German
|
||||
# - PEGI_GEN (OGN4) : for Europe
|
||||
# - PEGI_FINLAND (OGN5) : obsolete organization
|
||||
# - PEGI_PRT (OGN6) : for Portugal
|
||||
# - PEGI_BBFC (OGN7) : for UK
|
||||
# - OFLC (OGN8) : for Australia and NewZealand
|
||||
# - GRB (OGN9) : for Korea
|
||||
# - OGN10 : reserved
|
||||
# - OGN11 : reserved
|
||||
# - OGN12 : reserved
|
||||
# - OGN13 : reserved
|
||||
# - OGN14 : reserved
|
||||
# - OGN15 : reserved
|
||||
#
|
||||
# Available age [ 0 - 31 / PENDING / FREE ]
|
||||
|
||||
CERO FREE
|
||||
# ESRB FREE
|
||||
# USK FREE
|
||||
# PEGI_GEN FREE
|
||||
# PEGI_PRT FREE
|
||||
# PEGI_BBFC FREE
|
||||
# OFLC FREE
|
||||
# GRB FREE
|
||||
}
|
||||
@ -1,368 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest - Nand-1
|
||||
File: main.c
|
||||
|
||||
Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include "common.h"
|
||||
#include "screen.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
変数定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
// キー入力
|
||||
static KeyInfo gKey;
|
||||
|
||||
// B ボタンジャンプ先の切りかえフラグ
|
||||
static u8 gJumpTypeForB = JUMPTYPE_RETURN;
|
||||
// アプリ間パラメータ
|
||||
static AppParam gAppParam;
|
||||
// アプリ間パラメータとして文字列をセットするかどうか
|
||||
static BOOL gIsSetDelArg = TRUE;
|
||||
// アプリ間パラメータとして引き渡された文字列を格納するバッファ(6つまで)
|
||||
static char gStrAppParam[6][APPJUMP_STRING_LENGTH + 1] ATTRIBUTE_ALIGN(32);
|
||||
// アプリ間パラメータとして引き渡された文字列の個数
|
||||
static int gArgc;
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Prototype
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
void TwlMain(void)
|
||||
{
|
||||
OSDeliverArgInfo argInfo;
|
||||
|
||||
int result;
|
||||
int argSize =sizeof(u32);
|
||||
|
||||
InitCommon();
|
||||
InitScreen();
|
||||
|
||||
GX_DispOn();
|
||||
GXS_DispOn();
|
||||
|
||||
ClearScreen();
|
||||
|
||||
// キー入力情報取得の空呼び出し(IPL での A ボタン押下対策)
|
||||
ReadKey(&gKey);
|
||||
|
||||
OS_InitDeliverArgInfo(&argInfo, sizeof(AppParam));
|
||||
OS_DecodeDeliverArg();
|
||||
|
||||
/* アプリ間パラメータ(バイナリデータの取得) */
|
||||
if ( OS_DELIVER_ARG_SUCCESS != (result = OS_GetBinaryFromDeliverArg( &gAppParam, &argSize, sizeof(AppParam))) )
|
||||
{
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: READ_ERROR (%d)", result);
|
||||
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
/* アプリ間パラメータ(文字列)の取得 */
|
||||
if ((gArgc = OS_GetDeliverArgc()) > 0)
|
||||
{
|
||||
int i;
|
||||
|
||||
OS_TPrintf("argc = %d\n", gArgc);
|
||||
|
||||
for (i=0; i < gArgc-1 && i < 6; i++)
|
||||
{
|
||||
STD_StrLCpy(gStrAppParam[i], (const char*)OS_GetDeliverArgv(i+1), APPJUMP_STRING_LENGTH);
|
||||
gStrAppParam[i][APPJUMP_STRING_LENGTH] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
while(TRUE)
|
||||
{
|
||||
int i;
|
||||
|
||||
// 自動テスト中に、ユーザのキー入力による終了指示を受け付けるためにウエイトを入れる
|
||||
if (gAppParam.isAutoJump == 1)
|
||||
{
|
||||
OSTick tick = OS_GetTick();
|
||||
|
||||
PutMainScreen(1, 9, 0xf8, "executing auto app jump...");
|
||||
PutMainScreen(1, 11, 0xff, "wait 2 seconds...");
|
||||
PutMainScreen(1, 13, 0xff, "START: quit auto app jump");
|
||||
do {
|
||||
ReadKey(&gKey);
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_START)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
OS_WaitVBlankIntr();
|
||||
} while (OS_TicksToSeconds(OS_GetTick() - tick) < 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
// キー入力情報取得
|
||||
ReadKey(&gKey);
|
||||
}
|
||||
|
||||
// 画面クリア
|
||||
ClearScreen();
|
||||
|
||||
// メイン画面描画
|
||||
PutMainScreen(0, 2, 0xf5, " ***** This APP is NAND-1 ***** ");
|
||||
PutMainScreen(0, 5, 0xff, " APP JUMP : %u times ", gAppParam.jumpCount);
|
||||
PutMainScreen(0, 7, 0xff, " DELIVERED PARAM (recent 6 app)");
|
||||
|
||||
for (i=0; i<gArgc-1; i++)
|
||||
{
|
||||
if ( i==0 )
|
||||
{
|
||||
PutMainScreen(2, 8, 0xf2, "%d : %s", i+1, gStrAppParam[i]); // 最新の履歴のみ色をつける
|
||||
}
|
||||
else
|
||||
{
|
||||
PutMainScreen(2, 8+i, 0xff, "%d : %s", i+1, gStrAppParam[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// サブ画面描画
|
||||
PutSubScreen(0, 0, 0xf5, " ------- APP JUMP TEST -------- ");
|
||||
|
||||
if (gIsSetDelArg)
|
||||
{
|
||||
PutSubScreen(0, 2, 0xf8, " DELIVER ARG: ON");
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen(0, 2, 0xff, " DELIVER ARG: OFF");
|
||||
}
|
||||
|
||||
if (gAppParam.isAutoJump)
|
||||
{
|
||||
PutSubScreen(0, 4, 0xf8, " AUTO JUMP TEST: ON");
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen(0, 4, 0xff, " AUTO JUMP TEST: OFF");
|
||||
}
|
||||
|
||||
PutSubScreen(0, 13, 0xf5, " ------------------------------- ");
|
||||
PutSubScreen(0, 15, 0xff, " A: JUMP TO CARD APP");
|
||||
PutSubScreen(0, 16, 0xff, " Y: JUMP TO NAND-2 APP");
|
||||
PutSubScreen(0, 17, 0xff, " X: JUMP TO SELF");
|
||||
|
||||
switch (gJumpTypeForB)
|
||||
{
|
||||
case JUMPTYPE_RETURN:
|
||||
PutSubScreen(0, 18, 0xff, " B: RETURN JUMP");
|
||||
break;
|
||||
case JUMPTYPE_ANOTHER_CARD:
|
||||
PutSubScreen(0, 18, 0xfe, " B: JUMP TO CARD APP (ANO)");
|
||||
break;
|
||||
case JUMPTYPE_SYSMENU:
|
||||
PutSubScreen(0, 18, 0xff, " B: JUMP TO SYSMENU");
|
||||
break;
|
||||
case JUMPTYPE_FAIL_CARD:
|
||||
PutSubScreen(0, 18, 0xfe, " B: JUMP TO CARD APP (FAIL)");
|
||||
break;
|
||||
}
|
||||
|
||||
PutSubScreen(0, 20, 0xff, " UP DOWN: SWITCH JUMP TYPE (B) ");
|
||||
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
||||
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
||||
|
||||
if (gKey.trg & PAD_KEY_DOWN)
|
||||
{
|
||||
if ( gJumpTypeForB == JUMPTYPE_RETURN )
|
||||
{
|
||||
gJumpTypeForB = JUMPTYPE_NUM - 1;
|
||||
}
|
||||
else
|
||||
gJumpTypeForB--;
|
||||
}
|
||||
else if (gKey.trg & PAD_KEY_UP)
|
||||
{
|
||||
if ( ++gJumpTypeForB >= JUMPTYPE_NUM )
|
||||
{
|
||||
gJumpTypeForB = JUMPTYPE_RETURN;
|
||||
}
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_START)
|
||||
{
|
||||
// 自動テストフラグをスイッチ
|
||||
gAppParam.isAutoJump ^= 1;
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_A)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
// カードアプリへジャンプ
|
||||
if( !OS_DoApplicationJump( CARDAPP_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_Y)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
|
||||
// もう一方の NAND アプリへジャンプ
|
||||
if ( !OS_DoApplicationJump( NANDAPP2_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_X || gAppParam.isAutoJump == 1)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
// 自分自身へジャンプ
|
||||
if( !OS_DoApplicationJump( OS_GetTitleId(), OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_B)
|
||||
{
|
||||
AddDeliverArg(&argInfo, TRUE);
|
||||
|
||||
switch (gJumpTypeForB)
|
||||
{
|
||||
case JUMPTYPE_RETURN:
|
||||
if ( !OS_ReturnToPrevApplication() )
|
||||
{
|
||||
OS_TPrintf("Failed to Return Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Sleep(1000);
|
||||
}
|
||||
break;
|
||||
case JUMPTYPE_ANOTHER_CARD:
|
||||
if ( !OS_DoApplicationJump(CARDAPP_ANO_TITLEID, OS_APP_JUMP_NORMAL) )
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump(ANO).");
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Sleep(1000);
|
||||
}
|
||||
break;
|
||||
case JUMPTYPE_SYSMENU:
|
||||
OS_JumpToSystemMenu();
|
||||
break;
|
||||
case JUMPTYPE_FAIL_CARD:
|
||||
if ( !OS_DoApplicationJump(CARDAPP_FAIL_TITLEID, OS_APP_JUMP_NORMAL) )
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump(FAIL).");
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Sleep(1000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
||||
{
|
||||
gIsSetDelArg = !gIsSetDelArg;
|
||||
}
|
||||
|
||||
// Vブランク待ち
|
||||
OS_WaitVBlankIntr();
|
||||
}
|
||||
|
||||
// Vブランク待ち 最後に画面を更新してから終了
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: AddDeliverArg
|
||||
|
||||
Description: アプリジャンプ先へ引き渡すパラメータを追加。
|
||||
|
||||
Arguments: argInfo :
|
||||
isReturn : ジャンプ元への復帰ならば TRUE
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn)
|
||||
{
|
||||
int result;
|
||||
char argument[APPJUMP_STRING_LENGTH + 1];
|
||||
gAppParam.jumpCount++;
|
||||
|
||||
OS_InitDeliverArgInfo(argInfo, sizeof(AppParam));
|
||||
|
||||
// アプリジャンプ回数を +1 してセット
|
||||
result = OS_SetBinaryToDeliverArg( &(gAppParam), sizeof(AppParam) );
|
||||
|
||||
if(result != OS_DELIVER_ARG_SUCCESS)
|
||||
{
|
||||
OS_Warning("Failed to Set DeliverArgument.");
|
||||
}
|
||||
|
||||
if (gIsSetDelArg)
|
||||
{
|
||||
int i;
|
||||
|
||||
// 文字列をセット
|
||||
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||
if (isReturn)
|
||||
{
|
||||
STD_TSPrintf(argument, "Returned from NAND-1");
|
||||
}
|
||||
else
|
||||
{
|
||||
STD_TSPrintf(argument, "Jumped from NAND-1");
|
||||
}
|
||||
OS_SetStringToDeliverArg(argument);
|
||||
|
||||
// 今まで引き渡されたパラメータ文字列を引き継がせる
|
||||
for (i=0; i <= 4 && i < gArgc; i++)
|
||||
{
|
||||
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||
STD_StrLCpy( argument, gStrAppParam[i], APPJUMP_STRING_LENGTH );
|
||||
result = OS_SetStringToDeliverArg(argument);
|
||||
OS_TPrintf("arg = %s : result = %d\n", argument, result);
|
||||
}
|
||||
}
|
||||
OS_EncodeDeliverArg();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: VBlankIntr
|
||||
|
||||
Description: Vブランク割込みハンドラ。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void VBlankIntr(void)
|
||||
{
|
||||
// テキスト表示を更新
|
||||
UpdateScreen();
|
||||
|
||||
// IRQ チェックフラグをセット
|
||||
OS_SetIrqCheckFlag(OS_IE_V_BLANK);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,47 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Nand-2
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM := TWL
|
||||
TWL_NANDAPP := TRUE
|
||||
|
||||
TARGET_BIN = appjumpTestForNand2.tad
|
||||
INCDIR = ../include
|
||||
SRCDIR = ./src ../src
|
||||
SRCS = main.c screen.c font.c common.c
|
||||
|
||||
ROM_SPEC = main_nand2.rsf
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/ApplicationJumpTest
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
endif
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
LIBSYSCALL = ./431A/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
Binary file not shown.
@ -1,243 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - include
|
||||
# File: ROM-TS.rsf
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# TWL ROM SPEC FILE
|
||||
#
|
||||
|
||||
Arm9
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
Elf "$(MAKEROM_ARM9:r).tef"
|
||||
}
|
||||
|
||||
Arm7
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
Elf "$(MAKEROM_ARM7_BASE:r).tef"
|
||||
}
|
||||
|
||||
Arm9.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
}
|
||||
|
||||
Arm7.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
}
|
||||
|
||||
Property
|
||||
{
|
||||
###
|
||||
### Settings for FinalROM
|
||||
###
|
||||
#### BEGIN
|
||||
#
|
||||
# TITLE NAME: Your product name within 12bytes
|
||||
#
|
||||
TitleName AppJmpTestN2
|
||||
|
||||
#
|
||||
# MAKER CODE: Your company ID# in 2 ascii words
|
||||
# issued by NINTENDO
|
||||
#
|
||||
MakerCode 01
|
||||
|
||||
#
|
||||
# REMASTER VERSION: Mastering version
|
||||
#
|
||||
RomVersion 0
|
||||
|
||||
#
|
||||
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||
#
|
||||
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||
|
||||
#
|
||||
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||
#
|
||||
#RomSize 256M
|
||||
|
||||
#
|
||||
# ROM PADDING: TRUE if finalrom
|
||||
#
|
||||
#RomFootPadding TRUE
|
||||
|
||||
#
|
||||
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderTemplate ./432A/rom_header_432a.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile "./banner/banner.bnr"
|
||||
|
||||
#
|
||||
# Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
PermitLandingNormalJump TRUE
|
||||
|
||||
#
|
||||
# Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
#PermitLandingTmpJump FALSE
|
||||
|
||||
###
|
||||
### Setting for TWL
|
||||
###
|
||||
|
||||
#
|
||||
# ROM HEADER Ltd: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderLtd $(TWLSDK_ROOT)/tools/bin/rom_header.LTD.sbin
|
||||
|
||||
#
|
||||
# Digest parameters:
|
||||
#
|
||||
DigestParam 1024 32
|
||||
|
||||
#
|
||||
# WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD
|
||||
# MAP2_BB_HYB/MAP2_BB_LTD/MAP2_TS_HYB/MAP2_TS_LTD]
|
||||
# don't have to edit
|
||||
#
|
||||
WramMapping $(MAKEROM_WRAM_MAPPING)
|
||||
|
||||
#
|
||||
# CardRegion: card region [Japan/America/Europe/Australia/China/Korea]
|
||||
#
|
||||
CardRegion ALL
|
||||
|
||||
#
|
||||
# Codec mode:
|
||||
# don't have to edit
|
||||
#
|
||||
CodecMode $(MAKEROM_CODEC_MODE)
|
||||
|
||||
#
|
||||
# Disp WiFiConnection Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#WiFiConnectionIcon FALSE
|
||||
|
||||
#
|
||||
# Disp DSWireless Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#DSWirelessIcon FALSE
|
||||
|
||||
#
|
||||
# Agree EULA [TRUE/FALSE]
|
||||
#
|
||||
#AgreeEULA FALSE
|
||||
|
||||
#
|
||||
# Agree EULA version [1 - 255]
|
||||
#
|
||||
#AgreeEULAVersion 1
|
||||
|
||||
###
|
||||
#### END
|
||||
}
|
||||
|
||||
AppendProperty
|
||||
{
|
||||
#
|
||||
# Boot allowed Media: [GameCard]
|
||||
#
|
||||
Media NAND
|
||||
|
||||
#
|
||||
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||
#
|
||||
GameCode 432A
|
||||
|
||||
#
|
||||
# Public save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PublicSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Private save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PrivateSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Enable SubBannerFile
|
||||
#SubBannerFile TRUE
|
||||
|
||||
#
|
||||
# Game card power on: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardOn FALSE
|
||||
|
||||
#
|
||||
# Game card transferd to nitro mode: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardNitroMode FALSE
|
||||
}
|
||||
|
||||
RomSpec
|
||||
{
|
||||
Offset 0x00000000
|
||||
Segment ALL
|
||||
HostRoot $(MAKEROM_ROMROOT)
|
||||
Root /
|
||||
File $(MAKEROM_ROMFILES)
|
||||
}
|
||||
|
||||
Rating
|
||||
{
|
||||
#
|
||||
# Permited age to play for each rating organization
|
||||
#
|
||||
# Supported organization
|
||||
# - CERO (OGN0) : for Japan
|
||||
# - ESRB (OGN1) : for North America
|
||||
# - BBFC (OGN2) : obsolete organization
|
||||
# - USK (OGN3) : for German
|
||||
# - PEGI_GEN (OGN4) : for Europe
|
||||
# - PEGI_FINLAND (OGN5) : obsolete organization
|
||||
# - PEGI_PRT (OGN6) : for Portugal
|
||||
# - PEGI_BBFC (OGN7) : for UK
|
||||
# - OFLC (OGN8) : for Australia and NewZealand
|
||||
# - GRB (OGN9) : for Korea
|
||||
# - OGN10 : reserved
|
||||
# - OGN11 : reserved
|
||||
# - OGN12 : reserved
|
||||
# - OGN13 : reserved
|
||||
# - OGN14 : reserved
|
||||
# - OGN15 : reserved
|
||||
#
|
||||
# Available age [ 0 - 31 / PENDING / FREE ]
|
||||
|
||||
CERO FREE
|
||||
# ESRB FREE
|
||||
# USK FREE
|
||||
# PEGI_GEN FREE
|
||||
# PEGI_PRT FREE
|
||||
# PEGI_BBFC FREE
|
||||
# OFLC FREE
|
||||
# GRB FREE
|
||||
}
|
||||
@ -1,370 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest - Nand-2
|
||||
File: main.c
|
||||
|
||||
Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include "common.h"
|
||||
#include "screen.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
変数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
// キー入力
|
||||
static KeyInfo gKey;
|
||||
|
||||
|
||||
// B ボタンジャンプ先の切りかえフラグ
|
||||
static u8 gJumpTypeForB = JUMPTYPE_RETURN;
|
||||
// アプリ間パラメータ
|
||||
static AppParam gAppParam;
|
||||
// アプリ間パラメータとして文字列をセットするかどうか
|
||||
static BOOL gIsSetDelArg = TRUE;
|
||||
// アプリ間パラメータとして引き渡された文字列を格納するバッファ(6つまで)
|
||||
static char gStrAppParam[6][APPJUMP_STRING_LENGTH + 1] ATTRIBUTE_ALIGN(32);
|
||||
// アプリ間パラメータとして引き渡された文字列の個数
|
||||
static int gArgc;
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Prototype
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
void TwlMain(void)
|
||||
{
|
||||
OSDeliverArgInfo argInfo;
|
||||
|
||||
int result;
|
||||
int argSize =sizeof(u32);
|
||||
|
||||
InitCommon();
|
||||
InitScreen();
|
||||
|
||||
GX_DispOn();
|
||||
GXS_DispOn();
|
||||
|
||||
ClearScreen();
|
||||
|
||||
// キー入力情報取得の空呼び出し(IPL での A ボタン押下対策)
|
||||
ReadKey(&gKey);
|
||||
|
||||
OS_InitDeliverArgInfo(&argInfo, sizeof(AppParam));
|
||||
OS_DecodeDeliverArg();
|
||||
|
||||
/* アプリ間パラメータ(バイナリデータの取得) */
|
||||
if ( OS_DELIVER_ARG_SUCCESS != (result = OS_GetBinaryFromDeliverArg( &gAppParam, &argSize, sizeof(AppParam))) )
|
||||
{
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: READ_ERROR (%d)", result);
|
||||
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
/* アプリ間パラメータ(文字列)の取得 */
|
||||
if ((gArgc = OS_GetDeliverArgc()) > 0)
|
||||
{
|
||||
int i;
|
||||
|
||||
OS_TPrintf("argc = %d\n", gArgc);
|
||||
|
||||
for (i=0; i < gArgc-1 && i < 6; i++)
|
||||
{
|
||||
STD_StrLCpy(gStrAppParam[i], (const char*)OS_GetDeliverArgv(i+1), APPJUMP_STRING_LENGTH);
|
||||
gStrAppParam[i][APPJUMP_STRING_LENGTH] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
while(TRUE)
|
||||
{
|
||||
int i;
|
||||
|
||||
// 自動テスト中に、ユーザのキー入力による終了指示を受け付けるためにウエイトを入れる
|
||||
if (gAppParam.isAutoJump == 1)
|
||||
{
|
||||
OSTick tick = OS_GetTick();
|
||||
|
||||
PutMainScreen(1, 9, 0xf8, "executing auto app jump...");
|
||||
PutMainScreen(1, 11, 0xff, "wait 2 seconds...");
|
||||
PutMainScreen(1, 13, 0xff, "START: quit auto app jump");
|
||||
do {
|
||||
ReadKey(&gKey);
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_START)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
OS_WaitVBlankIntr();
|
||||
} while (OS_TicksToSeconds(OS_GetTick() - tick) < 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
// キー入力情報取得
|
||||
ReadKey(&gKey);
|
||||
}
|
||||
|
||||
// 画面クリア
|
||||
ClearScreen();
|
||||
|
||||
// メイン画面描画
|
||||
PutMainScreen(0, 2, 0xf6, " ***** This APP is NAND-2 ***** ");
|
||||
PutMainScreen(0, 5, 0xff, " APP JUMP : %u times ", gAppParam.jumpCount);
|
||||
PutMainScreen(0, 7, 0xff, " DELIVERED PARAM (recent 6 app)");
|
||||
|
||||
for (i=0; i<gArgc-1; i++)
|
||||
{
|
||||
if ( i==0 )
|
||||
{
|
||||
PutMainScreen(2, 8, 0xf2, "%d : %s", i+1, gStrAppParam[i]); // 最新の履歴のみ色をつける
|
||||
}
|
||||
else
|
||||
{
|
||||
PutMainScreen(2, 8+i, 0xff, "%d : %s", i+1, gStrAppParam[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// サブ画面描画
|
||||
PutSubScreen(0, 0, 0xf6, " ------- APP JUMP TEST -------- ");
|
||||
|
||||
if (gIsSetDelArg)
|
||||
{
|
||||
PutSubScreen(0, 2, 0xf8, " DELIVER ARG : ON");
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen(0, 2, 0xff, " DELIVER ARG : OFF");
|
||||
}
|
||||
|
||||
if (gAppParam.isAutoJump)
|
||||
{
|
||||
PutSubScreen(0, 4, 0xf8, " AUTO JUMP TEST: ON");
|
||||
}
|
||||
else
|
||||
{
|
||||
PutSubScreen(0, 4, 0xff, " AUTO JUMP TEST: OFF");
|
||||
}
|
||||
|
||||
PutSubScreen(0, 13, 0xf6, " ------------------------------- ");
|
||||
PutSubScreen(0, 15, 0xff, " A: JUMP TO CARD APP");
|
||||
PutSubScreen(0, 16, 0xff, " Y: JUMP TO NAND-1 APP");
|
||||
PutSubScreen(0, 17, 0xff, " X: JUMP TO SELF");
|
||||
|
||||
switch (gJumpTypeForB)
|
||||
{
|
||||
case JUMPTYPE_RETURN:
|
||||
PutSubScreen(0, 18, 0xff, " B: RETURN JUMP");
|
||||
break;
|
||||
case JUMPTYPE_ANOTHER_CARD:
|
||||
PutSubScreen(0, 18, 0xfe, " B: JUMP TO CARD APP (ANO)");
|
||||
break;
|
||||
case JUMPTYPE_SYSMENU:
|
||||
PutSubScreen(0, 18, 0xff, " B: JUMP TO SYSMENU");
|
||||
break;
|
||||
case JUMPTYPE_FAIL_CARD:
|
||||
PutSubScreen(0, 18, 0xfe, " B: JUMP TO CARD APP (FAIL)");
|
||||
break;
|
||||
}
|
||||
|
||||
PutSubScreen(0, 20, 0xff, " UP DOWN: SWITCH JUMP TYPE (B) ");
|
||||
PutSubScreen(0, 21, 0xff, " L R: SWITCH DELIVER ARG ON/OFF");
|
||||
PutSubScreen(0, 22, 0xff, " STR: SWITCH AUTO TEST ON/OFF");
|
||||
|
||||
if (gKey.trg & PAD_KEY_DOWN)
|
||||
{
|
||||
if ( gJumpTypeForB == JUMPTYPE_RETURN )
|
||||
{
|
||||
gJumpTypeForB = JUMPTYPE_NUM - 1;
|
||||
}
|
||||
else
|
||||
gJumpTypeForB--;
|
||||
}
|
||||
else if (gKey.trg & PAD_KEY_UP)
|
||||
{
|
||||
if ( ++gJumpTypeForB >= JUMPTYPE_NUM )
|
||||
{
|
||||
gJumpTypeForB = JUMPTYPE_RETURN;
|
||||
}
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_START)
|
||||
{
|
||||
// 自動テストフラグをスイッチ
|
||||
gAppParam.isAutoJump ^= 1;
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_A)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
// カードアプリへジャンプ
|
||||
if( !OS_DoApplicationJump( CARDAPP_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_Y)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
|
||||
// もう一方の NAND アプリへジャンプ
|
||||
if ( !OS_DoApplicationJump( NANDAPP1_TITLEID, OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_X || gAppParam.isAutoJump == 1)
|
||||
{
|
||||
AddDeliverArg(&argInfo, FALSE);
|
||||
// 自分自身へジャンプ
|
||||
if( !OS_DoApplicationJump( OS_GetTitleId(), OS_APP_JUMP_NORMAL ))
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gKey.trg & PAD_BUTTON_B)
|
||||
{
|
||||
AddDeliverArg(&argInfo, TRUE);
|
||||
switch (gJumpTypeForB)
|
||||
{
|
||||
case JUMPTYPE_RETURN:
|
||||
if ( !OS_ReturnToPrevApplication() )
|
||||
{
|
||||
OS_TPrintf("Failed to Return Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Return Jump.");
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Sleep(1000);
|
||||
}
|
||||
break;
|
||||
case JUMPTYPE_ANOTHER_CARD:
|
||||
if ( !OS_DoApplicationJump(CARDAPP_ANO_TITLEID, OS_APP_JUMP_NORMAL) )
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump(ANO).");
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Sleep(1000);
|
||||
}
|
||||
break;
|
||||
case JUMPTYPE_SYSMENU:
|
||||
OS_JumpToSystemMenu();
|
||||
break;
|
||||
case JUMPTYPE_FAIL_CARD:
|
||||
if ( !OS_DoApplicationJump(CARDAPP_FAIL_TITLEID, OS_APP_JUMP_NORMAL) )
|
||||
{
|
||||
OS_TPrintf("Failed to Jump.\n");
|
||||
PutMainScreen(1, 16, 0xf1, "ERROR!: Failed to Jump(FAIL).");
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Sleep(1000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (gKey.trg & PAD_BUTTON_L || gKey.trg & PAD_BUTTON_R)
|
||||
{
|
||||
gIsSetDelArg = !gIsSetDelArg;
|
||||
}
|
||||
|
||||
// Vブランク待ち
|
||||
OS_WaitVBlankIntr();
|
||||
}
|
||||
|
||||
// Vブランク待ち 最後に画面を更新してから終了
|
||||
OS_WaitVBlankIntr();
|
||||
OS_Terminate();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: AddDeliverArg
|
||||
|
||||
Description: アプリジャンプ先へ引き渡すパラメータを追加。
|
||||
|
||||
Arguments: argInfo :
|
||||
isReturn : ジャンプ元への復帰ならば TRUE
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void AddDeliverArg(OSDeliverArgInfo *argInfo, BOOL isReturn)
|
||||
{
|
||||
int result;
|
||||
char argument[APPJUMP_STRING_LENGTH + 1];
|
||||
gAppParam.jumpCount++;
|
||||
|
||||
OS_InitDeliverArgInfo(argInfo, sizeof(AppParam));
|
||||
|
||||
// アプリジャンプ回数を +1 してセット
|
||||
result = OS_SetBinaryToDeliverArg( &(gAppParam), sizeof(AppParam) );
|
||||
|
||||
if(result != OS_DELIVER_ARG_SUCCESS)
|
||||
{
|
||||
OS_Warning("Failed to Set DeliverArgument.");
|
||||
}
|
||||
|
||||
if (gIsSetDelArg)
|
||||
{
|
||||
int i;
|
||||
|
||||
// 文字列をセット
|
||||
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||
if (isReturn)
|
||||
{
|
||||
STD_TSPrintf(argument, "Returned from NAND-2");
|
||||
}
|
||||
else
|
||||
{
|
||||
STD_TSPrintf(argument, "Jumped from NAND-2");
|
||||
}
|
||||
|
||||
OS_SetStringToDeliverArg(argument);
|
||||
|
||||
// 今まで引き渡されたパラメータ文字列を引き継がせる
|
||||
for (i=0; i <= 4 && i < gArgc; i++)
|
||||
{
|
||||
MI_CpuClear8(argument, APPJUMP_STRING_LENGTH + 1);
|
||||
STD_StrLCpy( argument, gStrAppParam[i], APPJUMP_STRING_LENGTH );
|
||||
result = OS_SetStringToDeliverArg(argument);
|
||||
OS_TPrintf("arg = %s : result = %d\n", argument, result);
|
||||
}
|
||||
}
|
||||
OS_EncodeDeliverArg();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: VBlankIntr
|
||||
|
||||
Description: Vブランク割込みハンドラ。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void VBlankIntr(void)
|
||||
{
|
||||
// テキスト表示を更新
|
||||
UpdateScreen();
|
||||
|
||||
// IRQ チェックフラグをセット
|
||||
OS_SetIrqCheckFlag(OS_IE_V_BLANK);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,86 +0,0 @@
|
||||
appjumpTest
|
||||
|
||||
アプリジャンプ機能をテストするためのアプリセットです。
|
||||
========================================================
|
||||
|
||||
<概要> ===============================================
|
||||
2種類のNAND アプリと 3種類のカードアプリで構成されます。
|
||||
各アプリ間で、アプリジャンプの機能を一通り試すことができます。
|
||||
アプリ間でのパラメータの受け渡し、ジャンプ元へのリターンも可能です。
|
||||
|
||||
|
||||
3種類のカードアプリについて
|
||||
|
||||
| ファイル名 | イニシャルコード | 被ノーマルジャンプ |
|
||||
| appjumpTestForCard.srl | 430A | 許可 |
|
||||
| appjumpTestForCard_Fail.srl | 460A | 不許可 |
|
||||
| appjumpTestForCard_AID.srl | 461A | 許可 |
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
<使い方> =============================================
|
||||
2種類のNAND アプリを TWL にインポートした状態で、カードアプリを起動してください。
|
||||
|
||||
操作方法は、下画面下部に一覧表示されます。
|
||||
ABXY ボタンがそれぞれに対応したターゲットへのアプリジャンプを実行します。
|
||||
|
||||
L/R ボタンで、アプリ間パラメータ(文字列データ)を次のジャンプ先へ渡すかどうかを
|
||||
切り替えることができます(デフォルトは ON になっています)。
|
||||
|
||||
START ボタンを押すと、現在起動中のアプリ自身へのアプリジャンプを自動で繰り返すモードに入ります。
|
||||
中断するには、起動後上画面にメッセージが出ている間(約2秒間)に START ボタンを押してください。
|
||||
|
||||
(2008/08/30 追記)
|
||||
異常系チェックのために、カードアプリを2種追加しました。
|
||||
|
||||
・ひとつめ(460A)について
|
||||
被ノーマルジャンプを許可していない TWL カードアプリです。
|
||||
NAND アプリからこのアプリにジャンプしようとすると、必ずエラーが返るはずです。
|
||||
|
||||
・ふたつめ(461A)について
|
||||
被ノーマルジャンプは許可していますが、最初のカードアプリとは TitleID が別物の TWL カードアプリです。
|
||||
最初に、もう一方のノーマルジャンプを許可しているカードアプリ[430A]をスロットに挿入した状態で
|
||||
テストを開始します。そこから NAND アプリにジャンプした後、カードを[461A] に差し替えます。
|
||||
そして、NAND アプリからカードアプリへノーマルジャンプを実行した際に、ジャンプできるかどうかをチェックします。
|
||||
|
||||
|
||||
<画面の見方> ==========================================
|
||||
・上画面について
|
||||
起動中のアプリが 3種類の内どれかを色と文字で表します。
|
||||
(黄:CARD、紫:NAND-1、水色:NAND-2)
|
||||
|
||||
APP JUMP -> 今までのアプリジャンプ実行回数です。
|
||||
DELIVERED PARAM -> アプリ間パラメータ渡しをONにしている場合、ジャンプ元へのリターンも含めて
|
||||
これまでのジャンプ元の履歴が 6つまで表示されます。
|
||||
エラー表示 -> アプリジャンプに失敗した場合、赤字でエラーが表示されます。
|
||||
エラー表示が出た場合、それ以上アプリの実行はできませんので再起動してください。
|
||||
|
||||
・下画面について
|
||||
DELIVER ARG: (ON or OFF) -> アプリ間パラメータ渡しを有効にするかどうかのフラグの状態です。
|
||||
L/R ボタンで ON/OFF を切り替えることができます。
|
||||
AUTO JUMP TEST: (ON or OFF) -> 自分自身へのアプリジャンプを中断するまで繰り返すテストモードかどうかを示す値です。
|
||||
操作方法一覧 -> 各ボタンの説明を表示しています。アプリによって、ボタンに割り当てられた
|
||||
ジャンプ先が異なりますので注意してください。
|
||||
ただし、ジャンプ元へのリターンは Bボタン、自分自身へのジャンプは Xボタン固定です。
|
||||
|
||||
(2008/09/03 追記)
|
||||
上下ボタンの入力によって、Bボタンに割り当てられるジャンプ先が変化します。
|
||||
リターンジャンプ、ランチャーへのジャンプ、別のカードアプリ[460A],[461A]へのジャンプが順に変わります。
|
||||
|
||||
最初にカードアプリ[430A]を挿している状態から NAND アプリにジャンプし、
|
||||
途中でカードを挿し替えた場合、[460A], [461A] へのジャンプは必ず失敗する仕様になっています。
|
||||
|
||||
|
||||
<その他注意事項>
|
||||
初回起動時(アプリジャンプを一度も実行していない状態)に、ジャンプ元へのリターンを行うと、
|
||||
必ずエラーになります。
|
||||
|
||||
|
||||
========================================================
|
||||
なにか問題がありましたら、環境制作部 西本まで。
|
||||
nishimoto_takashi@nintendo.co.jp
|
||||
|
||||
|
||||
<更新履歴>============================================
|
||||
2008/09/03 操作方法に追記
|
||||
2008/08/30 カードアプリ2種追加について加筆修正
|
||||
2008/07/31 新規追加
|
||||
@ -1,96 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest
|
||||
File: common.h
|
||||
|
||||
Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef COMMON_H_
|
||||
#define COMMON_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
#include <twl.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
定数定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
/* TitleID */
|
||||
#define CARDAPP_TITLEID (u64)(0x0003000034333041) // 430A
|
||||
#define CARDAPP_FAIL_TITLEID (u64)(0x0003000034363041) // 460A
|
||||
#define CARDAPP_ANO_TITLEID (u64)(0x0003000034363141) // 461A
|
||||
|
||||
#define NANDAPP1_TITLEID (u64)(0x0003000434333141) // 431A
|
||||
#define NANDAPP2_TITLEID (u64)(0x0003000434333241) // 432A
|
||||
|
||||
#define KEY_REPEAT_START 25 // キーリピート開始までのフレーム数
|
||||
#define KEY_REPEAT_SPAN 10 // キーリピートの間隔フレーム数
|
||||
|
||||
/* アプリ間パラメータ関連 */
|
||||
#define APPJUMP_STRING_LENGTH 24 // 引数一つ分として受け渡しされる文字列の長さ制限
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
構造体 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
typedef enum JumpTypeForB
|
||||
{
|
||||
JUMPTYPE_RETURN = 0,
|
||||
JUMPTYPE_ANOTHER_CARD,
|
||||
JUMPTYPE_SYSMENU,
|
||||
JUMPTYPE_FAIL_CARD,
|
||||
|
||||
JUMPTYPE_NUM
|
||||
} JumpTypeForB;
|
||||
|
||||
// キー入力情報
|
||||
typedef struct KeyInfo
|
||||
{
|
||||
u16 cnt; // 未加工入力値
|
||||
u16 trg; // 押しトリガ入力
|
||||
u16 up; // 離しトリガ入力
|
||||
u16 rep; // 押し維持リピート入力
|
||||
} KeyInfo;
|
||||
|
||||
// アプリ間でバイナリデータとして引き渡す構造体
|
||||
typedef struct AppParam
|
||||
{
|
||||
u32 jumpCount; // アプリジャンプの実行回数
|
||||
u8 isAutoJump; // 一定間隔で自動的にアプリジャンプを実行するかどうかのフラグ
|
||||
u8 rsv[3]; // 4バイトアラインメントのため
|
||||
} AppParam;
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Prototype
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitCommon(void);
|
||||
|
||||
void ReadKey(KeyInfo* pKey);
|
||||
|
||||
void VBlankIntr(void);
|
||||
|
||||
/*===========================================================================*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* COMMON_H_ */
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,41 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - WCM - demos - wcm-list-2
|
||||
File: font.h
|
||||
|
||||
Copyright 2007 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef FONT_H_
|
||||
#define FONT_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
#include <nitro/types.h>
|
||||
|
||||
extern const u32 d_CharData[8 * 256];
|
||||
extern const u32 d_PaletteData[8 * 16];
|
||||
|
||||
/*===========================================================================*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* FONT_H_ */
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,49 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - WCM - demos - wcm-list-2
|
||||
File: screen.h
|
||||
|
||||
Copyright 2007 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef SCREEN_H_
|
||||
#define SCREEN_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
#include <nitro/types.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
ŠÖ<EFBFBD>” ’è‹`
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitScreen(void);
|
||||
void ClearScreen(void);
|
||||
void ClearMainScreen(void);
|
||||
void ClearSubScreen(void);
|
||||
void PutMainScreen(s32 x, s32 y, u8 palette, char* text, ...);
|
||||
void PutSubScreen(s32 x, s32 y, u8 palette, char* text, ...);
|
||||
void UpdateScreen(void);
|
||||
|
||||
/*===========================================================================*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* SCREEN_H_ */
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,153 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - tests - appjumpTest
|
||||
File: common.c
|
||||
|
||||
Copyright 2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include "common.h"
|
||||
|
||||
static void InitInterrupts(void);
|
||||
static void InitHeap(void);
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
関数定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitCommon
|
||||
|
||||
Description: 基本的な初期化関数をここで呼ぶ。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitCommon(void)
|
||||
{
|
||||
OS_Init();
|
||||
OS_InitTick();
|
||||
OS_InitAlarm();
|
||||
GX_Init();
|
||||
GX_DispOff();
|
||||
GXS_DispOff();
|
||||
|
||||
InitHeap();
|
||||
InitInterrupts();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: ReadKey
|
||||
|
||||
Description: キー入力情報を取得し、入力情報構造体を編集する。
|
||||
押しトリガ、離しトリガ、押し継続リピートトリガ を検出する。
|
||||
|
||||
Arguments: pKey - 編集するキー入力情報構造体を指定する。
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void ReadKey(KeyInfo* pKey)
|
||||
{
|
||||
static u16 repeat_count[12];
|
||||
int i;
|
||||
u16 r;
|
||||
|
||||
r = PAD_Read();
|
||||
pKey->trg = 0x0000;
|
||||
pKey->up = 0x0000;
|
||||
pKey->rep = 0x0000;
|
||||
|
||||
for (i = 0; i < 12; i++)
|
||||
{
|
||||
if (r & (0x0001 << i))
|
||||
{
|
||||
if (!(pKey->cnt & (0x0001 << i)))
|
||||
{
|
||||
pKey->trg |= (0x0001 << i); // 押しトリガ
|
||||
repeat_count[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (repeat_count[i] > KEY_REPEAT_START)
|
||||
{
|
||||
pKey->rep |= (0x0001 << i); // 押し継続リピート
|
||||
repeat_count[i] = (u16) (KEY_REPEAT_START - KEY_REPEAT_SPAN);
|
||||
}
|
||||
else
|
||||
{
|
||||
repeat_count[i]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pKey->cnt & (0x0001 << i))
|
||||
{
|
||||
pKey->up |= (0x0001 << i); // 離しトリガ
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pKey->cnt = r; // 未加工キー入力
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitInterrupts
|
||||
|
||||
Description: 割り込み設定を初期化する。
|
||||
V ブランク割り込みを許可し、割り込みハンドラを設定する。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void InitInterrupts(void)
|
||||
{
|
||||
// V ブランク割り込み設定
|
||||
OS_SetIrqFunction(OS_IE_V_BLANK, VBlankIntr);
|
||||
(void)OS_EnableIrqMask(OS_IE_V_BLANK);
|
||||
(void)GX_VBlankIntr(TRUE);
|
||||
|
||||
// 割り込み許可
|
||||
(void)OS_EnableIrq();
|
||||
(void)OS_EnableInterrupts();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitHeap
|
||||
|
||||
Description: メインメモリ上のアリーナにてメモリ割当てシステムを初期化する。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void InitHeap(void)
|
||||
{
|
||||
void* tempLo;
|
||||
OSHeapHandle hh;
|
||||
|
||||
// メインメモリ上のアリーナにヒープをひとつ作成
|
||||
tempLo = OS_InitAlloc(OS_ARENA_MAIN, OS_GetMainArenaLo(), OS_GetMainArenaHi(), 1);
|
||||
OS_SetArenaLo(OS_ARENA_MAIN, tempLo);
|
||||
hh = OS_CreateHeap(OS_ARENA_MAIN, OS_GetMainArenaLo(), OS_GetMainArenaHi());
|
||||
if (hh < 0)
|
||||
{
|
||||
// ヒープ作成に失敗した場合は異常終了
|
||||
OS_Panic("ARM9: Fail to create heap...\n");
|
||||
}
|
||||
(void)OS_SetCurrentHeap(OS_ARENA_MAIN, hh);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,585 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: NitroWiFi - WCM - demos - wcm-list
|
||||
File: font.c
|
||||
|
||||
Copyright 2005,2006 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Log: font.c,v $
|
||||
Revision 1.2 2006/03/10 09:22:43 kitase_hirotake
|
||||
INDENT SOURCE
|
||||
|
||||
Revision 1.1 2005/07/21 08:21:06 adachi_hiroaki
|
||||
<EFBFBD>V‹K’ljÁ
|
||||
|
||||
|
||||
$NoKeywords: $
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include "font.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Character data
|
||||
*---------------------------------------------------------------------------*/
|
||||
const u32 d_CharData[8 * 256] =
|
||||
{
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0000h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x01010010, 0x01010010, 0x00000110, // 0001h
|
||||
0x00011010, 0x01100010, 0x00000010, 0x00000010,
|
||||
0x00000000, 0x01011010, 0x01010010, 0x00010010, // 0002h
|
||||
0x00100010, 0x00100010, 0x00100001, 0x00100001,
|
||||
0x00000000, 0x01010001, 0x01010001, 0x01111111, // 0003h
|
||||
0x00000001, 0x00000001, 0x00000001, 0x01111110,
|
||||
0x00000000, 0x01010000, 0x01111111, 0x00100000, // 0004h
|
||||
0x00100000, 0x00010000, 0x00001000, 0x00000110,
|
||||
0x00000000, 0x01010000, 0x01010100, 0x00001010, // 0005h
|
||||
0x00010001, 0x00100001, 0x01000000, 0x00000000,
|
||||
0x00000000, 0x01011000, 0x01011000, 0x01111111, // 0006h
|
||||
0x00001000, 0x00101010, 0x01001010, 0x01001001,
|
||||
0x00000000, 0x01010010, 0x01101111, 0x01010010, // 0007h
|
||||
0x00010010, 0x00010010, 0x00010010, 0x00001001,
|
||||
0x00000000, 0x01010010, 0x01011111, 0x00000100, // 0008h
|
||||
0x00011111, 0x00001000, 0x00000001, 0x00011110,
|
||||
0x00000000, 0x01010000, 0x01011000, 0x00000110, // 0009h
|
||||
0x00000001, 0x00000110, 0x00011000, 0x00100000,
|
||||
0x00000000, 0x01010000, 0x01111101, 0x00010001, // 000ah
|
||||
0x00010001, 0x00010001, 0x00010001, 0x00001010,
|
||||
0x00000000, 0x01010000, 0x01011110, 0x00100000, // 000bh
|
||||
0x00000000, 0x00000001, 0x00000001, 0x00111110,
|
||||
0x00000000, 0x01010100, 0x01011111, 0x00001000, // 000ch
|
||||
0x00010000, 0x00000001, 0x00000001, 0x00011110,
|
||||
0x00000000, 0x01010001, 0x01010001, 0x00000001, // 000dh
|
||||
0x01000001, 0x01000001, 0x00100010, 0x00011100,
|
||||
0x00000000, 0x01010000, 0x01111111, 0x00011000, // 000eh
|
||||
0x00010100, 0x00010100, 0x00011000, 0x00001100,
|
||||
0x00000000, 0x01010010, 0x01111111, 0x00010010, // 000fh
|
||||
0x00010010, 0x00000010, 0x00000010, 0x00111100,
|
||||
0x00000000, 0x00001110, 0x01010100, 0x01010010, // 0010h
|
||||
0x00111111, 0x00000100, 0x00000100, 0x00011000,
|
||||
0x00000000, 0x01010100, 0x01011111, 0x00000100, // 0011h
|
||||
0x01110100, 0x00000010, 0x00001010, 0x01110010,
|
||||
0x00000000, 0x01010100, 0x01011111, 0x00000010, // 0012h
|
||||
0x00011110, 0x00100001, 0x00100000, 0x00011110,
|
||||
0x00000000, 0x01010000, 0x01011100, 0x00100011, // 0013h
|
||||
0x01000000, 0x01000000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x01010000, 0x01111111, 0x00010000, // 0014h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00110000,
|
||||
0x00000000, 0x01010010, 0x01010010, 0x00001100, // 0015h
|
||||
0x00000010, 0x00000001, 0x00000001, 0x00111110,
|
||||
0x00000000, 0x01010001, 0x01111101, 0x00010001, // 0016h
|
||||
0x00010001, 0x00111001, 0x01010101, 0x00011001,
|
||||
0x00000000, 0x01010100, 0x01010011, 0x01110010, // 0017h
|
||||
0x00010001, 0x00010001, 0x00001010, 0x00000100,
|
||||
0x00000000, 0x01011110, 0x01011000, 0x00000100, // 0018h
|
||||
0x00101001, 0x01010001, 0x01010001, 0x00001100,
|
||||
0x00000000, 0x01010000, 0x01011100, 0x00010010, // 0019h
|
||||
0x00010010, 0x00100001, 0x01000000, 0x00000000,
|
||||
0x00000000, 0x01011101, 0x01010001, 0x00111101, // 001ah
|
||||
0x00010001, 0x00011001, 0x00110101, 0x00001001,
|
||||
0x00000000, 0x01110001, 0x01011101, 0x00110001, // 001bh
|
||||
0x00010001, 0x00111001, 0x01010101, 0x00011001,
|
||||
0x00000000, 0x01110100, 0x01010011, 0x00110010, // 001ch
|
||||
0x00010001, 0x00010001, 0x00001010, 0x00000100,
|
||||
0x00000000, 0x01101110, 0x01011000, 0x00100100, // 001dh
|
||||
0x00101001, 0x01010001, 0x01010001, 0x00001100,
|
||||
0x00000000, 0x01110000, 0x01011100, 0x00110010, // 001eh
|
||||
0x00010010, 0x00100001, 0x01000000, 0x00000000,
|
||||
0x00000000, 0x01111101, 0x01010001, 0x00111101, // 001fh
|
||||
0x00010001, 0x00011001, 0x00110101, 0x00001001,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0020h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 0021h
|
||||
0x00001000, 0x00001000, 0x00000000, 0x00001000,
|
||||
0x00000000, 0x01101100, 0x01001000, 0x00100100, // 0022h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00100100, 0x01111111, 0x00100100, // 0023h
|
||||
0x00100100, 0x01111111, 0x00010010, 0x00010010,
|
||||
0x00000000, 0x00001000, 0x01111110, 0x00001001, // 0024h
|
||||
0x00111110, 0x01001000, 0x00111111, 0x00001000,
|
||||
0x00000000, 0x01000010, 0x00100101, 0x00010010, // 0025h
|
||||
0x00001000, 0x00100100, 0x01010010, 0x00100001,
|
||||
0x00000000, 0x00001110, 0x00010001, 0x00001001, // 0026h
|
||||
0x01000110, 0x00101001, 0x00110001, 0x01001110,
|
||||
0x00000000, 0x00011000, 0x00010000, 0x00001000, // 0027h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x01110000, 0x00001000, 0x00000100, // 0028h
|
||||
0x00000100, 0x00000100, 0x00001000, 0x01110000,
|
||||
0x00000000, 0x00000111, 0x00001000, 0x00010000, // 0029h
|
||||
0x00010000, 0x00010000, 0x00001000, 0x00000111,
|
||||
0x00000000, 0x00001000, 0x01001001, 0x00101010, // 002ah
|
||||
0x00011100, 0x00101010, 0x01001001, 0x00001000,
|
||||
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 002bh
|
||||
0x01111111, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002ch
|
||||
0x00000000, 0x00001100, 0x00001000, 0x00000100,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002dh
|
||||
0x01111111, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002eh
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00001100,
|
||||
0x00000000, 0x01000000, 0x00100000, 0x00010000, // 002fh
|
||||
0x00001000, 0x00000100, 0x00000010, 0x00000001,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0030h
|
||||
0x01000001, 0x01000001, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x00011100, 0x00010000, 0x00010000, // 0031h
|
||||
0x00010000, 0x00010000, 0x00010000, 0x00010000,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0032h
|
||||
0x00111110, 0x00000001, 0x00000001, 0x01111111,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0033h
|
||||
0x00111110, 0x01000000, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x00100000, 0x00110000, 0x00101000, // 0034h
|
||||
0x00100100, 0x00100010, 0x01111111, 0x00100000,
|
||||
0x00000000, 0x01111111, 0x00000001, 0x00111111, // 0035h
|
||||
0x01000000, 0x01000000, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x00111110, 0x00000001, 0x00111111, // 0036h
|
||||
0x01000001, 0x01000001, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x01111111, 0x00100000, 0x00100000, // 0037h
|
||||
0x00010000, 0x00010000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0038h
|
||||
0x00111110, 0x01000001, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0039h
|
||||
0x01000001, 0x01111110, 0x01000000, 0x00111110,
|
||||
0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003ah
|
||||
0x00000000, 0x00000000, 0x00001100, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003bh
|
||||
0x00000000, 0x00001100, 0x00001000, 0x00000100,
|
||||
0x00000000, 0x01100000, 0x00011000, 0x00000110, // 003ch
|
||||
0x00000001, 0x00000110, 0x00011000, 0x01100000,
|
||||
0x00000000, 0x00000000, 0x01111111, 0x00000000, // 003dh
|
||||
0x00000000, 0x00000000, 0x01111111, 0x00000000,
|
||||
0x00000000, 0x00000011, 0x00001100, 0x00110000, // 003eh
|
||||
0x01000000, 0x00110000, 0x00001100, 0x00000011,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x01000001, // 003fh
|
||||
0x00110000, 0x00001000, 0x00000000, 0x00001000,
|
||||
0x00000000, 0x00011100, 0x00100010, 0x01001001, // 0040h
|
||||
0x01010101, 0x01010101, 0x01010101, 0x00111010,
|
||||
0x00000000, 0x00001000, 0x00010100, 0x00010100, // 0041h
|
||||
0x00100010, 0x00111110, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0042h
|
||||
0x00111111, 0x01000001, 0x01000001, 0x00111111,
|
||||
0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0043h
|
||||
0x00000001, 0x00000001, 0x01000010, 0x00111100,
|
||||
0x00000000, 0x00011111, 0x00100001, 0x01000001, // 0044h
|
||||
0x01000001, 0x01000001, 0x00100001, 0x00011111,
|
||||
0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0045h
|
||||
0x01111111, 0x00000001, 0x00000001, 0x01111111,
|
||||
0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0046h
|
||||
0x00111111, 0x00000001, 0x00000001, 0x00000001,
|
||||
0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0047h
|
||||
0x01111001, 0x01000001, 0x01000010, 0x00111100,
|
||||
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0048h
|
||||
0x01111111, 0x01000001, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x00111110, 0x00001000, 0x00001000, // 0049h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00111110,
|
||||
0x00000000, 0x01000000, 0x01000000, 0x01000000, // 004ah
|
||||
0x01000001, 0x01000001, 0x00100010, 0x00011100,
|
||||
0x00000000, 0x01100001, 0x00011001, 0x00000101, // 004bh
|
||||
0x00000011, 0x00000101, 0x00011001, 0x01100001,
|
||||
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 004ch
|
||||
0x00000001, 0x00000001, 0x00000001, 0x01111111,
|
||||
0x00000000, 0x01000001, 0x01100011, 0x01010101, // 004dh
|
||||
0x01001001, 0x01000001, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x01000001, 0x01000011, 0x01000101, // 004eh
|
||||
0x01001001, 0x01010001, 0x01100001, 0x01000001,
|
||||
0x00000000, 0x00011100, 0x00100010, 0x01000001, // 004fh
|
||||
0x01000001, 0x01000001, 0x00100010, 0x00011100,
|
||||
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0050h
|
||||
0x00111111, 0x00000001, 0x00000001, 0x00000001,
|
||||
0x00000000, 0x00011100, 0x00100010, 0x01000001, // 0051h
|
||||
0x01000001, 0x01011001, 0x00100010, 0x01011100,
|
||||
0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0052h
|
||||
0x00111111, 0x01000001, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x00111110, 0x01000001, 0x00000001, // 0053h
|
||||
0x00111110, 0x01000000, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x01111111, 0x00001000, 0x00001000, // 0054h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0055h
|
||||
0x01000001, 0x01000001, 0x00100010, 0x00011100,
|
||||
0x00000000, 0x01000001, 0x01000001, 0x00100010, // 0056h
|
||||
0x00100010, 0x00010100, 0x00010100, 0x00001000,
|
||||
0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0057h
|
||||
0x01001001, 0x01010101, 0x01100011, 0x01000001,
|
||||
0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0058h
|
||||
0x00001000, 0x00010100, 0x00100010, 0x01000001,
|
||||
0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0059h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x01111111, 0x00100000, 0x00010000, // 005ah
|
||||
0x00001000, 0x00000100, 0x00000010, 0x01111111,
|
||||
0x00000000, 0x01111100, 0x00000100, 0x00000100, // 005bh
|
||||
0x00000100, 0x00000100, 0x00000100, 0x01111100,
|
||||
0x00000000, 0x00100010, 0x00010100, 0x00111110, // 005ch
|
||||
0x00001000, 0x00111110, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00011111, 0x00010000, 0x00010000, // 005dh
|
||||
0x00010000, 0x00010000, 0x00010000, 0x00011111,
|
||||
0x00000000, 0x00001000, 0x00010100, 0x00100010, // 005eh
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 005fh
|
||||
0x00000000, 0x00000000, 0x00000000, 0x01111111,
|
||||
0x00000000, 0x00010000, 0x00001000, 0x00011000, // 0060h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00011110, 0x00100001, // 0061h
|
||||
0x00111110, 0x00100001, 0x00100001, 0x01011110,
|
||||
0x00000000, 0x00000001, 0x00000001, 0x00111111, // 0062h
|
||||
0x01000001, 0x01000001, 0x01000001, 0x00111111,
|
||||
0x00000000, 0x00000000, 0x00111100, 0x01000010, // 0063h
|
||||
0x00000001, 0x00000001, 0x01000010, 0x00111100,
|
||||
0x00000000, 0x01000000, 0x01000000, 0x01111110, // 0064h
|
||||
0x01000001, 0x01000001, 0x01000001, 0x01111110,
|
||||
0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0065h
|
||||
0x01111111, 0x00000001, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x00110000, 0x00001000, 0x00001000, // 0066h
|
||||
0x01111111, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00000000, 0x01111110, 0x01000001, // 0067h
|
||||
0x01000001, 0x01111110, 0x01000000, 0x00111110,
|
||||
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0068h
|
||||
0x00111111, 0x01000001, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x00001000, 0x00000000, 0x00001000, // 0069h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00100000, 0x00000000, 0x00100000, // 006ah
|
||||
0x00100000, 0x00100001, 0x00100001, 0x00011110,
|
||||
0x00000000, 0x00000001, 0x00000001, 0x01100001, // 006bh
|
||||
0x00011001, 0x00000111, 0x00011001, 0x01100001,
|
||||
0x00000000, 0x00001000, 0x00001000, 0x00001000, // 006ch
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00000000, 0x00110111, 0x01001001, // 006dh
|
||||
0x01001001, 0x01001001, 0x01001001, 0x01001001,
|
||||
0x00000000, 0x00000000, 0x00111111, 0x01000001, // 006eh
|
||||
0x01000001, 0x01000001, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x00000000, 0x00011100, 0x00100010, // 006fh
|
||||
0x01000001, 0x01000001, 0x00100010, 0x00011100,
|
||||
0x00000000, 0x00000000, 0x00111101, 0x01000011, // 0070h
|
||||
0x01000001, 0x01000011, 0x00111101, 0x00000001,
|
||||
0x00000000, 0x00000000, 0x01011110, 0x01100001, // 0071h
|
||||
0x01000001, 0x01100001, 0x01011110, 0x01000000,
|
||||
0x00000000, 0x00000000, 0x00110001, 0x00001101, // 0072h
|
||||
0x00000011, 0x00000001, 0x00000001, 0x00000001,
|
||||
0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0073h
|
||||
0x00001110, 0x00110000, 0x01000001, 0x00111110,
|
||||
0x00000000, 0x00000100, 0x00000100, 0x01111111, // 0074h
|
||||
0x00000100, 0x00000100, 0x00000100, 0x01111000,
|
||||
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0075h
|
||||
0x01000001, 0x01000001, 0x01000001, 0x01111110,
|
||||
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0076h
|
||||
0x00100010, 0x00100010, 0x00010100, 0x00001000,
|
||||
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0077h
|
||||
0x01001001, 0x00101010, 0x00101010, 0x00010100,
|
||||
0x00000000, 0x00000000, 0x00100001, 0x00010010, // 0078h
|
||||
0x00001100, 0x00001100, 0x00010010, 0x00100001,
|
||||
0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0079h
|
||||
0x00100010, 0x00011100, 0x00001000, 0x00000110,
|
||||
0x00000000, 0x00000000, 0x00111111, 0x00010000, // 007ah
|
||||
0x00001000, 0x00000100, 0x00000010, 0x00111111,
|
||||
0x00000000, 0x00001000, 0x00011110, 0x01100100, // 007bh
|
||||
0x00011000, 0x00100100, 0x00000100, 0x01111000,
|
||||
0x00000000, 0x00000000, 0x00011110, 0x00000100, // 007ch
|
||||
0x00011110, 0x00110101, 0x00101101, 0x00010010,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00010001, // 007dh
|
||||
0x00100001, 0x00100001, 0x00000001, 0x00000010,
|
||||
0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007eh
|
||||
0x00011110, 0x00100000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007fh
|
||||
0x00111110, 0x00010000, 0x00001100, 0x00110010,
|
||||
0x00000000, 0x00000000, 0x00000100, 0x00101111, // 0080h
|
||||
0x01000100, 0x00011110, 0x00100101, 0x00010110,
|
||||
0x00000000, 0x00000000, 0x00001010, 0x00011110, // 0081h
|
||||
0x00101011, 0x00100010, 0x00010100, 0x00000100,
|
||||
0x00000000, 0x00000000, 0x00001000, 0x00011101, // 0082h
|
||||
0x00101011, 0x00101001, 0x00011001, 0x00000100,
|
||||
0x00000000, 0x00000000, 0x00001000, 0x00111000, // 0083h
|
||||
0x00001000, 0x00011110, 0x00101001, 0x00000110,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00011100, // 0084h
|
||||
0x00100011, 0x00100000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x00000110, 0x01001001, 0x00110000, // 0085h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000100, 0x00111111, 0x00000100, // 0086h
|
||||
0x00111110, 0x01010101, 0x01001101, 0x00100110,
|
||||
0x00000000, 0x00000000, 0x00100001, 0x01000001, // 0087h
|
||||
0x01000001, 0x01000001, 0x00000001, 0x00000010,
|
||||
0x00000000, 0x00111100, 0x00000000, 0x00111110, // 0088h
|
||||
0x01000000, 0x01000000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x00011100, 0x00000000, 0x00111110, // 0089h
|
||||
0x00010000, 0x00001000, 0x00010100, 0x01100010,
|
||||
0x00000000, 0x00100100, 0x01011111, 0x00000100, // 008ah
|
||||
0x00111110, 0x01000101, 0x01000101, 0x00100010,
|
||||
0x00000000, 0x00100010, 0x01001111, 0x01010010, // 008bh
|
||||
0x01010010, 0x00010010, 0x00010010, 0x00001001,
|
||||
0x00000000, 0x00000100, 0x00111110, 0x00001000, // 008ch
|
||||
0x00111110, 0x00010000, 0x00000010, 0x00111100,
|
||||
0x00000000, 0x00100000, 0x00011000, 0x00000110, // 008dh
|
||||
0x00000001, 0x00000110, 0x00011000, 0x00100000,
|
||||
0x00000000, 0x00100000, 0x01111101, 0x00100001, // 008eh
|
||||
0x00100001, 0x00100001, 0x00100001, 0x00010010,
|
||||
0x00000000, 0x00011110, 0x00100000, 0x00000000, // 008fh
|
||||
0x00000000, 0x00000001, 0x00000001, 0x00111110,
|
||||
0x00000000, 0x00001000, 0x01111111, 0x00010000, // 0090h
|
||||
0x00100000, 0x00000010, 0x00000010, 0x00111100,
|
||||
0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0091h
|
||||
0x01000001, 0x01000001, 0x00100010, 0x00011100,
|
||||
0x00000000, 0x00010000, 0x01111111, 0x00011000, // 0092h
|
||||
0x00010100, 0x00010100, 0x00011000, 0x00001100,
|
||||
0x00000000, 0x00100010, 0x01111111, 0x00100010, // 0093h
|
||||
0x00100010, 0x00000010, 0x00000010, 0x01111100,
|
||||
0x00000000, 0x00111100, 0x00010000, 0x00001100, // 0094h
|
||||
0x01111111, 0x00001000, 0x00001000, 0x00110000,
|
||||
0x00000000, 0x00000100, 0x00011111, 0x00000100, // 0095h
|
||||
0x01110100, 0x00000010, 0x00001010, 0x01110010,
|
||||
0x00000000, 0x00001000, 0x01111111, 0x00000100, // 0096h
|
||||
0x00111100, 0x01000010, 0x01000000, 0x00111100,
|
||||
0x00000000, 0x00000000, 0x00011100, 0x00100011, // 0097h
|
||||
0x01000000, 0x01000000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x01111111, 0x00010000, 0x00001000, // 0098h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00110000,
|
||||
0x00000000, 0x00000010, 0x00110010, 0x00001100, // 0099h
|
||||
0x00000010, 0x00000001, 0x00000001, 0x00111110,
|
||||
0x00000000, 0x00100100, 0x01001111, 0x01000010, // 009ah
|
||||
0x00010001, 0x00111100, 0x00010010, 0x00001100,
|
||||
0x00000000, 0x00000010, 0x01111010, 0x01000010, // 009bh
|
||||
0x00000010, 0x00000010, 0x00001010, 0x01110010,
|
||||
0x00000000, 0x00100010, 0x00111110, 0x01010010, // 009ch
|
||||
0x01001011, 0x01101101, 0x01010101, 0x00110010,
|
||||
0x00000000, 0x00110010, 0x01001011, 0x01000110, // 009dh
|
||||
0x01000110, 0x01110010, 0x01001011, 0x00110010,
|
||||
0x00000000, 0x00011100, 0x00101010, 0x01001001, // 009eh
|
||||
0x01001001, 0x01000101, 0x01000101, 0x00110010,
|
||||
0x00000000, 0x00100001, 0x01111101, 0x00100001, // 009fh
|
||||
0x00100001, 0x00111001, 0x01100101, 0x00011001,
|
||||
0x00000000, 0x00000100, 0x00100011, 0x01100010, // 00a0h
|
||||
0x00100001, 0x00100001, 0x00010010, 0x00001100,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a1h
|
||||
0x00000000, 0x00000100, 0x00001010, 0x00000100,
|
||||
0x00000000, 0x01110000, 0x00010000, 0x00010000, // 00a2h
|
||||
0x00010000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a3h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00001110,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a4h
|
||||
0x00000000, 0x00000010, 0x00000100, 0x00000100,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00011000, // 00a5h
|
||||
0x00011000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x01111111, 0x01000000, 0x01111111, // 00a6h
|
||||
0x01000000, 0x01000000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x00000000, 0x00111111, 0x00100000, // 00a7h
|
||||
0x00010100, 0x00001100, 0x00000100, 0x00000010,
|
||||
0x00000000, 0x00000000, 0x00100000, 0x00100000, // 00a8h
|
||||
0x00010000, 0x00001111, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x00000000, 0x00000100, 0x00111111, // 00a9h
|
||||
0x00100001, 0x00100000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00aah
|
||||
0x00001000, 0x00001000, 0x00001000, 0x01111111,
|
||||
0x00000000, 0x00000000, 0x00010000, 0x00111111, // 00abh
|
||||
0x00011000, 0x00010100, 0x00010010, 0x00011001,
|
||||
0x00000000, 0x00000000, 0x00000010, 0x00111111, // 00ach
|
||||
0x00100010, 0x00010010, 0x00000100, 0x00000100,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00adh
|
||||
0x00100000, 0x00100000, 0x00100000, 0x01111111,
|
||||
0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00aeh
|
||||
0x00111110, 0x00100000, 0x00100000, 0x00111110,
|
||||
0x00000000, 0x00000000, 0x00100101, 0x00101010, // 00afh
|
||||
0x00101010, 0x00100000, 0x00010000, 0x00001110,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00b0h
|
||||
0x01111111, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x01111111, 0x01000000, 0x00101000, // 00b1h
|
||||
0x00011000, 0x00001000, 0x00001000, 0x00000100,
|
||||
0x00000000, 0x01000000, 0x00100000, 0x00011000, // 00b2h
|
||||
0x00010111, 0x00010000, 0x00010000, 0x00010000,
|
||||
0x00000000, 0x00001000, 0x01111111, 0x01000001, // 00b3h
|
||||
0x01000001, 0x01000000, 0x00100000, 0x00011000,
|
||||
0x00000000, 0x00000000, 0x00111110, 0x00001000, // 00b4h
|
||||
0x00001000, 0x00001000, 0x00001000, 0x01111111,
|
||||
0x00000000, 0x00100000, 0x01111111, 0x00110000, // 00b5h
|
||||
0x00101000, 0x00100100, 0x00100010, 0x00110001,
|
||||
0x00000000, 0x00000100, 0x01111111, 0x01000100, // 00b6h
|
||||
0x01000100, 0x01000100, 0x01000010, 0x00100001,
|
||||
0x00000000, 0x00000100, 0x00111111, 0x00001000, // 00b7h
|
||||
0x01111111, 0x00010000, 0x00010000, 0x00010000,
|
||||
0x00000000, 0x01111100, 0x01000100, 0x01000100, // 00b8h
|
||||
0x01000010, 0x01000000, 0x00100000, 0x00011000,
|
||||
0x00000000, 0x00000010, 0x01111110, 0x00100010, // 00b9h
|
||||
0x00100001, 0x00100000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00bah
|
||||
0x01000000, 0x01000000, 0x01000000, 0x01111110,
|
||||
0x00000000, 0x00100010, 0x01111111, 0x00100010, // 00bbh
|
||||
0x00100010, 0x00100000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x00000011, 0x00000100, 0x01000011, // 00bch
|
||||
0x01000100, 0x00100000, 0x00011000, 0x00000111,
|
||||
0x00000000, 0x01111111, 0x01000000, 0x00100000, // 00bdh
|
||||
0x00010000, 0x00011000, 0x00100100, 0x01000011,
|
||||
0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00beh
|
||||
0x00100010, 0x00000010, 0x00000010, 0x01111100,
|
||||
0x00000000, 0x01000001, 0x01000010, 0x01000000, // 00bfh
|
||||
0x00100000, 0x00100000, 0x00011000, 0x00000110,
|
||||
0x00000000, 0x01111110, 0x01000010, 0x01001110, // 00c0h
|
||||
0x01110001, 0x01000000, 0x00100000, 0x00011000,
|
||||
0x00000000, 0x01100000, 0x00011110, 0x00010000, // 00c1h
|
||||
0x01111111, 0x00010000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x01000101, 0x01001010, 0x01001010, // 00c2h
|
||||
0x01000000, 0x00100000, 0x00010000, 0x00001110,
|
||||
0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00c3h
|
||||
0x00010000, 0x00010000, 0x00001000, 0x00000110,
|
||||
0x00000000, 0x00000010, 0x00000010, 0x00000110, // 00c4h
|
||||
0x00011010, 0x01100010, 0x00000010, 0x00000010,
|
||||
0x00000000, 0x00010000, 0x00010000, 0x01111111, // 00c5h
|
||||
0x00010000, 0x00010000, 0x00001000, 0x00000110,
|
||||
0x00000000, 0x00000000, 0x00111110, 0x00000000, // 00c6h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x01111111,
|
||||
0x00000000, 0x01111110, 0x01000000, 0x01000100, // 00c7h
|
||||
0x00101000, 0x00010000, 0x00101000, 0x01000110,
|
||||
0x00000000, 0x00001000, 0x01111111, 0x00100000, // 00c8h
|
||||
0x00010000, 0x00011100, 0x01101011, 0x00001000,
|
||||
0x00000000, 0x01000000, 0x01000000, 0x01000000, // 00c9h
|
||||
0x00100000, 0x00100000, 0x00011000, 0x00000111,
|
||||
0x00000000, 0x00010010, 0x00100010, 0x00100010, // 00cah
|
||||
0x01000010, 0x01000010, 0x01000001, 0x01000001,
|
||||
0x00000000, 0x00000001, 0x00000001, 0x01111111, // 00cbh
|
||||
0x00000001, 0x00000001, 0x00000001, 0x01111110,
|
||||
0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cch
|
||||
0x01000000, 0x00100000, 0x00010000, 0x00001110,
|
||||
0x00000000, 0x00000000, 0x00000100, 0x00001010, // 00cdh
|
||||
0x00010001, 0x00100001, 0x01000000, 0x00000000,
|
||||
0x00000000, 0x00001000, 0x00001000, 0x01111111, // 00ceh
|
||||
0x00001000, 0x00101010, 0x01001010, 0x01001001,
|
||||
0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cfh
|
||||
0x00100010, 0x00010100, 0x00001000, 0x00010000,
|
||||
0x00000000, 0x00001110, 0x01110000, 0x00001110, // 00d0h
|
||||
0x01110000, 0x00000110, 0x00011000, 0x01100000,
|
||||
0x00000000, 0x00001000, 0x00001000, 0x00000100, // 00d1h
|
||||
0x00000100, 0x00100010, 0x01000010, 0x01111111,
|
||||
0x00000000, 0x01000000, 0x01000000, 0x00100100, // 00d2h
|
||||
0x00101000, 0x00010000, 0x00101100, 0x01000011,
|
||||
0x00000000, 0x01111111, 0x00000100, 0x01111111, // 00d3h
|
||||
0x00000100, 0x00000100, 0x00000100, 0x01111000,
|
||||
0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00d4h
|
||||
0x00100010, 0x00010100, 0x00000100, 0x00000100,
|
||||
0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00d5h
|
||||
0x00100000, 0x00100000, 0x00100000, 0x01111111,
|
||||
0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00d6h
|
||||
0x01111110, 0x01000000, 0x01000000, 0x01111110,
|
||||
0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00d7h
|
||||
0x01000000, 0x01000000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00d8h
|
||||
0x01000010, 0x01000000, 0x00100000, 0x00011000,
|
||||
0x00000000, 0x00001010, 0x00001010, 0x00001010, // 00d9h
|
||||
0x01001010, 0x01001010, 0x00101010, 0x00011001,
|
||||
0x00000000, 0x00000010, 0x00000010, 0x01000010, // 00dah
|
||||
0x01000010, 0x00100010, 0x00010010, 0x00001110,
|
||||
0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dbh
|
||||
0x01000001, 0x01000001, 0x01000001, 0x01111111,
|
||||
0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dch
|
||||
0x01000000, 0x01000000, 0x00100000, 0x00011100,
|
||||
0x00000000, 0x01000011, 0x01000100, 0x01000000, // 00ddh
|
||||
0x01000000, 0x00100000, 0x00010000, 0x00001111,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00deh
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00dfh
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00011110, 0x00001000, 0x00000100, // 00e0h
|
||||
0x00101001, 0x01010001, 0x01010001, 0x00001100,
|
||||
0x00000000, 0x00000000, 0x00001100, 0x00010010, // 00e1h
|
||||
0x00010010, 0x00100001, 0x01000000, 0x00000000,
|
||||
0x00000000, 0x01111101, 0x00100001, 0x01111101, // 00e2h
|
||||
0x00100001, 0x00111001, 0x01100101, 0x00011001,
|
||||
0x00000000, 0x00111100, 0x00010000, 0x00111100, // 00e3h
|
||||
0x00010000, 0x00011100, 0x00110010, 0x00001100,
|
||||
0x00000000, 0x00001110, 0x00101000, 0x00101000, // 00e4h
|
||||
0x00111110, 0x01100101, 0x00100101, 0x00010010,
|
||||
0x00000000, 0x00000100, 0x00101111, 0x01000100, // 00e5h
|
||||
0x00000110, 0x01000101, 0x01000101, 0x00111110,
|
||||
0x00000000, 0x00100010, 0x00100010, 0x00111110, // 00e6h
|
||||
0x01010010, 0x01010101, 0x01001101, 0x00100110,
|
||||
0x00000000, 0x00000100, 0x00011111, 0x00000010, // 00e7h
|
||||
0x00011111, 0x01000010, 0x01000010, 0x00111100,
|
||||
0x00000000, 0x00010010, 0x00111110, 0x01010011, // 00e8h
|
||||
0x01000010, 0x00100100, 0x00000100, 0x00000100,
|
||||
0x00000000, 0x00001000, 0x00111101, 0x01001011, // 00e9h
|
||||
0x01001001, 0x01001001, 0x00111000, 0x00000100,
|
||||
0x00000000, 0x00001000, 0x00111000, 0x00001000, // 00eah
|
||||
0x00001000, 0x00011110, 0x00101001, 0x00000110,
|
||||
0x00000000, 0x00011000, 0x00100000, 0x00000100, // 00ebh
|
||||
0x00111010, 0x01000110, 0x01000000, 0x00111000,
|
||||
0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00ech
|
||||
0x01000110, 0x01000000, 0x00100000, 0x00011000,
|
||||
0x00000000, 0x00111110, 0x00010000, 0x00111100, // 00edh
|
||||
0x01000011, 0x01001100, 0x01010010, 0x00111100,
|
||||
0x00000000, 0x00100010, 0x00110011, 0x00101010, // 00eeh
|
||||
0x00100110, 0x00100010, 0x00100011, 0x01000010,
|
||||
0x00000000, 0x00111110, 0x00010000, 0x00111100, // 00efh
|
||||
0x01000011, 0x01000000, 0x01000010, 0x00111100,
|
||||
0x00000000, 0x00000010, 0x00111011, 0x01000110, // 00f0h
|
||||
0x01000010, 0x01000011, 0x01000010, 0x00110010,
|
||||
0x00000000, 0x00000100, 0x00000100, 0x00000010, // 00f1h
|
||||
0x01000110, 0x01000101, 0x01000101, 0x00111001,
|
||||
0x00000000, 0x01010100, 0x01111111, 0x00100100, // 00f2h
|
||||
0x00100100, 0x00100100, 0x00100010, 0x00010001,
|
||||
0x00000000, 0x01010100, 0x01011111, 0x00000100, // 00f3h
|
||||
0x00111111, 0x00001000, 0x00001000, 0x00001000,
|
||||
0x00000000, 0x01011110, 0x01100010, 0x00100010, // 00f4h
|
||||
0x00100001, 0x00100000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x01010010, 0x01111110, 0x00100010, // 00f5h
|
||||
0x00100001, 0x00100000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x01010000, 0x01111111, 0x00100000, // 00f6h
|
||||
0x00100000, 0x00100000, 0x00100000, 0x00111111,
|
||||
0x00000000, 0x01010010, 0x01010010, 0x00111111, // 00f7h
|
||||
0x00010010, 0x00010000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x01010011, 0x01010100, 0x00100011, // 00f8h
|
||||
0x00100100, 0x00010000, 0x00001000, 0x00000111,
|
||||
0x00000000, 0x01010000, 0x01011111, 0x00010000, // 00f9h
|
||||
0x00001000, 0x00001100, 0x00010010, 0x00100001,
|
||||
0x00000000, 0x01010010, 0x01111111, 0x00100010, // 00fah
|
||||
0x00010010, 0x00000010, 0x00000010, 0x00111100,
|
||||
0x00000000, 0x01010001, 0x01010010, 0x00100000, // 00fbh
|
||||
0x00100000, 0x00010000, 0x00001000, 0x00000110,
|
||||
0x00000000, 0x01011110, 0x01010010, 0x00100110, // 00fch
|
||||
0x00111001, 0x00100000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x01010000, 0x01011110, 0x00010000, // 00fdh
|
||||
0x01111111, 0x00010000, 0x00010000, 0x00001100,
|
||||
0x00000000, 0x00100101, 0x01001010, 0x00101010, // 00feh
|
||||
0x00100000, 0x00010000, 0x00001000, 0x00000111,
|
||||
0x00000000, 0x01011110, 0x01010000, 0x00111111, // 00ffh
|
||||
0x00001000, 0x00001000, 0x00001000, 0x00000110
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Palette data
|
||||
*---------------------------------------------------------------------------*/
|
||||
const u32 d_PaletteData[8 * 16] =
|
||||
{
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, // black
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x001f0000, 0x00000000, 0x00000000, 0x00000000, // red
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x03e00000, 0x00000000, 0x00000000, 0x00000000, // green
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x7c000000, 0x00000000, 0x00000000, 0x00000000, // blue
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x03ff0000, 0x00000000, 0x00000000, 0x00000000, // yellow
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x7c1f0000, 0x00000000, 0x00000000, 0x00000000, // purple
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x7fe00000, 0x00000000, 0x00000000, 0x00000000, // light blue
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00180000, 0x00000000, 0x00000000, 0x00000000, // dark red
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x03000000, 0x00000000, 0x00000000, 0x00000000, // dark green
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x60000000, 0x00000000, 0x00000000, 0x00000000, // dark blue
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x03180000, 0x00000000, 0x00000000, 0x00000000, // dark yellow
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x60180000, 0x00000000, 0x00000000, 0x00000000, // dark purple
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x63000000, 0x00000000, 0x00000000, 0x00000000, // dark light blue
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x56b50000, 0x00000000, 0x00000000, 0x00000000, // gray
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x2d6b0000, 0x00000000, 0x00000000, 0x00000000, // dark gray
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x7fff0000, 0x00000000, 0x00000000, 0x00000000, // white
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,194 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - WCM - demos - wcm-list-2
|
||||
File: screen.c
|
||||
|
||||
Copyright 2007 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include <nitro.h>
|
||||
#include "screen.h"
|
||||
#include "font.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
定数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
#define TEXT_SCREEN_SIZE 2048
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
内部変数 定義
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
// 仮想スクリーン[ 上下画面 ][ BG 枚数 ][ キャラクタ数 ]
|
||||
static u16 gScreen[2 ][ 1 ][ TEXT_SCREEN_SIZE / sizeof(u16) ] ATTRIBUTE_ALIGN(32);
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: InitScreen
|
||||
|
||||
Description: 文字表示システムのために、表示設定を初期化する。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void InitScreen(void)
|
||||
{
|
||||
// 各 V-RAM 初期化
|
||||
GX_SetBankForLCDC(GX_VRAM_LCDC_ALL);
|
||||
MI_CpuClearFast((void*)HW_LCDC_VRAM, HW_LCDC_VRAM_SIZE);
|
||||
(void)GX_DisableBankForLCDC();
|
||||
|
||||
// OAM 初期化
|
||||
MI_CpuFillFast((void*)HW_OAM, 0xc0, HW_OAM_SIZE);
|
||||
MI_CpuFillFast((void*)HW_DB_OAM, 0xc0, HW_DB_OAM_SIZE);
|
||||
|
||||
// パレット初期化
|
||||
MI_CpuClearFast((void*)HW_PLTT, HW_PLTT_SIZE);
|
||||
MI_CpuClearFast((void*)HW_DB_PLTT, HW_DB_PLTT_SIZE);
|
||||
|
||||
// 上画面設定
|
||||
GX_SetGraphicsMode(GX_DISPMODE_GRAPHICS, GX_BGMODE_0, GX_BG0_AS_2D);
|
||||
|
||||
GX_SetBankForBG(GX_VRAM_BG_128_A);
|
||||
G2_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256, GX_BG_COLORMODE_16, GX_BG_SCRBASE_0x0000, GX_BG_CHARBASE_0x04000,
|
||||
GX_BG_EXTPLTT_01);
|
||||
G2_SetBG0Priority(0);
|
||||
|
||||
GX_SetVisiblePlane(GX_PLANEMASK_BG0);
|
||||
GX_LoadBG0Char(d_CharData, 0, sizeof(d_CharData));
|
||||
GX_LoadBGPltt(d_PaletteData, 0, sizeof(d_PaletteData));
|
||||
((u16*)HW_PLTT)[0] = 0x0000; // black
|
||||
MI_CpuFillFast(gScreen[0][0], 0, TEXT_SCREEN_SIZE);
|
||||
DC_StoreRange(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
GX_LoadBG0Scr(gScreen[0][0], 0, TEXT_SCREEN_SIZE);
|
||||
|
||||
// 下画面設定
|
||||
GX_SetBankForSubBG(GX_VRAM_SUB_BG_32_H);
|
||||
G2S_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256, GX_BG_COLORMODE_16, GX_BG_SCRBASE_0x0000, GX_BG_CHARBASE_0x04000,
|
||||
GX_BG_EXTPLTT_01);
|
||||
G2S_SetBG0Priority(0);
|
||||
GXS_SetGraphicsMode(GX_BGMODE_0);
|
||||
GXS_SetVisiblePlane(GX_PLANEMASK_BG0);
|
||||
GXS_LoadBG0Char(d_CharData, 0, sizeof(d_CharData));
|
||||
GXS_LoadBGPltt(d_PaletteData, 0, sizeof(d_PaletteData));
|
||||
((u16*)HW_DB_PLTT)[0] = 0x0000; // black
|
||||
MI_CpuFillFast(gScreen[1][0], 0, TEXT_SCREEN_SIZE);
|
||||
DC_StoreRange(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
GXS_LoadBG0Scr(gScreen[1][0], 0, TEXT_SCREEN_SIZE);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: ClearScreen
|
||||
|
||||
Description: 画面のテキスト表示をクリアする。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void ClearScreen(void)
|
||||
{
|
||||
MI_CpuClearFast(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
MI_CpuClearFast(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
}
|
||||
void ClearMainScreen(void)
|
||||
{
|
||||
MI_CpuClearFast(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
|
||||
}
|
||||
void ClearSubScreen(void)
|
||||
{
|
||||
MI_CpuClearFast(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: PutMainScreen
|
||||
|
||||
Description: メイン画面にテキスト出力する。
|
||||
|
||||
Arguments: text - 出力する文字列。
|
||||
... - 仮想引数。
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void PutMainScreen(s32 x, s32 y, u8 palette, char* text, ...)
|
||||
{
|
||||
va_list vlist;
|
||||
char temp[33];
|
||||
s32 i;
|
||||
|
||||
va_start(vlist, text);
|
||||
(void)vsnprintf(temp, 33, text, vlist);
|
||||
va_end(vlist);
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
if (temp[i] == 0x00)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
gScreen[0][0][((y * 32) + x + i) % (32 * 32)] = (u16) (palette << 12 | temp[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: PrintSubScreen
|
||||
|
||||
Description: サブ画面にテキスト出力する。
|
||||
|
||||
Arguments: text - 出力する文字列。
|
||||
... - 仮想引数。
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void PutSubScreen(s32 x, s32 y, u8 palette, char* text, ...)
|
||||
{
|
||||
va_list vlist;
|
||||
char temp[33];
|
||||
s32 i;
|
||||
|
||||
va_start(vlist, text);
|
||||
(void)vsnprintf(temp, 33, text, vlist);
|
||||
va_end(vlist);
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
if (temp[i] == 0x00)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
gScreen[1][0][((y * 32) + x + i) % (32 * 32)] = (u16) (palette << 12 | temp[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: UpdateScreen
|
||||
|
||||
Description: 仮想スクリーンを V-RAM に反映する。
|
||||
V ブランク期間中での呼び出しを想定。
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void UpdateScreen(void)
|
||||
{
|
||||
// 仮想スクリーンを V-RAM に反映
|
||||
DC_StoreRange(gScreen[0][0], TEXT_SCREEN_SIZE);
|
||||
GX_LoadBG0Scr(gScreen[0][0], 0, TEXT_SCREEN_SIZE);
|
||||
DC_StoreRange(gScreen[1][0], TEXT_SCREEN_SIZE);
|
||||
GXS_LoadBG0Scr(gScreen[1][0], 0, TEXT_SCREEN_SIZE);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
End of file
|
||||
*---------------------------------------------------------------------------*/
|
||||
@ -1,51 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Card
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM := TWL
|
||||
|
||||
SUBDIRS = ../common/banner \
|
||||
$(ROOT)/build/demos/gx/UnitTours/DEMOLib
|
||||
|
||||
TARGET_BIN = CardRomHeaderChecker.srl
|
||||
#INCDIR = ../common/include
|
||||
SRCDIR = ../common/src
|
||||
SRCS = main.c
|
||||
|
||||
ROM_SPEC = ./ROM-TS.rsf
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib
|
||||
|
||||
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/CardRomHeaderChecker
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
endif
|
||||
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
LIBSYSCALL = ../common/0CZA/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,196 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - include
|
||||
# File: ROM-TS.rsf
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# TWL ROM SPEC FILE
|
||||
#
|
||||
|
||||
Arm9
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
Elf "$(MAKEROM_ARM9:r).tef"
|
||||
}
|
||||
|
||||
Arm7
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
Elf "$(MAKEROM_ARM7_BASE:r).tef"
|
||||
}
|
||||
|
||||
Arm9.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
}
|
||||
|
||||
Arm7.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
}
|
||||
|
||||
Property
|
||||
{
|
||||
###
|
||||
### Settings for FinalROM
|
||||
###
|
||||
#### BEGIN
|
||||
#
|
||||
# TITLE NAME: Your product name within 12bytes
|
||||
#
|
||||
TitleName "CardRH Check"
|
||||
|
||||
#
|
||||
# MAKER CODE: Your company ID# in 2 ascii words
|
||||
# issued by NINTENDO
|
||||
#
|
||||
#MakerCode "00"
|
||||
|
||||
#
|
||||
# REMASTER VERSION: Mastering version
|
||||
#
|
||||
#RomVersion 0
|
||||
|
||||
#
|
||||
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||
#
|
||||
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||
|
||||
#
|
||||
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||
#
|
||||
#RomSize 256M
|
||||
|
||||
#
|
||||
# ROM PADDING: TRUE if finalrom
|
||||
#
|
||||
#RomFootPadding TRUE
|
||||
|
||||
#
|
||||
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderTemplate ../common/0CZA/rom_header_0cza.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile ../common/banner/banner.bnr
|
||||
|
||||
###
|
||||
### Setting for TWL
|
||||
###
|
||||
|
||||
#
|
||||
# ROM HEADER Ltd: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderLtd $(TWLSDK_ROOT)/tools/bin/rom_header.LTD.sbin
|
||||
|
||||
#
|
||||
# Digest parameters:
|
||||
#
|
||||
DigestParam 1024 32
|
||||
|
||||
#
|
||||
# WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD
|
||||
# MAP2_BB_HYB/MAP2_BB_LTD/MAP2_TS_HYB/MAP2_TS_LTD]
|
||||
# don't have to edit
|
||||
#
|
||||
WramMapping $(MAKEROM_WRAM_MAPPING)
|
||||
|
||||
#
|
||||
# CardRegion: card region [Japan/America/Europe/Australia/China/Korea]
|
||||
#
|
||||
CardRegion ALL
|
||||
|
||||
#
|
||||
# Codec mode:
|
||||
# don't have to edit
|
||||
#
|
||||
CodecMode $(MAKEROM_CODEC_MODE)
|
||||
|
||||
#
|
||||
# Disp WiFiConnection Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#WiFiConnectionIcon FALSE
|
||||
|
||||
#
|
||||
# Disp DSWireless Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#DSWirelessIcon FALSE
|
||||
|
||||
#
|
||||
# Agree EULA [TRUE/FALSE]
|
||||
#
|
||||
#AgreeEULA FALSE
|
||||
|
||||
#
|
||||
# Agree EULA version [1 - 255]
|
||||
#
|
||||
#AgreeEULAVersion 1
|
||||
|
||||
###
|
||||
#### END
|
||||
}
|
||||
|
||||
RomSpec
|
||||
{
|
||||
Offset 0x00000000
|
||||
Segment ALL
|
||||
HostRoot $(MAKEROM_ROMROOT)
|
||||
Root /
|
||||
File $(MAKEROM_ROMFILES)
|
||||
}
|
||||
|
||||
Rating
|
||||
{
|
||||
#
|
||||
# Permited age to play for each rating organization
|
||||
#
|
||||
# Supported organization
|
||||
# - CERO (OGN0) : for Japan
|
||||
# - ESRB (OGN1) : for North America
|
||||
# - BBFC (OGN2) : obsolete organization
|
||||
# - USK (OGN3) : for German
|
||||
# - PEGI_GEN (OGN4) : for Europe
|
||||
# - PEGI_FINLAND (OGN5) : obsolete organization
|
||||
# - PEGI_PRT (OGN6) : for Portugal
|
||||
# - PEGI_BBFC (OGN7) : for UK
|
||||
# - OFLC (OGN8) : for Australia and NewZealand
|
||||
# - GRB (OGN9) : for Korea
|
||||
# - OGN10 : reserved
|
||||
# - OGN11 : reserved
|
||||
# - OGN12 : reserved
|
||||
# - OGN13 : reserved
|
||||
# - OGN14 : reserved
|
||||
# - OGN15 : reserved
|
||||
#
|
||||
# Available age [ 0 - 31 / PENDING / FREE ]
|
||||
|
||||
CERO FREE
|
||||
# ESRB FREE
|
||||
# USK FREE
|
||||
# PEGI_GEN FREE
|
||||
# PEGI_PRT FREE
|
||||
# PEGI_BBFC FREE
|
||||
# OFLC FREE
|
||||
# GRB FREE
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Card
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM := TWL
|
||||
TWL_NANDAPP := TRUE
|
||||
override TWL_ARCHGEN = HYBRID
|
||||
|
||||
SUBDIRS = ../common/banner \
|
||||
$(ROOT)/build/demos/gx/UnitTours/DEMOLib
|
||||
|
||||
TARGET_BIN = CardRomHeaderChecker.tad
|
||||
#INCDIR = ../common/include
|
||||
SRCDIR = ../common/src
|
||||
SRCS = main.c
|
||||
|
||||
ROM_SPEC = ./ROM-TS_nand.HYB.rsf
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,243 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - include
|
||||
# File: ROM-TS.rsf
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# TWL ROM SPEC FILE
|
||||
#
|
||||
|
||||
Arm9
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
Elf "$(MAKEROM_ARM9:r).tef"
|
||||
}
|
||||
|
||||
Arm7
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
Elf "$(MAKEROM_ARM7_BASE:r).tef"
|
||||
}
|
||||
|
||||
Arm9.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
}
|
||||
|
||||
Arm7.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
}
|
||||
|
||||
Property
|
||||
{
|
||||
###
|
||||
### Settings for FinalROM
|
||||
###
|
||||
#### BEGIN
|
||||
#
|
||||
# TITLE NAME: Your product name within 12bytes
|
||||
#
|
||||
TitleName "CardRH Check"
|
||||
|
||||
#
|
||||
# MAKER CODE: Your company ID# in 2 ascii words
|
||||
# issued by NINTENDO
|
||||
#
|
||||
#MakerCode "00"
|
||||
|
||||
#
|
||||
# REMASTER VERSION: Mastering version
|
||||
#
|
||||
#RomVersion 0
|
||||
|
||||
#
|
||||
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||
#
|
||||
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||
|
||||
#
|
||||
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||
#
|
||||
#RomSize 256M
|
||||
|
||||
#
|
||||
# ROM PADDING: TRUE if finalrom
|
||||
#
|
||||
#RomFootPadding TRUE
|
||||
|
||||
#
|
||||
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderTemplate ../common/0CZA/rom_header_0cza.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile ../common/banner/banner.bnr
|
||||
|
||||
#
|
||||
# Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
PermitLandingNormalJump TRUE
|
||||
|
||||
#
|
||||
# Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
PermitLandingTmpJump TRUE
|
||||
|
||||
###
|
||||
### Setting for TWL
|
||||
###
|
||||
|
||||
#
|
||||
# ROM HEADER Ltd: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderLtd $(TWLSDK_ROOT)/tools/bin/rom_header.LTD.sbin
|
||||
|
||||
#
|
||||
# Digest parameters:
|
||||
#
|
||||
DigestParam 1024 32
|
||||
|
||||
#
|
||||
# WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD
|
||||
# MAP2_BB_HYB/MAP2_BB_LTD/MAP2_TS_HYB/MAP2_TS_LTD]
|
||||
# don't have to edit
|
||||
#
|
||||
WramMapping $(MAKEROM_WRAM_MAPPING)
|
||||
|
||||
#
|
||||
# CardRegion: card region [Japan/America/Europe/Australia/China/Korea]
|
||||
#
|
||||
CardRegion ALL
|
||||
|
||||
#
|
||||
# Codec mode:
|
||||
# don't have to edit
|
||||
#
|
||||
CodecMode $(MAKEROM_CODEC_MODE)
|
||||
|
||||
#
|
||||
# Disp WiFiConnection Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#WiFiConnectionIcon FALSE
|
||||
|
||||
#
|
||||
# Disp DSWireless Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#DSWirelessIcon FALSE
|
||||
|
||||
#
|
||||
# Agree EULA [TRUE/FALSE]
|
||||
#
|
||||
#AgreeEULA FALSE
|
||||
|
||||
#
|
||||
# Agree EULA version [1 - 255]
|
||||
#
|
||||
#AgreeEULAVersion 1
|
||||
|
||||
###
|
||||
#### END
|
||||
}
|
||||
|
||||
AppendProperty
|
||||
{
|
||||
#
|
||||
# Boot allowed Media: [GameCard]
|
||||
#
|
||||
Media NAND
|
||||
|
||||
#
|
||||
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||
#
|
||||
#GameCode ABCJ
|
||||
|
||||
#
|
||||
# Public save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PublicSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Private save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PrivateSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Enable SubBannerFile
|
||||
#SubBannerFile TRUE
|
||||
|
||||
#
|
||||
# Game card power on: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardOn FALSE
|
||||
|
||||
#
|
||||
# Game card transferd to nitro mode: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardNitroMode FALSE
|
||||
}
|
||||
|
||||
RomSpec
|
||||
{
|
||||
Offset 0x00000000
|
||||
Segment ALL
|
||||
HostRoot $(MAKEROM_ROMROOT)
|
||||
Root /
|
||||
File $(MAKEROM_ROMFILES)
|
||||
}
|
||||
|
||||
Rating
|
||||
{
|
||||
#
|
||||
# Permited age to play for each rating organization
|
||||
#
|
||||
# Supported organization
|
||||
# - CERO (OGN0) : for Japan
|
||||
# - ESRB (OGN1) : for North America
|
||||
# - BBFC (OGN2) : obsolete organization
|
||||
# - USK (OGN3) : for German
|
||||
# - PEGI_GEN (OGN4) : for Europe
|
||||
# - PEGI_FINLAND (OGN5) : obsolete organization
|
||||
# - PEGI_PRT (OGN6) : for Portugal
|
||||
# - PEGI_BBFC (OGN7) : for UK
|
||||
# - OFLC (OGN8) : for Australia and NewZealand
|
||||
# - GRB (OGN9) : for Korea
|
||||
# - OGN10 : reserved
|
||||
# - OGN11 : reserved
|
||||
# - OGN12 : reserved
|
||||
# - OGN13 : reserved
|
||||
# - OGN14 : reserved
|
||||
# - OGN15 : reserved
|
||||
#
|
||||
# Available age [ 0 - 31 / PENDING / FREE ]
|
||||
|
||||
CERO FREE
|
||||
# ESRB FREE
|
||||
# USK FREE
|
||||
# PEGI_GEN FREE
|
||||
# PEGI_PRT FREE
|
||||
# PEGI_BBFC FREE
|
||||
# OFLC FREE
|
||||
# GRB FREE
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - debugsoft - ApplicationJump
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
TARGET_PLATFORM = TWL
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = Card \
|
||||
Nand
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
#===== End of Makefile =====
|
||||
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Card
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBMAKES = ./Makefile.HYB ./Makefile.LTD
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,53 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Card
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM := TWL
|
||||
TWL_NANDAPP := TRUE
|
||||
override TWL_ARCHGEN = HYBRID
|
||||
|
||||
SUBDIRS = ../common/banner \
|
||||
$(ROOT)/build/demos/gx/UnitTours/DEMOLib
|
||||
|
||||
TARGET_BIN = CardRomHeaderChecker.tad
|
||||
#INCDIR = ../common/include
|
||||
SRCDIR = ../common/src
|
||||
SRCS = main.c
|
||||
|
||||
ROM_SPEC = ./ROM-TS_nand.HYB.rsf
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib
|
||||
|
||||
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/CardRomHeaderChecker
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
endif
|
||||
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
LIBSYSCALL = ../common/0CZA/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,53 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Card
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM := TWL
|
||||
TWL_NANDAPP := TRUE
|
||||
override TWL_ARCHGEN = LIMITED
|
||||
|
||||
SUBDIRS = ../common/banner2 \
|
||||
$(ROOT)/build/demos/gx/UnitTours/DEMOLib
|
||||
|
||||
TARGET_BIN = CardRomHeaderChecker.tad
|
||||
#INCDIR = ../common/include
|
||||
SRCDIR = ../common/src
|
||||
SRCS = main.c
|
||||
|
||||
ROM_SPEC = ./ROM-TS_nand.LTD.rsf
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib
|
||||
|
||||
# ƒCƒ“ƒXƒg<C692>[ƒ‹Žw’è
|
||||
ifneq ($(TWL_IPL_RED_ROOT),)
|
||||
INSTALL_DIR = $(TWL_IPL_RED_ROOT)/debugsoft/CardRomHeaderChecker
|
||||
INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN)
|
||||
endif
|
||||
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
LIBSYSCALL = ../common/0CYA/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,243 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - include
|
||||
# File: ROM-TS.rsf
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# TWL ROM SPEC FILE
|
||||
#
|
||||
|
||||
Arm9
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
Elf "$(MAKEROM_ARM9:r).tef"
|
||||
}
|
||||
|
||||
Arm7
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
Elf "$(MAKEROM_ARM7_BASE:r).tef"
|
||||
}
|
||||
|
||||
Arm9.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
}
|
||||
|
||||
Arm7.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
}
|
||||
|
||||
Property
|
||||
{
|
||||
###
|
||||
### Settings for FinalROM
|
||||
###
|
||||
#### BEGIN
|
||||
#
|
||||
# TITLE NAME: Your product name within 12bytes
|
||||
#
|
||||
TitleName "CardRH Check"
|
||||
|
||||
#
|
||||
# MAKER CODE: Your company ID# in 2 ascii words
|
||||
# issued by NINTENDO
|
||||
#
|
||||
#MakerCode "00"
|
||||
|
||||
#
|
||||
# REMASTER VERSION: Mastering version
|
||||
#
|
||||
#RomVersion 0
|
||||
|
||||
#
|
||||
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||
#
|
||||
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||
|
||||
#
|
||||
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||
#
|
||||
#RomSize 256M
|
||||
|
||||
#
|
||||
# ROM PADDING: TRUE if finalrom
|
||||
#
|
||||
#RomFootPadding TRUE
|
||||
|
||||
#
|
||||
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderTemplate ../common/0CZA/rom_header_0cza.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile ../common/banner/banner.bnr
|
||||
|
||||
#
|
||||
# Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
PermitLandingNormalJump TRUE
|
||||
|
||||
#
|
||||
# Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
PermitLandingTmpJump TRUE
|
||||
|
||||
###
|
||||
### Setting for TWL
|
||||
###
|
||||
|
||||
#
|
||||
# ROM HEADER Ltd: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderLtd $(TWLSDK_ROOT)/tools/bin/rom_header.LTD.sbin
|
||||
|
||||
#
|
||||
# Digest parameters:
|
||||
#
|
||||
DigestParam 1024 32
|
||||
|
||||
#
|
||||
# WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD
|
||||
# MAP2_BB_HYB/MAP2_BB_LTD/MAP2_TS_HYB/MAP2_TS_LTD]
|
||||
# don't have to edit
|
||||
#
|
||||
WramMapping $(MAKEROM_WRAM_MAPPING)
|
||||
|
||||
#
|
||||
# CardRegion: card region [Japan/America/Europe/Australia/China/Korea]
|
||||
#
|
||||
CardRegion ALL
|
||||
|
||||
#
|
||||
# Codec mode:
|
||||
# don't have to edit
|
||||
#
|
||||
CodecMode $(MAKEROM_CODEC_MODE)
|
||||
|
||||
#
|
||||
# Disp WiFiConnection Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#WiFiConnectionIcon FALSE
|
||||
|
||||
#
|
||||
# Disp DSWireless Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#DSWirelessIcon FALSE
|
||||
|
||||
#
|
||||
# Agree EULA [TRUE/FALSE]
|
||||
#
|
||||
#AgreeEULA FALSE
|
||||
|
||||
#
|
||||
# Agree EULA version [1 - 255]
|
||||
#
|
||||
#AgreeEULAVersion 1
|
||||
|
||||
###
|
||||
#### END
|
||||
}
|
||||
|
||||
AppendProperty
|
||||
{
|
||||
#
|
||||
# Boot allowed Media: [GameCard]
|
||||
#
|
||||
Media NAND
|
||||
|
||||
#
|
||||
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||
#
|
||||
#GameCode ABCJ
|
||||
|
||||
#
|
||||
# Public save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PublicSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Private save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PrivateSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Enable SubBannerFile
|
||||
#SubBannerFile TRUE
|
||||
|
||||
#
|
||||
# Game card power on: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardOn FALSE
|
||||
|
||||
#
|
||||
# Game card transferd to nitro mode: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardNitroMode FALSE
|
||||
}
|
||||
|
||||
RomSpec
|
||||
{
|
||||
Offset 0x00000000
|
||||
Segment ALL
|
||||
HostRoot $(MAKEROM_ROMROOT)
|
||||
Root /
|
||||
File $(MAKEROM_ROMFILES)
|
||||
}
|
||||
|
||||
Rating
|
||||
{
|
||||
#
|
||||
# Permited age to play for each rating organization
|
||||
#
|
||||
# Supported organization
|
||||
# - CERO (OGN0) : for Japan
|
||||
# - ESRB (OGN1) : for North America
|
||||
# - BBFC (OGN2) : obsolete organization
|
||||
# - USK (OGN3) : for German
|
||||
# - PEGI_GEN (OGN4) : for Europe
|
||||
# - PEGI_FINLAND (OGN5) : obsolete organization
|
||||
# - PEGI_PRT (OGN6) : for Portugal
|
||||
# - PEGI_BBFC (OGN7) : for UK
|
||||
# - OFLC (OGN8) : for Australia and NewZealand
|
||||
# - GRB (OGN9) : for Korea
|
||||
# - OGN10 : reserved
|
||||
# - OGN11 : reserved
|
||||
# - OGN12 : reserved
|
||||
# - OGN13 : reserved
|
||||
# - OGN14 : reserved
|
||||
# - OGN15 : reserved
|
||||
#
|
||||
# Available age [ 0 - 31 / PENDING / FREE ]
|
||||
|
||||
CERO FREE
|
||||
# ESRB FREE
|
||||
# USK FREE
|
||||
# PEGI_GEN FREE
|
||||
# PEGI_PRT FREE
|
||||
# PEGI_BBFC FREE
|
||||
# OFLC FREE
|
||||
# GRB FREE
|
||||
}
|
||||
@ -1,243 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - include
|
||||
# File: ROM-TS.rsf
|
||||
#
|
||||
# Copyright 2007 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded insructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# TWL ROM SPEC FILE
|
||||
#
|
||||
|
||||
Arm9
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.FLX.sbin$(COMPSUFFIX9)"
|
||||
Elf "$(MAKEROM_ARM9:r).tef"
|
||||
}
|
||||
|
||||
Arm7
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.FLX.sbin$(COMPSUFFIX7)"
|
||||
Elf "$(MAKEROM_ARM7_BASE:r).tef"
|
||||
}
|
||||
|
||||
Arm9.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM9:r).TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayDefs "$(MAKEROM_ARM9:r)_defs.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
OverlayTable "$(MAKEROM_ARM9:r)_table.TWL.LTD.sbin$(COMPSUFFIX9)"
|
||||
}
|
||||
|
||||
Arm7.Ltd
|
||||
{
|
||||
Static "$(MAKEROM_ARM7_BASE:r).TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayDefs "$(MAKEROM_ARM7_BASE:r)_defs.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
OverlayTable "$(MAKEROM_ARM7_BASE:r)_table.TWL.LTD.sbin$(COMPSUFFIX7)"
|
||||
}
|
||||
|
||||
Property
|
||||
{
|
||||
###
|
||||
### Settings for FinalROM
|
||||
###
|
||||
#### BEGIN
|
||||
#
|
||||
# TITLE NAME: Your product name within 12bytes
|
||||
#
|
||||
TitleName "CardRH Check"
|
||||
|
||||
#
|
||||
# MAKER CODE: Your company ID# in 2 ascii words
|
||||
# issued by NINTENDO
|
||||
#
|
||||
#MakerCode "00"
|
||||
|
||||
#
|
||||
# REMASTER VERSION: Mastering version
|
||||
#
|
||||
#RomVersion 0
|
||||
|
||||
#
|
||||
# ROM SPEED TYPE: [MROM/1TROM/UNDEFINED]
|
||||
#
|
||||
RomSpeedType $(MAKEROM_ROMSPEED)
|
||||
|
||||
#
|
||||
# ROM SIZE: in bit [64M/128M/256M/512M/1G/2G/4G]
|
||||
#
|
||||
#RomSize 256M
|
||||
|
||||
#
|
||||
# ROM PADDING: TRUE if finalrom
|
||||
#
|
||||
#RomFootPadding TRUE
|
||||
|
||||
#
|
||||
# ROM HEADER TEMPLATE: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderTemplate ../common/0CYA/rom_header_0cya.template.sbin
|
||||
|
||||
#
|
||||
# BANNER FILE: generated from Banner Spec File
|
||||
#
|
||||
BannerFile ../common/banner2/banner.bnr
|
||||
|
||||
#
|
||||
# Permit LandingNormalJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
PermitLandingNormalJump TRUE
|
||||
|
||||
#
|
||||
# Permit LandingTmpJump: for TWL "ApplicationJump" function [TRUE/FALSE]
|
||||
#
|
||||
PermitLandingTmpJump TRUE
|
||||
|
||||
###
|
||||
### Setting for TWL
|
||||
###
|
||||
|
||||
#
|
||||
# ROM HEADER Ltd: Provided to every product by NINTENDO
|
||||
#
|
||||
RomHeaderLtd $(TWLSDK_ROOT)/tools/bin/rom_header.LTD.sbin
|
||||
|
||||
#
|
||||
# Digest parameters:
|
||||
#
|
||||
DigestParam 1024 32
|
||||
|
||||
#
|
||||
# WRAM mapping: [MAP_BB_HYB/MAP_BB_LTD/MAP_TS_HYB/MAP_TS_LTD
|
||||
# MAP2_BB_HYB/MAP2_BB_LTD/MAP2_TS_HYB/MAP2_TS_LTD]
|
||||
# don't have to edit
|
||||
#
|
||||
WramMapping $(MAKEROM_WRAM_MAPPING)
|
||||
|
||||
#
|
||||
# CardRegion: card region [Japan/America/Europe/Australia/China/Korea]
|
||||
#
|
||||
CardRegion ALL
|
||||
|
||||
#
|
||||
# Codec mode:
|
||||
# don't have to edit
|
||||
#
|
||||
CodecMode $(MAKEROM_CODEC_MODE)
|
||||
|
||||
#
|
||||
# Disp WiFiConnection Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#WiFiConnectionIcon FALSE
|
||||
|
||||
#
|
||||
# Disp DSWireless Icon for Launcher [TRUE/FALSE]
|
||||
#
|
||||
#DSWirelessIcon FALSE
|
||||
|
||||
#
|
||||
# Agree EULA [TRUE/FALSE]
|
||||
#
|
||||
#AgreeEULA FALSE
|
||||
|
||||
#
|
||||
# Agree EULA version [1 - 255]
|
||||
#
|
||||
#AgreeEULAVersion 1
|
||||
|
||||
###
|
||||
#### END
|
||||
}
|
||||
|
||||
AppendProperty
|
||||
{
|
||||
#
|
||||
# Boot allowed Media: [GameCard]
|
||||
#
|
||||
Media NAND
|
||||
|
||||
#
|
||||
# GameCode for TitleID : Your GameCode in 4 ascii words
|
||||
#
|
||||
#GameCode ABCJ
|
||||
|
||||
#
|
||||
# Public save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PublicSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Private save data size: [0K/16K/32K/64K/128K/256K/512K/1M/2M/4M]
|
||||
#
|
||||
#PrivateSaveDataSize 0K
|
||||
|
||||
#
|
||||
# Enable SubBannerFile
|
||||
#SubBannerFile TRUE
|
||||
|
||||
#
|
||||
# Game card power on: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardOn FALSE
|
||||
|
||||
#
|
||||
# Game card transferd to nitro mode: [TRUE/FALSE]
|
||||
#
|
||||
#GameCardNitroMode FALSE
|
||||
}
|
||||
|
||||
RomSpec
|
||||
{
|
||||
Offset 0x00000000
|
||||
Segment ALL
|
||||
HostRoot $(MAKEROM_ROMROOT)
|
||||
Root /
|
||||
File $(MAKEROM_ROMFILES)
|
||||
}
|
||||
|
||||
Rating
|
||||
{
|
||||
#
|
||||
# Permited age to play for each rating organization
|
||||
#
|
||||
# Supported organization
|
||||
# - CERO (OGN0) : for Japan
|
||||
# - ESRB (OGN1) : for North America
|
||||
# - BBFC (OGN2) : obsolete organization
|
||||
# - USK (OGN3) : for German
|
||||
# - PEGI_GEN (OGN4) : for Europe
|
||||
# - PEGI_FINLAND (OGN5) : obsolete organization
|
||||
# - PEGI_PRT (OGN6) : for Portugal
|
||||
# - PEGI_BBFC (OGN7) : for UK
|
||||
# - OFLC (OGN8) : for Australia and NewZealand
|
||||
# - GRB (OGN9) : for Korea
|
||||
# - OGN10 : reserved
|
||||
# - OGN11 : reserved
|
||||
# - OGN12 : reserved
|
||||
# - OGN13 : reserved
|
||||
# - OGN14 : reserved
|
||||
# - OGN15 : reserved
|
||||
#
|
||||
# Available age [ 0 - 31 / PENDING / FREE ]
|
||||
|
||||
CERO FREE
|
||||
# ESRB FREE
|
||||
# USK FREE
|
||||
# PEGI_GEN FREE
|
||||
# PEGI_PRT FREE
|
||||
# PEGI_BBFC FREE
|
||||
# OFLC FREE
|
||||
# GRB FREE
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - tests - appjumpTest - Card
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBMAKES = ./Makefile.HYB ./Makefile.LTD
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,71 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - demos.TWL - nandApp - ExecTmpApp
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2007-2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
MISC_DIR = $(ROOT)/build/demos.TWL/nandApp/launcher_param/misc
|
||||
DATA_DIR = $(ROOT)/build/demos.TWL/nandApp/launcher_param/data
|
||||
|
||||
SUBDIRS = banner
|
||||
|
||||
#-------------------------
|
||||
#-- NAND アプリのビルドを指定します。
|
||||
|
||||
TWL_NANDAPP = TRUE
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM = TWL
|
||||
override TWL_ARCHGEN = HYBRID
|
||||
|
||||
LINCLUDES = $(MISC_DIR) \
|
||||
$(DATA_DIR)
|
||||
|
||||
SRCS = main.c ExecTmpApp.c \
|
||||
$(MISC_DIR)/misc_simple.c \
|
||||
$(DATA_DIR)/data.c
|
||||
|
||||
TARGET_BIN = ExecTmpCardRomHeaderChecker.tad
|
||||
|
||||
|
||||
#-------------------------
|
||||
#-- NAND アプリではいくつかのパラメータの指定のために固有の RSF ファイルが必要です。
|
||||
|
||||
ROM_SPEC = demo.autogen.hyb.rsf
|
||||
ROM_SPEC_TEMPLATE = $(ROOT)/include/twl/specfiles/ROM-TS_nand.rsf
|
||||
ROM_SPEC_PARAM = MakerCode=01 \
|
||||
InitialCode=0CXA \
|
||||
BannerFile="banner/banner.bnr" \
|
||||
RomHeaderTemplate="../common/0CXA/rom_header_0cxa.template.sbin"
|
||||
|
||||
MAKEROM_ROMROOT = ./../Nand/bin/$(TWL_BUILDTYPE_ARM9)
|
||||
MAKEROM_ROMFILES = CardRomHeaderChecker.nand.srl
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
do-build : $(TARGETS)
|
||||
|
||||
LIBSYSCALL = ../common/0CXA/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,72 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - demos.TWL - nandApp - ExecTmpApp
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2007-2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
MISC_DIR = $(ROOT)/build/demos.TWL/nandApp/launcher_param/misc
|
||||
DATA_DIR = $(ROOT)/build/demos.TWL/nandApp/launcher_param/data
|
||||
|
||||
SUBDIRS = banner2
|
||||
|
||||
#-------------------------
|
||||
#-- NAND アプリのビルドを指定します。
|
||||
|
||||
TWL_NANDAPP = TRUE
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PLATFORM = TWL
|
||||
override TWL_ARCHGEN = LIMITED
|
||||
|
||||
LINCLUDES = $(MISC_DIR) \
|
||||
$(DATA_DIR)
|
||||
|
||||
SRCS = main.c ExecTmpApp.c \
|
||||
$(MISC_DIR)/misc_simple.c \
|
||||
$(DATA_DIR)/data.c
|
||||
|
||||
TARGET_BIN = ExecTmpCardRomHeaderChecker.tad
|
||||
|
||||
|
||||
#-------------------------
|
||||
#-- NAND アプリではいくつかのパラメータの指定のために固有の RSF ファイルが必要です。
|
||||
|
||||
ROM_SPEC = demo.autogen.ltd.rsf
|
||||
ROM_SPEC_TEMPLATE = $(ROOT)/include/twl/specfiles/ROM-TS_nand.rsf
|
||||
ROM_SPEC_PARAM = MakerCode=01 \
|
||||
InitialCode=0CWA \
|
||||
BannerFile="banner2/banner.bnr" \
|
||||
RomHeaderTemplate="../common/0CWA/rom_header_0cwa.template.sbin"
|
||||
|
||||
MAKEROM_ROMROOT = ./../Nand/bin/$(TWL_BUILDTYPE_ARM9)
|
||||
MAKEROM_ROMFILES = CardRomHeaderChecker.nand.srl
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
do-build : $(TARGETS)
|
||||
|
||||
|
||||
LIBSYSCALL = ../common/0CWA/libsyscall.a
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
#===== End of Makefile =====
|
||||
@ -1,49 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - nandApp - demos - launcher_param - ExecTmpApp
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2007-2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
TARGET_PLATFORM = TWL
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
MAKEBANNER = $(TWL_TOOLSDIR)/bin/makebanner.TWL.exe
|
||||
|
||||
ICON_DIR = ./icon
|
||||
|
||||
BANNER_ICON = $(ICON_DIR)/gameIcon.bmp
|
||||
BANNER_SPEC = banner_v3.bsf
|
||||
|
||||
TARGETS = banner.bnr
|
||||
INSTALL_DIR = ./
|
||||
INSTALL_TARGETS = $(TARGETS)
|
||||
|
||||
BANNER_ICON_NAME = $(basename $(BANNER_ICON))
|
||||
BANNER_ICON_MIDDLE = $(addprefix $(BANNER_ICON_NAME), .nbfs .nbfc .nbfp)
|
||||
|
||||
LDIRT_CLEAN = $(TARGETS) \
|
||||
$(BANNER_ICON_MIDDLE) \
|
||||
$(TARGETS:.bnr=.srl)
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# build
|
||||
#----------------------------------------------------------------------------
|
||||
do-build: $(TARGETS)
|
||||
|
||||
$(TARGETS): $(BANNER_SPEC) $(BANNER_ICON) $(BANNER_ICON_MIDDLE)
|
||||
$(MAKEBANNER) -N $(BANNER_ICON_NAME) $(BANNER_SPEC) $(TARGETS)
|
||||
|
||||
#
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 630 B |
@ -1,49 +0,0 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - nandApp - demos - launcher_param - ExecTmpApp
|
||||
# File: Makefile
|
||||
#
|
||||
# Copyright 2007-2008 Nintendo. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Date:: $
|
||||
# $Rev$
|
||||
# $Author$
|
||||
#----------------------------------------------------------------------------
|
||||
TARGET_PLATFORM = TWL
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
MAKEBANNER = $(TWL_TOOLSDIR)/bin/makebanner.TWL.exe
|
||||
|
||||
ICON_DIR = ./icon
|
||||
|
||||
BANNER_ICON = $(ICON_DIR)/gameIcon.bmp
|
||||
BANNER_SPEC = banner_v3.bsf
|
||||
|
||||
TARGETS = banner.bnr
|
||||
INSTALL_DIR = ./
|
||||
INSTALL_TARGETS = $(TARGETS)
|
||||
|
||||
BANNER_ICON_NAME = $(basename $(BANNER_ICON))
|
||||
BANNER_ICON_MIDDLE = $(addprefix $(BANNER_ICON_NAME), .nbfs .nbfc .nbfp)
|
||||
|
||||
LDIRT_CLEAN = $(TARGETS) \
|
||||
$(BANNER_ICON_MIDDLE) \
|
||||
$(TARGETS:.bnr=.srl)
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# build
|
||||
#----------------------------------------------------------------------------
|
||||
do-build: $(TARGETS)
|
||||
|
||||
$(TARGETS): $(BANNER_SPEC) $(BANNER_ICON) $(BANNER_ICON_MIDDLE)
|
||||
$(MAKEBANNER) -N $(BANNER_ICON_NAME) $(BANNER_SPEC) $(TARGETS)
|
||||
|
||||
#
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 630 B |
@ -1,169 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - nandApp - demos - launcher_param - ExecTmpApp
|
||||
File: ExecTmpApp.c
|
||||
|
||||
Copyright 2007-2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#include <twl.h>
|
||||
#include "misc_simple.h"
|
||||
#include "ExecTmpApp.h"
|
||||
|
||||
// define data------------------------------------------
|
||||
|
||||
#define COPB_MENU_ELEMENT_NUM 2 // メニューの項目数
|
||||
|
||||
// extern data------------------------------------------
|
||||
|
||||
// function's prototype declaration---------------------
|
||||
|
||||
static void MenuScene( void );
|
||||
|
||||
// global variable -------------------------------------
|
||||
|
||||
// static variable -------------------------------------
|
||||
static u16 s_csr = 0;
|
||||
static void(*s_pNowProcess)(void);
|
||||
|
||||
// const data -----------------------------------------
|
||||
static const char *s_pStrMenu[ COPB_MENU_ELEMENT_NUM ] =
|
||||
{
|
||||
"save app to tmp and restart",
|
||||
"return to launcher",
|
||||
};
|
||||
|
||||
static MenuPos s_menuPos[] = {
|
||||
{ TRUE, 3, 6 },
|
||||
{ TRUE, 3, 8 },
|
||||
};
|
||||
|
||||
static const MenuParam s_menuParam = {
|
||||
COPB_MENU_ELEMENT_NUM,
|
||||
TXT_COLOR_BLACK,
|
||||
TXT_COLOR_GREEN,
|
||||
TXT_COLOR_RED,
|
||||
&s_menuPos[ 0 ],
|
||||
(const char **)&s_pStrMenu,
|
||||
};
|
||||
|
||||
//======================================================
|
||||
// アプリ連携テストプログラムB
|
||||
//======================================================
|
||||
|
||||
static void DrawMenuScene( void )
|
||||
{
|
||||
myDp_Printf( 1, 0, TXT_COLOR_BLUE, MAIN_SCREEN, "ExecTmpCardRomHeaderChecker");
|
||||
// メニュー項目
|
||||
myDp_DrawMenu( s_csr, MAIN_SCREEN, &s_menuParam );
|
||||
}
|
||||
|
||||
static void MenuInit( void )
|
||||
{
|
||||
FS_Init(3);
|
||||
GX_DispOff();
|
||||
GXS_DispOff();
|
||||
|
||||
myDp_Printf( 1, 0, TXT_COLOR_BLUE, MAIN_SCREEN, "ExecTmpCardRomHeaderChecker");
|
||||
|
||||
s_pNowProcess = MenuScene;
|
||||
|
||||
DrawMenuScene();
|
||||
|
||||
GX_DispOn();
|
||||
GXS_DispOn();
|
||||
}
|
||||
|
||||
static void MenuScene(void)
|
||||
{
|
||||
//--------------------------------------
|
||||
// キー入力処理
|
||||
//--------------------------------------
|
||||
if( MYPAD_IS_TRIG(PAD_KEY_DOWN) ){ // カーソルの移動
|
||||
if( ++s_csr == COPB_MENU_ELEMENT_NUM ) {
|
||||
s_csr=0;
|
||||
}
|
||||
}
|
||||
if( MYPAD_IS_TRIG(PAD_KEY_UP) ){
|
||||
if( --s_csr & 0x80 ) {
|
||||
s_csr=COPB_MENU_ELEMENT_NUM - 1;
|
||||
}
|
||||
}
|
||||
|
||||
DrawMenuScene();
|
||||
|
||||
if( MYPAD_IS_TRIG(PAD_BUTTON_A) ) { // メニュー項目への分岐
|
||||
if( s_menuPos[ s_csr ].enable ) {
|
||||
u64 targetApp = 0x00030004534d504c;// SMPL
|
||||
s32 len = 0;
|
||||
s32 llen;
|
||||
BOOL success = TRUE;
|
||||
FSFile src,dest;
|
||||
void *buf;
|
||||
switch( s_csr ) {
|
||||
case 0:
|
||||
|
||||
// tmpに保存
|
||||
FS_DeleteFile(OS_TMP_APP_PATH);
|
||||
FS_CreateFile(OS_TMP_APP_PATH, FS_PERMIT_R | FS_PERMIT_W);
|
||||
FS_InitFile( &src );
|
||||
FS_InitFile( &dest );
|
||||
if ( !FS_OpenFileEx( &src, "rom:/CardRomHeaderChecker.nand.srl", FS_FILEMODE_R ) ) success = FALSE;
|
||||
len = (int)FS_GetFileLength( &src );
|
||||
|
||||
buf = (void *)0x2400000;
|
||||
for(llen = 0; llen < len; )
|
||||
{
|
||||
int rd;
|
||||
rd = FS_ReadFile( &src, buf, len );
|
||||
if(rd == -1)
|
||||
{
|
||||
success = FALSE;
|
||||
break;
|
||||
}
|
||||
buf = (void *)((u32)buf + rd);
|
||||
llen += rd;
|
||||
}
|
||||
buf = (void *)0x2400000;
|
||||
if ( !FS_CloseFile( &src ) ) success = FALSE;
|
||||
if (len != llen) success = FALSE;
|
||||
|
||||
if ( !FS_OpenFileEx( &dest, OS_TMP_APP_PATH, FS_FILEMODE_W ) ) success = FALSE;
|
||||
llen = FS_WriteFile( &dest, buf, len );
|
||||
if ( !FS_CloseFile( &dest ) ) success = FALSE;
|
||||
if (len != llen) success = FALSE;
|
||||
|
||||
if( !success ) break;
|
||||
|
||||
//アプリ起動
|
||||
OS_DoApplicationJump( targetApp, OS_APP_JUMP_TMP );
|
||||
break;
|
||||
case 1:
|
||||
OS_DoApplicationJump( NULL, OS_APP_JUMP_NORMAL );
|
||||
//再起動
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 初期化
|
||||
void ExecTmpAppInit( void )
|
||||
{
|
||||
MenuInit();
|
||||
}
|
||||
|
||||
// メインループ
|
||||
void ExecTmpAppMain(void)
|
||||
{
|
||||
s_pNowProcess();
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - nandApp - demos - launcher_param - ExecTmpApp
|
||||
File: ExecTmpApp.h
|
||||
|
||||
Copyright 2007-2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __COOPERATION_B_H__
|
||||
#define __COOPERATION_B_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#include <twl.h>
|
||||
|
||||
// define data----------------------------------------------------------
|
||||
|
||||
void ExecTmpAppInit( void );
|
||||
void ExecTmpAppMain( void );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __COOPERATION_B_H__
|
||||
@ -1,68 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - nandApp - demos - launcher_param - ExecTmpApp
|
||||
File: main.c
|
||||
|
||||
Copyright 2007-2008 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Date:: $
|
||||
$Rev$
|
||||
$Author$
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#include <twl.h>
|
||||
#include "misc_simple.h"
|
||||
#include "ExecTmpApp.h"
|
||||
|
||||
// extern data-----------------------------------------------------------------
|
||||
|
||||
// define data-----------------------------------------------------------------
|
||||
|
||||
// function's prototype-------------------------------------------------------
|
||||
static void INTR_VBlank( void );
|
||||
|
||||
// global variable-------------------------------------------------------------
|
||||
|
||||
// static variable-------------------------------------------------------------
|
||||
BOOL g_isValidTSD;
|
||||
|
||||
// const data------------------------------------------------------------------
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// function's description
|
||||
// ============================================================================
|
||||
void TwlMain(void)
|
||||
{
|
||||
myInit();
|
||||
|
||||
ExecTmpAppInit();
|
||||
// メインループ----------------------------
|
||||
while(1){
|
||||
|
||||
myPreMain();
|
||||
|
||||
ExecTmpAppMain();
|
||||
|
||||
myProMain();
|
||||
|
||||
OS_WaitIrq(1, OS_IE_V_BLANK); // Vブランク割り込み待ち
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// 割り込み処理
|
||||
// ============================================================================
|
||||
|
||||
// Vブランク割り込み
|
||||
static void INTR_VBlank(void)
|
||||
{
|
||||
OS_SetIrqCheckFlag(OS_IE_V_BLANK); // Vブランク割込チェックのセット
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user