1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4<meta http-equiv="Content-Style-Type" content="text/css">
5<title>ctr_makerom</title>
6<style type="text/css">
7<!--
8body {
9/*
10    font-size       : 10pt;
11*/
12    font-weight     : normal;
13    color           : #000000;
14    margin          : 8px;
15}
16
17div {
18    width           : 98%;
19    white-space     : nowrap;
20}
21
22div.title {
23    text-align      : left;
24    font-weight     : bold;
25/*
26    font-size       : 16pt;
27*/
28    font-size       : 150%;
29    color           : #202020;
30    border-style    : double;
31    border-width    : 8px;
32    /* タイトルを囲む枠線の色を指定 */
33    border-color    : #CD202C;
34
35    /* RVLプラットフォーム系列 */
36/*
37    border-color    : #34beed;
38*/
39
40    /* TWLプラットフォーム系列 */
41/*
42    border-color    : #ff458f;
43*/
44
45    margin          : 4px;
46    padding         : 4px;
47}
48H1 {
49  font-size     : 150%;
50  font-family       : Arial;
51  border-bottom-width   : 5px;
52  border-bottom-style   : solid;
53  border-bottom-color   : #CD202C;
54  padding-bottom        : 1px;
55  margin-bottom     : 20px;
56  letter-spacing        : normal;
57  font-weight       : bold;
58}
59
60h2 {
61    font-weight     : bold;
62/*
63    font-size       : 16pt;
64*/
65    font-size       : 150%;
66    border-style    : none none solid double;
67    border-width    : 0px 0px 2px 8px;
68    /* 見出しの線の色を指定 */
69    border-color    : #CD202C;
70
71    /* RVLプラットフォーム系列 */
72/*
73    border-color    : #34beed;
74*/
75
76    /* TWLプラットフォーム系列 */
77/*
78    border-color    : #ff458f;
79*/
80
81    margin-left     : 2px;
82    padding-left    : 4px;
83}
84CODE {
85  font-family       : "Courier New", monospace;
86  left          : 12px;
87  font-size     : 10pt;
88}
89table {
90  margin-top        : 2pt;
91  margin-bottom     : 2pt;
92  margin-left       : 0pt;
93  margin-right      : 0pt;
94        padding-left      : 0pt;
95        padding-right     : 0pt;
96        position          : relative;
97        left              : 12px;
98        font-family       : Arial;
99        font-size         : 10pt;
100        border-style      : none none none none;
101    }
102table table
103{
104  border-collapse   : collapse;
105  width             : 90%;
106}
107table table td
108{
109  border      : solid 1px black;
110}
111
112td,th {
113  padding           : 2pt;
114  border-width      : 2pt;
115  border-style      : none none none none;
116  font-style        : normal;
117  text-align        : left;
118}
119td {
120  background        : #e8f4f4;
121  font-weight       : normal;
122}
123th {
124  background        : #c0d8d8;
125  font-weight       : bold;
126}
127
128p {
129    margin-left     : 4px;
130}
131p.code {
132  font-family       : "Courier New", monospace;
133  left          : 12px;
134  font-size     : 10pt;
135  background            : #e8f4f4;
136}
137
138-->
139</style>
140
141</head>
142<body>
143<a name="top"></a>
144
145<h1><CODE>ctr_makerom</CODE></h1>
146
147<h1>Contents</h1>
148<ol>
149  <li><a href="#intro">Introduction</a></li>
150  <li><a href="#usage">How to Use</a></li>
151  <li><a href="#rsf">RSF File</a></li>
152  <li><a href="#desc">DESC File</a></li>
153  <li><a href="#titleid">Game Software Prototype Code</a></li>
154  <li><a href="#omake">Variables Defined in OMakefile</a></li>
155  <li><a href="#history">Revision History</a></li>
156</ol>
157
158
159
160<h2><a name="intro">Introduction</a></h2>
161<P>The <CODE>ctr_makerom</CODE> tool is for creating CCI (CTR Card Image) files.<br/>CCI files are created based on the content in RSF files.</P>
162
163<p>
164Use the <SPAN class="argument">-f</SPAN> option to generate a CXI (CTR eXecutable Image) file and a CFA (CTR File Archive) file.<br/>
165</p>
166
167<h2><a name="usage">How to Use</a></h2>
168<h3>What Is Required</h3>
169<p>You need the following to create a CCI file:</p>
170<ul>
171<li> <CODE>.axf</CODE> file (ELF format) created with ARMCC</li>
172<li> <CODE>.rsf</CODE> file</li>
173<li> <CODE>.desc</CODE> file</li>
174</ul>
175
176<p>
177RSF files contain the information required to create a CCI file. They must be created individually for each application. By default, the SDK build system uses <CODE>$(CTRSDK_ROOT)/resources/specfiles/Application.rsf</CODE> (the default RSF file).<br>Be sure to always use the DESC file included in the SDK.
178</p>
179
180<h3>Commands</h3>
181
182
183<h4>Format 1</h4>
184<p class="code">
185% ctr_makerom32 ELF_FILE -rsf RSF_FILE -desc DESC_FILE [-o OUTPUT_FILE] [-Dname=value...] [-f FORMAT] [-info INFO_FILE] [-banner BANNER_FILE] [-icon ICON_FILE] [-content CONTENTS_PATH:INDEX] [-j NUM]
186</p>
187
188<p class="first_ja">Creates files in CXI, CFA, and CCI format. You must specify <CODE>ELF_FILE</CODE>, <CODE>-rsf</CODE>, and <CODE>-desc</CODE>.
189</p>
190
191
192<h4>Format 2</h4>
193<p class="code">
194% ctr_makerom32 ELF_FILE -rsf RSF_FILE -desc DESC_FILE -f le -lr LR_FILE -m 0x01000000 -o OUTPUT_FILE [-Dname=value...] [-info INFO_FILE] [-banner BANNER_FILE] [-icon ICON_FILE] [-j NUM]
195</p>
196
197<p class="first_ja">Creates files in LE format. You must specify <CODE>ELF_FILE</CODE>, <CODE>-rsf</CODE>, <CODE>-desc</CODE>, <CODE>-f</CODE>, <CODE>-lr</CODE>, <CODE>-m</CODE>, and <CODE>-o</CODE>.
198</p>
199
200<h4>Format 3</h4>
201<p class="code">
202% ctr_makerom32 -rsf RSF_FILE -desc DESC_FILE -f lr -o OUTPUT_FILE [-Dname=value...] [-info INFO_FILE] [-j NUM]
203</p>
204
205<p class="first_ja">Creates files in LR format.  You must specify a value for <CODE>-rsf</CODE>, <CODE>-desc</CODE>, <CODE>-f</CODE>, and <CODE>-o</CODE>.
206</p>
207
208<h4>Format 4</h4>
209<p class="code">
210% ctr_makerom32 -f list -le LE_FILE -lr LR_FILE -o OUTPUT_FILE
211</p>
212
213<p class="first_ja">Creates files in CCL format.  You must specify all options.
214</p>
215
216<h4 >Options</h4>
217
218
219<div class="table">
220<table border="1">
221<thead>
222<tr>
223<th align="center">Options</th>
224<th align="center">Description</th>
225</tr>
226</thead>
227<tbody>
228<tr>
229<td align="center"><CODE>-rsf</CODE></td>
230<td align="center">Specifies the RSF file.</td>
231</tr>
232<tr>
233<td align="center"><CODE>-desc</CODE></td>
234<td align="center">Specifies the DESC file.</td>
235</tr>
236<tr>
237<td align="center"><CODE>-banner</CODE></td>
238<td align="center">Specifies the banner file.</td>
239</tr>
240<tr>
241<td align="center"><CODE>-icon</CODE></td>
242<td align="center">
243Specifies the icon file.<br/> Unless you specify an icon file with this option, you cannot get the EULA version from the application.
244</td>
245</tr>
246<tr>
247<td align="center"><CODE>-content CONTENTS_PATH:INDEX</CODE></td>
248<td align="center">
249Specifies content (CFA files) included in the CCI file.<BR> Specify the content file path in <CODE>CONTENTS_PATH</CODE>.<BR> <CODE>INDEX</CODE> specifies the index number that contains this content. There is a predetermined <CODE>INDEX</CODE> to specify for each type of content. Specify <CODE>1</CODE> for a CFA file storing an e-manual. Specify <CODE>2</CODE> for a CFA file storing a download-play child program. You must not specify any other values. <BR> For more information, see the documentation for each type of content.
250
251</td>
252</tr>
253<tr>
254<td align="center"><CODE>-o</CODE></td>
255<td align="center">Specifies the output filename. If this option is omitted, the output is written to a file with a filename that consists of the input <CODE>.axf</CODE> filename with its extension replaced by <CODE>.cci</CODE>, <CODE>.cxi</CODE>, or <CODE>.cfa</CODE>. The extension is determined by the format specified in the <CODE>-f</CODE> option.</td>
256</tr>
257<tr>
258<td align="center"><CODE>-Dname=value</CODE></td>
259<td align="center">Specifies the variable name (<CODE>name</CODE>) and value (<CODE>value</CODE>) to reference in the RSF file. Locations where <CODE>$(name)</CODE> is written in the RSF file are replaced with the <CODE>value</CODE> command line argument and then evaluated.</td>
260</tr>
261<tr>
262<td align="center"><CODE>-f FORMAT</CODE></td>
263<td align="center">Specifies the format of the image to output. The following values can be specified for <CODE>FORMAT</CODE>.
264<table>
265<tr>
266  <td><CODE>card</CODE></td>
267  <td>Outputs in .cci format. Specify this option when creating a standard card application.</td>
268</tr>
269<tr>
270  <td><CODE>exec</CODE></td>
271<td>Outputs in .cxi format. Specify this option when building an import application.<br/>To create images that can be imported, you must input the generated CXI file to <CODE>ctr_makecia</CODE> and create a CIA file.</td>
272</tr>
273<tr>
274  <td><CODE>data</CODE></td>
275  <td>Outputs in CFA format.</td>
276</tr>
277<tr>
278  <td><CODE>list</CODE></td>
279  <td>Outputs in CCL format.</td>
280</tr>
281<tr>
282  <td><CODE>le</CODE></td>
283  <td>Outputs in LE format used for CCL.</td>
284</tr>
285<tr>
286  <td><CODE>lr</CODE></td>
287  <td>Outputs in LR format used for CCL.</td>
288</tr>
289
290</table>
291If nothing is specified, it is assumed that <CODE>exec</CODE> is specified.<br/>
292</td>
293</tr>
294<tr>
295<td align="center"><CODE>-info</CODE></td>
296<td align="center">Specifies the output file to which to output information about the output image. When omitted, the file is saved with the <CODE>.xml</CODE> filename extension. This file contains information about the application title and ROMFS.
297</td>
298</tr>
299<tr>
300<td align="center"><CODE>-j NUM</CODE></td>
301<td align="center">Specifies the number of makerom parallel processes. However, only some processes can be performed in parallel.<br/> When it is not specified, the CPU core count for the execution environment is acquired and used.
302</td>
303</tr>
304
305<tr>
306    <td align="center"><CODE>-le LE_FILE</CODE></td>
307    <td align="center">Specifies the file path for an LE-format file created in format 2.</td>
308</tr>
309<tr>
310    <td align="center"><CODE>-lr LR_FILE</CODE></td>
311    <td align="center">Specifies the file path for an LR-format file created in format 3.</td>
312</tr>
313<tr>
314    <td align="center"><CODE>-m 0x01000000</CODE></td>
315    <td align="center">Required for format 2. Always specify <CODE>0x01000000</CODE>.</td>
316</tr>
317<tr>
318    <td align="center"><CODE>-nowarn WARNING_NUMBER</CODE></td>
319    <td align="center">
320    Suppresses warnings. Currently, you can only specify <CODE>0</CODE> for <CODE>WARNING_NUMBER</CODE>. When you specify a value of <CODE>0</CODE>, you can suppress warnings for invalid combinations of <CODE>CardDevice</CODE> and <CODE>BackupMemoryType</CODE>.
321    </td>
322</tr>
323
324
325</tbody>
326</table>
327</div>
328
329<h2><a name="rsf">RSF File</a></h2>
330
331<p>This file contains the settings for the CCI file.</p>
332
333<h3>Format</h3>
334
335<p>The RSF file format includes the following elements.</p>
336
337<p class="code">
338BasicInfo:<br/>&nbsp;&nbsp;Title:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Application title.<br/> &nbsp;&nbsp;ProductCode:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Product code.<br/> &nbsp;&nbsp;MediaSize:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Media size.<br/> &nbsp;&nbsp;Logo:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Logo data specification.<br/> &nbsp;&nbsp;BackupMemoryType:&nbsp;&nbsp;# Backup memory type.<br/>
339
340<br/> TitleInfo: <br/> &nbsp;&nbsp;Category:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Title category.<br/> &nbsp;&nbsp;UniqueId:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Unique ID for title code.<br/> &nbsp;&nbsp;ChildIndex:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Download Play child index.<br/> &nbsp;&nbsp;DemoIndex:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Downloadable application demos index.<br/> &nbsp;&nbsp;Variation:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Add-on content index.<br/> <br/> Rom:<br/>&nbsp;&nbsp;HostRoot:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# The root path of the ROM file system.<br/> &nbsp;&nbsp;Reject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Specifies files and directories to exclude from the ROM file system.<br/> &nbsp;&nbsp;Include:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Specifies files that should be included in the ROM file system.<br/> &nbsp;&nbsp;SaveDataSize:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Save data size.<br/> <br/> CardInfo:<br/>&nbsp;&nbsp;CardDevice:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Set to NorFlash or None.<br/> &nbsp;&nbsp;MediaType:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Set to Card 1 or Card 2.<br/> <br/> AccessControlInfo:<br/>&nbsp;&nbsp;Priority:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Main thread priority.<br/> &nbsp;&nbsp;UseExtSaveData:&nbsp;&nbsp;&nbsp;&nbsp;# Whether to use expanded save data.<br/> &nbsp;&nbsp;ExtSaveDataNumber:&nbsp;# Expanded save data number.<br/> &nbsp;&nbsp;FileSystemAccess:&nbsp;&nbsp;# File system access permissions.<br/> <br/> SystemControlInfo:<br/>StackSize:&nbsp;&nbsp;&nbsp;# Stack size of main thread.<br/> &nbsp;&nbsp;RemasterVersion:&nbsp;&nbsp;&nbsp;# The remaster version.<br/> <br/> Option:<br/>&nbsp;&nbsp;EnableCompress:&nbsp;&nbsp;# Enables or disables compression of static memory.<br/>
341
342</p>
343
344<p>
345Configure the values of the items under the seven main sections (<CODE>BasicInfo</CODE>, <CODE>TitleInfo</CODE>, <CODE>Rom</CODE>, <CODE>AccessControlInfo</CODE>, <CODE>SystemControlInfo</CODE>, and <CODE>Option</CODE>).<br/> Set the values using the following format:
346
347<h3>Specifying Single Values</h3>
348<p class="code">
349Key Name: Value
350</p>
351
352<h3><a name="sequence_element">Specifying Multiple Values</a></h3>
353<p class="code">
354Key Name:<br/> &nbsp;&nbsp;-&nbsp;Value 1<br/> &nbsp;&nbsp;-&nbsp;Value 2<br/> &nbsp;&nbsp;...<br/>
355</p>
356
357</p>
358
359<h4>Notes</h4>
360<ul>
361<li>Tabs cannot be used in place of half-width spaces.</li>
362<li>You must use at least one half-width space after the colons and hyphens that separate the key names from the values.</li>
363<li>Indentation (using half-width spaces) is required at the beginning of the line for each sub-item.</li>
364<li>Main sections must not be indented.</li>
365<li>Each sub-item within a main section must be indented by the same number of spaces.</li>
366</ul>
367The following table describes the settings for each of these items.
368<h4><CODE>BasicInfo</CODE></h4>
369<div class="table">
370<table border="1">
371<thead>
372<tr>
373<th align="center">Item</th>
374<th align="center">Description</th>
375<th align="center">Comments</th>
376</tr>
377</thead>
378<tbody>
379<tr>
380<td align="center"><CODE>Title</CODE></td>
381<td align="center">The title of the application. Specify the application title in eight or fewer ASCII characters.</td>
382<td align="center"></td>
383</tr>
384<tr>
385<td align="center"><CODE>ProductCode</CODE></td>
386<td align="center">Specify the product code, or the add-on content code. If it is a product code, specify the product code issued by Nintendo.</td>
387<td align="center"></td>
388</tr>
389<tr>
390<td align="center"><CODE>MediaSize</CODE></td>
391<td align="center">Specify the media size. Specify a value of 125 MB, 256 MB, 512 MB, 1 GB, 2 GB, or 4GB.<br /></td>
392<td align="center"></td>
393</tr>
394<tr>
395<td align="center"><CODE>Logo</CODE></td>
396<td align="center">Specify the logo data type.</td>
397<td align="center">Specify <CODE>Nintendo</CODE> for Nintendo titles, <CODE>Distributed</CODE> for titles for which Nintendo purchased the publishing license from the software manufacturer or titles for which Nintendo acquired the publishing license from a publisher, and <CODE>Licensed</CODE> for all other titles. For Chinese region titles, specify <CODE>iQue</CODE>.<br/>
398</td>
399</tr>
400<tr>
401<td align="center"><CODE>BackupMemoryType</CODE></td>
402<td align="center">This parameter is not used at the present time. It will be deleted in the future.</td>
403<td align="center">This parameter has been integrated into <a href="#savedatasize"><CODE>SaveDataSize</CODE></a>.</td>
404</tr>
405</tbody>
406</table>
407</div>
408
409<h4><CODE>TitleInfo</CODE></h4>
410<div class="table">
411<table border="1">
412<thead>
413<tr>
414<th align="center">Item</th>
415<th align="center">Description</th>
416<th align="center">Comments</th>
417</tr>
418</thead>
419<tbody>
420<tr>
421<td align="center"><CODE>Category</CODE></td>
422<td align="center">Specify the application type.<br/>
423<table border="1">
424<tr>
425<td><CODE>Application</CODE></td>
426<td>Specify this item when building a typical application.</td>
427</tr>
428<tr>
429<td><CODE>DlpChild</CODE></td>
430<td>Specify this item when building a Download Play child.<br/>It must be specified along with <CODE>ChildIndex</CODE> (described later).</td>
431</tr>
432<tr>
433<td><CODE>Demo</CODE></td>
434<td>Specify this item when you create a demo as a downloadable application.</td>
435</tr>
436<tr>
437<td><CODE>AddOnContents</CODE></td>
438<td>Specify this item when you create add-on content.</td>
439</tr>
440</table>
441</td>
442<td align="center">When omitted, the tool automatically chooses a value based on the <CODE>DESC</CODE> file contents.</td>
443</tr>
444<tr>
445<td align="center"><CODE>UniqueId</CODE></td>
446<td align="center">The unique ID of the application. Specify the ID issued by Nintendo.<br />Specify the same ID as the parent device for Download Play child devices.</td>
447<td align="center">You can specify a value from <CODE>0x00300</CODE> through <CODE>0xf7fff</CODE>. An error occurs if you do not specify a value. In the default RSF file, the end of the <a href="#titleid">trial code</a> is used as the <CODE>UniqueId</CODE>.</td>
448</tr>
449<tr>
450<td align="center"><CODE>ChildIndex</CODE></td>
451<td align="center">Specify the Download Play child index.</td>
452<td align="center">You can specify values from <CODE>0</CODE> through <CODE>255</CODE>.</td>
453</tr>
454<tr>
455<td align="center"><CODE>DemoIndex</CODE></td>
456<td align="center">Specify the index for downloadable application demos.<br/>For more information, see <I>CTR Demo Creation Procedures for Downloadable Demos</I>.</td>
457<td align="center">You can specify values from <CODE>1</CODE> through <CODE>255</CODE>.</td>
458</tr>
459<tr>
460<td align="center">Variation</td>
461<td align="center">This option specifies the index of add-on content.</td>
462<td align="center">You can specify values from <CODE>0</CODE> through <CODE>255</CODE>.</td>
463</tr>
464</tbody>
465</table>
466</div>
467
468
469
470<h4><CODE>Rom</CODE></h4>
471<div class="table">
472<table border="1">
473<thead>
474<tr>
475<th align="center">Item</th>
476<th align="center">Description</th>
477<th align="center">Comments</th>
478</tr>
479</thead>
480<tbody>
481<tr>
482<td align="center"><CODE>HostRoot</CODE></td>
483<td align="center">The root path of the ROM file system.<br/>Specify either an absolute path or a relative path from the directory that is the current directory when executing <CODE>ctr_makerom</CODE>. All files and directories under the directory specified here are stored in the ROM file system. However, any files or directories that start with a period (&quot;<CODE>.</CODE>&quot;), or that are specified under the <CODE>Reject</CODE> item, are not stored in the ROM file system.</td>
484<td align="center">Although setting this parameter has the same effect as setting <CODE>ROMFS_ROOT</CODE> in the <CODE>OMake</CODE> file (except for the following point), if both are set <CODE>HostRoot</CODE> has precedence.
485<ul><li>When <CODE>HostRoot</CODE> is specified, the dependency relationships for the files and directories under the specified directory are not set, and a rebuild is not performed even if the files under the ROM file system are updated.</li></ul>
486When you want to set the dependency relationships for files and directories under the directory specified with <CODE>HostRoot</CODE>, they must be set with the <CODE>Omake</CODE> file's<a href="#ROMFS_DEPENDENCIES"><CODE>ROMFS_DEPENDENCIES</CODE></a>. For more information, see <A href="../SDKRules/BuildRules.html#makerom">Build Rules (<CODE>ctr_makerom</CODE>)</A>.</td>
487</tr>
488
489<tr>
490<td align="center"><CODE>Reject</CODE></td>
491<td align="center">Specify the names of files and directories to exclude from the ROM file system.<br/>Any files or directories that match the specified names are not stored in the ROM file system. You can set multiple values. Specifications can use the &quot;<CODE>*</CODE>&quot; and &quot;<CODE>?</CODE>&quot; wildcards (&quot;<CODE>*</CODE>&quot; matches 0 or more characters, and &quot;<CODE>?</CODE>&quot; matches a single character) or the .NET Framework regular expressions. When specifying paths, specify absolute paths from the root directory specified by <CODE>HostRoot</CODE>.<br/>The only character that can be used as a path delimiter is the <CODE>/</CODE> character. <br/><br/> When specifying wildcards, denote paths that begin with '<CODE>/</CODE>'.<br/>
492<p class="code">
493<B>Example:</B><br/> Reject: <br/><br/>&nbsp;&nbsp;- &quot;/abc*&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Exclude files in HostRoot that start with &quot;abc.&quot;<br/> &nbsp;&nbsp;- &quot;/*def*&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Exclude files that contain the string &quot;def.&quot; <br/>
494</p>
495<br/> When specifying regular expressions, start the notation pattern with '<CODE>&gt;</CODE>'.<br/>
496<p class="code">
497<B>Example:</B><br/> Reject: <br/><br/>&nbsp;&nbsp;- &quot;&gt;^/abc.*&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Exclude files in HostRoot that start with &quot;abc.&quot;<br/> &nbsp;&nbsp;- &quot;&gt;def.*&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Exclude files that contain the string &quot;def.&quot;<br/> &nbsp;&nbsp;- &quot;&gt;^/[^/]+/.*ghi.*&quot;&nbsp;&nbsp;# Exclude files two levels below the HostRoot directory that contain the string &quot;ghi.&quot; <br/>
498</p>
499<br/> <br/> When the first character is other than '<CODE>/</CODE>' or '<CODE>&gt;</CODE>', it is treated as a wildcard specification. Although operation specifications of this type were supported up to CTR-SDK 1.0, their use is not recommended.<br/> For example, if the filename matches, it is excluded regardless of the directory it is in.<br/> <br/>
500</td>
501<td align="center">Use the syntax described in the <a href="#sequence_element">Specifying Multiple Values</a> section.</td>
502</tr>
503
504<tr>
505<td align="center">Include</td>
506<td align="center">Specify the names of files and directories to include in the ROM file system.<br/>An error occurs if files and directories matching the specified names do not exist in the ROM file system.<br/>You can set multiple values. The format for specifying values is the same as for <CODE>Reject</CODE>.<br/>
507</td>
508<td align="center">Use the syntax described in the <a href="#sequence_element">Specifying Multiple Values</a> section.</td>
509</tr>
510
511
512<tr>
513<a name="savedatasize"><td align="center"><CODE>SaveDataSize</CODE></td></a>
514<td align="center">Specify the size of the save data. Specify values in the format <CODE>nKB</CODE>, <CODE>nMB</CODE>, or <CODE>nGB</CODE>. If <CODE>Card1</CODE> is specified for <B>CardInfo/MediaType</B>, a value of 0 KB, 128 KB, or 512 KB can be specified.<br/>If <CODE>Card2</CODE> is specified for <B>CardInfo/MediaType</B>, any value can be specified in 1 MB units up to a maximum of half the value specified for <B>BasicInfo/MediaSize</B>.<br/><STRONG>Note:</STRONG> In either case, the actual size that is used is smaller than the size specified here.<br/>For more information about the sizes that can be used, see the <a href="../api/nn/fs/briefing/savedata_calc_user.html">Save Data File System Capacity Calculation Sheet</a> page in the Function Reference.
515</td>
516<td align="center">
517If the specified value differs from the size of the backup memory actually being used, the backup memory size takes precedence. (However, if you specify nothing or a size of <CODE>0</CODE>, <B>CardInfo/MediaType</B> is set to <CODE>None</CODE> by default, and you cannot use backup memory.)<br />For more information, see the function reference page for <CODE><a href="../api/nn/fs/FormatSaveData.html">nn::fs::FormatSaveData</a></CODE>.<br/><br/>If this value is not specified, it is treated as if a size of <CODE>0</CODE> has been specified.<br/><br/><br/>The <CODE>Card2</CODE> specifications are provisional, and may change moving forward.
518</td>
519</tr>
520</tbody>
521</table>
522</div>
523
524<h4><CODE>CardInfo</CODE></h4>
525<div class="table">
526<table border="1">
527<thead>
528<tr>
529<th align="center">Item</th>
530<th align="center">Description</th>
531<th align="center">Comments</th>
532</tr>
533</thead>
534<tbody>
535<tr>
536<td align="center"><CODE>CardDevice</CODE></td>
537<td align="center">Specify <CODE>NorFlash</CODE> if <SPAN class="argument">MediaType</SPAN> is <CODE>Card1</CODE> and <SPAN class="argument">SaveDataSize</SPAN> is larger than 0.<br/>Otherwise, specify <CODE>None</CODE>. <br/>This value can be omitted because if it is unspecified, the appropriate value is determined automatically.</td>
538<td align="center">
539</td>
540</tr>
541<tr>
542<td align="center"><CODE>MediaType</CODE></td>
543<td align="center">Specify the type of game card according to the size of save data required. Specify either <CODE>Card1</CODE> or <CODE>Card2</CODE>.</td>
544<td align="center">
545When omitted, the tool uses the default value of <CODE>Card1</CODE>.
546</td>
547</tr>
548</tbody>
549</table>
550</div>
551
552
553<h4><CODE>SystemControlInfo</CODE></h4>
554<div class="table">
555<table border="1">
556<thead>
557<tr>
558<th align="center">Item</th>
559<th align="center">Description</th>
560<th align="center">Comments</th>
561</tr>
562</thead>
563<tbody>
564<tr>
565<td align="center"><CODE>StackSize</CODE></td>
566<td align="center">Specify the stack size of the main thread (in bytes).</td>
567<td align="center">Must be a multiple of 4096. (Default value: 256 KB)</td>
568</tr>
569<tr>
570<td align="center"><CODE>RemasterVersion</CODE></td>
571<td align="center">Specify the remaster version. When omitted, the tool uses the default value of <CODE>0</CODE>.</td>
572<td align="center"></td>
573</tr>
574</tbody>
575</table>
576</div>
577
578<h4><CODE>AccessControlInfo</CODE></h4>
579<div class="table">
580<table border="1">
581<thead>
582<tr>
583<th align="center">Item</th>
584<th align="center">Description</th>
585<th align="center">Comments</th>
586</tr>
587</thead>
588<tbody>
589<tr>
590<td align="center"><CODE>Priority</CODE></td>
591<td align="center">Specify the priority of the main thread.</td>
592<td align="center">You can specify values from <CODE>0</CODE> through <CODE>31</CODE> (inclusive).</td>
593</tr>
594</tbody>
595<tbody>
596<tr>
597<td align="center"><CODE>UseExtSaveData</CODE></td>
598<td align="center">Specify <CODE>true</CODE> when using expanded save data.</td>
599<td align="center">The default value is <CODE>false</CODE>.</td>
600</tr>
601</tbody>
602<tbody>
603<tr>
604<td align="center"><CODE>ExtSaveDataNumber</CODE></td>
605<td align="center">Specify the expanded save data number using 20 bits.</td>
606<td align="center">The default is the <CODE>UniqueId</CODE>.</td>
607</tr>
608</tbody>
609<tbody>
610<tr>
611<td align="center"><CODE>OtherUserSaveDataId1</CODE><br /><CODE>OtherUserSaveDataId2</CODE><br /><CODE>OtherUserSaveDataId3</CODE></td>
612<td align="center">
613Specify the unique IDs for the titles with the save data you want to access. Up to three IDs can be specified.<br />If the unique ID you want to specify is the same as the unique ID of the program that is made by this RSF file, you can just set <CODE>true</CODE> for <SPAN class="argument">UseOtherVariationSaveData</SPAN> and not bother setting anything for <SPAN class="argument">OtherUserSaveDataId</SPAN>.
614</td>
615<td align="center"></td>
616</tr>
617</tbody>
618<tbody>
619<tr>
620<td align="center"><CODE>UseOtherVariationSaveData</CODE></td>
621<td align="center">
622Specify whether the save data of titles with the same unique ID as the local one can be accessed.<br />When <CODE>true</CODE> is specified, access is allowed. When <CODE>false</CODE> is specified, access is not allowed.
623</td>
624<td align="center">The default value is <CODE>false</CODE>.</td>
625</tr>
626</tbody>
627<tbody>
628<tr>
629<td align="center"><CODE>FileSystemAccess</CODE></td>
630<td align="center">
631    Specify the file system access permission attributes.<br /> Specify from the following values:
632    <ul>
633<li><CODE>DirectSdmc</CODE>: Allows direct access to the SD Card. Specify this option when using the library to directly access the SD CARD.</li>
634<li><CODE>DirectSdmcWrite</CODE>: Enables direct access to the SD Card for writing only.</li>
635        <li><CODE>Debug</CODE>: Enables debug features, such as direct access to SD Cards. This value cannot be specified for retail versions.</li>
636    </ul>
637When <CODE>Debug</CODE> is specified, restrictions on access to the file system are eased in part. For this reason, actions that operate with <CODE>Debug</CODE> specified may not operate correctly when <CODE>Debug</CODE> is not specified. To confirm the operations of retail products, be sure to check them with <CODE>Debug</CODE> not specified.
638</td>
639<td align="center">Use the syntax described in the <a href="#sequence_element">Specifying Multiple Values</a> section.</td>
640</tr>
641</tbody>
642</table>
643</div>
644
645<h4>Option</h4>
646<div class="table">
647<table border="1">
648<thead>
649<tr>
650<th align="center">Item</th>
651<th align="center">Description</th>
652<th align="center">Comments</th>
653</tr>
654</thead>
655<tbody>
656<tr>
657<td align="center"><CODE>EnableCompress</CODE></td>
658<td align="center">Specify <CODE>true</CODE> to enable static memory compression or <CODE>false</CODE> to disable it. Memory is not compressed if doing so does not decrease the size. The compression rate is output to the file specified in the <SPAN class="argument">-info</SPAN> argument.</td>
659<td align="center">If this argument is not specified, the default value of <CODE>true</CODE> is used.</td>
660</tr>
661</tbody>
662</table>
663</div>
664
665<h3>Variables</h3>
666
667<p>
668Using the <CODE>-Dname=value</CODE> option allows you to pass variable names and their corresponding values to the <CODE>ctr_makerom</CODE> tool. The <CODE>ctr_makerom</CODE> tool replaces any occurrences of <CODE>$(name)</CODE> within the RSF file with the specified <CODE>value</CODE>, then evaluates the results. An example is shown below.
669</p>
670
671<p class="code">
672$ ctr_makerom32 test.axf -o test.cci -rsf test.rsf -DTITLE=Test -DROMFS_ROOT=files<br/> <br/> --- test.rsf<br/> BasicInfo:<br/>&nbsp;&nbsp;Title: $(TITLE)<br/> <br/> Rom:<br/>&nbsp;&nbsp;HostRoot: &quot;$(ROMFS_ROOT)&quot;<br/> <br/> --- Value at final evaluation.<br/> BasicInfo:<br/>&nbsp;&nbsp;Title: Test<br/> <br/> Rom:<br/>&nbsp;&nbsp;HostRoot: &quot;files&quot;<br/>
673</p>
674
675<h2><a name="desc">DESC File</a></h2>
676<p>
677DESC files are placed in the <CODE>CTR_SDK/resources/specfiles</CODE> folder. Use the appropriate DESC file depending on the type of application you are creating.<br/> <br/>
678<table border="1">
679<thead>
680<tr>
681<th align="center">Application Type</th>
682<th align="center">DESC File</th>
683<th align="center">Comments</th>
684</tr>
685</thead>
686<tbody>
687<tr>
688<td align="center">General applications</td>
689<td align="center"><CODE>Application.desc</CODE></td>
690<td align="center"></td>
691</tr>
692<tr>
693<td align="center">Download Play child</td>
694<td align="center"><CODE>DlpChild.desc</CODE></td>
695<td align="center"></td>
696</tr>
697<tr>
698<td align="center">Downloadable application demo</td>
699<td align="center"><CODE>DemoVersion.desc</CODE></td>
700<td align="center"></td>
701</tr>
702</tbody>
703</table>
704<br/>
705Edits to the DESC file are prohibited. Editing this file may prevent your application from operating properly.
706</p>
707<p>
708When you use the build system, the option <CODE>-desc CTR_SDK/resources/specfiles/Application.desc</CODE> is specified automatically when you run <CODE>ctr_makerom</CODE>.<br/>You can also specify within the OMakefile what DESC file to use. For more information, see the <a href="../SDKRules/BuildRules.html">Build Rules</a>.
709</p>
710<h2><a name="titleid">Game Software Prototype Code</a></h2>
711<p>
712The following code has been assigned for software testing and prototyping purposes.<br/>Use it as an ID for internal testing. Be careful to avoid duplicate IDs within your company and development department.<br/>Note that if you use this code for prototyping it will be handled as an error by Master Editor.
713<p class="code">
714BasicInfo:<br/>&nbsp;&nbsp;ProductCode: &quot;CTR-*-****&quot;<br/> <br/> TitleInfo:<br/>&nbsp;&nbsp;UniqueId&nbsp;&nbsp;&nbsp;: 0xFF000 through 0xFF3FF<br/> <br/> &nbsp;* ... A-Z, 0-9<br/>
715</p>
716<B>Note:</B> In CTR-SDK 0.14.1 and prior versions, <CODE>ProductCode</CODE> used the following format, but this format is no longer usable in subsequent versions.<br/>The value that is used in the 0.14.1 environment is the value with the &quot;<CODE>(###)</CODE>&quot; portion removed.
717<p class="code">
718&nbsp;&nbsp;ProductCode: &quot;CTR-*-**** (###)&quot;<br/>
719</p>
720</p>
721<h2><a name="omake">Variables Defined in <CODE>OMakefile</CODE></a></h2>
722<p>
723For more information about variables defined in <CODE>OMakefile</CODE>, see <A href="../SDKRules/BuildRules.html#makerom">Build Rules (<CODE>ctr_makerom</CODE>)</A>.
724</p>
725
726</tbody>
727</table>
728</div>
729<h2><a name="history">Revision History</a></h2>
730    <dl class="history">
731      <dt>2012/06/29</dt>
732<dd>Deleted the description of the Company Code.</dd>
733      <dt>2012/02/16</dt>
734<dd>Added a means of specifying access to the save data of another program.</dd>
735<dd>Added a caution about specifying <CODE>AccessControlInfo</CODE>/<CODE>Debug</CODE>.</dd>
736      <dt>2012/02/13</dt>
737<dd>Added a description of <CODE>Include</CODE>.</dd>
738      <dt>2012/01/20</dt>
739<dd>Noted that <CODE>BackupMemoryType</CODE> cannot be used anymore.</dd>
740<dd>Noted that the specification has been changed for <CODE>CardDevice</CODE>.</dd>
741      <dt>2012/01/11</dt>
742<dd>Added 4 GB to the media sizes.</dd>
743      <dt>2011/12/15</dt>
744<dd>Added text about add-on content codes and add-on content indices.</dd>
745<dd>Added a method for specifying logos for the Chinese region.</dd>
746      <dt>2011/12/07</dt>
747<dd>Added a reference to <I>Demo Creation Procedures for Downloadable Demos</I> to the <CODE>DemoIndex</CODE> item of the <CODE>TitleInfo</CODE> section.</dd>
748      <dt>2011/09/29</dt>
749<dd>Added information specific to <CODE>DemoIndex</CODE> and <CODE>TitleInfo</CODE>.</dd>
750      <dt>2011/09/05</dt>
751<dd>Added text about <CODE>CardDevice</CODE> download applications.</dd>
752      <dt>2011/08/03</dt>
753<dd>Added information on <CODE>-nowarn</CODE>.</dd>
754      <dt>2011/07/21</dt>
755<dd>Added what to specify in <CODE>Category</CODE> and <CODE>DESC</CODE> for a downloadable application demo.</dd>
756      <dt>2011/05/24</dt>
757<dd>Added information on what to specify in <CODE>Category</CODE> for add-on content.</dd>
758      <dt>2011/05/18</dt>
759<dd>Deleted the note that a warning is generated when code for prototyping is used.</dd>
760<dd>Added a note that Master Editor treats the code for prototyping as an error.</dd>
761      <dt>2011/04/25</dt>
762<dd>Added an explanation relating to CCL builds.</dd>
763<dd>Corrected misleading text.</dd>
764      <dt>2011/04/04</dt>
765<dd>Added information about <CODE>SaveDataSize</CODE>.</dd>
766      <dt>2011/03/25</dt>
767<dd>Added supplementary information about <CODE>BackupMemoryType</CODE>.</dd>
768      <dt>2011/03/23</dt>
769<dd>Added information about <CODE>-f exec</CODE>.</dd>
770<dd>Revised &quot;NAND app&quot; to &quot;import application.&quot;</dd>
771      <dt>2011/02/17</dt>
772<dd>Added information about specifications for <CODE>CardDevice</CODE>.</dd>
773      <dt>2011/01/26</dt>
774<dd>Complied with the changes in specification methods for <CODE>Reject</CODE>.</dd>
775      <dt>2010/12/27</dt>
776<dd>Added a method for specifying the remaster version.</dd>
777      <dt>2010/12/10</dt>
778<dd>Added remarks about <CODE>ChildIndex</CODE>.</dd>
779<dd>Added information about Download Play child devices to <CODE>UniqueId</CODE>.</dd>
780      <dt>2010/12/07</dt>
781<dd>Added a description of when no logo is specified.</dd>
782      <dt>2010/11/18</dt>
783<dd>Added a description of DESC file types.</dd>
784<dd>Added a description of the change in logo specification.</dd>
785<dd>Added a description of the <CODE>-icon</CODE> option.</dd>
786      <dt>2010/11/11</dt>
787<dd>Added a description of the file system access permission attributes.</dd>
788      <dt>2010/11/10</dt>
789<dd>Added a description of the change in the format of the product code.</dd>
790      <dt>2010/10/29</dt>
791<dd>Added a description of expanded save data and backup memory specifications.</dd>
792      <dt>2010/10/26</dt>
793<dd>Added a description of logo data.</dd>
794<dd>Changed the specifiable range for <CODE>UniqueId</CODE> to <CODE>0x300</CODE>.</dd>
795      <dt>2010/10/07</dt>
796<dd>Added the <CODE>-j</CODE> option.</dd>
797      <dt>2010/09/24</dt>
798<dd>Changed the <CODE>-cxi</CODE> option to <CODE>-content</CODE> and included a description.</dd>
799<dd>Included a description of the <CODE>-banner</CODE> and <CODE>-icon</CODE> options.</dd>
800<dd>Included a description of <CODE>Category</CODE> and <CODE>ChildIndex</CODE> specifications for <CODE>TitleInfo</CODE> and the logo specification for <CODE>BasicInfo</CODE>.</dd>
801      <dt>2010/08/17</dt>
802<dd>Added the Game Software Prototype Code section.</dd>
803      <dt>2010/08/03</dt>
804<dd>Added descriptions of the <CODE>EnableCompress</CODE> and <CODE>MediaSize</CODE> options.</dd>
805<dd>Deleted the <CODE>InitialCode</CODE> option.</dd>
806      <dt>2010/07/19</dt>
807<dd>Added a description of specifying the <CODE>-info</CODE> option, <CODE>CompanyCode</CODE>, <CODE>ProductCode</CODE>, and <CODE>UniqueId</CODE>.</dd>
808      <dt>2010/07/14</dt>
809<dd>Added a description of CXI files.</dd>
810      <dt>2009/12/22</dt>
811<dd>Initial version.</dd>
812    </dl>
813<hr><p>CONFIDENTIAL</p></body>
814</html>