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    : #FF6600;
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	: #FF6600;
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    : #FF6600;
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>ctr_makerom</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 Within OMakefiles</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> ELF file that was created using &quot;RVCT for Nintendo&quot;
172<li> RSF File
173<li> DESC File
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's default RSF file is used. 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 -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 <CODE>-rsf</CODE>, <CODE>-f</CODE>, <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 much 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. Refer to the documentation corresponding to each type of content.
250</td>
251</tr>
252<tr>
253<td align="center"><CODE>-o</CODE></td>
254<td align="center">Specifies the output filename. If this option is omitted, the output is written to a file whose filename consists of the input ELF filename with its extension replaced by CCI, CXI, or CFA. The extension is determined by the format specified in the <CODE>-f</CODE> option.</td>
255</tr>
256<tr>
257<td align="center"><CODE>-Dname=value</CODE></td>
258<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>
259</tr>
260<tr>
261<td align="center"><CODE>-f FORMAT</CODE></td>
262<td align="center">Specifies the format of the image to output. The following values can be specified for <CODE>FORMAT</CODE>.
263<table>
264<tr>
265<td><CODE>card</CODE></td>
266<td>Outputs in .cci format. Specify this option when creating a standard card application.</td>
267</tr>
268<tr>
269<td><CODE>exec</CODE></td>
270<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>
271</tr>
272<tr>
273<td><CODE>data</CODE></td>
274<td>Outputs in CFA format.</td>
275</tr>
276<tr>
277<td><CODE>list</CODE></td>
278<td>Outputs in CCL format.</td>
279</tr>
280<tr>
281<td><CODE>le</CODE></td>
282<td>Outputs in LE format used for CCL.</td>
283</tr>
284<tr>
285<td><CODE>lr</CODE></td>
286<td>Outputs in LR format used for CCL.</td>
287</tr>
288
289</table>
290If nothing is specified, it is assumed that <CODE>exec</CODE> is specified.<br/>
291</td>
292</tr>
293<tr>
294<td align="center"><CODE>-info</CODE></td>
295<td align="center">Specifies the output file to which to output information about the output image. If unspecified, the output filename will have the <CODE>.xml</CODE> filename extension. This file contains information about the application title and ROMFS.
296</td>
297</tr>
298<tr>
299<td align="center"><CODE>-j NUM</CODE></td>
300<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.
301</td>
302</tr>
303
304<tr>
305<td align="center"><CODE>-le LE_FILE</CODE></td>
306<td align="center">Specifies the file path for an LE-format file created in format 2.</td>
307</tr>
308<tr>
309<td align="center"><CODE>-lr LR_FILE</CODE></td>
310<td align="center">Specifies the file path for an LR-format file created in format 3.</td>
311</tr>
312<tr>
313<td align="center"><CODE>-m 0x01000000</CODE></td>
314<td align="center">Required for format 2. Always specify <CODE>0x01000000</CODE>.</td>
315</tr>
316
317</tbody>
318</table>
319</div>
320
321<h2><a name="rsf">RSF File</a></h2>
322
323<p>This is a file that contains the settings for the CCI file.</p>
324
325<h3>Format</h3>
326
327<p>The RSF file format is shown below.</p>
328
329<p class="code">
330BasicInfo:<br/>&nbsp;&nbsp;Title:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Application title<br/> &nbsp;&nbsp;CompanyCode:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Company code<br/> &nbsp;&nbsp;ProductCode:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Product code<br/> &nbsp;&nbsp;MediaSize:&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;# Logo data specification<br/> &nbsp;&nbsp;BackupMemoryType:&nbsp;&nbsp;# Backup memory type<br/>
331
332</br> TitleInfo: <br/> &nbsp;&nbsp;Category:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Title category<br/> &nbsp;&nbsp;UniqueId:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Unique ID for title code<br/> &nbsp;&nbsp;ChildIndex:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# DLP child index<br/> <br/> Rom:<br/>&nbsp;&nbsp;HostRoot:&nbsp;&nbsp;&nbsp;&nbsp;# Root path of the ROM file system<br/> &nbsp;&nbsp;Reject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# File and directory names to exclude from 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;# Sets either NorFlash or None<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/>
333
334</p>
335
336<p>
337Configure 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:
338
339<h3>Specifying Single Values</h3>
340<p class="code">
341Key Name: Value
342</p>
343
344<h3><a name="sequence_element" />Specifying Multiple Values</h3>
345<p class="code">
346Key Name:<br/>&nbsp;&nbsp;-&nbsp;Value 1<br/> &nbsp;&nbsp;-&nbsp;Value 2<br/> &nbsp;&nbsp;...<br/>
347</p>
348
349</p>
350
351<h4>Notes</h4>
352<ul>
353<li>Tabs cannot be used in place of half-width spaces.</li>
354<li>You must use at least one half-width space after the colons and hyphens that separate the key names from the values.</li>
355<li>Indentation (using half-width spaces) is required at the beginning of the line for each sub-item.</li>
356<li>Main sections must not be indented.</li>
357<li>Each sub-item within a given main section must be indented by the same number of spaces.</li>
358</ul>
359
360Setting descriptions for each of these items are provided below.
361
362<h4><CODE>BasicInfo</CODE></h4>
363<div class="table">
364<table border="1">
365<thead>
366<tr>
367<th align="center">Item</th>
368<th align="center">Description</th>
369<th align="center">Comments</th>
370</tr>
371</thead>
372<tbody>
373<tr>
374<td align="center"><CODE>Title</CODE></td>
375<td align="center">The title of the application. Specifies the application title in eight or fewer ASCII characters.</td>
376<td align="center"></td>
377</tr>
378<tr>
379<td align="center"><CODE>CompanyCode</CODE></td>
380<td align="center">The company code. Company code that was assigned when the licensing agreement was signed with Nintendo. Two ASCII characters.</td>
381<td align="center"></td>
382</tr>
383<tr>
384<td align="center"><CODE>ProductCode</CODE></td>
385<td align="center">Product code. Specifies the product code issued by Nintendo.</td>
386<td align="center"></td>
387</tr>
388<tr>
389<td align="center"><CODE>MediaSize</CODE></td>
390<td align="center">Specifies the media size. Specify a value of 125 MB, 256 MB, 512 MB, 1 GB, or 2 GB.</td>
391<td align="center"></td>
392</tr>
393<tr>
394<td align="center"><CODE>Logo</CODE></td>
395<td align="center">Specifies the type of logo data.</td>
396<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. If omitted, &quot;<CODE>Nintendo</CODE>&quot; is used as the default value.<br/><br/>The value &quot;<CODE>Published</CODE>&quot; was valid in previous versions, but it has been replaced by &quot;<CODE>Distributed</CODE>&quot;. If you specify &quot;<CODE>Published</CODE>&quot;, it is handled as &quot;<CODE>Distributed</CODE>&quot;. In future releases it will not be possible to specify &quot;<CODE>Published</CODE>&quot;.
397</td>
398</tr>
399<tr>
400<td align="center"><CODE>BackupMemoryType</CODE></td>
401<td align="center">
402Specify the backup memory type. This is ignored for download applications.<br/>Specify None, 128 KB, or 512 KB.
403</td>
404<td align="center">
405If the value specified here differs from the size of the backup memory that is actually used, then the backup memory size takes precedence.<br />See the page on the <a href="../api/nn/fs/FormatSaveData.html"><CODE>nn::fs::FormatSaveData</CODE></a> function in the Function Reference for details.
406</tr>
407</tbody>
408</table>
409</div>
410
411<h4><CODE>TitleInfo</CODE></h4>
412<div class="table">
413<table border="1">
414<thead>
415<tr>
416<th align="center">Item</th>
417<th align="center">Description</th>
418<th align="center">Note</th>
419</tr>
420</thead>
421<tbody>
422<tr>
423<td align="center"><CODE>Category</CODE></td>
424<td align="center">Specifies the application type.<br/>
425<table border="1">
426<tr>
427<td><CODE>Application</CODE></td>
428<td>Specify this when building a typical application.</td>
429</tr>
430<tr>
431<td><CODE>DlpChild</CODE></td>
432<td>Specify this when building a Download Play child.<br/>This must be specified along with <CODE>ChildIndex</CODE> (described later).</td>
433</tr>
434</table>
435</td>
436<td align="center">When unspecified, a value corresponding to <CODE>DESC</CODE> is automatically selected.</td>
437</tr>
438<tr>
439<td align="center"><CODE>UniqueId</CODE></td>
440<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>
441<td align="center">Valid values are from 0x00300 to 0xf7fff.</td>
442</tr>
443<tr>
444<td align="center"><CODE>ChildIndex</CODE></td>
445<td align="center">Specifies the Download Play child index.</td>
446<td align="center">You can specify values from 0 through 255.</td>
447</tr>
448</tbody>
449</table>
450</div>
451
452
453
454<h4><CODE>Rom</CODE></h4>
455<div class="table">
456<table border="1">
457<thead>
458<tr>
459<th align="center">Item</th>
460<th align="center">Description</th>
461<th align="center">Note</th>
462</tr>
463</thead>
464<tbody>
465<tr>
466<td align="center"><CODE>HostRoot</CODE></td>
467<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>
468<td align="center"></td>
469</tr>
470
471<tr>
472<td align="center"><CODE>Reject</CODE></td>
473<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/>
474<p class="code">
475<B>Example:</B><br/> Reject:<br/> &nbsp;&nbsp;- &quot;/abc*&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Exclude files in HostRoot starting with &quot;abc&quot;<br/> &nbsp;&nbsp;- &quot;/*def*&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Exclude files containing the string &quot;def&quot;<br/>
476</p>
477<br/> When specifying regular expressions, start the notatation pattern with '<CODE>&gt;</CODE>'.<br/>
478<p class="code">
479<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 HostRoot starting 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 containing the string &quot;def&quot;<br/> &nbsp;&nbsp;- &quot;&gt;^/[^/]+/.*ghi.*&quot;&nbsp;&nbsp;# Exclude files two levels below the HostRoot directory containing the string &quot;ghi&quot;<br/>
480</p>
481<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/>
482</td>
483<td align="center">Use the syntax described in the <a href="#sequence_element">Specifying Multiple Values</a> section.</td>
484</tr>
485
486<tr>
487<td align="center"><cf style="CodeInline">SaveDataSize</cf></td>
488<td align="center">Specifies the size of the save data of the download application. Specify a value in the format <I>n</I>KB or <I>n</I>K, where <I>n</I> is <CODE>0</CODE>, <CODE>128</CODE>, or <CODE>512</CODE> only. The value specified in <CODE>BackupMemoryType</CODE> cannot be exceeded.<br/><STRONG>Note:</STRONG> The actual size that is used will be smaller than the size specified here.
489</td>
490<td align="center"></td>
491</tr>
492</tbody>
493</table>
494</div>
495
496<h4><CODE>CardInfo</CODE></h4>
497<div class="table">
498<table border="1">
499<thead>
500<tr>
501<th align="center">Item</th>
502<th align="center">Description</th>
503<th align="center">Note</th>
504</tr>
505</thead>
506<tbody>
507<tr>
508<td align="center"><CODE>CardDevice</CODE></td>
509<td align="center">When <CODE>None</CODE> is specified for <CODE>BasicInfo</CODE> or <CODE>BackupMemoryType</CODE>, <CODE>None</CODE> is specified for this item. When <CODE>128KB</CODE> or <CODE>512KB</CODE> is specified for <CODE>BasicInfo</CODE> or <CODE>BackupMemoryType</CODE>, <CODE>NorFlash</CODE> is specified for this item.
510</td>
511<td align="center">When unspecified, it is handled as if <CODE>NorFlash</CODE> had been specified.</td>
512</tr>
513</tbody>
514</table>
515</div>
516
517
518<h4><CODE>SystemControlInfo</CODE></h4>
519<div class="table">
520<table border="1">
521<thead>
522<tr>
523<th align="center">Item</th>
524<th align="center">Description</th>
525<th align="center">Note</th>
526</tr>
527</thead>
528<tbody>
529<tr>
530<td align="center"><CODE>StackSize</CODE></td>
531<td align="center">Specify the stack size of the main thread (in bytes).</td>
532<td align="center">Must be a multiple of 4096.</td>
533</tr>
534<tr>
535<td align="center">RemasterVersion</td>
536<td align="center">Specifies the remaster version. If unspecified, the version is treated as if 0 had been specified.</td>
537<td align="center"></td>
538</tr>
539</tbody>
540</table>
541</div>
542
543<h4><CODE>AccessControlInfo</CODE></h4>
544<div class="table">
545<table border="1">
546<thead>
547<tr>
548<th align="center">Item</th>
549<th align="center">Description</th>
550<th align="center">Note</th>
551</tr>
552</thead>
553<tbody>
554<tr>
555<td align="center"><CODE>Priority</CODE></td>
556<td align="center">Specifies the priority of the main thread.</td>
557<td align="center">You can specify values between 0 and 31 (inclusive).</td>
558</tr>
559</tbody>
560<tbody>
561<tr>
562<td align="center"><CODE>UseExtSaveData</CODE></td>
563<td align="center">Specify <CODE>true</CODE> when using expanded save data.</td>
564<td align="center">The default value is <CODE>false</CODE>.</td>
565</tr>
566</tbody>
567<tbody>
568<tr>
569<td align="center"><CODE>ExtSaveDataNumber</CODE></td>
570<td align="center">Specify the expanded save data number using 20 bits.</td>
571<td align="center">The default is the <CODE>UniqueId</CODE>.</td>
572</tr>
573</tbody>
574<tbody>
575<tr>
576<td align="center"><CODE>FileSystemAccess</CODE></td>
577<td align="center">
578Specifies the file system access permission attributes.<br />Specify from the following values:
579    <ul>
580<li><CODE>DirectSdmc</CODE>: Allows direct access to the SD Card. Specify this when using the library to directly access the SD CARD.</li>
581<li><CODE>DirectSdmcWrite</CODE>: Enables direct access to the SD Card for writing only.</li>
582<li><CODE>Debug</CODE>: Enables debug features, such as direct access to SD Cards. This value cannot be specified for retail versions.</li>
583    </ul>
584</td>
585<td align="center">Use the syntax described in the <a href="#sequence_element">Specifying Multiple Values</a> section.</td>
586</tr>
587</tbody>
588</table>
589</div>
590
591<h4>Option</h4>
592<div class="table">
593<table border="1">
594<thead>
595<tr>
596<th align="center">Item</th>
597<th align="center">Description</th>
598<th align="center">Note</th>
599</tr>
600</thead>
601<tbody>
602<tr>
603<td align="center"><CODE>EnableCompress</CODE></td>
604<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>
605<td align="center">If this argument is not specified, the default value of <CODE>true</CODE> is used.</td>
606</tr>
607</tbody>
608</table>
609</div>
610
611<h3>Variables</h3>
612
613<p>
614Using 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.
615</p>
616
617<p class="code">
618$ 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/>
619</p>
620
621<h2><a name="desc">DESC File</a></h2>
622<p>
623DESC 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/>
624<table border="1">
625<thead>
626<tr>
627<th align="center">Application Type</th>
628<th align="center">DESC File</th>
629<th align="center">Note</th>
630</tr>
631</thead>
632<tbody>
633<tr>
634<td align="center">General applications</td>
635<td align="center"><CODE>Application.desc</CODE></td>
636<td align="center"></td>
637</tr>
638<tr>
639<td align="center">Download Play child</td>
640<td align="center"><CODE>DlpChild.desc</CODE></td>
641<td align="center"></td>
642</tr>
643</tbody>
644</table>
645<br/>
646
647Edits to the DESC file are prohibited. Editing this file may prevent your application from operating properly.
648</p>
649<p>
650When 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>.
651</p>
652
653<h2><a name="titleid">Game Software Prototype Code</a></h2>
654<p>
655The 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.
656<p class="code">
657BasicInfo:<br/>&nbsp;CompanyCode:&quot;00&quot;</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/>
658</p>
659
660<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.
661
662<p class="code">
663&nbsp;&nbsp;ProductCode: &quot;CTR-*-**** (###)&quot;</br>
664</p>
665
666</p>
667
668
669<h2><a name="omake">Variables Defined Within OMakefiles</a></h2>
670<p>
671Refer to <A href="../SDKRules/BuildRules.html#makeromvariable">Build Rules (<CODE>ctr_makerom</CODE>)</A> for more information about variables defined within the <CODE>OMakefile</CODE>.
672</p>
673
674</tbody>
675</table>
676</div>
677<h2><a name="history">Revision History</a></h2>
678    <dl class="history">
679      <dt>2011/05/18</dt>
680<dd>Deleted note that a warning is generated when code for prototyping is used.</dd>
681<dd>Added note that Master Editor treats the code for prototyping as an error.</dd>
682      <dt>2011/04/25</dt>
683<dd>Added explanation relating to CCL builds. </dd>
684<dd>Corrected misleading text.</dd>
685      <dt>2011/04/04</dt>
686<dd>Added information about <CODE>SaveDataSize</CODE>.</dd>
687      <dt>2011/03/25</dt>
688<dd>Added supplementary information about <CODE>BackupMemoryType</CODE>.</dd>
689      <dt>2011/03/23</dt>
690<dd>Added information about <SPAN class="argument">-f exec</SPAN>.<br /></dd>
691<dd>Revised &quot;NAND app&quot; to &quot;import application&quot;.<br /></dd>
692      <dt>2011/02/17</dt>
693<dd>Added information about specifying <CODE>CardDevice</CODE>.<br />
694        </dd>
695      <dt>2011/01/26</dt>
696<dd>Updated for compliance with the changes in specification methods for <CODE>Reject</CODE>.<br />
697        </dd>
698      <dt>2010/12/27</dt>
699<dd>Added a method for specifying the remaster version.<br />
700        </dd>
701      <dt>2010/12/10</dt>
702<dd>Added remarks about <CODE>ChildIndex</CODE>.<br />
703<dd>Added information about Download Play child devices to <CODE>UniqueId</CODE>.<br />
704        </dd>
705      <dt>2010/12/07</dt>
706<dd>Added description of when no logo is specified.<br />
707        </dd>
708      <dt>2010/11/18</dt>
709<dd>Added description of DESC file types.<br />
710<dd>Added description of the change in logo specification.<br />
711<dd>Added description of the <CODE>-icon</CODE> option.<br />
712        </dd>
713      <dt>2010/11/11</dt>
714<dd>Added description of file system access permission attributes.<br />
715        </dd>
716      <dt>2010/11/10</dt>
717<dd>Added description of product code format change.<br />
718        </dd>
719      <dt>2010/10/29</dt>
720<dd>Added description of expanded save data and backup memory specifications.<br />
721        </dd>
722      <dt>2010/10/26</dt>
723<dd>Added description of logo data.<br />
724        </dd>
725<dd>Changed specifiable range for <CODE>UniqueId</CODE> to <CODE>0x300</CODE>.<br />
726        </dd>
727      <dt>2010/10/07</dt>
728<dd>Added the <CODE>-j</CODE> option.<br />
729        </dd>
730      <dt>2010/09/24</dt>
731<dd>Changed the <CODE>-cxi</CODE> option to <CODE>-content</CODE> and included a description.<BR>
732<dd>Included a description of the <CODE>-banner</CODE> and <CODE>-icon</CODE> options.<BR>
733<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>
734        </dd>
735      <dt>2010/08/17</dt>
736<dd>Added the &quot;Game Software Prototype Code&quot; section.
737        </dd>
738      <dt>2010/08/03</dt>
739<dd>Added descriptions of the <CODE>EnableCompress</CODE> and <CODE>MediaSize</CODE> options.
740        </dd>
741<dd>Deleted the <CODE>InitialCode</CODE> option.
742        </dd>
743      <dt>2010/07/19</dt>
744<dd>Added a description of the <CODE>-info</CODE> option, <CODE>CompanyCode</CODE>, <CODE>ProductCode</CODE>, and <CODE>UniqueId</CODE>.
745        </dd>
746      <dt>2010/07/14</dt>
747<dd>Added a description of CXI files.
748        </dd>
749      <dt>2009/12/22</dt>
750<dd>Initial version.<br />
751      </dd>
752    </dl>
753<hr><p>CONFIDENTIAL</p></body>
754</html>
755