mirror of
https://github.com/rvtr/twl_wrapsdk.git
synced 2025-06-18 14:25:43 -04:00
add ioreg build.
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/twl_wrapsdk/trunk@3 4ee2a332-4b2b-5046-8439-1ba90f034370
This commit is contained in:
parent
2d28bb33c9
commit
26b07d9d71
@ -21,6 +21,7 @@ include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = \
|
||||
buildsetup \
|
||||
libraries \
|
||||
tests \
|
||||
|
||||
|
32
build/buildsetup/Makefile
Normal file
32
build/buildsetup/Makefile
Normal file
@ -0,0 +1,32 @@
|
||||
#! make -f
|
||||
#-----------TwlSDK - buildsetup - create register map
|
||||
# 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:$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
ifdef TWL_PRIVATE
|
||||
SUBDIRS += versions
|
||||
endif
|
||||
|
||||
SUBDIRS += ioreg ioreg_sp # fx
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
|
||||
#----- End of Makefile -----
|
65
build/buildsetup/ioreg/Makefile
Normal file
65
build/buildsetup/ioreg/Makefile
Normal file
@ -0,0 +1,65 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - buildsetup - create register map
|
||||
# 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:$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
WORKDIR = nitro/hw/ARM9
|
||||
TARGET = $(WORKDIR)/ioreg.h
|
||||
|
||||
CSVSRC = io_register_list.csv
|
||||
SCRIPT = header_generator_ioreg.pl
|
||||
|
||||
NEWDIRS = $(WORKDIR)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PREFIX = $(subst .h,,$(TARGET))
|
||||
TARGET_SUBFILES = $(TARGET_PREFIX)_*.h
|
||||
TARGET_TMPCSV = $(TARGET_PREFIX).csv
|
||||
|
||||
# build
|
||||
TARGETS = $(TARGET) $(TARGET_SUBFILES)
|
||||
|
||||
# install
|
||||
INSTALL_TARGETS = $(TARGETS)
|
||||
INSTALL_DIR = $(TWL_INSTALL_INCDIR)/$(WORKDIR)
|
||||
override DO_INSTALL = $(DO_INSTALL_WILDCARD)
|
||||
|
||||
# clean/clobber
|
||||
LDIRT_CLEAN = $(TARGET_TMPCSV) $(TARGETS) \
|
||||
$(firstword $(subst /, ,$(WORKDIR)))
|
||||
LDIRT_CLOBBER =
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
do-build: $(TARGET)
|
||||
|
||||
$(TARGET): $(CSVSRC) $(SCRIPT)
|
||||
$(CP) $(CSVSRC) $(TARGET_TMPCSV)
|
||||
$(PERL) $(SCRIPT) $(TARGET_TMPCSV)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
|
||||
#----- End of Makefile -----
|
678
build/buildsetup/ioreg/header_generator_ioreg.pl
Normal file
678
build/buildsetup/ioreg/header_generator_ioreg.pl
Normal file
@ -0,0 +1,678 @@
|
||||
#!/usr/bin/perl -s
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Project: TwlSDK - header generator -
|
||||
# File: header_generator_ioreg.pl
|
||||
#
|
||||
# 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: $
|
||||
##############################################################################
|
||||
|
||||
#
|
||||
# ヘッダファイルのマクロ生成スクリプト
|
||||
#
|
||||
# 使用法:
|
||||
# conv.pl [-v] [-dup] filename1.csv [filename2.csv ...]
|
||||
#
|
||||
# CSVファイルからマクロの定義が書かれているヘッダファイル
|
||||
# filename1.h (filename2.h...)を出力します。
|
||||
#
|
||||
# CSVファイルのフォーマットについては(SDKRoot)/docs/private/how-to-make-headers.txt
|
||||
# をご覧下さい。
|
||||
#
|
||||
|
||||
use Text::ParseWords;
|
||||
|
||||
#
|
||||
# グローバル変数
|
||||
#
|
||||
$line_no = 0;
|
||||
%name_hash = ();
|
||||
@hash_array = ();
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# verbose出力
|
||||
#
|
||||
sub verbose {
|
||||
if ($verbose_mode == 1) {
|
||||
print STDERR @_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# フィールドの最初と最後の空白を取り除く
|
||||
#
|
||||
sub trim {
|
||||
my @out = @_;
|
||||
for (@out) {
|
||||
s/^\s+//;
|
||||
s/\s+$//;
|
||||
}
|
||||
return @out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# CSV解析ルーチン
|
||||
#
|
||||
sub parse_csv {
|
||||
my @fields = quotewords(",", 0, shift @_);
|
||||
@fields = trim(@fields);
|
||||
|
||||
my $tmp;
|
||||
# 行末の,,,,を取り除く
|
||||
while(defined($tmp = pop @fields) && $tmp =~ /^$/ ) {
|
||||
;
|
||||
}
|
||||
push @fields, $tmp;
|
||||
|
||||
return @fields;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# プリプロセッサ
|
||||
#
|
||||
sub preprocess {
|
||||
return parse_csv(shift @_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# マクロ名の重複チェック
|
||||
#
|
||||
|
||||
sub check_macro_duplicate {
|
||||
my $name = shift @_;
|
||||
my $condition = shift @_;
|
||||
my $no = shift @_;
|
||||
|
||||
if ($condition ne "") {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (exists $name_hash{$name}) {
|
||||
if ($duplicate_ok == 1) {
|
||||
print STDERR "WARNING: generating duplicate macro \'$name\' in line $no\n";
|
||||
} else {
|
||||
die "ERROR: duplicate macro \'$name\' in line $no";
|
||||
}
|
||||
return 1;
|
||||
} else {
|
||||
$name_hash{$name} = 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#
|
||||
# 解析
|
||||
#
|
||||
sub analyze {
|
||||
my @fields = @_;
|
||||
|
||||
my $fields;
|
||||
my $tmphash;
|
||||
my $address, $condition, $name, $bitwidth, $rw, $category, $volatile;
|
||||
$tmphash = {};
|
||||
|
||||
$address = shift @fields;
|
||||
die "ERROR: Illegal address \'$address\' in line $line_no\n" unless ($address =~ /^0x[0-9A-Fa-f]+$/);
|
||||
|
||||
$condition = shift @fields;
|
||||
die "ERROR: Illegal condition name \'$condition\' in line $line_no\n" unless ($address =~ /^[A-Za-z0-9_()&|!]+$/);
|
||||
|
||||
$name = shift @fields;
|
||||
die "ERROR: Illegal macro name \'$name\' in line $line_no\n" unless ($name =~ /^[A-Za-z0-9_]+$/);
|
||||
check_macro_duplicate($name, $condition, $line_no);
|
||||
|
||||
|
||||
$bitwidth = shift @fields;
|
||||
if ($bitwidth eq "8") {
|
||||
$mask_format = "0x%02x";
|
||||
} elsif ($bitwidth eq "16") {
|
||||
$mask_format = "0x%04x";
|
||||
} elsif ($bitwidth eq "32") {
|
||||
$mask_format = "0x%08x";
|
||||
} elsif ($bitwidth eq "64") {
|
||||
$mask_format = "0x%016x";
|
||||
} else {
|
||||
die "ERROR: Illegal bitwidth \'$bitwidth\' in line $line_no\n";
|
||||
}
|
||||
|
||||
|
||||
$rw = shift @fields;
|
||||
$category = shift @fields;
|
||||
$volatile = shift @fields;
|
||||
|
||||
$tmphash->{"condition"} = $condition;
|
||||
$tmphash->{"name"} = $name;
|
||||
$tmphash->{"offset"} = $address;
|
||||
$tmphash->{"bitwidth"} = $bitwidth;
|
||||
$tmphash->{"rw"} = $rw;
|
||||
if ($rw eq "r") {
|
||||
$tmphash->{"const"} = "const";
|
||||
} else {
|
||||
$tmphash->{"const"} = "";
|
||||
}
|
||||
|
||||
$tmphash->{"category"} = $category;
|
||||
|
||||
if ($volatile eq "volatile") {
|
||||
$tmphash->{"volatile"} = "v";
|
||||
} elsif ($volatile eq "permanent") {
|
||||
$tmphash->{"volatile"} = "";
|
||||
} else {
|
||||
die "ERROR: specify volatile/permanent in line $line_no\n";
|
||||
}
|
||||
|
||||
@{$tmphash->{"option"}} = splice @fields, 0;
|
||||
|
||||
$tmphash->{"mask_format"} = $mask_format;
|
||||
$tmphash->{"line_no"} = $line_no;
|
||||
return $tmphash;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# 配列へ要素を追加
|
||||
# 重複があれば線形リストとしてつなげる
|
||||
#
|
||||
sub push_fields {
|
||||
my $hash = shift @_;
|
||||
my $array_num;
|
||||
my $tmp_hash;
|
||||
|
||||
# 既に同じ名前のものが登録されている場合はハッシュテーブルへ線形リストとして追加
|
||||
if ( exists($index_name_hash{ $hash->{"name"} }) ) {
|
||||
$array_num = $index_name_hash{ $hash->{"name"} }; # 対応する配列のインデックスを取得
|
||||
# (condition eq "")のものが線形リストの最後になるよう追加
|
||||
$tmp_hash = $hash_array[ $array_num ];
|
||||
if ( $tmp_hash->{"condition"} eq "") {
|
||||
$hash->{"next"} = $tmp_hash;
|
||||
$hash_array[ $array_num] = $hash;
|
||||
return;
|
||||
}
|
||||
|
||||
while ( exists($tmp_hash->{"next"}) ) {
|
||||
if ($tmp_hash->{"next"}->{"condition"} eq "") {
|
||||
$hash->{"next"} = $tmp_hash->{"next"};
|
||||
$tmp_hash->{"next"} = $hash;
|
||||
return;
|
||||
}
|
||||
$tmp_hash = $tmp_hash->{"next"};
|
||||
}
|
||||
$tmp_hash->{"next"} = $hash;
|
||||
} else {
|
||||
$array_num = @hash_array;
|
||||
$index_name_hash{ $hash->{"name"} } = $array_num;
|
||||
push @hash_array, $hash;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# カテゴリ情報収集
|
||||
#
|
||||
sub collect_category {
|
||||
my %cat_hash;
|
||||
my $hash;
|
||||
foreach $hash (@hash_array) {
|
||||
$cat_hash{$hash->{"category"}} = 1;
|
||||
}
|
||||
return (keys %cat_hash);
|
||||
}
|
||||
|
||||
#
|
||||
# 条件のマージ
|
||||
#
|
||||
sub merge_condition {
|
||||
my $cond1 = shift @_;
|
||||
my $cond2 = shift @_;
|
||||
my $name = shift @_;
|
||||
|
||||
my $merged_cond;
|
||||
|
||||
if ( $cond1 eq "" || $cond2 eq "") {
|
||||
$merged_cond = "";
|
||||
return $merged_cond;
|
||||
}
|
||||
|
||||
if ( "$cond1" eq "!$cond2" || "!$cond1" eq "$cond2" ) {
|
||||
$merge_cond = "";
|
||||
} else {
|
||||
$merged_cond = "$cond1 || $cond2";
|
||||
}
|
||||
|
||||
return $merged_cond;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# レジスタのオフセット定義取得
|
||||
#
|
||||
sub cull_register_offset_def {
|
||||
my $hash = shift @_;
|
||||
|
||||
my $offset_name;
|
||||
my @tmp_hash;
|
||||
my @def_array = ();
|
||||
my $i, $k;
|
||||
|
||||
$i = 0;
|
||||
while ( 1 ) {
|
||||
|
||||
{
|
||||
$offset_name = "REG_$hash->{'name'}_OFFSET";
|
||||
$hash->{"offset_def"} = $offset_name;
|
||||
$hash->{"address_def"} = "REG_$hash->{'name'}_ADDR";
|
||||
# この変数の定義は後で使用するので残しておく
|
||||
$hash->{"valname_def"} = "REG_$hash->{'category'}_$hash->{'name'}";
|
||||
$hash->{"valname_def_new"} = "reg_$hash->{'category'}_$hash->{'name'}";
|
||||
}
|
||||
|
||||
$tmp_hash[$i]->{"condition"} = $hash->{"condition"};
|
||||
$tmp_hash[$i]->{"name"} = $hash->{"name"};
|
||||
$tmp_hash[$i]->{"offset_def"} = $hash->{"offset_def"};
|
||||
$tmp_hash[$i]->{"offset"} = $hash->{"offset"};
|
||||
$tmp_hash[$i]->{"address_def"} = $hash->{"address_def"};
|
||||
$tmp_hash[$i]->{"valname_def"} = $hash->{"valname_def"};
|
||||
$tmp_hash[$i]->{"valname_def_new"} = $hash->{"valname_def_new"};
|
||||
|
||||
my $val = "(*($hash->{'const'} REGType$hash->{'bitwidth'}$hash->{'volatile'} *) $hash->{'address_def'})";
|
||||
|
||||
$tmp_hash[$i]->{"reg_type"} = $val;
|
||||
|
||||
my $find_flg = 0;
|
||||
|
||||
#reg_typeとoffsetが同じならconditionをマージ
|
||||
foreach $k (@def_array) {
|
||||
if ( $k->{'condition'} eq "" ) {
|
||||
# 条件無しのフィールドは最後に来るはずで、先に既に存在する場合は条件設定がおかしい
|
||||
print STDERR "WARNING: illegal condition in \'$k->{'name'}\'\n";
|
||||
}
|
||||
|
||||
if ( ($k->{"reg_type"} eq $tmp_hash[$i]->{"reg_type"}) && ($k->{"offset"} eq $tmp_hash[$i]->{"offset"}) )
|
||||
{
|
||||
$k->{'condition'} = merge_condition( $k->{'condition'}, $tmp_hash[$i]->{'condition'}, $k->{'name'} );
|
||||
$find_flg = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if ($find_flg == 0) {
|
||||
push @def_array, $tmp_hash[$i];
|
||||
$i++;
|
||||
}
|
||||
|
||||
# リストにまだ残っているなら次を処理
|
||||
if (exists($hash->{"next"})) {
|
||||
$hash = $hash->{"next"};
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
return @def_array;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# アウトプット
|
||||
#
|
||||
sub output {
|
||||
my $output_filename = shift @_;
|
||||
my $category = shift @_;
|
||||
|
||||
# 出力ファイルのオープン
|
||||
|
||||
open OUT, ">$output_filename" or die "ERROR: Cannot create file \'$output_filename\'\n";
|
||||
my $handle = OUT;
|
||||
# my $handle = STDOUT;
|
||||
|
||||
my $include_guard = $output_filename;
|
||||
$include_guard =~ s/[.\/]/_/g;
|
||||
$include_guard = uc($include_guard). "_";
|
||||
|
||||
#
|
||||
# 出力
|
||||
#
|
||||
print $handle <<ENDDOC;
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: NitroSDK - IO Register List -
|
||||
File: $output_filename
|
||||
|
||||
Copyright 2003-2004 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
*---------------------------------------------------------------------------*/
|
||||
//
|
||||
// I was generated automatically, don't edit me directly!!!
|
||||
//
|
||||
#ifndef $include_guard
|
||||
#define $include_guard
|
||||
|
||||
#ifndef SDK_ASM
|
||||
#include <nitro/types.h>
|
||||
#include <nitro/hw/ARM9/mmap_global.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Definition of Register offsets, addresses and variables.
|
||||
*/
|
||||
|
||||
|
||||
ENDDOC
|
||||
my $hash, $tmp_hash;
|
||||
|
||||
foreach $hash (@hash_array) {
|
||||
next if ($hash->{"category"} ne $category);
|
||||
|
||||
print $handle "/* $hash->{'name'} */\n\n";
|
||||
|
||||
my @reg_array = cull_register_offset_def($hash); # 重複した項目を最適化
|
||||
my $nest_state = 0;
|
||||
|
||||
foreach $tmp_hash (@reg_array)
|
||||
{
|
||||
if ($tmp_hash->{"condition"} ne "") {
|
||||
if ($nest_state == 0) {
|
||||
$nest_state = 1;
|
||||
printf $handle "#if %s\n\n", $tmp_hash->{'condition'};
|
||||
} elsif ($nest_state == 1) {
|
||||
printf $handle "\n#elif %s\n\n", $tmp_hash->{'condition'};
|
||||
}
|
||||
} elsif ($nest_state == 1) {
|
||||
printf $handle "\n#else\n\n";
|
||||
}
|
||||
|
||||
printf $handle "#define %-50s %s\n", $tmp_hash->{'offset_def'}, $tmp_hash->{'offset'};
|
||||
printf $handle "#define %-50s %s\n", $tmp_hash->{"address_def"}, "(HW_REG_BASE + $tmp_hash->{'offset_def'})";
|
||||
printf $handle "#define %-50s %s\n", $tmp_hash->{"valname_def_new"}, $tmp_hash->{"reg_type"};
|
||||
|
||||
if ($nest_state == 1) {
|
||||
printf $handle "// endif %s\n", $tmp_hash->{"condition"}
|
||||
}
|
||||
}
|
||||
|
||||
printf $handle "\n";
|
||||
if ($nest_state == 1) {
|
||||
printf $handle "#endif\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
print $handle <<ENDDOC;
|
||||
|
||||
/*
|
||||
* Definitions of Register fields
|
||||
*/
|
||||
|
||||
ENDDOC
|
||||
my $hash;
|
||||
my $nest_state;
|
||||
|
||||
foreach $hash (@hash_array) {
|
||||
next if ($hash->{"category"} ne $category);
|
||||
|
||||
$nest_state = 0;
|
||||
|
||||
printf $handle "\n";
|
||||
print $handle "/* $hash->{'name'} */\n";
|
||||
|
||||
while ( 1 ) {
|
||||
if ($hash->{"condition"} ne "") {
|
||||
if ($nest_state == 0) {
|
||||
$nest_state = 1;
|
||||
printf $handle "#if %s\n", $hash->{'condition'};
|
||||
} elsif ($nest_state == 1) {
|
||||
printf $handle "#elif %s\n", $hash->{'condition'};
|
||||
}
|
||||
} elsif ($nest_state == 1) {
|
||||
printf $handle "#else\n";
|
||||
}
|
||||
|
||||
my $no = $hash->{"line_no"};
|
||||
|
||||
my @array = @{$hash->{"option"}};
|
||||
|
||||
my $field_macro_func = "#define $hash->{'valname_def'}_FIELD(";
|
||||
my $field_macro_flag = 0;
|
||||
my $field_macro_body = " (u$hash->{'bitwidth'})( \\\n";
|
||||
|
||||
my $fieldname, $fieldshift, $fieldsize;
|
||||
while($fieldname = shift @array) {
|
||||
my $shift_macro;
|
||||
|
||||
die "ERROR: Field option not good in line $no\n" if (!defined($fieldshift = shift @array));
|
||||
die "ERROR: Field option not good in line $no\n" if (!defined($fieldsize = shift @array));
|
||||
|
||||
print $handle "\n";
|
||||
|
||||
# REG_XXX_XXXXX_SHIFTの出力
|
||||
{
|
||||
my $name = "$hash->{'valname_def'}_" . $fieldname . "_SHIFT";
|
||||
check_macro_duplicate($name, $hash->{'condition'}, $no);
|
||||
$shift_macro = $name;
|
||||
printf $handle "#define %-50s %s\n", $name, $fieldshift;
|
||||
}
|
||||
|
||||
# REG_XXX_XXXXX_SIZEの出力
|
||||
{
|
||||
my $name = "$hash->{'valname_def'}_" . $fieldname . "_SIZE";
|
||||
check_macro_duplicate($name, $hash->{'condition'}, $no);
|
||||
printf $handle "#define %-50s %s\n", $name, $fieldsize;
|
||||
}
|
||||
|
||||
# REG_XXX_XXXXX_MASKの出力
|
||||
{
|
||||
my $width = $hash->{"bitwidth"};
|
||||
my $mask_val = 1 << $fieldshift;
|
||||
my $tmp = $mask_val;
|
||||
my $i;
|
||||
for ($i = 0; $i < $fieldsize - 1; $i++) {
|
||||
$mask_val = $mask_val << 1;
|
||||
$mask_val = $mask_val + $tmp;
|
||||
}
|
||||
my $name = "$hash->{'valname_def'}_" . $fieldname . "_MASK";
|
||||
check_macro_duplicate($name, $hash->{'condition'}, $no);
|
||||
printf $handle "#define %-50s $hash->{'mask_format'}\n", $name, $mask_val;
|
||||
}
|
||||
|
||||
# REG_XXX_XXXXX_FIELDの定義の一行分を作成
|
||||
my $fn = lc($fieldname);
|
||||
if ($field_macro_flag == 1) {
|
||||
$field_macro_func = $field_macro_func . ", " . $fn;
|
||||
$field_macro_body = $field_macro_body . " | \\\n" . " ((u32)($fn) << $shift_macro)";
|
||||
} else {
|
||||
$field_macro_func = $field_macro_func . " " . $fn;
|
||||
$field_macro_body = $field_macro_body . " ((u32)($fn) << $shift_macro)";
|
||||
$field_macro_flag = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ($field_macro_flag == 1) {
|
||||
# REG_XXX_XXXXX_FIELDの出力
|
||||
$field_macro_func .= " ) \\\n";
|
||||
$field_macro_func .= $field_macro_body;
|
||||
print $handle "\n#ifndef SDK_ASM\n";
|
||||
print $handle $field_macro_func, ")\n";
|
||||
print $handle "#endif\n\n"
|
||||
|
||||
}
|
||||
if ($nest_state == 1) {
|
||||
printf $handle "// endif %s\n", $hash->{"condition"};
|
||||
if ( !exists($hash->{"next"})) {
|
||||
printf $handle "#endif \n\n";
|
||||
}
|
||||
}
|
||||
|
||||
# リストにまだ残っているなら次を表示
|
||||
if (exists($hash->{'next'})) {
|
||||
$hash = $hash->{'next'};
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print $handle <<ENDDOC;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
/* $include_guard */
|
||||
#endif
|
||||
ENDDOC
|
||||
|
||||
verbose("done.\n");
|
||||
}
|
||||
|
||||
#
|
||||
# コマンドラインオプションの設定
|
||||
#
|
||||
|
||||
|
||||
# -vか-verboseが指定されているとverboseモード
|
||||
if ($v == 1 || $verbose == 1) {
|
||||
$verbose_mode = 1;
|
||||
verbose("verbose mode on\n");
|
||||
} else {
|
||||
$verbose_mode = 0;
|
||||
}
|
||||
|
||||
# -nodupが指定されているとマクロ名の重複を許さない
|
||||
if ($nodup == 1) {
|
||||
$duplicate_ok = 0;
|
||||
} else {
|
||||
$duplicate_ok = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# メインルーチン
|
||||
#
|
||||
foreach $filename (@ARGV) {
|
||||
$line_no = 0;
|
||||
@hash_array = ();
|
||||
|
||||
open INPUTFILE, "$filename" or die "ERROR: Cannot open file \'$filename\'\n";
|
||||
|
||||
my $line;
|
||||
while($line = <INPUTFILE>) {
|
||||
$line_no++;
|
||||
$line =~ s/\"//g;
|
||||
$line =~ s/\#.*//;
|
||||
next if ($line =~ /^[\s,]*$/);
|
||||
|
||||
@fields = preprocess($line);
|
||||
push @hash_array, analyze(@fields);
|
||||
}
|
||||
verbose("$line_no lines read\n");
|
||||
|
||||
my @categories = collect_category();
|
||||
my $category;
|
||||
my @headerfile_array = ();
|
||||
|
||||
|
||||
foreach $category (@categories) {
|
||||
my $output_filename = $filename;
|
||||
if (($output_filename =~ s/\.csv/\.h/) == 0) {
|
||||
$output_filename .= ".h";
|
||||
}
|
||||
$output_filename =~ s/\.h/_$category.h/;
|
||||
|
||||
push @headerfile_array, $output_filename;
|
||||
|
||||
verbose("Output filename is $output_filename\n");
|
||||
output($output_filename, $category);
|
||||
}
|
||||
|
||||
my $master_filename = $filename;
|
||||
if (($master_filename =~ s/\.csv/\.h/) == 0) {
|
||||
$master_filename .= ".h";
|
||||
}
|
||||
|
||||
open MASTER, ">$master_filename" or die "ERROR: Cannot create file \'$master_filename$'\n";
|
||||
|
||||
my $include_guard = $master_filename;
|
||||
$include_guard =~ s/[.\/]/_/g;
|
||||
$include_guard = uc($include_guard). "_";
|
||||
|
||||
print MASTER <<ENDDOC;
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - IO Register List -
|
||||
File: $master_filename
|
||||
|
||||
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.
|
||||
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef $include_guard
|
||||
#define $include_guard
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
ENDDOC
|
||||
|
||||
foreach $header_file (@headerfile_array) {
|
||||
print MASTER "#include <$header_file>\n"
|
||||
}
|
||||
|
||||
print MASTER <<ENDDOC;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
/* $include_guard */
|
||||
#endif
|
||||
ENDDOC
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
386
build/buildsetup/ioreg/io_register_list.csv
Normal file
386
build/buildsetup/ioreg/io_register_list.csv
Normal file
@ -0,0 +1,386 @@
|
||||
#offset,condition,name,bit,rw,category,volatile/permanent,fieldname,shift,bit,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
# 表示コントロールレジスタ p40 p59 p92 …,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x000,,DISPCNT,32,rw,GX,volatile,O,31,1,BG,30,1,BGSCREENOFFSET,27,3,BGCHAROFFSET,24,3,OH,23,1,EXOBJ,20,3,VRAM,18,2,MODE,16,2,OW,15,1,W1,14,1,W0,13,1,DISPLAY,8,5,BLANK,7,1,OBJMAP,4,3,BG02D3D,3,1,BGMODE,0,3,OBJMAP_CH,4,1,OBJMAP_BM,5,2,EXOBJ_CH,20,2,EXOBJ_BM,22,1
|
||||
#表示ステータス p39,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x004,,DISPSTAT,16,rw,GX,volatile,VCOUNTER,7,9,VQI,5,1,HBI,4,1,VBI,3,1,LYC,2,1,HBLK,1,1,VBLK,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x006,,VCOUNT,16,rw,GX,volatile,VCOUNTER,0,9,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#BGコントロール p55。BG0CNTはp175でも登場,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x008,,BG0CNT,16,rw,G2,volatile,SCREENSIZE,14,2,BGPLTTSLOT,13,1,SCREENBASE,8,5,COLORMODE,7,1,MOSAIC,6,1,CHARBASE,2,4,PRIORITY,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x00a,,BG1CNT,16,rw,G2,volatile,SCREENSIZE,14,2,BGPLTTSLOT,13,1,SCREENBASE,8,5,COLORMODE,7,1,MOSAIC,6,1,CHARBASE,2,4,PRIORITY,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x00c,,BG2CNT,16,rw,G2,volatile,SCREENSIZE,14,2,AREAOVER,13,1,SCREENBASE,8,5,COLORMODE,7,1,MOSAIC,6,1,CHARBASE,2,4,PRIORITY,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x00e,,BG3CNT,16,rw,G2,volatile,SCREENSIZE,14,2,AREAOVER,13,1,SCREENBASE,8,5,COLORMODE,7,1,MOSAIC,6,1,CHARBASE,2,4,PRIORITY,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
# BGデータ参照開始点設定、参照方向設定 p69~。 BG0OFSはp 175 でも登場,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x010,,BG0OFS,32,w,G2,volatile,VOFFSET,16,9,HOFFSET,0,9,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x010,,BG0HOFS,16,w,G2,volatile,OFFSET,0,9,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x012,,BG0VOFS,16,w,G2,volatile,OFFSET,0,9,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x014,,BG1OFS,32,w,G2,volatile,VOFFSET,16,9,HOFFSET,0,9,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x014,,BG1HOFS,16,w,G2,volatile,OFFSET,0,9,,,,,,
|
||||
0x016,,BG1VOFS,16,w,G2,volatile,OFFSET,0,9,,,,,,
|
||||
0x018,,BG2OFS,32,w,G2,volatile,VOFFSET,16,9,HOFFSET,0,9,,,
|
||||
0x018,,BG2HOFS,16,w,G2,volatile,OFFSET,0,9,,,,,,
|
||||
0x01a,,BG2VOFS,16,w,G2,volatile,OFFSET,0,9,,,,,,
|
||||
0x01c,,BG3OFS,32,w,G2,volatile,VOFFSET,16,9,HOFFSET,0,9,,,
|
||||
0x01c,,BG3HOFS,16,w,G2,volatile,OFFSET,0,9,,,,,,
|
||||
0x01e,,BG3VOFS,16,w,G2,volatile,OFFSET,0,9,,,,,,
|
||||
0x020,,BG2PA,16,w,G2,volatile,S,15,1,INTEGER_DX,8,7,DECIMAL_DX,0,8
|
||||
0x022,,BG2PB,16,w,G2,volatile,S,15,1,INTEGER_DMX,8,7,DECIMAL_DMX,0,8
|
||||
0x024,,BG2PC,16,w,G2,volatile,S,15,1,INTEGER_DY,8,7,DECIMAL_DY,0,8
|
||||
0x026,,BG2PD,16,w,G2,volatile,S,15,1,INTEGER_DMY,8,7,DECIMAL_DMY,0,8
|
||||
0x028,,BG2X,32,w,G2,volatile,S,27,1,INTEGER_SX,8,19,DECIMAL_SX,0,8
|
||||
0x02c,,BG2Y,32,w,G2,volatile,S,27,1,INTEGER_SY,8,19,DECIMAL_SY,0,8
|
||||
0x030,,BG3PA,16,w,G2,volatile,S,15,1,INTEGER_DX,8,7,DECIMAL_DX,0,8
|
||||
0x032,,BG3PB,16,w,G2,volatile,S,15,1,INTEGER_DMX,8,7,DECIMAL_DMX,0,8
|
||||
0x034,,BG3PC,16,w,G2,volatile,S,15,1,INTEGER_DY,8,7,DECIMAL_DY,0,8,,,
|
||||
0x036,,BG3PD,16,w,G2,volatile,S,15,1,INTEGER_DMY,8,7,DECIMAL_DMY,0,8,,,
|
||||
0x038,,BG3X,32,w,G2,volatile,S,27,1,INTEGER_SX,8,19,DECIMAL_SX,0,8,,,
|
||||
0x03c,,BG3Y,32,w,G2,volatile,S,27,1,INTEGER_SY,8,19,DECIMAL_SY,0,8,,,
|
||||
#ウィンドウ p95、p176,,,,,,,,,,,,,,,,,,
|
||||
0x040,,WIN0H,16,w,G2,volatile,LEFTX,8,8,RIGHTX,0,8,,,,,,
|
||||
0x042,,WIN1H,16,w,G2,volatile,LEFTX,8,8,RIGHTX,0,8,,,,,,
|
||||
0x044,,WIN0V,16,w,G2,volatile,UPY,8,8,DOWNY,0,8,,,,,,
|
||||
0x046,,WIN1V,16,w,G2,volatile,UPY,8,8,DOWNY,0,8,,,,,,
|
||||
0x048,,WININ,16,rw,G2,volatile,WIN1IN,8,6,WIN0IN,0,6,,,,,,
|
||||
0x04a,,WINOUT,16,rw,G2,volatile,OBJWININ,8,6,WINOUT,0,6,,,,,,
|
||||
#モザイク p99,,,,,,,,,,,,,,,,,,
|
||||
0x04c,,MOSAIC,16,w,G2,volatile,OBJVSIZE,12,4,OBJHSIZE,8,4,BGVSIZE,4,4,BGHSIZE,0,4
|
||||
#カラー特殊効果 p97、 p177~p178,,,,,,,,,,,,,,,,,,
|
||||
0x050,,BLDCNT,16,rw,G2,volatile,PLANE2,8,6,EFFECT,6,2,PLANE1,0,6,,,
|
||||
0x052,,BLDALPHA,16,rw,G2,volatile,EVB,8,5,EVA,0,5,,,,,,
|
||||
0x054,,BLDY,16,rw,G2,volatile,EVY,0,5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#3D表示制御 p103,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x060,,DISP3DCNT,16,rw,G3X,volatile,PRI,14,1,GO,13,1,RO,12,1,FOG_SHIFT,8,4,FME,7,1,FMOD,6,1,EME,5,1,AAE,4,1,ABE,3,1,ATE,2,1,THS,1,1,TME,0,1
|
||||
#表示キャプチャ p48,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x064,,DISPCAPCNT,32,rw,GX,volatile,E,31,1,MOD,29,2,COFS,26,2,SRCB,25,1,SRCA,24,1,WSIZE,20,2,WOFS,18,2,DEST,16,2,EVB,8,5,EVA,0,5,,,,,,
|
||||
#メインメモリ表示モード p47 ↓アドレス重複してます、,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x068,,DISP_MMEM_FIFO,32,rw,GX,volatile,EVEN,0,16,ODD,16,16,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x068,,DISP_MMEM_FIFO_L,16,rw,GX,volatile,RED,0,5,GREEN,5,5,BLUE,10,5,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x06a,,DISP_MMEM_FIFO_H,16,rw,GX,volatile,RED,0,5,GREEN,5,5,BLUE,10,5,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#マスター輝度 p50,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x06c,,MASTER_BRIGHT,16,rw,GX,volatile,E_MOD,14,2,E_VALUE,0,5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#ビデオ出力 p51,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x070,,TVOUTCNT,16,w,GX,volatile,COMMAND3,8,4,COMMAND2,4,4,COMMAND,0,4,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#DMA p179,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0b0,,DMA0SAD,32,rw,MI,volatile,DMASRC,0,28,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0b4,,DMA0DAD,32,rw,MI,volatile,DMADEST,0,28,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0b8,,DMA0CNT,32,rw,MI,volatile,E,31,1,I,30,1,MODE,27,3,SB,26,1,CM,25,1,SAR,23,2,DAR,21,2,WORDCNT,0,21
|
||||
0x0bc,,DMA1SAD,32,rw,MI,volatile,DMASRC,0,28,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0c0,,DMA1DAD,32,rw,MI,volatile,DMADEST,0,28,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0c4,,DMA1CNT,32,rw,MI,volatile,E,31,1,I,30,1,MODE,27,3,SB,26,1,CM,25,1,SAR,23,2,DAR,21,2,WORDCNT,0,21
|
||||
0x0c8,,DMA2SAD,32,rw,MI,volatile,DMASRC,0,28,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0cc,,DMA2DAD,32,rw,MI,volatile,DMADEST,0,28,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0d0,,DMA2CNT,32,rw,MI,volatile,E,31,1,I,30,1,MODE,27,3,SB,26,1,CM,25,1,SAR,23,2,DAR,21,2,WORDCNT,0,21
|
||||
0x0d4,,DMA3SAD,32,rw,MI,volatile,DMASRC,0,28,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0d8,,DMA3DAD,32,rw,MI,volatile,DMADEST,0,28,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0dc,,DMA3CNT,32,rw,MI,volatile,E,31,1,I,30,1,MODE,27,3,SB,26,1,CM,25,1,SAR,23,2,DAR,21,2,WORDCNT,0,21
|
||||
0x0e0,,DMA0_CLR_DATA,32,rw,MI,volatile,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0e4,,DMA1_CLR_DATA,32,rw,MI,volatile,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0e8,,DMA2_CLR_DATA,32,rw,MI,volatile,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0ec,,DMA3_CLR_DATA,32,rw,MI,volatile,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#タイマ p181,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x100,,TM0CNT_L,16,rw,OS,volatile,TIMER0CNT,0,16,,,,,,,,,,,,,,,,,,,,,
|
||||
0x102,,TM0CNT_H,16,rw,OS,volatile,E,7,1,I,6,1,PS,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x104,,TM1CNT_L,16,rw,OS,volatile,TIMER1CNT,0,16,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x106,,TM1CNT_H,16,rw,OS,volatile,E,7,1,I,6,1,CH,2,1,PS,0,2,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x108,,TM2CNT_L,16,rw,OS,volatile,TIMER2CNT,0,16,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x10a,,TM2CNT_H,16,rw,OS,volatile,E,7,1,I,6,1,CH,2,1,PS,0,2,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x10c,,TM3CNT_L,16,rw,OS,volatile,TIMER2CNT,0,16,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x10e,,TM3CNT_H,16,rw,OS,volatile,E,7,1,I,6,1,CH,2,1,PS,0,2,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#SIO p14-1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x120,,SIODATA32,32,rw,EXI,volatile,H,16,16,L,0,16,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x128,,SIOCNT,16,rw,EXI,volatile,TSEND,3,1,TRECV,2,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x12c,,SIOSEL,16,rw,EXI,volatile,SEL,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#キー p182,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x130,,KEYINPUT,16,r,PAD,volatile,L,9,1,R,8,1,DOWN,7,1,UP,6,1,LEFT,5,1,RIGHT,4,1,START,3,1,SEL,2,1,B,1,1,A,0,1,,,,,,
|
||||
0x132,,KEYCNT,16,rw,PAD,volatile,LOGIC,15,1,INTR,14,1,L,9,1,R,8,1,DOWN,7,1,UP,6,1,LEFT,5,1,RIGHT,4,1,START,3,1,SEL,2,1,B,1,1,A,0,1
|
||||
#ARM7とのインタフェース p187,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x180,,SUBPINTF,16,rw,PXI,volatile,I,14,1,IREQ,13,1,A9STATUS,8,4,A7STATUS,0,4,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x184,,SUBP_FIFO_CNT,16,rw,PXI,volatile,E,15,1,ERR,14,1,RECV_RI,10,1,RECV_FULL,9,1,RECV_EMP,8,1,SEND_CL,3,1,SEND_TI,2,1,SEND_FULL,1,1,SEND_EMP,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x188,,SEND_FIFO,32,rw,PXI,volatile,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x100000,,RECV_FIFO,32,rw,PXI,volatile,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#メモリカード,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1a0,,MCCNT0,16,rw,MI,volatile,E,15,1,I,14,1,SEL,13,1,BUSY,7,1,MODE,6,1,BAUDRATE,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1a2,,MCD0,16,rw,MI,volatile,DATA,0,8,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x100010,,MCD1,32,rw,MI,volatile,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1a4,,MCCNT1,32,rw,MI,volatile,START,31,1,WR,30,1,CT,27,1,PC,24,3,RDY,23,1,L2,16,6,L1,0,13,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1a8,,MCCMD0,32,w,MI,volatile,CMD3,24,8,CMD2,16,8,CMD1,8,8,CMD0,0,8,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1ac,,MCCMD1,32,w,MI,volatile,CMD7,24,8,CMD6,16,8,CMD5,8,8,CMD4,0,8,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#外部メモリ p27,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x204,,EXMEMCNT,16,rw,MI,volatile,EP,15,1,IFM,14,1,MP,11,1,CP,7,1,PHI,5,2,ROM2nd,4,1,ROM1st,2,2,RAM,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#割り込み p183,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x208,,IME,16,rw,OS,volatile,IME,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x210,,IE,32,rw,OS,volatile,D2_3,31,1,D2_2,30,1,D2_1,29,1,D2_0,28,1,MI_B,27,1,MC_B,26,1,GF,21,1,MI,20,1,MC,19,1,IFN,18,1,IFE,17,1,A7,16,1,MCB_DET,15,1,MC_DET,14,1,I_D,13,1,K,12,1,D3,11,1,D2,10,1,D1,9,1,D0,8,1,T3,6,1,T2,5,1,T1,4,1,T0,3,1,VE,2,1,HB,1,1,VB,0,1
|
||||
0x214,,IF,32,rw,OS,volatile,D2_3,31,1,D2_2,30,1,D2_1,29,1,D2_0,28,1,MI_B,27,1,MC_B,26,1,GF,21,1,MI,20,1,MC,19,1,IFN,18,1,IFE,17,1,A7,16,1,MCB_DET,15,1,MC_DET,14,1,I_D,13,1,K,12,1,D3,11,1,D2,10,1,D1,9,1,D0,8,1,T3,6,1,T2,5,1,T1,4,1,T0,3,1,VE,2,1,HB,1,1,VB,0,1
|
||||
#RAM バンクコントロールレジスタ p29 (とりあえず分解しましたが…),,,,,,,,,,,,,,,
|
||||
0x240,,VRAMCNT,32,w,GX,volatile,,,,,,,,,
|
||||
0x240,,VRAMCNT_A,8,w,GX,volatile,E,7,1,OFS,3,2,MST,0,2
|
||||
0x241,,VRAMCNT_B,8,w,GX,volatile,E,7,1,OFS,3,2,MST,0,2
|
||||
0x242,,VRAMCNT_C,8,w,GX,volatile,E,7,1,OFS,3,2,MST,0,3
|
||||
0x243,,VRAMCNT_D,8,w,GX,volatile,E,7,1,OFS,3,2,MST,0,3
|
||||
0x244,,WVRAMCNT,32,w,GX,volatile,,,,,,,,,
|
||||
0x244,,VRAMCNT_E,8,w,GX,volatile,E,7,1,MST,0,3,,,
|
||||
0x245,,VRAMCNT_F,8,w,GX,volatile,E,7,1,OFS,3,2,MST,0,3
|
||||
0x246,,VRAMCNT_G,8,w,GX,volatile,E,7,1,OFS,3,2,MST,0,3
|
||||
0x247,,VRAMCNT_WRAM,8,w,GX,volatile,BANK,0,2,,,,,,
|
||||
0x248,,VRAM_HI_CNT,16,w,GX,volatile,,,,,,,,,
|
||||
0x248,,VRAMCNT_H,8,w,GX,volatile,E,7,1,MST,0,2,,,
|
||||
0x249,,VRAMCNT_I,8,w,GX,volatile,E,7,1,MST,0,2,,,
|
||||
#アクセラレータ(ディバイダと平方根演算器) p185,,,,,,,,,,,,,,,
|
||||
0x280,,DIVCNT,16,rw,CP,volatile,BUSY,15,1,DIV0,14,1,MODE,0,2
|
||||
#DIV_xxxの以下4つは、64ビットアクセスのほかに _H と _L を作りました。,,,,,,,,,,,,
|
||||
0x290,,DIV_NUMER,64,rw,CP,volatile,,,,,,
|
||||
0x290,,DIV_NUMER_L,32,rw,CP,volatile,,,,,,
|
||||
0x294,,DIV_NUMER_H,32,rw,CP,volatile,,,,,,
|
||||
0x298,,DIV_DENOM,64,rw,CP,volatile,,,,,,
|
||||
0x298,,DIV_DENOM_L,32,rw,CP,volatile,,,,,,
|
||||
0x29c,,DIV_DENOM_H,32,rw,CP,volatile,,,,,,
|
||||
0x2a0,,DIV_RESULT,64,rw,CP,volatile,,,,,,
|
||||
0x2a0,,DIV_RESULT_L,32,rw,CP,volatile,,,,,,
|
||||
0x2a4,,DIV_RESULT_H,32,rw,CP,volatile,,,,,,
|
||||
0x2a8,,DIVREM_RESULT,64,rw,CP,volatile,,,,,,
|
||||
0x2a8,,DIVREM_RESULT_L,32,rw,CP,volatile,,,,,,
|
||||
0x2ac,,DIVREM_RESULT_H,32,rw,CP,volatile,,,,,,
|
||||
0x2b0,,SQRTCNT,16,rw,CP,volatile,BUSY,15,1,MODE,0,1
|
||||
0x2b4,,SQRT_RESULT,32,rw,CP,volatile,,,,,,
|
||||
#以下のSQRT_PARAM は、64ビットアクセスのほかに _H と _L を作りました。,,,,,,,,,,,,
|
||||
0x2b8,,SQRT_PARAM,64,rw,CP,volatile,,,,,,,,,,,,,,,,,,,,,
|
||||
0x2b8,,SQRT_PARAM_L,32,rw,CP,volatile,,,,,,,,,,,,,,,,,,,,,
|
||||
0x2bc,,SQRT_PARAM_H,32,rw,CP,volatile,,,,,,,,,,,,,,,,,,,,,
|
||||
#PAUSE page 19-43,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x300,,PAUSE,16,rw,OS,volatile,MOD,14,2,CHK,0,1,,,,,,,,,,,,,,,
|
||||
#パワーコントロール p35,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x304,,POWCNT,16,rw,GX,volatile,GE,3,1,RE,2,1,E2DG,1,1,LCD,0,1,LCDB,8,1,E2DGB,9,1,DSEL,15,1
|
||||
#レンダリング済みライン数カウントレジスタ p174,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x320,,RDLINES_COUNT,16,r,G3X,volatile,RENDERED_LINES_MIN,0,6,,,,,,,,,,,,,,,,,,
|
||||
#エッジカラーレジスタ p170 (このフィールド名称考慮すべき),,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#重複定義ありです。,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x330,,EDGE_COLOR_0,32,w,G3X,volatile,BLUE1,26,5,GREEN1,21,5,RED1,16,5,BLUE0,10,5,GREEN0,5,5,RED0,0,5,,,
|
||||
0x330,,EDGE_COLOR_0_L,16,w,G3X,volatile,BLUE0,10,5,GREEN0,5,5,RED0,0,5,,,,,,,,,,,,
|
||||
0x332,,EDGE_COLOR_0_H,16,w,G3X,volatile,BLUE1,10,5,GREEN1,5,5,RED1,0,5,,,,,,,,,,,,
|
||||
0x334,,EDGE_COLOR_1,32,w,G3X,volatile,BLUE3,26,5,GREEN3,21,5,RED3,16,5,BLUE2,10,5,GREEN2,5,5,RED2,0,5,,,
|
||||
0x334,,EDGE_COLOR_1_L,16,w,G3X,volatile,BLUE2,10,5,GREEN2,5,5,RED2,0,5,,,,,,,,,,,,
|
||||
0x336,,EDGE_COLOR_1_H,16,w,G3X,volatile,BLUE3,10,5,GREEN3,5,5,RED3,0,5,,,,,,,,,
|
||||
0x338,,EDGE_COLOR_2,32,w,G3X,volatile,BLUE5,26,5,GREEN5,21,5,RED5,16,5,BLUE4,10,5,GREEN4,5,5,RED4,0,5
|
||||
0x338,,EDGE_COLOR_2_L,16,w,G3X,volatile,BLUE4,10,5,GREEN4,5,5,RED4,0,5,,,,,,,,,
|
||||
0x33a,,EDGE_COLOR_2_H,16,w,G3X,volatile,BLUE5,10,5,GREEN5,5,5,RED5,0,5,,,,,,,,,
|
||||
0x33c,,EDGE_COLOR_3,32,w,G3X,volatile,BLUE7,26,5,GREEN7,21,5,RED7,16,5,BLUE6,10,5,GREEN6,5,5,RED6,0,5
|
||||
0x33c,,EDGE_COLOR_3_L,16,w,G3X,volatile,BLUE6,10,5,GREEN6,5,5,RED6,0,5,,,,,,,,,
|
||||
0x33e,,EDGE_COLOR_3_H,16,w,G3X,volatile,BLUE7,10,5,GREEN7,5,5,RED7,0,5,,,,,,,,,
|
||||
#アルファテスト p169,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x340,,ALPHA_TEST_REF,16,w,G3X,volatile,ALPHA_REFERENCE,0,5,,,,,,,,,,,,,,,
|
||||
#クリアカラーアトリビュート p153,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x350,,CLEAR_COLOR,32,w,G3X,volatile,POLYGONID,24,6,ALPHA,16,5,F,15,1,BLUE,10,5,GREEN,5,5,RED,0,5
|
||||
#クリアデプス p153,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x354,,CLEAR_DEPTH,16,w,G3X,volatile,CLEARDEPTH,0,15,,,,,,,,,,,,,,,
|
||||
#クリアイメージのオフセット設定レジスタ p155,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x356,,CLRIMAGE_OFFSET,16,w,G3X,volatile,OFFSETY,8,8,OFFSETX,0,8,,,,,,,,,,,,
|
||||
#フォグ p 171,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#重複定義ありです。,,,,,,,,,,,,,,,,,,
|
||||
0x358,,FOG_COLOR,32,w,G3X,volatile,FOG_ALPHA,16,5,FOG_BLUE,10,5,FOG_GREEN,5,5,FOG_RED,0,5
|
||||
0x35c,,FOG_OFFSET,16,w,G3X,volatile,FOG_OFFSET,0,15,,,,,,,,,
|
||||
0x360,,FOG_TABLE_0,32,w,G3X,volatile,DENSITY3,24,7,DENSITY2,16,7,DENSITY1,8,7,DENSITY0,0,7
|
||||
0x360,,FOG_TABLE_0_L,16,w,G3X,volatile,DENSITY1,8,7,DENSITY0,0,7,,,,,,
|
||||
0x362,,FOG_TABLE_0_H,16,w,G3X,volatile,DENSITY3,8,7,DENSITY2,0,7,,,,,,
|
||||
0x364,,FOG_TABLE_1,32,w,G3X,volatile,DENSITY7,24,7,DENSITY6,16,7,DENSITY5,8,7,DENSITY4,0,7
|
||||
0x364,,FOG_TABLE_1_L,16,w,G3X,volatile,DENSITY5,8,7,DENSITY4,0,7,,,,,,
|
||||
0x366,,FOG_TABLE_1_H,16,w,G3X,volatile,DENSITY7,8,7,DENSITY6,0,7,,,,,,
|
||||
0x368,,FOG_TABLE_2,32,w,G3X,volatile,DENSITY11,24,7,DENSITY10,16,7,DENSITY9,8,7,DENSITY8,0,7
|
||||
0x368,,FOG_TABLE_2_L,16,w,G3X,volatile,DENSITY9,8,7,DENSITY8,0,7,,,,,,
|
||||
0x36a,,FOG_TABLE_2_H,16,w,G3X,volatile,DENSITY11,8,7,DENSITY10,0,7,,,,,,
|
||||
0x36c,,FOG_TABLE_3,32,w,G3X,volatile,DENSITY15,24,7,DENSITY14,16,7,DENSITY13,8,7,DENSITY12,0,7
|
||||
0x36c,,FOG_TABLE_3_L,16,w,G3X,volatile,DENSITY13,8,7,DENSITY12,0,7,,,,,,
|
||||
0x36e,,FOG_TABLE_3_H,16,w,G3X,volatile,DENSITY15,8,7,DENSITY14,0,7,,,,,,
|
||||
0x370,,FOG_TABLE_4,32,w,G3X,volatile,DENSITY19,24,7,DENSITY18,16,7,DENSITY17,8,7,DENSITY16,0,7
|
||||
0x370,,FOG_TABLE_4_L,16,w,G3X,volatile,DENSITY17,8,7,DENSITY16,0,7,,,,,,,,,,,,
|
||||
0x372,,FOG_TABLE_4_H,16,w,G3X,volatile,DENSITY19,8,7,DENSITY18,0,7,,,,,,,,,,,,
|
||||
0x374,,FOG_TABLE_5,32,w,G3X,volatile,DENSITY23,24,7,DENSITY22,16,7,DENSITY21,8,7,DENSITY20,0,7,,,,,,
|
||||
0x374,,FOG_TABLE_5_L,16,w,G3X,volatile,DENSITY21,8,7,DENSITY20,0,7,,,,,,,,,,,,
|
||||
0x376,,FOG_TABLE_5_H,16,w,G3X,volatile,DENSITY23,8,7,DENSITY22,0,7,,,,,,,,,,,,
|
||||
0x378,,FOG_TABLE_6,32,w,G3X,volatile,DENSITY27,24,7,DENSITY26,16,7,DENSITY25,8,7,DENSITY24,0,7,,,,,,
|
||||
0x378,,FOG_TABLE_6_L,16,w,G3X,volatile,DENSITY25,8,7,DENSITY24,0,7,,,,,,,,,,,,
|
||||
0x37a,,FOG_TABLE_6_H,16,w,G3X,volatile,DENSITY27,8,7,DENSITY26,0,7,,,,,,,,,,,,
|
||||
0x37c,,FOG_TABLE_7,32,w,G3X,volatile,DENSITY31,24,7,DENSITY30,16,7,DENSITY29,8,7,DENSITY28,0,7,,,,,,
|
||||
0x37c,,FOG_TABLE_7_L,16,w,G3X,volatile,DENSITY29,8,7,DENSITY28,0,7,,,,,,,,,,,,
|
||||
0x37e,,FOG_TABLE_7_H,16,w,G3X,volatile,DENSITY31,8,7,DENSITY30,0,7,,,,,,,,,,,,
|
||||
#トゥーンテーブル p160 (この名称、考慮すべきか),,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#重複定義ありです。,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x380,,TOON_TABLE_0,32,w,G3X,volatile,BLUE1,26,5,GREEN1,21,5,RED1,16,5,BLUE0,10,5,GREEN0,5,5,RED0,0,5
|
||||
0x380,,TOON_TABLE_0_L,16,w,G3X,volatile,BLUE0,10,5,GREEN0,5,5,RED0,0,5,,,,,,,,,
|
||||
0x382,,TOON_TABLE_0_H,16,w,G3X,volatile,BLUE1,10,5,GREEN1,5,5,RED1,0,5,,,,,,,,,
|
||||
0x384,,TOON_TABLE_1,32,w,G3X,volatile,BLUE3,26,5,GREEN3,21,5,RED3,16,5,BLUE2,10,5,GREEN2,5,5,RED2,0,5
|
||||
0x384,,TOON_TABLE_1_L,16,w,G3X,volatile,BLUE2,10,5,GREEN2,5,5,RED2,0,5,,,,,,,,,
|
||||
0x386,,TOON_TABLE_1_H,16,w,G3X,volatile,BLUE3,10,5,GREEN3,5,5,RED3,0,5,,,,,,,,,
|
||||
0x388,,TOON_TABLE_2,32,w,G3X,volatile,BLUE5,26,5,GREEN5,21,5,RED5,16,5,BLUE4,10,5,GREEN4,5,5,RED4,0,5
|
||||
0x388,,TOON_TABLE_2_L,16,w,G3X,volatile,BLUE4,10,5,GREEN4,5,5,RED4,0,5,,,,,,,,,
|
||||
0x38a,,TOON_TABLE_2_H,16,w,G3X,volatile,BLUE5,10,5,GREEN5,5,5,RED5,0,5,,,,,,,,,
|
||||
0x38c,,TOON_TABLE_3,32,w,G3X,volatile,BLUE7,26,5,GREEN7,21,5,RED7,16,5,BLUE6,10,5,GREEN6,5,5,RED6,0,5
|
||||
0x38c,,TOON_TABLE_3_L,16,w,G3X,volatile,BLUE6,10,5,GREEN6,5,5,RED6,0,5,,,,,,,,,
|
||||
0x38e,,TOON_TABLE_3_H,16,w,G3X,volatile,BLUE7,10,5,GREEN7,5,5,RED7,0,5,,,,,,,,,
|
||||
0x390,,TOON_TABLE_4,32,w,G3X,volatile,BLUE9,26,5,GREEN9,21,5,RED9,16,5,BLUE8,10,5,GREEN8,5,5,RED8,0,5
|
||||
0x390,,TOON_TABLE_4_L,16,w,G3X,volatile,BLUE8,10,5,GREEN8,5,5,RED8,0,5,,,,,,,,,
|
||||
0x392,,TOON_TABLE_4_H,16,w,G3X,volatile,BLUE9,10,5,GREEN9,5,5,RED9,0,5,,,,,,,,,
|
||||
0x394,,TOON_TABLE_5,32,w,G3X,volatile,BLUE11,26,5,GREEN11,21,5,RED11,16,5,BLUE10,10,5,GREEN10,5,5,RED10,0,5
|
||||
0x394,,TOON_TABLE_5_L,16,w,G3X,volatile,BLUE10,10,5,GREEN10,5,5,RED10,0,5,,,,,,,,,
|
||||
0x396,,TOON_TABLE_5_H,16,w,G3X,volatile,BLUE11,10,5,GREEN11,5,5,RED11,0,5,,,,,,,,,
|
||||
0x398,,TOON_TABLE_6,32,w,G3X,volatile,BLUE13,26,5,GREEN13,21,5,RED13,16,5,BLUE12,10,5,GREEN12,5,5,RED12,0,5
|
||||
0x398,,TOON_TABLE_6_L,16,w,G3X,volatile,BLUE12,10,5,GREEN12,5,5,RED12,0,5,,,,,,,,,
|
||||
0x39a,,TOON_TABLE_6_H,16,w,G3X,volatile,BLUE13,10,5,GREEN13,5,5,RED13,0,5,,,,,,,,,
|
||||
0x39c,,TOON_TABLE_7,32,w,G3X,volatile,BLUE15,26,5,GREEN15,21,5,RED15,16,5,BLUE14,10,5,GREEN14,5,5,RED14,0,5
|
||||
0x39c,,TOON_TABLE_7_L,16,w,G3X,volatile,BLUE14,10,5,GREEN14,5,5,RED14,0,5,,,,,,,,,
|
||||
0x39e,,TOON_TABLE_7_H,16,w,G3X,volatile,BLUE15,10,5,GREEN15,5,5,RED15,0,5,,,,,,,,,
|
||||
0x3a0,,TOON_TABLE_8,32,w,G3X,volatile,BLUE17,26,5,GREEN17,21,5,RED17,16,5,BLUE16,10,5,GREEN16,5,5,RED16,0,5
|
||||
0x3a0,,TOON_TABLE_8_L,16,w,G3X,volatile,BLUE16,10,5,GREEN16,5,5,RED16,0,5,,,,,,,,,
|
||||
0x3a2,,TOON_TABLE_8_H,16,w,G3X,volatile,BLUE17,10,5,GREEN17,5,5,RED17,0,5,,,,,,,,,
|
||||
0x3a4,,TOON_TABLE_9,32,w,G3X,volatile,BLUE19,26,5,GREEN19,21,5,RED19,16,5,BLUE18,10,5,GREEN18,5,5,RED18,0,5
|
||||
0x3a4,,TOON_TABLE_9_L,16,w,G3X,volatile,BLUE18,10,5,GREEN18,5,5,RED18,0,5,,,,,,,,,
|
||||
0x3a6,,TOON_TABLE_9_H,16,w,G3X,volatile,BLUE19,10,5,GREEN19,5,5,RED19,0,5,,,,,,,,,
|
||||
0x3a8,,TOON_TABLE_10,32,w,G3X,volatile,BLUE21,26,5,GREEN21,21,5,RED21,16,5,BLUE20,10,5,GREEN20,5,5,RED20,0,5
|
||||
0x3a8,,TOON_TABLE_10_L,16,w,G3X,volatile,BLUE20,10,5,GREEN20,5,5,RED20,0,5,,,,,,,,,
|
||||
0x3aa,,TOON_TABLE_10_H,16,w,G3X,volatile,BLUE21,10,5,GREEN21,5,5,RED21,0,5,,,,,,,,,
|
||||
0x3ac,,TOON_TABLE_11,32,w,G3X,volatile,BLUE23,26,5,GREEN23,21,5,RED23,16,5,BLUE22,10,5,GREEN22,5,5,RED22,0,5
|
||||
0x3ac,,TOON_TABLE_11_L,16,w,G3X,volatile,BLUE22,10,5,GREEN22,5,5,RED22,0,5,,,,,,,,,
|
||||
0x3ae,,TOON_TABLE_11_H,16,w,G3X,volatile,BLUE23,10,5,GREEN23,5,5,RED23,0,5,,,,,,,,,
|
||||
0x3b0,,TOON_TABLE_12,32,w,G3X,volatile,BLUE25,26,5,GREEN25,21,5,RED25,16,5,BLUE24,10,5,GREEN24,5,5,RED24,0,5
|
||||
0x3b0,,TOON_TABLE_12_L,16,w,G3X,volatile,BLUE24,10,5,GREEN24,5,5,RED24,0,5,,,,,,,,,
|
||||
0x3b2,,TOON_TABLE_12_H,16,w,G3X,volatile,BLUE25,10,5,GREEN25,5,5,RED25,0,5,,,,,,,,,
|
||||
0x3b4,,TOON_TABLE_13,32,w,G3X,volatile,BLUE27,26,5,GREEN27,21,5,RED27,16,5,BLUE26,10,5,GREEN26,5,5,RED26,0,5
|
||||
0x3b4,,TOON_TABLE_13_L,16,w,G3X,volatile,BLUE26,10,5,GREEN26,5,5,RED26,0,5,,,,,,,,,
|
||||
0x3b6,,TOON_TABLE_13_H,16,w,G3X,volatile,BLUE27,10,5,GREEN27,5,5,RED27,0,5,,,,,,,,,
|
||||
0x3b8,,TOON_TABLE_14,32,w,G3X,volatile,BLUE29,26,5,GREEN29,21,5,RED29,16,5,BLUE28,10,5,GREEN28,5,5,RED28,0,5
|
||||
0x3b8,,TOON_TABLE_14_L,16,w,G3X,volatile,BLUE28,10,5,GREEN28,5,5,RED28,0,5,,,,,,,,,
|
||||
0x3ba,,TOON_TABLE_14_H,16,w,G3X,volatile,BLUE29,10,5,GREEN29,5,5,RED29,0,5,,,,,,,,,
|
||||
0x3bc,,TOON_TABLE_15,32,w,G3X,volatile,BLUE31,26,5,GREEN31,21,5,RED31,16,5,BLUE30,10,5,GREEN30,5,5,RED30,0,5
|
||||
0x3bc,,TOON_TABLE_15_L,16,w,G3X,volatile,BLUE30,10,5,GREEN30,5,5,RED30,0,5,,,,,,,,,
|
||||
0x3be,,TOON_TABLE_15_H,16,w,G3X,volatile,BLUE31,10,5,GREEN31,5,5,RED31,0,5,,,,,,,,,
|
||||
#コマンドFIFOレジスタ p112,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x400,,GXFIFO,32,w,G3X,volatile,,,,,,,,,,,,,,,,,,
|
||||
#マトリクス p117,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x440,,MTX_MODE,32,w,G3,volatile,M,0,2,,,,,,,,,,,,,,,
|
||||
0x444,,MTX_PUSH,32,w,G3,volatile,,,,,,,,,,,,,,,,,,
|
||||
0x448,,MTX_POP,32,w,G3,volatile,S,5,1,INT,0,5,,,,,,,,,,,,
|
||||
0x44c,,MTX_STORE,32,w,G3,volatile,INDEX,0,5,,,,,,,,,,,,,,,
|
||||
0x450,,MTX_RESTORE,32,w,G3,volatile,INDEX,0,5,,,,,,,,,,,,,,,
|
||||
0x454,,MTX_IDENTITY,32,w,G3,volatile,,,,,,,,,,,,,,,,,,
|
||||
0x458,,MTX_LOAD_4x4,32,w,G3,volatile,S,31,1,INTEGER_M44,12,19,DECIMAL_M44,0,12,,,,,,,,,
|
||||
0x45c,,MTX_LOAD_4x3,32,w,G3,volatile,S,31,1,INTEGER_M43,12,19,DECIMAL_M43,0,12,,,,,,,,,
|
||||
0x460,,MTX_MULT_4x4,32,w,G3,volatile,S,31,1,INTEGER_M44,12,19,DECIMAL_M44,0,12,,,,,,,,,
|
||||
0x464,,MTX_MULT_4x3,32,w,G3,volatile,S,31,1,INTEGER_M43,12,19,DECIMAL_M43,0,12,,,,,,,,,
|
||||
0x468,,MTX_MULT_3x3,32,w,G3,volatile,S,31,1,INTEGER_M33,12,19,DECIMAL_M33,0,12,,,,,,,,,
|
||||
0x46c,,MTX_SCALE,32,w,G3,volatile,S,31,1,INTEGER_SCALE,12,19,DECIMAL_SCALE,0,12,,,,,,,,,
|
||||
0x470,,MTX_TRANS,32,w,G3,volatile,S,31,1,INTEGER_TRANSLATE,12,19,DECIMAL_TRANSLATE,0,12,,,,,,,,,
|
||||
#頂点の設定 カラー直接設定と法線ベクトル設定 p134,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x480,,COLOR,32,w,G3,volatile,BLUE,10,5,GREEN,5,5,RED,0,5,,,,,,,,,
|
||||
0x484,,NORMAL,32,w,G3,volatile,SZ,29,1,NZ,20,9,SY,19,1,NY,10,9,SX,9,1,NX,0,9
|
||||
#テクスチャマッピング テクスチャ座標の設定 p137,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x488,,TEXCOORD,32,w,G3,volatile,ST,31,1,INTEGER,20,11,DECIMAL_T,16,4,SS,15,1,INTEGER_S,4,11,DECIMAL_S,0,4,,,,,,,,,,,,,,,
|
||||
#頂点座標の設定 p135,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x48c,,VTX_16,32,w,G3,volatile,SY,31,1,INT_Y,28,3,DECIMAL_Y,16,12,SX,15,1,INT_X,12,3,DECIMAL_X,0,12,,,,,,,,,,,,,,,
|
||||
0x490,,VTX_10,32,w,G3,volatile,SZ,29,1,INT_Z,26,3,DECIMAL_Z,20,6,SY,19,1,INT_Y,16,3,DECIMAL_Y,10,6,SX,9,1,INT_X,6,3,DECIMAL_X,0,6,,,,,,
|
||||
0x494,,VTX_XY,32,w,G3,volatile,SY,31,1,INT_Y,28,3,DECIMAL_Y,16,12,SX,15,1,INT_X,12,3,DECIMAL_X,0,12,,,,,,,,,,,,,,,
|
||||
0x498,,VTX_XZ,32,w,G3,volatile,SZ,31,1,INT_Z,28,3,DECIMAL_Z,16,12,SX,15,1,INT_X,12,3,DECIMAL_X,0,12,,,,,,,,,,,,,,,
|
||||
0x49c,,VTX_YZ,32,w,G3,volatile,SZ,31,1,INT_Z,28,3,DECIMAL_Z,16,12,SY,15,1,INT_Y,12,3,DECIMAL_Y,0,12,,,,,,,,,,,,,,,
|
||||
0x4a0,,VTX_DIFF,32,w,G3,volatile,SZ,29,1,DECIMAL_Z,20,9,SY,19,1,DECIMAL_Y,10,9,SX,9,1,DECIMAL_X,0,9,,,,,,,,,,,,,,,
|
||||
#ポリゴン属性 p130,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x4a4,,POLYGON_ATTR,32,w,G3,volatile,ID,24,6,ALPHA,16,5,FE,15,1,DT,14,1,D1,13,1,FC,12,1,XL,11,1,FR,7,1,BK,6,1,PM,4,2,LE,0,4
|
||||
#テクスチャのパラメータ、パレットアドレス設定 p138 p141,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x4a8,,TEXIMAGE_PARAM,32,w,G3,volatile,TGEN,30,2,TR,29,1,TEXFMT,26,3,T_SIZE,23,3,V_SIZE,20,3,FT,19,1,FS,18,1,RT,17,1,RS,16,1,TEX_ADDR,0,16,,,
|
||||
0x4ac,,TEXPLTT_BASE,32,w,G3,volatile,PLTT_BASE,0,13,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#ライト p124,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x4c0,,DIF_AMB,32,w,G3,volatile,AMBIENT_BLUE,26,5,AMBIENT_GREEN,21,5,AMBIENT_RED,16,5,C,15,1,DIFFUSE_BLUE,10,5,DIFFUSE_GREEN,5,5,DIFFUSE_RED,0,5,,,,,,,,,,,,
|
||||
0x4c4,,SPE_EMI,32,w,G3,volatile,EMISSION_BLUE,26,5,EMISSION_GREEN,21,5,EMISSION_RED,16,5,S,15,1,SPECULAR_BLUE,10,5,SPECULAR_GREEN,5,5,SPECULAR_RED,0,5
|
||||
0x4c8,,LIGHT_VECTOR,32,w,G3,volatile,LNUM,30,2,SZ,29,1,DECIMAL_Z,20,9,SY,19,1,DECIMAL_Y,10,9,SX,9,1,DECIMAL_X,0,9
|
||||
0x4cc,,LIGHT_COLOR,32,w,G3,volatile,LNUM,30,2,BLUE,10,5,GREEN,5,5,RED,0,5,,,,,,,,,
|
||||
0x4d0,,SHININESS,32,w,G3,volatile,SHININESS3,24,8,SHININESS2,16,8,SHININESS1,8,8,SHININESS0,0,8,,,,,,,,,
|
||||
#ポリゴン 頂点リストの開始と終了宣言 p133,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x500,,BEGIN_VTXS,32,w,G3,volatile,TYPE,0,2,,,,,,,,,,,,,,,,,,
|
||||
0x504,,END_VTXS,32,w,G3,volatile,,,,,,,,,,,,,,,,,,,,,
|
||||
#レンダリングエンジン参照データスワップ p115,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x540,,SWAP_BUFFERS,32,w,G3,volatile,DP,1,1,XS,0,1,,,,,,,,,,,,,,,
|
||||
#ビューポート p116,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x580,,VIEWPORT,32,w,G3,volatile,INTEGER_Y2,24,8,INTEGER_X2,16,8,INTEGER_Y1,8,8,INTEGER_X1,0,8,,,,,,,,,
|
||||
#テスト p144,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x5c0,,BOX_TEST,32,w,G3,volatile,SY,31,1,INT_Y,28,3,DECIMAL_Y,16,12,SX,15,1,INT_X,12,3,DECIMAL_X,0,12,,,
|
||||
0x5c4,,POS_TEST,32,w,G3,volatile,SY,31,1,INT_Y,28,3,DECIMAL_Y,16,12,SX,15,1,INT_X,12,3,DECIMAL_X,0,12,,,
|
||||
0x5c8,,VEC_TEST,32,w,G3,volatile,SZ,29,1,DECIMAL_Z,20,9,SY,19,1,DECIMAL_Y,10,9,SX,9,1,DECIMAL_X,0,9,,,
|
||||
#ジオメトリエンジンステータス p146,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x600,,GXSTAT,32,rw,G3X,volatile,FI,30,2,B,27,1,E,26,1,H,25,1,F,24,1,FIFOCNT,16,8,SE,15,1,SB,14,1,PJ,13,1,PV,8,5,TR,1,1,TB,0,1
|
||||
#ポリゴンリストカウントレジスタ p148,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x604,,LISTRAM_COUNT,16,r,G3X,volatile,RAMCNT,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#頂点RAMカウントレジスタ p148,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x606,,VTXRAM_COUNT,16,r,G3X,volatile,VTXCNT,0,13,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#1ドットポリゴン表示境界デプス値レジスタ p132,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x610,,DISP_1DOT_DEPTH,16,w,G3X,volatile,INTEGER_W,3,12,DECIMAL_W,0,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#計算結果取得 p145,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x620,,POS_RESULT_X,32,r,G3X,volatile,SX,31,1,INTEGER_X,12,19,DECIMAL_X,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x624,,POS_RESULT_Y,32,r,G3X,volatile,SY,31,1,INTEGER_Y,12,19,DECIMAL_Y,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x628,,POS_RESULT_Z,32,r,G3X,volatile,SZ,31,1,INTEGER_Z,12,19,DECIMAL_Z,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x62c,,POS_RESULT_W,32,r,G3X,volatile,SW,31,1,INTEGER_W,12,19,DECIMAL_W,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x630,,VEC_RESULT_X,16,r,G3X,volatile,SX,15,1,INTEGER_X,12,3,DECIMAL_X,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x632,,VEC_RESULT_Y,16,r,G3X,volatile,SY,15,1,INTEGER_Y,12,3,DECIMAL_Y,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x634,,VEC_RESULT_Z,16,r,G3X,volatile,SZ,15,1,INTEGER_Z,12,3,DECIMAL_Z,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#カレント行列の読み出し p123,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x640,,CLIPMTX_RESULT_0,32,r,G3X,volatile,S,31,1,INTEGER_m0,12,19,DECIMAL_m0,0,12
|
||||
0x644,,CLIPMTX_RESULT_1,32,r,G3X,volatile,S,31,1,INTEGER_m1,12,19,DECIMAL_m1,0,12
|
||||
0x648,,CLIPMTX_RESULT_2,32,r,G3X,volatile,S,31,1,INTEGER_m2,12,19,DECIMAL_m2,0,12
|
||||
0x64c,,CLIPMTX_RESULT_3,32,r,G3X,volatile,S,31,1,INTEGER_m3,12,19,DECIMAL_m3,0,12
|
||||
0x650,,CLIPMTX_RESULT_4,32,r,G3X,volatile,S,31,1,INTEGER_m4,12,19,DECIMAL_m4,0,12
|
||||
0x654,,CLIPMTX_RESULT_5,32,r,G3X,volatile,S,31,1,INTEGER_m5,12,19,DECIMAL_m5,0,12
|
||||
0x658,,CLIPMTX_RESULT_6,32,r,G3X,volatile,S,31,1,INTEGER_m6,12,19,DECIMAL_m6,0,12
|
||||
0x65c,,CLIPMTX_RESULT_7,32,r,G3X,volatile,S,31,1,INTEGER_m7,12,19,DECIMAL_m7,0,12
|
||||
0x660,,CLIPMTX_RESULT_8,32,r,G3X,volatile,S,31,1,INTEGER_m8,12,19,DECIMAL_m8,0,12
|
||||
0x664,,CLIPMTX_RESULT_9,32,r,G3X,volatile,S,31,1,INTEGER_m9,12,19,DECIMAL_m9,0,12
|
||||
0x668,,CLIPMTX_RESULT_10,32,r,G3X,volatile,S,31,1,INTEGER_m10,12,19,DECIMAL_m10,0,12
|
||||
0x66c,,CLIPMTX_RESULT_11,32,r,G3X,volatile,S,31,1,INTEGER_m11,12,19,DECIMAL_m11,0,12
|
||||
0x670,,CLIPMTX_RESULT_12,32,r,G3X,volatile,S,31,1,INTEGER_m12,12,19,DECIMAL_m12,0,12
|
||||
0x674,,CLIPMTX_RESULT_13,32,r,G3X,volatile,S,31,1,INTEGER_m13,12,19,DECIMAL_m13,0,12
|
||||
0x678,,CLIPMTX_RESULT_14,32,r,G3X,volatile,S,31,1,INTEGER_m14,12,19,DECIMAL_m14,0,12
|
||||
0x67c,,CLIPMTX_RESULT_15,32,r,G3X,volatile,S,31,1,INTEGER_m15,12,19,DECIMAL_m15,0,12
|
||||
0x680,,VECMTX_RESULT_0,32,r,G3X,volatile,S,31,1,INTEGER_m0,12,19,DECIMAL_m0,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x684,,VECMTX_RESULT_1,32,r,G3X,volatile,S,31,1,INTEGER_m1,12,19,DECIMAL_m1,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x688,,VECMTX_RESULT_2,32,r,G3X,volatile,S,31,1,INTEGER_m2,12,19,DECIMAL_m2,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x68c,,VECMTX_RESULT_3,32,r,G3X,volatile,S,31,1,INTEGER_m3,12,19,DECIMAL_m3,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x690,,VECMTX_RESULT_4,32,r,G3X,volatile,S,31,1,INTEGER_m4,12,19,DECIMAL_m4,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x694,,VECMTX_RESULT_5,32,r,G3X,volatile,S,31,1,INTEGER_m5,12,19,DECIMAL_m5,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x698,,VECMTX_RESULT_6,32,r,G3X,volatile,S,31,1,INTEGER_m6,12,19,DECIMAL_m6,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x69c,,VECMTX_RESULT_7,32,r,G3X,volatile,S,31,1,INTEGER_m7,12,19,DECIMAL_m7,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x6a0,,VECMTX_RESULT_8,32,r,G3X,volatile,S,31,1,INTEGER_m8,12,19,DECIMAL_m8,0,12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#2画面目関係レジスタ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1000,,DB_DISPCNT,32,rw,GXS,volatile,O,31,1,BG,30,1,OH,23,1,EXOBJ,20,2,MODE,16,1,OW,15,1,W1,14,1,W0,13,1,DISPLAY,8,5,BLANK,7,1,OBJMAP,4,3,BGMODE,0,3,OBJMAP_CH,4,1,OBJMAP_BM,5,2,EXOBJ_CH,20,2
|
||||
0x106c,,DB_MASTER_BRIGHT,16,rw,GXS,volatile,E_MOD,14,2,E_VALUE,0,5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1008,,DB_BG0CNT,16,rw,G2S,volatile,SCREENSIZE,14,2,BGPLTTSLOT,13,1,SCREENBASE,8,5,COLORMODE,7,1,MOSAIC,6,1,CHARBASE,2,4,PRIORITY,0,2,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x100a,,DB_BG1CNT,16,rw,G2S,volatile,SCREENSIZE,14,2,BGPLTTSLOT,13,1,SCREENBASE,8,5,COLORMODE,7,1,MOSAIC,6,1,CHARBASE,2,4,PRIORITY,0,2,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x100c,,DB_BG2CNT,16,rw,G2S,volatile,SCREENSIZE,14,2,AREAOVER,13,1,SCREENBASE,8,5,COLORMODE,7,1,MOSAIC,6,1,CHARBASE,2,4,PRIORITY,0,2,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x100e,,DB_BG3CNT,16,rw,G2S,volatile,SCREENSIZE,14,2,AREAOVER,13,1,SCREENBASE,8,5,COLORMODE,7,1,MOSAIC,6,1,CHARBASE,2,4,PRIORITY,0,2,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1010,,DB_BG0OFS,32,w,G2S,volatile,VOFFSET,16,9,HOFFSET,0,9,,,
|
||||
0x1010,,DB_BG0HOFS,16,w,G2S,volatile,OFFSET,0,9,,,,,,
|
||||
0x1012,,DB_BG0VOFS,16,w,G2S,volatile,OFFSET,0,9,,,,,,
|
||||
0x1014,,DB_BG1OFS,32,w,G2S,volatile,VOFFSET,16,9,HOFFSET,0,9,,,
|
||||
0x1014,,DB_BG1HOFS,16,w,G2S,volatile,OFFSET,0,9,,,,,,
|
||||
0x1016,,DB_BG1VOFS,16,w,G2S,volatile,OFFSET,0,9,,,,,,
|
||||
0x1018,,DB_BG2OFS,32,w,G2S,volatile,VOFFSET,16,9,HOFFSET,0,9,,,
|
||||
0x1018,,DB_BG2HOFS,16,w,G2S,volatile,OFFSET,0,9,,,,,,
|
||||
0x101a,,DB_BG2VOFS,16,w,G2S,volatile,OFFSET,0,9,,,,,,
|
||||
0x101c,,DB_BG3OFS,32,w,G2S,volatile,VOFFSET,16,9,HOFFSET,0,9,,,
|
||||
0x101c,,DB_BG3HOFS,16,w,G2S,volatile,OFFSET,0,9,,,,,,
|
||||
0x101e,,DB_BG3VOFS,16,w,G2S,volatile,OFFSET,0,9,,,,,,
|
||||
0x1020,,DB_BG2PA,16,w,G2S,volatile,S,15,1,INTEGER_DX,8,7,DECIMAL_DX,0,8
|
||||
0x1022,,DB_BG2PB,16,w,G2S,volatile,S,15,1,INTEGER_DMX,8,7,DECIMAL_DMX,0,8
|
||||
0x1024,,DB_BG2PC,16,w,G2S,volatile,S,15,1,INTEGER_DY,8,7,DECIMAL_DY,0,8
|
||||
0x1026,,DB_BG2PD,16,w,G2S,volatile,S,15,1,INTEGER_DMY,8,7,DECIMAL_DMY,0,8
|
||||
0x1028,,DB_BG2X,32,w,G2S,volatile,S,27,1,INTEGER_SX,8,19,DECIMAL_SX,0,8,,,
|
||||
0x102c,,DB_BG2Y,32,w,G2S,volatile,S,27,1,INTEGER_SY,8,19,DECIMAL_SY,0,8,,,
|
||||
0x1030,,DB_BG3PA,16,w,G2S,volatile,S,15,1,INTEGER_DX,8,7,DECIMAL_DX,0,8,,,
|
||||
0x1032,,DB_BG3PB,16,w,G2S,volatile,S,15,1,INTEGER_DMX,8,7,DECIMAL_DMX,0,8,,,
|
||||
0x1034,,DB_BG3PC,16,w,G2S,volatile,S,15,1,INTEGER_DY,8,7,DECIMAL_DY,0,8,,,
|
||||
0x1036,,DB_BG3PD,16,w,G2S,volatile,S,15,1,INTEGER_DMY,8,7,DECIMAL_DMY,0,8,,,
|
||||
0x1038,,DB_BG3X,32,w,G2S,volatile,S,27,1,INTEGER_SX,8,19,DECIMAL_SX,0,8,,,
|
||||
0x103c,,DB_BG3Y,32,w,G2S,volatile,S,27,1,INTEGER_SY,8,19,DECIMAL_SY,0,8,,,
|
||||
0x1040,,DB_WIN0H,16,w,G2S,volatile,LEFTX,8,8,RIGHTX,0,8,,,,,,
|
||||
0x1042,,DB_WIN1H,16,w,G2S,volatile,LEFTX,8,8,RIGHTX,0,8,,,,,,
|
||||
0x1044,,DB_WIN0V,16,w,G2S,volatile,UPY,8,8,DOWNY,0,8,,,,,,
|
||||
0x1046,,DB_WIN1V,16,w,G2S,volatile,UPY,8,8,DOWNY,0,8,,,,,,
|
||||
0x1048,,DB_WININ,16,rw,G2S,volatile,WIN1IN,8,6,WIN0IN,0,6,,,,,,
|
||||
0x104a,,DB_WINOUT,16,rw,G2S,volatile,OBJWININ,8,6,WINOUT,0,6,,,,,,
|
||||
0x104c,,DB_MOSAIC,16,w,G2S,volatile,OBJVSIZE,12,4,OBJHSIZE,8,4,BGVSIZE,4,4,BGHSIZE,0,4
|
||||
0x1050,,DB_BLDCNT,16,rw,G2S,volatile,PLANE2,8,6,EFFECT,6,2,PLANE1,0,6,,,
|
||||
0x1052,,DB_BLDALPHA,16,rw,G2S,volatile,EVB,8,5,EVA,0,5
|
||||
0x1054,,DB_BLDY,16,rw,G2S,volatile,EVY,0,5,,,
|
Can't render this file because it has a wrong number of fields in line 17.
|
BIN
build/buildsetup/ioreg/io_register_list.xls
Normal file
BIN
build/buildsetup/ioreg/io_register_list.xls
Normal file
Binary file not shown.
63
build/buildsetup/ioreg_sp/Makefile
Normal file
63
build/buildsetup/ioreg_sp/Makefile
Normal file
@ -0,0 +1,63 @@
|
||||
#! make -f
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: TwlSDK - buildsetup - create register map
|
||||
# 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:$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
WORKDIR = nitro/hw/ARM7
|
||||
TARGET = $(WORKDIR)/ioreg.h
|
||||
|
||||
CSVSRC = io_register_list.csv
|
||||
SCRIPT = ./header_generator_ioreg_sp.pl
|
||||
|
||||
NEWDIRS = $(WORKDIR)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
TARGET_PREFIX = $(subst .h,,$(TARGET))
|
||||
TARGET_SUBFILES = $(TARGET_PREFIX)_*.h
|
||||
TARGET_TMPCSV = $(TARGET_PREFIX).csv
|
||||
|
||||
# build
|
||||
TARGETS = $(TARGET) $(TARGET_SUBFILES)
|
||||
|
||||
# install
|
||||
INSTALL_TARGETS = $(TARGETS)
|
||||
INSTALL_DIR = $(TWL_INSTALL_INCDIR)/$(WORKDIR)
|
||||
override DO_INSTALL = $(DO_INSTALL_WILDCARD)
|
||||
|
||||
# clean/clobber
|
||||
LDIRT_CLEAN = $(TARGET_TMPCSV) $(TARGETS) \
|
||||
$(firstword $(subst /, ,$(WORKDIR)))
|
||||
LDIRT_CLOBBER =
|
||||
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/commondefs
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
do-build: $(TARGET)
|
||||
|
||||
|
||||
$(TARGET): $(CSVSRC) $(SCRIPT)
|
||||
$(CP) $(CSVSRC) $(TARGET_TMPCSV)
|
||||
$(PERL) $(SCRIPT) $(TARGET_TMPCSV)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
include $(TWLSDK_ROOT)/build/buildtools/modulerules
|
||||
|
||||
|
||||
#----- End of Makefile -----
|
692
build/buildsetup/ioreg_sp/header_generator_ioreg_sp.pl
Normal file
692
build/buildsetup/ioreg_sp/header_generator_ioreg_sp.pl
Normal file
@ -0,0 +1,692 @@
|
||||
#!/usr/bin/perl -s
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Project: TwlSDK - header generator -
|
||||
# File: header_generator_ioreg.pl
|
||||
#
|
||||
# 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: $
|
||||
##############################################################################
|
||||
|
||||
#
|
||||
# ヘッダファイルのマクロ生成スクリプト
|
||||
#
|
||||
# 使用法:
|
||||
# conv.pl [-v] [-dup] filename1.csv [filename2.csv ...]
|
||||
#
|
||||
# CSVファイルからマクロの定義が書かれているヘッダファイル
|
||||
# filename1.h (filename2.h...)を出力します。
|
||||
#
|
||||
# CSVファイルのフォーマットについては(SDKRoot)/docs/private/how-to-make-headers.txt
|
||||
# をご覧下さい。
|
||||
#
|
||||
|
||||
use Text::ParseWords;
|
||||
|
||||
#
|
||||
# グローバル変数
|
||||
#
|
||||
$line_no = 0;
|
||||
%name_hash = ();
|
||||
%index_name_hash = ();
|
||||
@hash_array = ();
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# verbose出力
|
||||
#
|
||||
sub verbose {
|
||||
if ($verbose_mode == 1) {
|
||||
print STDERR @_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# フィールドの最初と最後の空白を取り除く
|
||||
#
|
||||
sub trim {
|
||||
my @out = @_;
|
||||
for (@out) {
|
||||
s/^\s+//;
|
||||
s/\s+$//;
|
||||
}
|
||||
return @out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# CSV解析ルーチン
|
||||
#
|
||||
sub parse_csv {
|
||||
my @fields = quotewords(",", 0, shift @_);
|
||||
@fields = trim(@fields);
|
||||
|
||||
my $tmp;
|
||||
# 行末の,,,,を取り除く
|
||||
while(defined($tmp = pop @fields) && $tmp =~ /^$/ ) {
|
||||
;
|
||||
}
|
||||
push @fields, $tmp;
|
||||
|
||||
return @fields;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# プリプロセッサ
|
||||
#
|
||||
sub preprocess {
|
||||
return parse_csv(shift @_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# マクロ名の重複チェック
|
||||
#
|
||||
|
||||
sub check_macro_duplicate {
|
||||
my $name = shift @_;
|
||||
my $condition = shift @_;
|
||||
my $no = shift @_;
|
||||
|
||||
if ($condition ne "") {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (exists $name_hash{$name}) {
|
||||
if ($duplicate_ok == 1) {
|
||||
print STDERR "WARNING: generating duplicate macro \'$name\' in line $no\n";
|
||||
} else {
|
||||
die "ERROR: duplicate macro \'$name\' in line $no";
|
||||
}
|
||||
return 1;
|
||||
} else {
|
||||
$name_hash{$name} = 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#
|
||||
# 解析
|
||||
#
|
||||
sub analyze {
|
||||
my @fields = @_;
|
||||
|
||||
my $fields;
|
||||
my $tmphash;
|
||||
my $address, $condition, $name, $bitwidth, $rw, $category, $volatile;
|
||||
$tmphash = {};
|
||||
|
||||
|
||||
$address = shift @fields;
|
||||
die "ERROR: Illegal address \'$address\' in line $line_no\n" unless ($address =~ /^0x[0-9A-Fa-f]+$/);
|
||||
|
||||
|
||||
$condition = shift @fields;
|
||||
die "ERROR: Illegal condition name \'$condition\' in line $line_no\n" unless ($address =~ /^[A-Za-z0-9_()&|!]+$/);
|
||||
|
||||
|
||||
$name = shift @fields;
|
||||
die "ERROR: Illegal macro name \'$name\' in line $line_no\n" unless ($name =~ /^[A-Za-z0-9_]+$/);
|
||||
check_macro_duplicate($name, $condition, $line_no);
|
||||
|
||||
|
||||
$bitwidth = shift @fields;
|
||||
if ($bitwidth eq "8") {
|
||||
$mask_format = "0x%02x";
|
||||
} elsif ($bitwidth eq "16") {
|
||||
$mask_format = "0x%04x";
|
||||
} elsif ($bitwidth eq "32") {
|
||||
$mask_format = "0x%08x";
|
||||
} elsif ($bitwidth eq "64") {
|
||||
$mask_format = "0x%016x";
|
||||
} else {
|
||||
die "ERROR: Illegal bitwidth \'$bitwidth\' in line $line_no\n";
|
||||
}
|
||||
|
||||
$rw = shift @fields;
|
||||
$category = shift @fields;
|
||||
$volatile = shift @fields;
|
||||
|
||||
$tmphash->{"condition"} = $condition;
|
||||
$tmphash->{"name"} = $name;
|
||||
$tmphash->{"offset"} = $address;
|
||||
$tmphash->{"bitwidth"} = $bitwidth;
|
||||
$tmphash->{"rw"} = $rw;
|
||||
if ($rw eq "r") {
|
||||
$tmphash->{"const"} = "const";
|
||||
} else {
|
||||
$tmphash->{"const"} = "";
|
||||
}
|
||||
|
||||
$tmphash->{"category"} = $category;
|
||||
|
||||
if ($volatile eq "volatile") {
|
||||
$tmphash->{"volatile"} = "v";
|
||||
} elsif ($volatile eq "permanent") {
|
||||
$tmphash->{"volatile"} = "";
|
||||
} else {
|
||||
die "ERROR: specify volatile/permanent in line $line_no\n";
|
||||
}
|
||||
|
||||
@{$tmphash->{"option"}} = splice @fields, 0;
|
||||
|
||||
$tmphash->{"mask_format"} = $mask_format;
|
||||
$tmphash->{"line_no"} = $line_no;
|
||||
return $tmphash;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# 配列へ要素を追加
|
||||
# 重複があれば線形リストとしてつなげる
|
||||
#
|
||||
sub push_fields {
|
||||
my $hash = shift @_;
|
||||
my $array_num;
|
||||
my $tmp_hash;
|
||||
|
||||
# 既に同じ名前のものが登録されている場合はハッシュテーブルへ線形リストとして追加
|
||||
if ( exists($index_name_hash{ $hash->{"name"} }) ) {
|
||||
$array_num = $index_name_hash{ $hash->{"name"} }; # 対応する配列のインデックスを取得
|
||||
# (condition eq "")のものが線形リストの最後になるよう追加
|
||||
$tmp_hash = $hash_array[ $array_num ];
|
||||
if ( $tmp_hash->{"condition"} eq "") {
|
||||
$hash->{"next"} = $tmp_hash;
|
||||
$hash_array[ $array_num] = $hash;
|
||||
return;
|
||||
}
|
||||
|
||||
while ( exists($tmp_hash->{"next"}) ) {
|
||||
if ($tmp_hash->{"next"}->{"condition"} eq "") {
|
||||
$hash->{"next"} = $tmp_hash->{"next"};
|
||||
$tmp_hash->{"next"} = $hash;
|
||||
return;
|
||||
}
|
||||
$tmp_hash = $tmp_hash->{"next"};
|
||||
}
|
||||
$tmp_hash->{"next"} = $hash;
|
||||
} else {
|
||||
$array_num = @hash_array;
|
||||
$index_name_hash{ $hash->{"name"} } = $array_num;
|
||||
push @hash_array, $hash;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# カテゴリ情報収集
|
||||
#
|
||||
sub collect_category {
|
||||
my %cat_hash;
|
||||
my $hash;
|
||||
foreach $hash (@hash_array) {
|
||||
$cat_hash{$hash->{"category"}} = 1;
|
||||
}
|
||||
return (keys %cat_hash);
|
||||
}
|
||||
|
||||
#
|
||||
# 条件のマージ
|
||||
#
|
||||
sub merge_condition {
|
||||
my $cond1 = shift @_;
|
||||
my $cond2 = shift @_;
|
||||
my $name = shift @_;
|
||||
|
||||
my $merged_cond;
|
||||
|
||||
if ( $cond1 eq "" || $cond2 eq "") {
|
||||
$merged_cond = "";
|
||||
return $merged_cond;
|
||||
}
|
||||
|
||||
if ( "$cond1" eq "!$cond2" || "!$cond1" eq "$cond2" ) {
|
||||
$merge_cond = "";
|
||||
} else {
|
||||
$merged_cond = "$cond1 || $cond2";
|
||||
}
|
||||
|
||||
return $merged_cond;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#
|
||||
# レジスタのオフセット定義取得
|
||||
#
|
||||
sub cull_register_offset_def {
|
||||
my $hash = shift @_;
|
||||
|
||||
my $offset_name;
|
||||
my @tmp_hash;
|
||||
my @def_array = ();
|
||||
my $i, $k;
|
||||
|
||||
$i = 0;
|
||||
while ( 1 ) {
|
||||
|
||||
{
|
||||
$offset_name = "REG_$hash->{'name'}_OFFSET";
|
||||
$hash->{"offset_def"} = $offset_name;
|
||||
$hash->{"address_def"} = "REG_$hash->{'name'}_ADDR";
|
||||
# この変数の定義は後で使用するので残しておく
|
||||
$hash->{"valname_def"} = "REG_$hash->{'category'}_$hash->{'name'}";
|
||||
$hash->{"valname_def_new"} = "reg_$hash->{'category'}_$hash->{'name'}";
|
||||
}
|
||||
|
||||
$tmp_hash[$i]->{"condition"} = $hash->{"condition"};
|
||||
$tmp_hash[$i]->{"name"} = $hash->{"name"};
|
||||
$tmp_hash[$i]->{"offset_def"} = $hash->{"offset_def"};
|
||||
$tmp_hash[$i]->{"offset"} = $hash->{"offset"};
|
||||
$tmp_hash[$i]->{"address_def"} = $hash->{"address_def"};
|
||||
$tmp_hash[$i]->{"valname_def"} = $hash->{"valname_def"};
|
||||
$tmp_hash[$i]->{"valname_def_new"} = $hash->{"valname_def_new"};
|
||||
|
||||
my $val = "(*($hash->{'const'} REGType$hash->{'bitwidth'}$hash->{'volatile'} *) $hash->{'address_def'})";
|
||||
|
||||
$tmp_hash[$i]->{"reg_type"} = $val;
|
||||
|
||||
my $find_flg = 0;
|
||||
|
||||
#reg_typeとoffsetが同じならconditionをマージ
|
||||
foreach $k (@def_array) {
|
||||
|
||||
if ( $k->{'condition'} eq "" ) {
|
||||
# 条件無しのフィールドは最後に来るはずで、先に既に存在する場合は条件設定がおかしい
|
||||
print STDERR "WARNING: illegal condition in \'$k->{'name'}\'\n";
|
||||
}
|
||||
|
||||
if ( ($k->{"reg_type"} eq $tmp_hash[$i]->{"reg_type"}) && ($k->{"offset"} eq $tmp_hash[$i]->{"offset"}) )
|
||||
{
|
||||
$k->{'condition'} = merge_condition( $k->{'condition'}, $tmp_hash[$i]->{'condition'}, $k->{'name'} );
|
||||
$find_flg = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if ($find_flg == 0) {
|
||||
push @def_array, $tmp_hash[$i];
|
||||
$i++;
|
||||
}
|
||||
|
||||
# リストにまだ残っているなら次を処理
|
||||
if (exists($hash->{"next"})) {
|
||||
$hash = $hash->{"next"};
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
return @def_array;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# アウトプット
|
||||
#
|
||||
sub output {
|
||||
my $output_filename = shift @_;
|
||||
my $category = shift @_;
|
||||
|
||||
# 出力ファイルのオープン
|
||||
|
||||
open OUT, ">$output_filename" or die "ERROR: Cannot create file \'$output_filename\'\n";
|
||||
my $handle = OUT;
|
||||
# my $handle = STDOUT;
|
||||
|
||||
my $include_guard = $output_filename;
|
||||
$include_guard =~ s/[.\/]/_/g;
|
||||
$include_guard = uc($include_guard). "_";
|
||||
|
||||
#
|
||||
# 出力
|
||||
#
|
||||
print $handle <<ENDDOC;
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: NitroSDK - IO Register List -
|
||||
File: $output_filename
|
||||
|
||||
Copyright 2003-2004 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
*---------------------------------------------------------------------------*/
|
||||
//
|
||||
// I was generated automatically, don't edit me directly!!!
|
||||
//
|
||||
#ifndef $include_guard
|
||||
#define $include_guard
|
||||
|
||||
#ifndef SDK_ASM
|
||||
#include <nitro/types.h>
|
||||
#include <nitro/hw/ARM7/mmap_global.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Definition of Register offsets, addresses and variables.
|
||||
*/
|
||||
|
||||
|
||||
ENDDOC
|
||||
my $hash, $tmp_hash;
|
||||
|
||||
foreach $hash (@hash_array) {
|
||||
next if ($hash->{"category"} ne $category);
|
||||
|
||||
print $handle "/* $hash->{'name'} */\n\n";
|
||||
|
||||
my @reg_array = cull_register_offset_def($hash); # 重複した項目を最適化
|
||||
my $nest_state = 0;
|
||||
|
||||
foreach $tmp_hash (@reg_array)
|
||||
{
|
||||
if ($tmp_hash->{"condition"} ne "") {
|
||||
if ($nest_state == 0) {
|
||||
$nest_state = 1;
|
||||
printf $handle "#if %s\n\n", $tmp_hash->{'condition'};
|
||||
} elsif ($nest_state == 1) {
|
||||
printf $handle "\n#elif %s\n\n", $tmp_hash->{'condition'};
|
||||
}
|
||||
} elsif ($nest_state == 1) {
|
||||
printf $handle "\n#else\n\n";
|
||||
}
|
||||
|
||||
printf $handle "#define %-50s %s\n", $tmp_hash->{'offset_def'}, $tmp_hash->{'offset'};
|
||||
printf $handle "#define %-50s %s\n", $tmp_hash->{"address_def"}, "(HW_REG_BASE + $tmp_hash->{'offset_def'})";
|
||||
printf $handle "#define %-50s %s\n", $tmp_hash->{"valname_def_new"}, $tmp_hash->{"reg_type"};
|
||||
|
||||
if ($nest_state == 1) {
|
||||
if ( $tmp_hash->{"condition"} ne "" ) {
|
||||
printf $handle "// endif %s\n", $tmp_hash->{"condition"};
|
||||
} else {
|
||||
printf $handle "// endif else\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($nest_state == 1) {
|
||||
printf $handle "#endif\n";
|
||||
}
|
||||
printf $handle "\n";
|
||||
|
||||
}
|
||||
|
||||
print $handle <<ENDDOC;
|
||||
|
||||
/*
|
||||
* Definitions of Register fields
|
||||
*/
|
||||
|
||||
ENDDOC
|
||||
my $hash;
|
||||
my $nest_state;
|
||||
|
||||
foreach $hash (@hash_array) {
|
||||
next if ($hash->{"category"} ne $category);
|
||||
|
||||
$nest_state = 0;
|
||||
|
||||
printf $handle "\n";
|
||||
print $handle "/* $hash->{'name'} */\n";
|
||||
|
||||
while ( 1 ) {
|
||||
if ($hash->{"condition"} ne "") {
|
||||
if ($nest_state == 0) {
|
||||
$nest_state = 1;
|
||||
printf $handle "#if %s\n", $hash->{'condition'};
|
||||
} elsif ($nest_state == 1) {
|
||||
printf $handle "#elif %s\n", $hash->{'condition'};
|
||||
}
|
||||
} elsif ($nest_state == 1) {
|
||||
printf $handle "#else\n";
|
||||
}
|
||||
|
||||
my $no = $hash->{"line_no"};
|
||||
|
||||
my @array = @{$hash->{"option"}};
|
||||
|
||||
my $field_macro_func = "#define $hash->{'valname_def'}_FIELD(";
|
||||
my $field_macro_flag = 0;
|
||||
my $field_macro_body = " (u$hash->{'bitwidth'})( \\\n";
|
||||
|
||||
my $fieldname, $fieldshift, $fieldsize;
|
||||
while($fieldname = shift @array) {
|
||||
my $shift_macro;
|
||||
die "ERROR: Field option not good in line $no\n" if (!defined($fieldshift = shift @array));
|
||||
die "ERROR: Field option not good in line $no\n" if (!defined($fieldsize = shift @array));
|
||||
|
||||
print $handle "\n";
|
||||
|
||||
# REG_XXX_XXXXX_SHIFTの出力
|
||||
{
|
||||
my $name = "$hash->{'valname_def'}_" . $fieldname . "_SHIFT";
|
||||
check_macro_duplicate($name, $hash->{'condition'}, $no);
|
||||
$shift_macro = $name;
|
||||
printf $handle "#define %-50s %s\n", $name, $fieldshift;
|
||||
}
|
||||
|
||||
# REG_XXX_XXXXX_SIZEの出力
|
||||
{
|
||||
my $name = "$hash->{'valname_def'}_" . $fieldname . "_SIZE";
|
||||
check_macro_duplicate($name, $hash->{'condition'}, $no);
|
||||
printf $handle "#define %-50s %s\n", $name, $fieldsize;
|
||||
}
|
||||
|
||||
# REG_XXX_XXXXX_MASKの出力
|
||||
{
|
||||
my $width = $hash->{"bitwidth"};
|
||||
my $mask_val = 1 << $fieldshift;
|
||||
my $tmp = $mask_val;
|
||||
my $i;
|
||||
for ($i = 0; $i < $fieldsize - 1; $i++) {
|
||||
$mask_val = $mask_val << 1;
|
||||
$mask_val = $mask_val + $tmp;
|
||||
}
|
||||
my $name = "$hash->{'valname_def'}_" . $fieldname . "_MASK";
|
||||
check_macro_duplicate($name, $hash->{'condition'}, $no);
|
||||
printf $handle "#define %-50s $hash->{'mask_format'}\n", $name, $mask_val;
|
||||
}
|
||||
|
||||
# REG_XXX_XXXXX_FIELDの定義の一行分を作成
|
||||
my $fn = lc($fieldname);
|
||||
if ($field_macro_flag == 1) {
|
||||
$field_macro_func = $field_macro_func . ", " . $fn;
|
||||
$field_macro_body = $field_macro_body . " | \\\n" . " ((u32)($fn) << $shift_macro)";
|
||||
} else {
|
||||
$field_macro_func = $field_macro_func . " " . $fn;
|
||||
$field_macro_body = $field_macro_body . " ((u32)($fn) << $shift_macro)";
|
||||
$field_macro_flag = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ($field_macro_flag == 1) {
|
||||
# REG_XXX_XXXXX_FIELDの出力
|
||||
$field_macro_func .= " ) \\\n";
|
||||
$field_macro_func .= $field_macro_body;
|
||||
print $handle "\n#ifndef SDK_ASM\n";
|
||||
print $handle $field_macro_func, ")\n";
|
||||
print $handle "#endif\n\n"
|
||||
|
||||
}
|
||||
|
||||
if ($nest_state == 1) {
|
||||
if ( $hash->{"condition"} ne "") {
|
||||
printf $handle "// endif %s\n", $hash->{"condition"};
|
||||
} else {
|
||||
printf $handle "// endif else\n";
|
||||
}
|
||||
if ( !exists($hash->{"next"})) {
|
||||
printf $handle "#endif \n\n";
|
||||
}
|
||||
}
|
||||
|
||||
# リストにまだ残っているなら次を表示
|
||||
if (exists($hash->{'next'})) {
|
||||
$hash = $hash->{'next'};
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print $handle <<ENDDOC;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
/* $include_guard */
|
||||
#endif
|
||||
ENDDOC
|
||||
|
||||
verbose("done.\n");
|
||||
}
|
||||
|
||||
#
|
||||
# コマンドラインオプションの設定
|
||||
#
|
||||
|
||||
|
||||
# -vか-verboseが指定されているとverboseモード
|
||||
if ($v == 1 || $verbose == 1) {
|
||||
$verbose_mode = 1;
|
||||
verbose("verbose mode on\n");
|
||||
} else {
|
||||
$verbose_mode = 0;
|
||||
}
|
||||
|
||||
# -nodupが指定されているとマクロ名の重複を許さない
|
||||
if ($nodup == 1) {
|
||||
$duplicate_ok = 0;
|
||||
} else {
|
||||
$duplicate_ok = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# メインルーチン
|
||||
#
|
||||
foreach $filename (@ARGV) {
|
||||
$line_no = 0;
|
||||
@hash_array = ();
|
||||
|
||||
open INPUTFILE, "$filename" or die "ERROR: Cannot open file \'$filename\'\n";
|
||||
|
||||
my $line;
|
||||
while($line = <INPUTFILE>) {
|
||||
$line_no++;
|
||||
$line =~ s/\"//g;
|
||||
$line =~ s/\#.*//;
|
||||
next if ($line =~ /^[\s,]*$/);
|
||||
|
||||
@fields = preprocess($line);
|
||||
push_fields( analyze(@fields) );
|
||||
}
|
||||
verbose("$line_no lines read\n");
|
||||
|
||||
my @categories = collect_category();
|
||||
my $category;
|
||||
my @headerfile_array = ();
|
||||
|
||||
|
||||
foreach $category (@categories) {
|
||||
my $output_filename = $filename;
|
||||
if (($output_filename =~ s/\.csv/\.h/) == 0) {
|
||||
$output_filename .= ".h";
|
||||
}
|
||||
$output_filename =~ s/\.h/_$category.h/;
|
||||
|
||||
push @headerfile_array, $output_filename;
|
||||
|
||||
verbose("Output filename is $output_filename\n");
|
||||
output($output_filename, $category);
|
||||
}
|
||||
|
||||
my $master_filename = $filename;
|
||||
if (($master_filename =~ s/\.csv/\.h/) == 0) {
|
||||
$master_filename .= ".h";
|
||||
}
|
||||
|
||||
open MASTER, ">$master_filename" or die "ERROR: Cannot create file \'$master_filename$'\n";
|
||||
|
||||
my $include_guard = $master_filename;
|
||||
$include_guard =~ s/[.\/]/_/g;
|
||||
$include_guard = uc($include_guard). "_";
|
||||
|
||||
print MASTER <<ENDDOC;
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - IO Register List -
|
||||
File: $master_filename
|
||||
|
||||
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.
|
||||
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef $include_guard
|
||||
#define $include_guard
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
ENDDOC
|
||||
|
||||
foreach $header_file (@headerfile_array) {
|
||||
print MASTER "#include <$header_file>\n"
|
||||
}
|
||||
|
||||
print MASTER <<ENDDOC;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
/* $include_guard */
|
||||
#endif
|
||||
ENDDOC
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
107
build/buildsetup/ioreg_sp/io_register_list.csv
Normal file
107
build/buildsetup/ioreg_sp/io_register_list.csv
Normal file
@ -0,0 +1,107 @@
|
||||
#offset,condition,name,bit,rw,category,volatile/permanent,fieldname,shift,bit,,,,,,,,,,,,,,,,,,,,,
|
||||
#表示ステータス p215,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x004,,DISPSTAT,16,rw,GX,volatile,VCOUNTER,7,9,VQI,5,1,HBI,4,1,VBI,3,1,LYC,2,1,HBLK,1,1,VBLK,0,1,,,
|
||||
0x006,,VCOUNT,16,rw,GX,volatile,VCOUNTER,0,10,,,,,,,,,,,,,,,,,,,,,
|
||||
#DMA p210 ~ p212,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0b0,,DMA0SAD,32,rw,MI,volatile,DMASRC,0,27,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0b4,,DMA0DAD,32,rw,MI,volatile,DMADEST,0,27,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0b8,,DMA0CNT,32,rw,MI,volatile,E,31,1,I,30,1,TIMING,28,2,SB,26,1,CM,25,1,SAR,23,2,DAR,21,2,WORDCNT,0,16
|
||||
0x0bc,,DMA1SAD,32,rw,MI,volatile,DMASRC,0,28,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0c0,,DMA1DAD,32,rw,MI,volatile,DMADEST,0,27,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0c4,,DMA1CNT,32,rw,MI,volatile,E,31,1,I,30,1,TIMING,28,2,SB,26,1,CM,25,1,SAR,23,2,DAR,21,2,WORDCNT,0,16
|
||||
0x0c8,,DMA2SAD,32,rw,MI,volatile,DMASRC,0,28,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0cc,,DMA2DAD,32,rw,MI,volatile,DMADEST,0,27,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0d0,,DMA2CNT,32,rw,MI,volatile,E,31,1,I,30,1,TIMING,28,2,SB,26,1,CM,25,1,SAR,23,2,DAR,21,2,WORDCNT,0,16
|
||||
0x0d4,,DMA3SAD,32,rw,MI,volatile,DMASRC,0,28,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0d8,,DMA3DAD,32,rw,MI,volatile,DMADEST,0,28,,,,,,,,,,,,,,,,,,,,,
|
||||
0x0dc,,DMA3CNT,32,rw,MI,volatile,E,31,1,I,30,1,TIMING,28,2,SB,26,1,CM,25,1,SAR,23,2,DAR,21,2,WORDCNT,0,16
|
||||
#タイマ p213,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x100,,TM0CNT_L,16,rw,OS,volatile,TIMER0CNT,0,16,,,,,,,,,,,,,,,,,,,,,
|
||||
0x102,,TM0CNT_H,16,rw,OS,volatile,E,7,1,I,6,1,PS,0,2,,,,,,,,,,,,,,,
|
||||
0x104,,TM1CNT_L,16,rw,OS,volatile,TIMER1CNT,0,16,,,,,,,,,,,,,,,,,,,,,
|
||||
0x106,,TM1CNT_H,16,rw,OS,volatile,E,7,1,I,6,1,CH,2,1,PS,0,2,,,,,,,,,,,,
|
||||
0x108,,TM2CNT_L,16,rw,OS,volatile,TIMER2CNT,0,16,,,,,,,,,,,,,,,,,,,,,
|
||||
0x10a,,TM2CNT_H,16,rw,OS,volatile,E,7,1,I,6,1,CH,2,1,PS,0,2,,,,,,,,,,,,
|
||||
0x10c,,TM3CNT_L,16,rw,OS,volatile,TIMER2CNT,0,16,,,,,,,,,,,,,,,,,,,,,
|
||||
0x10e,,TM3CNT_H,16,rw,OS,volatile,E,7,1,I,6,1,CH,2,1,PS,0,2,,,,,,,,,,,,
|
||||
#SIO,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
"#レジスタ0x128,0x12aは状況でビットの意味が大きく変わるので多重に定義してあります。",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x120,,SIODATA32,32,rw,EXI,volatile,H,16,16,L,0,16,,,,,,,,,,,,,,,,,,
|
||||
0x120,,SIOMULTI0,16,rw,EXI,volatile,DATA,0,16,,,,,,,,,,,,,,,,,,,,,
|
||||
0x122,,SIOMULTI1,16,rw,EXI,volatile,DATA,0,16,,,,,,,,,,,,,,,,,,,,,
|
||||
0x124,,SIOMULTI2,16,rw,EXI,volatile,DATA,0,16,,,,,,,,,,,,,,,,,,,,,
|
||||
0x126,,SIOMULTI3,16,rw,EXI,volatile,DATA,0,16,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x128,,SIOCNT,16,rw,EXI,volatile,CKUP,15,1,I,14,1,MD1,13,1,BITLEN,12,1,START,7,1,TSEND,3,1,TRECV,2,1,SCLOCKHZ,1,1,SCLOCK,0,1,,,,,,,,,,,,,,,,,,,,,
|
||||
0x128,,SIOCNT_MULTI,16,rw,EXI,volatile,CKUP,15,1,I,14,1,MD1,13,1,MD0,12,1,START,7,1,ERROR,6,1,MULTIID,4,2,SDMON,3,1,SIMON,2,1,BAUD,0,2,,,,,,,,,,,,,,,,,,
|
||||
0x128,,SIOCNT_UART,16,rw,EXI,volatile,CKUP,15,1,MD1,13,1,MD0,12,1,RECVEF,11,1,SENDEF,10,1,PARITYEF,9,1,FIFOEF,8,1,DATALEN,7,1,ERROR,6,1,RECV,5,1,SEND,4,1,PARITYCNT,3,1,CTS,2,1,BAUD,0,2,,,,,,
|
||||
0x12a,,SIOCNT_H,16,rw,EXI,volatile,RFFUL,15,1,TFEMP,14,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x12a,,SIOMLT_SEND,16,rw,EXI,volatile,DATA,0,16,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x12a,,SIODATA8,16,rw,EXI,volatile,DATA,0,8,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x12c,,SIOSEL,16,rw,EXI,volatile,SEL,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#キー p214,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x130,,KEYINPUT,16,rw,PAD,volatile,L,9,1,R,8,1,DOWN,7,1,UP,6,1,LEFT,5,1,RIGHT,4,1,START,3,1,SEL,2,1,B,1,1,A,0,1,,,,,,,,,,,,,,,,,,
|
||||
0x132,,KEYCNT,16,rw,PAD,volatile,LOGIC,15,1,INTR,14,1,L,9,1,R,8,1,DOWN,7,1,UP,6,1,LEFT,5,1,RIGHT,4,1,START,3,1,SEL,2,1,B,1,1,A,0,1,,,,,,,,,,,,
|
||||
#シリアル通信 汎用端子,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x134,,RCNT0_L,16,rw,EXI,volatile,RE1,15,1,RE0,14,1,I,8,1,DIR_SO,7,1,DIR_SI,6,1,DIR_SD,5,1,DIR_SC,4,1,DATA_SO,3,1,DATA_SI,2,1,DATA_SD,1,1,DATA_SC,0,1,,,,,,,,,,,,,,,
|
||||
0x136,!defined(SDK_TS),RCNT0_H,16,rw,EXI,volatile,DIR_R7,15,1,DIR_R6,14,1,DIR_R5,13,1,DIR_R4,12,1,DIR_R3,11,1,DIR_R2,10,1,DIR_R1,9,1,DIR_R0,8,1,DATA_R7,7,1,DATA_R6,6,1,DATA_R5,5,1,DATA_R4,4,1,DATA_R3,3,1,DATA_R2,2,1,DATA_R1,1,1,DATA_R0,0,1
|
||||
0x136,defined(SDK_TS),RCNT0_H,16,rw,EXI,volatile,DATA_R7,7,1,DATA_R6,6,1,DATA_R5,5,1,DATA_R4,4,1,DATA_R3,3,1,DATA_R2,2,1,DATA_R1,1,1,DATA_R0,0,1,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x138,!defined(SDK_TS),RCNT1,16,rw,EXI,volatile,DIR_RB,7,1,DIR_RA,6,1,DIR_R9,5,1,DIR_R8,4,1,DATA_RB,3,1,DATA_RA,2,1,DATA_R9,1,1,DATA_R8,0,1,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x138,defined(SDK_TS),RCNT1,16,rw,EXI,volatile,DIR_RF,15,1,DIR_RE,14,1,DIR_RD,13,1,DIR_RC,12,1,DATA_RF,11,1,DATA_RE,10,1,DATA_RD,9,1,DATA_RC,8,1,DIR_RB,7,1,DIR_RA,6,1,DIR_R9,5,1,DIR_R8,4,1,DATA_RB,3,1,DATA_RA,2,1,DATA_R9,1,1,DATA_R8,0,1
|
||||
#JOY,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x140,,JOYCNT,16,rw,EXI,volatile,MOD,7,1,I,6,1,SEND,2,1,RECV,1,1,RESET,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x150,,JOY_RECV,32,rw,EXI,volatile,RECVDATA,0,32,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x154,,JOY_TRANS,32,rw,EXI,volatile,SENDDATA,0,32,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x158,,JOY_STAT,16,rw,EXI,volatile,GEN,4,2,SSTATUS,3,1,RSTATUS,1,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
# ARM9 とのインターフェイス p191~ p192,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x180,,MAINPINTF,16,rw,PXI,volatile,I,14,1,IREQ,13,1,A7STATUS,8,4,A9STATUS,0,4,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x184,,MAINP_FIFO_CNT,16,rw,PXI,volatile,E,15,1,ERR,14,1,RECV_RI,10,1,RECV_FULL,9,1,RECV_EMP,8,1,SEND_CL,3,1,SEND_TI,2,1,SEND_FULL,1,1,SEND_EMP,0,1,,,,,,,,,,,,,,,,,,,,,
|
||||
0x188,,SEND_FIFO,32,rw,PXI,volatile,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x100000,,RECV_FIFO,32,rw,PXI,volatile,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#メモリカード,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1a0,,MCCNT0,16,rw,MI,volatile,E,15,1,I,14,1,SEL,13,1,BUSY,7,1,MODE,6,1,BAUDRATE,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1a2,,MCD0,16,rw,MI,volatile,DATA,0,8,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x100010,,MCD1,32,rw,MI,volatile,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1a4,,MCCNT1,32,rw,MI,volatile,START,31,1,WR,30,1,CT,27,1,PC,24,3,RDY,23,1,L2,16,6,L1,0,13,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1a8,,MCCMD0,32,w,MI,volatile,CMD3,24,8,CMD2,16,8,CMD1,8,8,CMD0,0,8,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1ac,,MCCMD1,32,w,MI,volatile,CMD7,24,8,CMD6,16,8,CMD5,8,8,CMD4,0,8,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1c0,!defined(SDK_TS),SPICNT,16,rw,SPI,volatile,E,15,1,I,14,1,SEL,13,1,MODE,12,1,BUSY,7,1,BAUDRATE,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1c0,defined(SDK_TS),SPICNT,16,rw,SPI,volatile,E,15,1,I,14,1,MODE,11,1,CLKMODE,10,1,SEL,8,2,BUSY,7,1,BAUDRATE,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x1c2,,SPID,16,rw,SPI,volatile,DATA,0,8,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#外部メモリ p19-26,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x204,,EXMEMCNT_L,16,rw,MI,volatile,EP,15,1,MP,11,1,CP,7,1,PHI,5,2,ROM2nd,4,1,ROM1st,2,2,RAM,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x206,,EXMEMCNT_H,16,rw,MI,volatile,PHI33M,7,1,WW1_2nd,5,1,WW1_1st,3,2,WW0_2nd,2,1,WW0_1st,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#割り込み p216 ~ 217,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x208,,IME,16,rw,OS,volatile,IME,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x210,,IE,32,rw,OS,volatile,D2_3,31,1,D2_2,30,1,D2_1,29,1,D2_0,28,1,MI_B,27,1,MC_B,26,1,CAM,25,1,DSP,24,1,WL,24,1,SPI,23,1,PM,22,1,MI,20,1,MC,19,1,IFN,18,1,IFE,17,1,A7,16,1,MCB_DET,15,1,MC_DET,14,1,I_D,13,1,K,12,1,D3,11,1,D2,10,1,D1,9,1,D0,8,1,T3,6,1,T2,5,1,T1,4,1,T0,3,1,VE,2,1,HB,1,1,VB,0,1
|
||||
0x214,,IF,32,rw,OS,volatile,D2_3,31,1,D2_2,30,1,D2_1,29,1,D2_0,28,1,MI_B,27,1,MC_B,26,1,CAM,25,1,DSP,24,1,WL,24,1,SPI,23,1,PM,22,1,MI,20,1,MC,19,1,IFN,18,1,IFE,17,1,A7,16,1,MCB_DET,15,1,MC_DET,14,1,I_D,13,1,K,12,1,D3,11,1,D2,10,1,D1,9,1,D0,8,1,T3,6,1,T2,5,1,T1,4,1,T0,3,1,VE,2,1,HB,1,1,VB,0,1
|
||||
0x218,,IE2,32,rw,OS,volatile,MIC,14,1,I2C,13,1,AES,12,1,WSDIO,11,1,WSD,10,1,SDIO,9,1,SD,8,1,IO33_3,7,1,IO33_2,6,1,IO33_1,5,1,IO33_0,4,1,IO18_2,2,1,IO18_1,1,1,IO18_0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x21c,,IF2,32,rw,OS,volatile,MIC,14,1,I2C,13,1,AES,12,1,WSDIO,11,1,WSD,10,1,SDIO,9,1,SD,8,1,IO33_3,7,1,IO33_2,6,1,IO33_1,5,1,IO33_0,4,1,IO18_2,2,1,IO18_1,1,1,IO18_0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#本体内メモリ p194,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x240,,WVRAMSTAT,16,rw,MI,volatile,WRAM_1,9,1,WRAM_0,8,1,VRAM_D,1,1,VRAM_C,0,1,,,,,,,,,,,,
|
||||
#PAUSE page 19-43,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x300,,PAUSE,16,rw,OS,volatile,MOD,14,2,CHK,0,1,,,,,,,,,,,,,,,,,,
|
||||
#パワーコントロール p200,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x304,,POWCNT,16,rw,SND,volatile,EWL,1,1,SPE,0,1,,,,,,,,,,,,,,,,,,
|
||||
#サウンド,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x400,,SOUND0CNT,32,rw,SND,volatile,E,31,1,FORMAT,29,2,REPEAT,27,2,DUTY,24,3,PAN,16,7,HOLD,15,1,SHIFT,8,2,VOLUME,0,7
|
||||
0x400,,SOUND0CNT_VOL_16,16,rw,SND,volatile,HOLD,15,1,SHIFT,8,2,VOLUME,0,7,,,,,,,,,,,,,,,
|
||||
0x400,,SOUND0CNT_VOL,8,rw,SND,volatile,VOLUME,0,7,,,,,,,,,,,,,,,,,,,,,
|
||||
0x402,,SOUND0CNT_PAN,8,rw,SND,volatile,PAN,0,7,,,,,,,,,,,,,,,,,,,,,
|
||||
0x403,,SOUND0CNT_8,8,rw,SND,volatile,E,7,1,FORMAT,5,2,REPEAT,3,2,DUTY,0,3,,,,,,,,,,,,
|
||||
0x404,,SOUND0SAD,32,w,SND,volatile,SRC,0,27,,,,,,,,,,,,,,,,,,,,,
|
||||
0x408,,SOUND0TMR,16,w,SND,volatile,TIMER,0,16,,,,,,,,,,,,,,,,,,,,,
|
||||
0x40a,,SOUND0RPT_PT,16,w,SND,volatile,POINT,0,16,,,,,,,,,,,,,,,,,,,,,
|
||||
0x40c,,SOUND0RPT_LEN,32,w,SND,volatile,LEN,0,22,,,,,,,,,,,,,,,,,,,,,
|
||||
#サウンドマスターコントロール p201,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x500,,SOUNDCNT,16,rw,SND,volatile,E,15,1,MIX_CH3,13,1,MIX_CH1,12,1,ROUT,10,2,LOUT,8,2,VOLUME,0,7,,,,,,,,,,,,
|
||||
0x501,,SOUNDCNT_8,8,rw,SND,volatile,E,7,1,MIX_CH3,5,1,MIX_CH1,4,1,ROUT,2,2,LOUT,0,2,,,,,,,,,,,,,,,
|
||||
0x500,,SOUNDCNT_VOL,8,rw,SND,volatile,VOLUME,0,7,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
#キャプチャ p206,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x508,,SNDCAPCNT,16,rw,SND,volatile,CAP1_E,15,1,CAP1_FORMAT,11,1,CAP1_REPEAT,10,1,CAP1_IN,9,1,CAP1_OUT,8,1,CAP0_E,7,1,CAP0_FORMAT,3,1,CAP0_REPEAT,2,1,CAP0_IN,1,1,CAP0_OUT,0,1
|
||||
0x508,,SNDCAP0CNT,8,rw,SND,volatile,E,7,1,FORMAT,3,1,REPEAT,2,1,IN,1,1,OUT,0,1,,,,,,,,,,,,,,,
|
||||
0x509,,SNDCAP1CNT,8,rw,SND,volatile,E,7,1,FORMAT,3,1,REPEAT,2,1,IN,1,1,OUT,0,1,,,,,,,,,,,,,,,
|
||||
0x510,,SNDCAP0DAD,32,w,SND,volatile,DEST,0,27,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x514,,SNDCAP0LEN,16,rw,SND,volatile,LEN,0,16,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x518,,SNDCAP1DAD,32,w,SND,volatile,DEST,0,27,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
0x51c,,SNDCAP1LEN,16,rw,SND,volatile,LEN,0,16,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
Can't render this file because it has a wrong number of fields in line 33.
|
BIN
build/buildsetup/ioreg_sp/io_register_list.xls
Normal file
BIN
build/buildsetup/ioreg_sp/io_register_list.xls
Normal file
Binary file not shown.
43
include/twl/memorymap.h
Normal file
43
include/twl/memorymap.h
Normal file
@ -0,0 +1,43 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - include - HW
|
||||
File: memorymap.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.
|
||||
|
||||
$Log: $
|
||||
$NoKeywords: $
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef TWL_MEMORYMAP_H_
|
||||
#define TWL_MEMORYMAP_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef SDK_ARM9
|
||||
#include <nitro/hw/ARM9/mmap_global.h>
|
||||
#include <nitro/hw/ARM9/mmap_main.h>
|
||||
#include <nitro/hw/ARM9/mmap_tcm.h>
|
||||
#include <nitro/hw/ARM9/mmap_vram.h>
|
||||
#include <nitro/hw/common/mmap_shared.h>
|
||||
#include <twl/hw/ARM9/ioreg.h>
|
||||
|
||||
#else //SDK_ARM7
|
||||
#include <nitro/hw/ARM7/mmap_global.h>
|
||||
#include <nitro/hw/ARM7/mmap_main.h>
|
||||
#include <nitro/hw/ARM7/mmap_wram.h>
|
||||
#include <nitro/hw/common/mmap_shared.h>
|
||||
#include <twl/hw/ARM7/ioreg.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
/* TWL_MEMORYMAP_H_ */
|
||||
#endif
|
22
include/twl/memorymap_sp.h
Normal file
22
include/twl/memorymap_sp.h
Normal file
@ -0,0 +1,22 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: TwlSDK - include
|
||||
File: memorymap_sp.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.
|
||||
|
||||
$Log: $
|
||||
$NoKeywords: $
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifndef SDK_ARM7
|
||||
#define SDK_ARM7
|
||||
#endif
|
||||
#ifdef SDK_ARM9
|
||||
#undef SDK_ARM9
|
||||
#endif
|
||||
#include <twl/memorymap.h>
|
Loading…
Reference in New Issue
Block a user