1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 4<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 5<base target="main"> 6<title>How to Develop Disc Spin-Off Channels</title> 7</head> 8 9<body> 10 11<h1>How to Develop Disc Spin-Off Channels</h1> 12<h2>Sample Demos Illustrating How to Develop Disc Spin-Off Channels and Channel Installer Applications</h2> 13<p>Here we use the sample demos (located below <CODE>/build/demos/discnanddemo</CODE>) to introduce methods of developing disc spin-off channels and channel installer applications.<br><br><br> <font color="red"><B>Note:</B> The creation of a single channel installer application requires the handling of multiple DLF files. Do not revise, delete, or move any of the files under <CODE>DvdRoot</CODE> while these DLF files are being used. Doing so results in abnormal application behavior.</font><br> 14</p> 15 16<H3>1. Creating a Disc Spin-Off Channel</H3> 17<p>Create a disc spin-off channel. For this example, we use <CODE>discnanddemo1</CODE>.</p> 18<TABLE border="1" width="100%"> 19 <TBODY> 20 <TR> 21 <TD width="100%"> 22 <PRE><CODE> 23% cd $REVOLUTION_SDK_ROOT/build/demos/discnanddemo<br> 24% make NDEBUG=TRUE NANDAPP=TRUE WAD_OPTION="-pc 0x4 -g ZZ -gc RABA"<br> 25% mkdir installdata<br> 26% cp bin/RVL/discnanddemo1.wad installdata/</CODE></PRE> 27 </TD> 28 </TR> 29 </TBODY> 30</TABLE> 31<p><font color=red><B>Note:</B> The disc spin-off channel must have the same game code and company code as the disc application.</font></p> 32<p><font color=red><B>Note:</B> You must add "<CODE>-pc 0x4</CODE>" to the <CODE>makeWad</CODE> arguments when creating a disc spin-off channel.</font></p> 33<TABLE border="1" width="100%"> 34 <TBODY> 35 <TR> 36 <TD width="100%"> 37 <PRE><CODE> 38% makeWad -n discnanddemo1 -l discnanddemo1.dol -pc 0x4 -g ZZ -gc RABA<br> 39 - or - <br> 40% make discnanddemo1.wad NDEBUG=TRUE NANDAPP=TRUE WAD_OPTION="-pc 0x4 -g ZZ -gc RABA"<br> 41 etc.</CODE></PRE> 42 </TD> 43 </TR> 44 </TBODY> 45</TABLE> 46<H3>2. Creating the Installer DLF</H3> 47<p>To create the installer DLF, specify the <CODE>dvdroot</CODE> directory for the channel installer in <CODE>makeinstaller</CODE>.</p> 48<TABLE border="1" width="100%"> 49 <TBODY> 50 <TR> 51 <TD width="100%"> 52 <PRE><CODE> 53% makeinstaller -d installdata</CODE></PRE> 54 </TD> 55 </TR> 56 </TBODY> 57</TABLE> 58<p> 59This process creates the following files.<br> 60<ul> 61<li><CODE>build/demos/discnanddemo/installer.dlf</CODE></li> 62<li><CODE>build/demos/discnanddemo/installer.rcf</CODE></li> 63<li><CODE>build/demos/discnanddemo/installer.dsf</CODE></li> 64</ul> 65</p> 66<H3>3. Creating the Application DLF</H3> 67<p>Create the source in the same way that the disc application (ELF file) is normally created. When the channel is being installed, the process makes use of information about the number of system nodes and the number of inodes that are consumed by the channel application (WAD file). You need to check on this before installing the channel.</p> 68<TABLE border="1" width="100%"> 69 <TBODY> 70 <TR> 71 <TD width="100%"> 72 <PRE><CODE> 73% scanWad installdata/discnanddemo1.wad</CODE></PRE> 74 </TD> 75 </TR> 76 </TBODY> 77</TABLE> 78<p>The information shown below <CODE>discnanddemo2.c</CODE> must be appropriately changed in accordance with what was just determined using <CODE>scanWad</CODE>.</p> 79<TABLE border="1" width="100%"> 80 <TBODY> 81 <TR> 82 <TD width="100%"> 83 <PRE><CODE> 84static u16* TitleNameJp = L"Disc Spin-off Channel Demo2"; 85static Channel InstallChannelListJp[] = 86{ 87 { "discnanddemo1.wad", L"Disc Spin-off Channel Demo1", 0x0001000452414241, 35, 10 }, 88 { NULL, NULL, 0, 0, 0 } 89}; 90 91static u16* TitleNameEn = L"Disc Spinoff Channel Demo 2"; 92static Channel InstallChannelListEn[] = 93{ 94 { "discnanddemo1.wad", L"Disc Spinoff Channel Demo 1", 0x0001000452414241, 35, 10 }, 95 { NULL, NULL, 0, 0, 0 } 96}; 97</CODE></PRE> 98 </TD> 99 </TR> 100 </TBODY> 101</TABLE> 102<p><font color=red>You must revise the application's DDF file to match the description in <CODE>installer.dlf</CODE>.</font>Revise the <CODE>FSTuserEnd</CODE> value of the [BB2] section as show below. 103<ul> 104<li>If it is a one-layer disc game: Revise to a value equal to or less than <CODE>(0x100000000 - </CODE><I><maximum outer circumference address of <CODE>installer.dlf</CODE>></I><CODE>)</CODE></li> 105<li>If it is a two-layer disc game: Revise to a value less than <CODE>(0x1DC000000 - </CODE><I><maximum outer circumference address of <CODE>installer.dlf</CODE>></I><CODE>)</CODE></li> 106</ul> 107<p><font color=red><B>Note:</B> The disc application must have the same game code and company code as the disc spin-off channel.</font></p> 108<p><font color=red><B>Note:</B> Execute <CODE>setpcode 4</CODE> before creating the disc application DLF.</font></p> 109<p>If an ELF file has been prepared, execute <CODE>ndrun(NdevRun -w)</CODE> to create the DLF file. Executing this as just <CODE>ndrun</CODE> creates a file that can operate correctly as a normal disc application. However, the file does not include an installer, so starting the installer fails.</p> 110<TABLE border="1" width="100%"> 111 <TBODY> 112 <TR> 113 <TD width="100%"> 114 <PRE><CODE> 115% make<br> 116% setinitialcode RABA<br> 117% setcompanycode ZZ<br> 118% setpcode 4<br> 119% ndrun bin/RVL/discnanddemo2D.elf</CODE></PRE> 120 </TD> 121 </TR> 122 </TBODY> 123</TABLE> 124<p>This process creates the following files.<br> 125<ul> 126<li>build/demos/discnanddemo/bin/RVL/discnanddemo2D.dlf</li> 127<li>build/demos/discnanddemo/bin/RVL/discnanddemo2D.rcf</li> 128<li>build/demos/discnanddemo/bin/RVL/discnanddemo2D.dsf</li> 129</ul> 130</p> 131<H3>4. Creating the Channel Installer Application DLF</H3> 132<p>From the application DLF and the installer DLF, create and run the channel installer application DLF.</p> 133<TABLE border="1" width="100%"> 134 <TBODY> 135 <TR> 136 <TD width="100%"> 137 <PRE><CODE> 138% dlfmerge -d bin/RVL/discnanddemo2D.dlf,installer.dlf -o output.dlf<br> 139% ODEM -r -l output.dlf &</CODE></PRE> 140 </TD> 141 </TR> 142 </TBODY> 143</TABLE> 144<p>The following files are created.</p> 145<ul> 146<li>build/demos/discnanddemo/output.dlf</li> 147<li>build/demos/discnanddemo/output.rcf</li> 148<li>build/demos/discnanddemo/output1.pcf</li> 149</ul> 150<p>The <CODE>output.dlf</CODE> file is the ultimate DLF file of the channel installer application.</p> 151<H3>5. Run</H3> 152<p>The <CODE>discnanddemo2</CODE> demo is for the installation of <CODE>discnanddemo1.wad</CODE>.</p> 153 154<p><font color=red><B>Note:</B> If <CODE>OSCheckInstall</CODE> ends on -1, the system's channel information has not been created. If this happens, install the Wii Menu.</font></p> 155 156<h2>Creating the Master Data</h2> 157<p>To create the master data, you need to use all of the pre-merge partition DLF files, not the ultimate <CODE>output.dlf</CODE> file.</p> 158<p>First, convert the application DLF and the installer DLF into <CODE>dev.dlf</CODE> (partitioned DLF). <B>Note:</B> <CODE>makedevpart</CODE> is included in the mastering tools.</p> 159<TABLE border="1" width="100%"> 160 <TBODY> 161 <TR> 162 <TD width="100%"> 163 <PRE><CODE> 164% makedevpart -d bin/RVL/discnanddemo2D.dlf<br> 165% makedevpart -d installer.dlf</CODE></PRE> 166 </TD> 167 </TR> 168 </TBODY> 169</TABLE> 170<p>The following files are created.</p> 171<ul> 172<li>build/demos/discnanddemo/discnanddemo2D.dev.dlf</li> 173<li>build/demos/discnanddemo/discnanddemo2D.dev.rcf</li> 174<li>build/demos/discnanddemo/discnanddemo2D.dev_part</li> 175<li>build/demos/discnanddemo/installer.dev.dlf</li> 176<li>build/demos/discnanddemo/installer.dev.rcf</li> 177<li>build/demos/discnanddemo/installer.dev_part</li> 178</ul> 179<p>The <CODE>dev_part</CODE> files are partition images that are referenced from <CODE>dev.dlf</CODE>.</p> 180<p>From the multiple application <CODE>dev.dlf</CODE> files, create a multi-partition disc <CODE>dev.dlf</CODE> and convert it into an RVM file.<font color="red">Use <CODE>makervm </CODE> (not <CODE>makemaster</CODE>) to convert the <CODE>dev.dlf</CODE> file into an RVM file.</font></p> 181<TABLE border="1" width="100%"> 182 <TBODY> 183 <TR> 184 <TD width="100%"> 185 <PRE><CODE> 186% dlfmerge -d discnanddemo2D.dev.dlf,installer.dev.dlf -o output.dev.dlf<br> 187% makervm output.dev.dlf output.rvm</CODE></PRE> 188 </TD> 189 </TR> 190 </TBODY> 191</TABLE> 192 193<h2>Revision History</h2> 194<p> 1952009/10/16 Revised some terminology.<br>2009/01/05 Revised some terminology.<br>2008/12/26 Revised some terminology.<br>2008/11/18 Made revisions.<br>2008/10/29 Initial version. 196</p> 197 198 199<hr><p>CONFIDENTIAL</p></body> 200</html> 201