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>Table of 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's Required</h3>
169<p>You will 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.<br/> 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>, <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>, <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 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 is a file that contains the settings for the CCI file.</p>
332
333<h3>Format</h3>
334
335<p>The RSF file format is shown below.</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;# Root path of the ROM file system<br/> &nbsp;&nbsp;Reject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# File and directory names to exclude from the ROM file system<br/> &nbsp;&nbsp;Include:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# File names that should be included in the ROM file system<br/> &nbsp;&nbsp;SaveDataSize:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Size of the save data<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 Card1 or Card2<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/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</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 given main section must be indented by the same number of spaces.</li>
366</ul>
367
368Setting descriptions for each of these items are provided below.
369
370<h4><CODE>BasicInfo</CODE></h4>
371<div class="table">
372<table border="1">
373<thead>
374<tr>
375<th align="center">Item</th>
376<th align="center">Description</th>
377<th align="center">Comments</th>
378</tr>
379</thead>
380<tbody>
381<tr>
382<td align="center"><CODE>Title</CODE></td>
383<td align="center">The title of the application. Specifies the application title in eight or fewer ASCII characters.</td>
384<td align="center"></td>
385</tr>
386<tr>
387<td align="center"><CODE>ProductCode</CODE></td>
388<td align="center">Specifies the product code, or the add-on content code. If this is a product code, specify the product code issued by Nintendo.</td>
389<td align="center"></td>
390</tr>
391<tr>
392<td align="center"><CODE>MediaSize</CODE></td>
393<td align="center">Specifies the media size. Specify a value of 125 MB, 256 MB, 512 MB, 1 GB, 2 GB, or 4GB.<br /></td>
394<td align="center"></td>
395</tr>
396<tr>
397<td align="center"><CODE>Logo</CODE></td>
398<td align="center">Specifies the logo data type.</td>
399<td align="center">Specify &quot;<CODE>Nintendo</CODE>&quot; for Nintendo titles, &quot;<CODE>Distributed</CODE>&quot; 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 &quot;<CODE>Licensed</CODE>&quot; for all other titles. For Chinese region titles, specify &quot;<CODE>iQue</CODE>.&quot;<br/>
400</td>
401</tr>
402<tr>
403<td align="center"><CODE>BackupMemoryType</CODE></td>
404<td align="center">
405This parameter is not used at the present time. It will be deleted in the future.<br/>
406</td>
407<td align="center">
408This parameter has been integrated into <a href="#savedatasize"><CODE>SaveDataSize</CODE></a>.
409</tr>
410</tbody>
411</table>
412</div>
413
414<h4><CODE>TitleInfo</CODE></h4>
415<div class="table">
416<table border="1">
417<thead>
418<tr>
419<th align="center">Item</th>
420<th align="center">Description</th>
421<th align="center">Comments</th>
422</tr>
423</thead>
424<tbody>
425<tr>
426<td align="center"><CODE>Category</CODE></td>
427<td align="center">Specifies the application type.<br/>
428<table border="1">
429<tr>
430  <td><CODE>Application</CODE></td>
431  <td>Specify this when building a typical application.</td>
432</tr>
433<tr>
434  <td><CODE>DlpChild</CODE></td>
435  <td>Specify this when building a Download Play child.<br/> This must be specified along with <CODE>ChildIndex</CODE> (described later).</td>
436</tr>
437<tr>
438  <td><CODE>Demo</CODE></td>
439  <td>Specify this when you create a demo as a downloadable application.</td>
440</tr>
441<tr>
442  <td><CODE>AddOnContents</CODE></td>
443  <td>Specify this when you create add-on content.</td>
444</tr>
445</table>
446</td>
447<td align="center">When omitted, the tool automatically chooses a value based on the <CODE>DESC</CODE> file contents.</td>
448</tr>
449<tr>
450<td align="center"><CODE>UniqueId</CODE></td>
451<td align="center">The application's unique ID. Specifies the ID issued by Nintendo.<br /> Specifies the same ID as the parent device for Download Play child devices.</td>
452<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>
453</tr>
454<tr>
455<td align="center"><CODE>ChildIndex</CODE></td>
456<td align="center">Specifies the Download Play child index.</td>
457<td align="center">You can specify values from 0 through 255.</td>
458</tr>
459<tr>
460<td align="center"><CODE>DemoIndex</CODE></td>
461<td align="center">Specifies the index for downloadable application demos.<br/> For details, see <I>CTR Demo Creation Procedures for Downloadable Demos</I>.</td>
462<td align="center">You can specify values from 1 through 255.</td>
463</tr>
464<tr>
465<td align="center">Variation</td>
466<td align="center">This option specifies the index of add-on content.</td>
467<td align="center">You can specify values from 0 through 255.</td>
468</tr>
469</tbody>
470</table>
471</div>
472
473
474
475<h4><CODE>Rom</CODE></h4>
476<div class="table">
477<table border="1">
478<thead>
479<tr>
480<th align="center">Item</th>
481<th align="center">Description</th>
482<th align="center">Comments</th>
483</tr>
484</thead>
485<tbody>
486<tr>
487<td align="center"><CODE>HostRoot</CODE></td>
488<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 will be stored in the ROM file system. However, any files or directories that start with a period (&quot;<CODE>.</CODE>&quot;) will not be stored in the ROM file system, nor will any files or directories specified under the <CODE>Reject</CODE> item.</td>
489<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 one point below), if both are set then <CODE>HostRoot</CODE> has precedence.
490<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 will not be performed even if the files under the ROM file system are updated.</li></ul>
491When you would like 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>. See <A href="../SDKRules/BuildRules.html#makerom">Build Rules (<CODE>ctr_makerom</CODE>)</A> for details.</td>
492</tr>
493
494<tr>
495<td align="center"><CODE>Reject</CODE></td>
496<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 names specified will not be 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/>
497<p class="code">
498<B>Example:</B><br/> Reject: <br/> &nbsp;&nbsp;- &quot;/abc*&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Exclude files in <CODE>HostRoot</CODE> 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/>
499</p>
500<br/> When specifying regular expressions, start the notation pattern with '<CODE>&gt;</CODE>'.<br/>
501<p class="code">
502<B>Example:</B><br/> Reject: <br/> &nbsp;&nbsp;- &quot;&gt;^/abc.*&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Exclude files in <CODE>HostRoot</CODE> 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/>
503</p>
504<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/>
505</td>
506<td align="center">Use the syntax described in the <a href="#sequence_element">Specifying Multiple Values</a> section.</td>
507</tr>
508
509<tr>
510<td align="center">Include</td>
511<td align="center">Specifies the names of files and directories that should be included 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 Reject.<br/>
512</td>
513<td align="center">Use the syntax described in the <a href="#sequence_element">Specifying Multiple Values</a> section.</td>
514</tr>
515
516
517<tr>
518<a name="savedatasize"><td align="center"><CODE>SaveDataSize</CODE></td>
519<td align="center">Specifies the size of the save data. Specify values in the format <CODE>nKB</CODE>, <CODE>nMB</CODE>, or <CODE>nGB</CODE>. If the media is <CODE>Card1</CODE>, downloadable applications can be specified only in sizes of 0 KB, 128 KB, and 512 KB.<br/> If the media is <CODE>Card2</CODE>, you can specify values only in increments of 1 MB, and only up to half of the value specified for <CODE>BasicInfo</CODE> / <CODE>BackupMemoryType</CODE>.<br/> <STRONG>Note:</STRONG> In either case, the actual size that is used is smaller than the size specified here.<br/> To read details about usable sizes, 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.
520</td>
521<td align="center">
522If the value specified here differs from the size of the backup memory that is actually used, then the backup memory size takes precedence.<br /> For details, see the page on the <a href="../api/nn/fs/FormatSaveData.html"><CODE>nn::fs::FormatSaveData</CODE></a> function in the Function Reference.<br/><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.
523</td>
524</tr>
525</tbody>
526</table>
527</div>
528
529<h4><CODE>CardInfo</CODE></h4>
530<div class="table">
531<table border="1">
532<thead>
533<tr>
534<th align="center">Item</th>
535<th align="center">Description</th>
536<th align="center">Comments</th>
537</tr>
538</thead>
539<tbody>
540<tr>
541<td align="center"><CODE>CardDevice</CODE></td>
542<td align="center">Specify <B>NorFlash</B> if <SPAN class="argument">MediaType</SPAN> is <CODE>Card1</CODE> and <SPAN class="argument">SaveDataSize</SPAN> is larger than 0.<br/>Otherwise, specify <B>None</B>. <br/> This value can be omitted because if it is unspecified, the appropriate value is determined automatically.
543<td align="center">
544</td>
545</tr>
546<tr>
547<td align="center"><CODE>MediaType</CODE></td>
548<td align="center">Specifies the game card type. Specify either <CODE>Card1</CODE> or <CODE>Card2</CODE>.</td>
549<td align="center">When omitted, the tool uses the default value of <CODE>Card1</CODE>.
550</tr>
551</tbody>
552</table>
553</div>
554
555
556<h4><CODE>SystemControlInfo</CODE></h4>
557<div class="table">
558<table border="1">
559<thead>
560<tr>
561<th align="center">Item</th>
562<th align="center">Description</th>
563<th align="center">Comments</th>
564</tr>
565</thead>
566<tbody>
567<tr>
568<td align="center"><CODE>StackSize</CODE></td>
569<td align="center">Specify the stack size of the main thread (in bytes).</td>
570<td align="center">Must be a multiple of 4096. (Default value: 256 KB)</td>
571</tr>
572<tr>
573<td align="center"><CODE>RemasterVersion</CODE></td>
574<td align="center">Specifies the remaster version. When omitted, the tool uses the default value of <CODE>0</CODE>.</td>
575<td align="center"></td>
576</tr>
577</tbody>
578</table>
579</div>
580
581<h4><CODE>AccessControlInfo</CODE></h4>
582<div class="table">
583<table border="1">
584<thead>
585<tr>
586<th align="center">Item</th>
587<th align="center">Description</th>
588<th align="center">Comments</th>
589</tr>
590</thead>
591<tbody>
592<tr>
593<td align="center"><CODE>Priority</CODE></td>
594<td align="center">Specifies the priority of the main thread.</td>
595<td align="center">You can specify values between 0 and 31 (inclusive).</td>
596</tr>
597</tbody>
598<tbody>
599<tr>
600<td align="center"><CODE>UseExtSaveData</CODE></td>
601<td align="center">Specify <CODE>true</CODE> when using expanded save data.</td>
602<td align="center">The default value is <CODE>false</CODE>.</td>
603</tr>
604</tbody>
605<tbody>
606<tr>
607<td align="center"><CODE>ExtSaveDataNumber</CODE></td>
608<td align="center">Specify the expanded save data number using 20 bits.</td>
609<td align="center">The default is the <CODE>UniqueId</CODE>.</td>
610</tr>
611</tbody>
612<tbody>
613<tr>
614<td align="center"><CODE>OtherUserSaveDataId1</CODE><br /><CODE>OtherUserSaveDataId2</CODE><br /><CODE>OtherUserSaveDataId3</CODE></td>
615<td align="center">
616  Specify the unique ID(s) for the title(s) with the save data you want to access. Up to three 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>.
617</td>
618<td align="center"></td>
619</tr>
620</tbody>
621<tbody>
622<tr>
623<td align="center"><CODE>UseOtherVariationSaveData</CODE></td>
624<td align="center">
625  Specify whether the save data of titles with the same unique ID as own unique ID can be used.<br /> When <CODE>true</CODE> is specified, access is allowed. When <CODE>false</CODE> is specified, access is not allowed.
626</td>
627<td align="center">The default value is <CODE>false</CODE>.</td>
628</tr>
629</tbody>
630<tbody>
631<tr>
632<td align="center"><CODE>FileSystemAccess</CODE></td>
633<td align="center">
634    Specifies the file system access permission attributes.<br /> Specify from the following values:
635    <ul>
636        <li><CODE>DirectSdmc</CODE>: Allows direct access to the SD Card. Specify this when using the library to directly access the SD CARD.</li>
637<li><CODE>DirectSdmcWrite</CODE>: Enables direct access to the SD Card for writing only.</li>
638        <li><CODE>Debug</CODE>: Enables debug features, such as direct access to SD Cards. This value cannot be specified for retail versions.</li>
639    </ul>
640    When <CODE>Debug</CODE> is specified, restrictions on access to the file system will be 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.
641</td>
642<td align="center">Use the syntax described in the <a href="#sequence_element">Specifying Multiple Values</a> section.</td>
643</tr>
644</tbody>
645</table>
646</div>
647
648<h4>Option</h4>
649<div class="table">
650<table border="1">
651<thead>
652<tr>
653<th align="center">Item</th>
654<th align="center">Description</th>
655<th align="center">Comments</th>
656</tr>
657</thead>
658<tbody>
659<tr>
660<td align="center"><CODE>EnableCompress</CODE></td>
661<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>
662<td align="center">If this argument is not specified, the default value of <CODE>true</CODE> is used.</td>
663</tr>
664</tbody>
665</table>
666</div>
667
668<h3>Variables</h3>
669
670<p>
671Using 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.
672</p>
673
674<p class="code">
675$ 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/>
676</p>
677
678<h2><a name="desc">DESC File</a></h2>
679<p>
680DESC 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/>
681<table border="1">
682<thead>
683<tr>
684<th align="center">Application Type</th>
685<th align="center">DESC File</th>
686<th align="center">Comments</th>
687</tr>
688</thead>
689<tbody>
690<tr>
691<td align="center">General applications</td>
692<td align="center"><CODE>Application.desc</CODE></td>
693<td align="center"></td>
694</tr>
695<tr>
696<td align="center">Download Play child</td>
697<td align="center"><CODE>DlpChild.desc</CODE></td>
698<td align="center"></td>
699</tr>
700<tr>
701<td align="center">Downloadable application demo</td>
702<td align="center"><CODE>DemoVersion.desc</CODE></td>
703<td align="center"></td>
704</tr>
705</tbody>
706</table>
707<br/>
708
709Edits to the DESC file are prohibited. Editing this file may prevent your application from operating properly.
710</p>
711<p>
712When 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 details, see the <a href="../SDKRules/BuildRules.html">Build Rules</a>.
713</p>
714
715<h2><a name="titleid">Game Software Prototype Code</a></h2>
716<p>
717The following code has been assigned for software testing and prototyping purposes. Use this as an ID for internal testing. Be careful to avoid duplicate IDs within your company and development department. Note that if you use this code for prototyping it will be handled as an error by Master Editor.
718
719<p class="code">
720BasicInfo:<br/> &nbsp;&nbsp;ProductCode: &quot;CTR-*-****&quot;<br/> <br/> TitleInfo:<br/> &nbsp;&nbsp;UniqueId&nbsp;&nbsp;&nbsp;: 0xFF000 ~ 0xFF3FF</br> <br/> &nbsp;* ... A-Z, 0-9<br/>
721</p>
722
723<B>Note:</B> In CTR-SDK 0.14.1 and prior versions, <CODE>ProductCode</CODE> used the format below, 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.
724
725<p class="code">
726&nbsp;&nbsp;ProductCode: &quot;CTR-*-**** (###)&quot;</br>
727</p>
728
729</p>
730
731
732<h2><a name="omake">Variables Defined in OMakefile</a></h2>
733<p>
734Refer to <A href="../SDKRules/BuildRules.html#makerom">Build Rules (<CODE>ctr_makerom</CODE>)</A> for more information about variables defined in <CODE>OMakefile</CODE>.
735</p>
736
737</tbody>
738</table>
739</div>
740<h2><a name="history">Revision History</a></h2>
741    <dl class="history">
742      <dt>2012/06/29</dt>
743<dd>Deleted the description for the Company Code.</dd>
744      <dt>2012/02/16</dt>
745        <dd>Added a means of specifying access to the save data of another program.</dd>
746        <dd>Added a precaution about specifying <CODE>AccessControlInfo</CODE>/<CODE>Debug</CODE>.</dd>
747      <dt>2012/02/13</dt>
748        <dd>Added a description of <CODE>Include</CODE>.</dd>
749      <dt>2012/01/20</dt>
750        <dd>Noted that <CODE>BackupMemoryType</CODE> cannot be used anymore.</dd>
751        <dd>Noted that the specification has been changed for <CODE>CardDevice</CODE>.</dd>
752      <dt>2012/01/11</dt>
753        <dd>Added 4 GB to the media sizes.</dd>
754      <dt>2011/12/15</dt>
755        <dd>Added text about add-on content codes and add-on content indices.</dd>
756        <dd>Added method for specifying logos for the Chinese region.</dd>
757      <dt>2011/12/07</dt>
758        <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>
759      <dt>2011/09/29</dt>
760        <dd>Added information specific to <CODE>DemoIndex</CODE> and <CODE>TitleInfo</CODE>.</dd>
761      <dt>2011/09/05</dt>
762        <dd>Added text about <CODE>CardDevice</CODE> download applications.</dd>
763      <dt>2011/08/03</dt>
764        <dd>Added information on <CODE>-nowarn</CODE>.</dd>
765      <dt>2011/07/21</dt>
766        <dd>Added what to specify in <CODE>Category</CODE> and <CODE>DESC</CODE> for a downloadable application demo.</dd>
767      <dt>2011/05/24</dt>
768        <dd>Added information on what to specify in <CODE>Category</CODE> for add-on content.</dd>
769      <dt>2011/05/18</dt>
770        <dd>Deleted note that a warning is generated when code for prototyping is used.</dd>
771        <dd>Added note that Master Editor treats the code for prototyping as an error.</dd>
772      <dt>2011/04/25</dt>
773        <dd>Added explanation relating to CCL builds. </dd>
774        <dd>Corrected misleading text.</dd>
775      <dt>2011/04/04</dt>
776        <dd>Added information about <CODE>SaveDataSize</CODE>.</dd>
777      <dt>2011/03/25</dt>
778        <dd>Added supplementary information about <CODE>BackupMemoryType</CODE>.</dd>
779      <dt>2011/03/23</dt>
780        <dd>Added information about <SPAN class="argument">-f exec</SPAN>.<br /></dd>
781        <dd>Revised &quot;NAND app&quot; to &quot;import application&quot;.<br /></dd>
782      <dt>2011/02/17</dt>
783        <dd>Added information about specifying <CODE>CardDevice</CODE>.<br />
784        </dd>
785      <dt>2011/01/26</dt>
786        <dd>Updated for compliance with the changes in specification methods for <CODE>Reject</CODE>.<br />
787        </dd>
788      <dt>2010/12/27</dt>
789        <dd>Added a method for specifying the remaster version.<br />
790        </dd>
791      <dt>2010/12/10</dt>
792        <dd>Added remarks about <CODE>ChildIndex</CODE>.<br />
793        <dd>Added information about Download Play child devices to <CODE>UniqueId</CODE>.<br />
794        </dd>
795      <dt>2010/12/07</dt>
796        <dd>Added description of when no logo is specified.<br />
797        </dd>
798      <dt>2010/11/18</dt>
799        <dd>Added description of DESC file types.<br />
800        <dd>Added description of the change in logo specification.<br />
801        <dd>Added description of the <CODE>-icon</CODE> option.<br />
802        </dd>
803      <dt>2010/11/11</dt>
804        <dd>Added description of file system access permission attributes.<br />
805        </dd>
806      <dt>2010/11/10</dt>
807        <dd>Added description of product code format change.<br />
808        </dd>
809      <dt>2010/10/29</dt>
810        <dd>Added description of expanded save data and backup memory specifications.<br />
811        </dd>
812      <dt>2010/10/26</dt>
813        <dd>Added description of logo data.<br />
814        </dd>
815        <dd>Changed specifiable range for <CODE>UniqueId</CODE> to <CODE>0x300</CODE>.<br />
816        </dd>
817      <dt>2010/10/07</dt>
818        <dd>Added the <CODE>-j</CODE> option.<br />
819        </dd>
820      <dt>2010/09/24</dt>
821        <dd>Changed the <CODE>-cxi</CODE> option to <CODE>-content</CODE> and included a description.<BR>
822        <dd>Included a description of the <CODE>-banner</CODE> and <CODE>-icon</CODE> options.<BR>
823        <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>.<BR>
824        </dd>
825      <dt>2010/08/17</dt>
826        <dd>Added the &quot;Game Software Prototype Code&quot; section.
827        </dd>
828      <dt>2010/08/03</dt>
829        <dd>Added descriptions of the <CODE>EnableCompress</CODE> and <CODE>MediaSize</CODE> options.
830        </dd>
831        <dd>Deleted the <CODE>InitialCode</CODE> option.
832        </dd>
833      <dt>2010/07/19</dt>
834        <dd>Added a description of the <CODE>-info</CODE> option, <CODE>CompanyCode</CODE>, <CODE>ProductCode</CODE>, and <CODE>UniqueId</CODE>.
835        </dd>
836      <dt>2010/07/14</dt>
837        <dd>Added a description of CXI files.
838        </dd>
839      <dt>2009/12/22</dt>
840      <dd>Initial version.<br />
841      </dd>
842    </dl>
843<hr><p>CONFIDENTIAL</p></body>
844</html>