localization.html
8.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Localization Process</title>
</head>
<body>
<font face="verdana, arial, helvetica">
<p><b>Localization Process</b></p>
<p><font size="2">The diagram below shows a proposed localization process (to
Chinese) for existing Nintendo games - or at least, the "type" of game that
is
similar to Dr.Mario64 (see "type" discussion later). The steps
involved are: </font></p>
<ol>
<li><font size="2">Extract: font/locale related code and assets</font></li>
<li><font size="2">Modify: replace or add code and assets that support Chinese
locale</font></li>
<li><font size="2">Assemble: rebuild with the rest of the object code using
the spec files and makefiles provided </font></li>
</ol>
<p><font size="2">The line between Nintendo and BroadOn/iQue in the diagram
indicates the division of asset ownership. The process assumes that the game
source code and assets (textures, models, audio files...) are somewhat
separated. It also assumes that the game has been localized to a locale other
than Japanese before (thus it makes sense to search, for example, patterns like
"#if.*JAPAN" or "#if.*AMERICA" in the source code). Lacking of such a pattern would make step 1. more
difficult and less automated. If that is the case, we would start from the asset
files and identify the assets that need to be localized. We will then search for
the identified asset symbols in the object files (*.o) and ask Nintendo for
their corresponding source files. </font></p>
<p><font size="2">[ A search of the pattern "#if LOCAL==*" in Dr.Mario64 turned out roughly
40 occurrences in 10 source code files (out of ~130 files), and 42 occurrences
in 16 asset files (out of ~60 files). ]</font></p>
<p><font size="2">A detailed description
of the steps is listed below.</font></p>
<p><img border="0" src="localization.jpg" width="800" height="685"><font size="2">
</font></p>
<ol>
<li><font size="2">Extract</font><p><font size="2">1a. font code files. In
Dr.Mario64's case, it's the code that is responsible for mapping input strings
(ASCII or 2-byte streams) to output bitmaps for drawing (listed in a file
named "font.c"). In general, the extraction of such file requires explicit
knowledge of how the font is implemented in the game. The cooperation from game
authors in this step is perhaps always necessary given that we won't have
access to the entire source tree.</font></p>
<p><font size="2">1b. source code files that contain string tables for the game.
In Dr.Mario64, these files have .mes suffix.</font></p>
<p><font size="2">1c. source code files that contain the locale specific pattern
(#if LOCAL==*). These
files usually have code to handle the differences in positioning, spacing, and
alignment of strings given a certain locale. </font></p>
<p><font size="2">1d. For source code files that do not contain the locale
specific pattern (#if LOCAL==*), extract the corresponding object files (*.o).</font></p>
<p><font size="2">1e. spec file and makefile for the game.</font></p>
<p><font size="2">1f. source asset files (C structures) that contain the locale
specific pattern (#if LOCAL==*), together with their corresponding raw asset files (texture, model,
sound...), tools that converts raw asset files to C structures, spec files and makefiles.</font></p>
<p><font size="2">1g. For source asset files that do not contain the keyword
"LOCAL", extract the corresponding compressed asset segments (*.zzz).</font></p>
</li>
<li><font size="2">Modify</font><p><font size="2">2a. Add font engine code to
the files extracted in step 1a. to render Chinese characters. In Dr.Mario64's
case, it's the code that maps GB or Big5 encoded Chinese stream (generated in
step 2b) to indexes in the font bitmap (generated in step 2e). Given that
Chinese is not an alphabetized language, we could not have a font bitmap that
contains the entire Chinese character set (as opposed to English and
Japanese, a font bitmap that contains the entire alphabet). Therefore a
document describing which string uses what font bitmap in the original game
would be helpful. </font></p>
<p><font size="2">2b. Translate string tables in the files extracted in step 1b.
into Chinese string tables (encoded in GB or Big5).</font></p>
<p><font size="2">2c. Add handling of position, spacing, alignment code for
Chinese characters in the files extracted in step 1c.</font></p>
<p><font size="2">2d. Add "#includes" for "#if LOCAL==CHINA" to the source asset
files extracted in step 1f. </font></p>
<p><font size="2">2e. Generate new Chinese asset files according to the raw
asset files extracted in step 1f. (while keeping the original dimension of the
texture). Convert them into C structures using the provided tools. </font></p>
</li>
<li><font size="2">Assemble</font><p><font size="2">3a. Build and compress
codesegment (code.zzz) using source files from 2a, 2b, 2c, and object files
from 1d. Adjust spec file if necessary. </font></p>
<p><font size="2">3b. Build and compress asset segments (*.zzz) using files from
2d. and 2e. </font></p>
<p><font size="2">3c. Build Chinese ROM image from 3a, 3b and 1g. Adjust spec file
if necessary. </font></p>
</li>
</ol>
<p><b>Questions / Issues</b></p>
<ul>
<li><font size="2">Types of Nintendo games</font></li>
</ul>
<blockquote>
<p><font size="2">The process above is derived from
studying Dr.Mario64's implementation. How generic is this implementation with
regard to the font engine, the code structure and asset directory structure?
Does it make sense to categorize Nintendo games and to derive different
localization process based: on NES/SNES and N64 origin? on different
development groups and coding styles? Could we get an example game
for each "type"? </font></p>
</blockquote>
<ul>
<li><font size="2">Non-localized games</font></li>
</ul>
<blockquote>
<p><font size="2">For non-localized games, assuming we have access to all
"asset files", we can search for locale specific asset symbols in source
object code and extract source files accordingly. An experiment with this
approach for Dr.Mario64 seems to work out okay - except it's quite hard to get
the code that deals with say sizing or positioning of certain layout (part of
1c. block mentioned above). </font></p>
<p><font size="2">How many of Nintendo's games have been localized before? Is
it ok to assume that majority of the games that we are interested in has been
localized to another locale before (and therefore the code structure could be
similar to Dr.Mario64, and that it has certain #if patterns like
"JAPAN", "AMERICA") ? </font></p>
</blockquote>
<ul>
<li><font size="2">Chinese font DB</font></li>
</ul>
<blockquote>
<p><font size="2">Does Nintendo have existing kanji
character font that looks good on a 12x12 or a 16x16 pixel square? If so, is
it sufficient for Chinese characters? If not, we'll need to either acquire
Chinese fonts or hire font developers. </font></p>
</blockquote>
<ul>
<li><font size="2">Localizing 3D text (model & animation sequence), Tools for generating/converting
certain 3D raw assets</font></li>
</ul>
<blockquote>
<p><font size="2">Localizing 3D text (model and animation sequence) could be
more involved depending on how the animation was authored. In most cases we
would have to replace the whole sequence instead of just the model. For
example, given that Chinese is not an alphabetized language, it can't have
individual letters that jump the same way as in English or Japanese version. </font>
</p>
<p><font size="2">What are the
tools used for converting models/textures into .gbi files, for converting .lws
(scene?) files into .ani (C structure) files? Are they supported by
traditional modeling applications or is it a toolset supplied by Nintendo? Can
we get access to these tools? </font>
</p>
</blockquote>
<p> </p>
<p> </p>
</font>
</body>
</html>