1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3	<head>
4		<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
5		<META http-equiv="Content-Style-Type" content="text/css">
6		<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
7			<title>makeWad.exe</title>
8	</head>
9	<body>
10		<H1>makeWad.exe</H1>
11		<H2>Location</H2>
12		<p><code> $REVOLUTION_SDK_ROOT/X86/bin/ </code>
13		</p>
14		<H2>Overview</H2>
15		<p>
16			This is a tool used to create WAD files (<CODE>.wad</CODE>) for importing applications to Wii console NAND memory.
17		</p>
18		<H2>Description</H2>
19		<p>
20			Creates WAD files for applications and data titles.
21		</p>
22		<p>
23			Applications contain a DOL file as well as content files. The DOL file can be created from an ELF file using <CODE>makedol</CODE>. Content files must be archive files created with the <a href="../../tools/darch.html"><CODE>darchD.exe</CODE></a> archiver included in the SDK.
24		</p>
25		<p>
26			Data titles do not contain programs (DOL files). For more information about data titles, see <a href="../intro.html">NADK Introduction</a>.
27		</p>
28		<H2>Options</H2>
29		<H4><code>-n &lt;name&gt;</code></H4>
30		<p>
31			Specifies the output WAD file name.<br>
32		</p>
33		<H4><code>-l &lt;file 1, file 2, ...&gt;</code></H4>
34		<p>
35			Lowercase L (&quot;<CODE>l</CODE>&quot;). Specifies the files you want to package in the WAD file. When specifying the executable file (DOL file) and the content files (archive files), delimit them with commas.<br>
36		</p>
37		<H4><code>-I &lt;game version&gt;</code></H4>
38		<p>
39			Uppercase L. Specifies the game version of the application. The specification is either the major and minor version in <I>x.x</I> format or a number in hexadecimal or decimal notation. The default game version is <CODE>0.0</CODE> (alternatively, <CODE>0x0000</CODE> or <CODE>0</CODE>). Values range from <CODE>0.0</CODE> to <CODE>255.255</CODE> (alternatively, <CODE>0xFFFF</CODE> or <CODE>65535</CODE>). Set <CODE>0x0</CODE> (alternatively, <CODE>0x0000</CODE> or <CODE>0</CODE>) as the game version for the first master data submission for WiiWare or Virtual Console.
40		</p>
41		<H4><code>-g &lt;company code&gt;</code></H4>
42		<p>
43			Specifies the company code (2-byte ASCII). Obtain the company code in advance from Nintendo. Can be specified using either hexadecimal or a text string. In either case, it specifies a 16-bit value. The default is 2.<br>
44		</p>
45		<H4><code>-gc &lt;game code&gt;</code></H4>
46		<p>
47			Specifies the game code of the application (4-byte ASCII). Obtain the game code in advance from Nintendo. Can be specified using either hexadecimal or a text string. In either case, it specifies a 32-bit value. The default is <CODE>0x30303031</CODE> (&quot;0001&quot;). <b>Be aware that an application's game code must use uppercase alphabetic characters.</b> If the game code includes lowercase characters, it will be identified as a data title and will not be displayed on the Wii Menu.<br>
48		</p>
49		<H4><code>-T &lt;shared content specification&gt;</code></H4>
50		<p>
51			Specifies the shared content attribute. Specify 0 to define the file as a normal content file, or specify 1 to add the shared content attribute to the content.<br> The method of specification is a little unusual, so refer to the shared content section on the <a href="../intro.html">Intro</a> page.<br>
52		</p>
53		<H4><code>-m &lt;banner file&gt;</code></H4>
54		<p>
55			Specifies the banner file to be displayed in the channel menu.
56		</p>
57		<H4><code>-f</code></H4>
58		<p>
59			An option for data titles. Creates the WAD file for Add-on Content. <b>Be sure to specify this option when creating Add-on Content.</b>
60		</p>
61		<H4><code>-E &lt;game code of the application using the data title&gt;</code></H4>
62		<p>
63			An option for data titles. Specifies the game code (4-byte ASCII) of the application that will use the data title. Data titles can only be used from applications with the specified game codes.<br> <font color="red">When creating a data title, you must use this option and the following <CODE>-e</CODE> option to specify the application(s) that can use it. </font>
64 Failure to give a specification will result in an error.		</p>
65		<H4><code>-e &lt;bitmask to ignore for the game codes of applications that use a data title&gt;</code></H4>
66		<p>
67			An option for data titles. Specify this 32-bit value if you want to allow multiple applications, such as series and sequels, to access a data title. <b>The specified bits will not be used when applying access restrictions. </b>
68 Refer to the bottom of the page for a specific example of access restrictions.		</p>
69		<H4><code>-z</code></H4>
70		<p>
71			Displays the version number of <CODE>makeWad</CODE>.
72		</p>
73		<H4><code>-h</code></H4>
74		<p>
75			Displays the tool help. There are other options, but they cannot be used with this development tool at this point.<br>
76		</p>
77		<br>
78		<p><font color="red"><b>Note: The <CODE>-N</CODE> option has been eliminated due to changes in the way the country identifier codes and Parental Controls information are configured.</b></font></p>
79		<H3>Example of WAD File Creation</H3>
80		<p>
81			A procedure for creating a WAD file of the following configuration will be shown as an example.<br> <br> <!--mstheme--> </font><table border="2" bordercolorlight="#999999" bordercolordark="#000000" ID="Table1">
82				<tr>
83					<th> <!--mstheme--><font face="MS P????">Game Code<!--mstheme--></font></th><td>
84						<!--mstheme--><font face="MS P????">RABA<!--mstheme--></font>
85				<tr>
86					<th>
87						<!--mstheme--><font face="MS P????">Company Code<!--mstheme--></font></th><td>
88						<!--mstheme--><font face="MS P????">ZZ<!--mstheme--></font>
89				<tr>
90					<th>
91						<!--mstheme--><font face="MS P????">Game Version<!--mstheme--></font></th><td>
92						<!--mstheme--><font face="MS P????">1<!--mstheme--></font>
93				<tr>
94					<th>
95						<!--mstheme--><font face="MS P????">.wad Filename<!--mstheme--></font></th><td>
96						<!--mstheme--><font face="MS P????">SampleApp.wad<!--mstheme--></font>
97				<tr>
98					<th>
99						<!--mstheme--><font face="MS P????">Content Files<!--mstheme--></font></th><td>
100						<!--mstheme--><font face="MS P????">[DOL file], test1.arc, test2.arc, shared.arc<!--mstheme--></font>
101				<tr>
102					<th>
103						<!--mstheme--><font face="MS P????">Banner File<!--mstheme--></font></th><td>
104						<!--mstheme--><font face="MS P????">title.met<!--mstheme--></font>
105				<tr>
106					<th>
107						<!--mstheme--><font face="MS P????">Shared Content<!--mstheme--></font></th><td>
108						<!--mstheme--><font face="MS P????">shared.arc<!--mstheme--></font></td>
109				</tr>
110				<tr>
111					<th>
112						<!--mstheme--><font face="MS P????">Country Identifier Code<!--mstheme--></font></th><td>
113						<!--mstheme--><font face="MS P????">jp<!--mstheme--></font></td>
114				</tr>
115				<tr>
116					<th>
117						<!--mstheme--><font face="MS P????">Parental Controls Information<!--mstheme--></font></th><td>
118						<!--mstheme--><font face="MS P????">CERO A (All ages)<!--mstheme--></font></td>
119				</tr>
120			</table>
121			<ol>
122				<li>
123					<code>% setncountrycode jp</code><br> <br> Running <CODE>setncountrycode</CODE> will set the country code used for both disc applications and NAND applications.<br> <br>
124				</li>
125				<li>
126					<code>% setnparentalcontrol CERO_ALL</code><br> <br> Running <CODE>setnparentalcontrol</CODE> will set the Parental Controls information. The settings up through this point will be applied automatically when <CODE>makeWad</CODE> is run.<br> <br>
127				</li>
128				<li>
129					<code>% makedol -f [ELF file] -d [DOL file] </code> <br> <br>When <CODE>makedol</CODE> is executed, an executable DOL file will be created from the ELF file.<br> <br>
130				</li>
131				<li>
132					<code>% makeWad -n SampleApp -l [DOL file],test1.arc,test2.arc,shared.arc -m title.met -gc RABA -g ZZ -T 0,0,0,1 -I 1</code><br> <br> Specify the arguments for each item and execute <CODE>makeWad</CODE>. A WAD file called <code>SampleApp.wad</code> will now be created.<br>
133				</li>
134			</ol>
135		<H2>Precautions When Creating Data Titles</H2>
136<p>
137Note the following options for data titles when creating the WAD file.
138</p>
139
140<ul>
141<li><code><b>-f </b></code><br>Always specify this option when creating data titles.<br><br></li>
142
143<li><code><b>-E</b> &lt;game code of the application using the data title&gt;</code><br>Use this option when creating data titles to specify which application is permitted to use the data title. ELF and RPF files have a game code of <CODE>0000</CODE> when they are run, so you must allow access from <CODE>0000</CODE> for these programs to access data titles. Apply access restrictions to allow access from <CODE>0000</CODE> using this option alone or together with the <CODE><B>-e</B></CODE> option mentioned below.<br><br></li>
144
145<li><code><b>-e</b> &lt;bitmask to ignore for the game codes of applications that use a data title&gt;</code><br> Specify the bits to ignore with this option if you want to allow multiple applications to use a data title.<br><br></li>
146
147<li><code><b>-l</b> File1[,File2,...]</code><br> Data titles do not include program files, so the first content file is not a program file.<br><br></li>
148
149<li><code><b>-gc</b> &lt;game code&gt;</code><br>The game code of a data title <b>must begin with a lowercase alphabetic character</b>. The default game code for data titles is <CODE>a000</CODE>.<br><br></li>
150
151<li><code><b>-m</b> &lt;banner file&gt;</code><br> Specifies the banner file to be displayed on the Save Data Management screen of the Wii Menu. <font color=red>Make sure to create the banner file with <CODE>WiiSaveBanner.exe</CODE>, not <CODE>WiiMakeBanner.exe</CODE>.</font><br><br></li>
152</ul>
153
154<h3>Example of Access Restriction Settings for Data Titles</h3>
155<h4>To allow access from a specific application only</h4>
156<p>
157Use the <CODE>-E</CODE> option to specify the game code of the application from which access is allowed, and either leave the <CODE>-e</CODE> option unspecified or set it to <CODE>0x00000000</CODE>.<br> The following specification allows access only from an application whose game code is &quot;<CODE>RABA</CODE>&quot;.
158</p>
159<p>
160<code>% makeWad -f ... -E RABA</code>
161</p>
162<h4>To allow access from applications with game codes that contain a specific character string</h4>
163<p>
164Use the <CODE>-E</CODE> option to specify the game code that will be used as a base for allowing access, and the <CODE>-e</CODE> option to specify bits that will be ignored.<br> The following <CODE>-E</CODE> and <CODE>-e</CODE> option specifications allow access from applications whose game code is <CODE>RAB*</CODE> (<CODE>RAB0</CODE>, <CODE>RAB1</CODE>, <CODE>RABZ</CODE>, and so on).
165</p>
166<p>
167<code>% makeWad -f ... -E RAB0 -e 0x000000ff</code>
168</p>
169<p>
170You can specify any character for a part of the game code specified by the <CODE>-E</CODE> option and ignored by the <CODE>-e</CODE> option. In this case, the same access restrictions are applied when <code>-E RAB0</code> is specified as when <code>-E RABA</code> is specified.
171</p>
172<h4>To allow access from all applications</h4>
173<p>
174Specify all bits (<code>0xffffffff</code>) for the <CODE>-e</CODE> option. Specifying the <CODE>-E</CODE> option is optional (it will be set to <code>0x00000000</code>).<br>
175</p>
176<p>
177<code>% makeWad -f ... -e 0xffffffff</code>
178</p>
179
180
181<h3>Example of Creating a Data Title with makeWad</h3>
182<p>
183A procedure for creating a data title (WAD file) of the following configuration will be shown as an example.<br> <br> <!--mstheme--> </font><table border="2" bordercolorlight="#999999" bordercolordark="#000000" ID="Table1">
184<tr>
185	<th>
186		<!--mstheme--><font face="MS P????">.wad Filename<!--mstheme--></font></th><td>
187		<!--mstheme--><font face="MS P????">DataTitle<!--mstheme--></font>
188<tr>
189	<th> <!--mstheme--><font face="MS P????">Game Code (of the data title)<!--mstheme--></font></th><td>
190		<!--mstheme--><font face="MS P????">abcd<!--mstheme--></font>
191<tr>
192	<th>
193		<!--mstheme--><font face="MS P????">Content Files<!--mstheme--></font></th><td>
194		<!--mstheme--><font face="MS P????">data1.arc, data2.arc<!--mstheme--></font>
195<tr>
196	<th>
197		<!--mstheme--><font face="MS P????">Game code of the application that uses the data title<!--mstheme--></font></th><td>
198		<!--mstheme--><font face="MS P????">0001<!--mstheme--></font>
199<tr>
200	<th>
201		<!--mstheme--><font face="MS P????">Banner File<!--mstheme--></font></th><td>
202		<!--mstheme--><font face="MS P????">save.bnr<!--mstheme--></font>
203</tr>
204</table>
205<ol>
206	<li>
207		<code>% makeWad -f -n DataTitle -l data1.arc,data2.arc -m save.bnr -gc abcd -E 0001</code><br> <br> Specify the arguments for each item and run <CODE>makeWad</CODE>. A data title called <CODE>DataTitle.wad</CODE> will be created.<br>
208	</li>
209</ol>
210</p>
211
212<H2>Tips</H2>
213<p>
214	You can also use a text file similar to the following to manage content files.
215</p>
216<dl><dd><pre class="construction">
217$ cat filelist
218contents/content2.arc
219contents/content3.arc
220contents/content4.arc
221contents/content5.arc
222</pre></dd></dl>
223<p>
224	In this case, you can run the following command to convert the aforementioned file list into the argument format passed to <CODE>makeWad</CODE>.<br> Suppress newline output with the <code>-n</code> option for <code>echo</code>, output a comma before each file, and redirect the results to a file.
225</p>
226<dl><dd><pre class="construction">
227$ for a in `cat filelist`; do echo -n ,$a; done &gt; inputfiles
228</pre></dd></dl>
229<p>
230	You can use the generated argument file as follows.
231</p>
232<dl><dd><pre class="construction">
233$ makeWad -n sampleApp -l sampleApp.dol`cat inputfiles`
234</pre></dd></dl>
235<p>
236	It is also possible to include a DOL file in the argument file as follows.
237</p>
238<dl><dd><pre class="construction">
239$ echo -n sampleApp.dol &gt; inputfiles
240$ for a in `cat filelist`; do echo -n ,$a; done &gt;&gt; inputfiles
241$ makeWad -n sampleApp -l `cat inputfiles`
242</pre></dd></dl>
243
244			<H2>See Also</H2>
245		<p><a href="./make.html"><CODE>make</CODE> Command Options</a></p>
246		<H2>Revision History</H2>
247		<p>
248			2008/05/28 Added notes concerning data title access from programs in the ELF and RPF file formats.<br> 2008/05/23 Added tips on how to specify content files using a file list.<br> 2008/03/27 Added a description of the <CODE>-e</CODE> option. Added examples of setting access restrictions for data titles.<br> 2008/03/24 Added information on how to specify the game version. Revised the explanation of the version for the initial submission.<br> 2008/02/16 Consolidated the description of data titles.<br> 2008/02/13 Added a precaution regarding the game code of applications.<br> 2008/01/15 <code>setncountrycode</code> has been integrated with <code>setcountrycode</code>.<br> 2007/08/06 Added and changed the content of <B>Example of WAD File Creation</B>.<br> 2007/07/11 Added text noting that the content file must be in the form of an archive file.<br> 2007/05/08 Revised <B>Example of WAD File Creation</B>.<br> 2007/05/02 Changed the option font.<br> 2006/11/17 Unified the terminology regarding versions.<BR> 2006/10/25 Added descriptions of the <CODE>-m</CODE> and <CODE>-z</CODE> options.<BR> 2006/10/20 Added a description of the <CODE>&ndash;T</CODE> option. Deleted the description of the <CODE>-N</CODE> option and added a note about this fact.<br> 2006/09/14 Added the <CODE>-N</CODE> option.<br>2006/08/15 Initial version.</p>
249	<hr><p>CONFIDENTIAL</p></body>
250</html>
251