1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"[]> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../css/manpage.css" type="text/css" /> 7 <style type="text/css"><!-- 8 span.static_style 9 { 10 font-size : 8pt; 11 color : white; 12 font-weight : bold; 13 background : #44f; 14 border-left : solid 1px #aaf; 15 border-top : solid 1px #aaf; 16 border-right : solid 1px #00c; 17 border-bottom : solid 1px #00c; 18 padding-left : 2px; 19 padding-right : 2px; 20 } 21 22 span.virtual_style 23 { 24 font-size : 8pt; 25 color : white; 26 font-weight : bold; 27 background : #0a0; 28 border-left : solid 1px #0f0; 29 border-top : solid 1px #0f0; 30 border-right : solid 1px #060; 31 border-bottom : solid 1px #060; 32 padding-left : 2px; 33 padding-right : 2px; 34 } 35 36 span.protected_style 37 { 38 font-size : 8pt; 39 color : white; 40 font-weight : bold; 41 background : #444; 42 border-left : solid 1px #ccc; 43 border-top : solid 1px #ccc; 44 border-right : solid 1px #222; 45 border-bottom : solid 1px #222; 46 padding-left : 2px; 47 padding-right : 2px; 48 } 49 table.table, table.table td, table.table th 50 { 51 border-collapse: collapse; 52 background-color: white; 53 } 54 55 table.table 56 { 57 width: auto; 58 margin: 1em; 59 position : static; 60 font-family : Arial; 61 } 62 63 table.table td, table.table th 64 { 65 padding: 0.2em; 66 } 67 68 table.table td.number, table.table th.number 69 { 70 text-align: right; 71 } 72 73 table.table tbody tr th 74 { 75 text-align: left; 76 font-weight: normal; 77 width: auto; 78 } 79 80 table.table thead tr th, 81 table.table tbody tr th.category 82 { 83 padding: 0 0.2em; 84 } 85 86 table.table caption 87 { 88 font-weight: bold; 89 padding: 0.4em; 90 } 91 table.table th 92 { 93 font-weight : bold; 94 background : #acf; 95 } 96 --></style> 97<title>SaveDataFiler</title> 98 </head> 99 <body> 100<h1><CODE>SaveDataFiler</CODE></h1> 101<h2>Table of Contents</h2> 102 <ul> 103<li><a href="#Summary">Overview</a></li> 104<li><a href="#Controller">Button Assignments</a></li> 105 <ul> 106<li><a href="#Controller_Export">Writing to SD Cards</a></li> 107<li><a href="#Controller_DestroyFile">Destroying Files</a></li> 108 </ul> 109<li><a href="#UpperScreen">Upper Screen</a></li> 110<li><a href="#UserTab">User Tab</a></li> 111<li><a href="#ExtDataTab">ExtData Tab</a></li> 112<li><a href="#SdTab">SD Tab</a></li> 113<li><a href="#ResetSharedExtData">Initializing Shared Expanded Save Data</a></li> 114<li><a href="#History">Revision History</a></li> 115 </ul> 116 117<a name="Summary"><h2>Overview</h2></a> 118 <div class="section"> 119The <CODE>SaveDataFiler</CODE> tool provides features to view, import, and export the following types of save data.<br /> <br /> 120 <ul> 121<li>Save data in CTR Cards (cannot use the data if SaveDataFiler is launched from emulation memory)</li> 122<li>Save data for download applications on SD Cards</li> 123<li>Expanded save data on SD Cards</li> 124 </ul> 125 126<h3>How to Use</h3> 127 <div class="section"> 128The <CODE>SaveDataFiler</CODE> binary is in the following location in the CTR-SDK. 129<pre> 130$HORIZON_ROOT/tools/TargetTools/CTR-TS/Release/SaveDataFiler.cia 131</pre> 132Copy the above binary to an SD Card, and import it from <a href="DevMenu.html">DevMenu</a> to the system's NAND memory. After that, it can be launched from the HOME Menu.(It can also be launched from <CODE><a href="DevMenu.html">DevMenu</a></CODE>.) 133 </div> 134 </div> 135 136<a name="Controller"><h2>Button Assignments</h2></a> 137 <div class="section"> 138The method of operations are as explained below. <br />The buttons that can be used vary by each screen. When the tool runs, use the guide displayed on the upper screen as a reference for operations. 139 140 <table class="table"><tbody> 141<tr><th>Button</th><th>Operation</th></tr> 142<tr><td>↑↓</td><td>Move the cursor within the list</td></tr> 143<tr><td>←→</td><td>Change tab</td></tr> 144<tr><td>A</td><td>Select / Run</td></tr> 145<tr><td>B</td><td>Cancel</td></tr> 146<tr><td>X</td><td>Delete the selected item</td></tr> 147<tr><td>Y</td><td>Write the save data to the SD Card (<B>Note:</B> See <a href="#Controller_Export">Writing to SD Cards</a>)</td></tr> 148<tr><td>R+Y</td><td>Destroy the selected files (<B>Note:</B> See <a href="#Controller_DestroyFile">Destroying Files</a>)</td></tr> 149<tr><td>L+R+START</td><td>Initializes shared expanded save data.※「See <a href="#ResetSharedExtData">Initializing shared expanded save data</a>.</td></tr> 150 </tbody></table> 151 152<a name="Controller_Export"><h3>Writing to SD Cards</h3></a> 153 <div class="section"> 154You can use <CODE>SaveDataFiler</CODE> to write save data and expanded save data to SD Cards.<br />The written data is saved to SD Cards in the following location. 155<pre> 156sdmc:/filer/ 157 +--- UserSaveData/ 158 | +--- <The date and time saved>/ 159 | +--- 00000000/ ←Data is saved below here(※) 160 | +--- 00000000.dat ←File containing format parameters 161 +--- ExtData/ 162 +--- <The date and time saved>/ 163 +--- <expanded save data number>/ ←Data is saved below here 164 +--- <expanded save data number>.dat ←File containing format parameters 165 166</pre> 167Data saved in the above location can be restored from the <CODE><a href="#SdTab">SD Tab</a></CODE>.<br /><br /> <B>Note:</B> In the case of data for download applications, the directory name is the application's unique ID. 168 </div> 169 170<a name="Controller_DestroyFile"><h3>Destroying Files</h3></a> 171 <div class="section"> 172The goal of destroying files is to put them in a state where the <a href="../nn/fs/ResultVerificationFailed/Overview.html"><CODE>nn::fs::ResultVerificationFailed</CODE></a> error is returned when they are loaded using functions from the FS library. You can use this to test error processing for files that are damaged when a card is removed during a write or a when a file is illegally spoofed.<br /><br /><font color="red"><STRONG>Note: </STRONG>In the case of save data, the file destruction does not take place if using automatic redundancy. During development, be sure to test save data in the non-redundant state.</font><br />However, the process performed by <CODE>SaveDataFiler</CODE> only attempts to reproduce a destroyed state in accordance with the specification: "The <a href="../nn/fs/ResultVerificationFailed/Overview.html"><CODE>nn::fs::ResultVerificationFailed</CODE></a> error is sometimes returned if a <CODE>Read</CODE> is performed on a region that has never been written to." Consequently, sometimes the file is not destroyed. If destruction is successful, an error is displayed on the file list.(「See the <a href="#UserTab">User Tab</a>)<br />If destruction fails, the DESCRIPTION_CANCEL_REQUESTED error dialog will display. If this happens, try to destroy the file again. 173 </div> 174 </div> 175 176<a name="UpperScreen"><h2>Upper Screen</h2></a> 177 <div class="section"> 178This is a description of the content of the upper screen.<br /> 179<pre> 180Revision : 34302 --- (1) 181 182File Type : file --- (2) 183 | LimitSize | LimitDir | LimitFile | Dup | --- (3) 184 | --- | 16 | 16 | ON | 185Level : -5 186Summary: 8 187Module : 17 188Desc : 392 --- (4) 189 190File Size : 1024 bytes --- (5) 191 192X: delete this file --- (6) 193R+Y: destroy this file 194 : 195 196</pre> 197 <table class="table"><tbody> 198<tr><th>Number</th><th>Description</th></tr> 199<tr><td>(1)</td><td>Revision number for the <CODE>SaveDataFiler</CODE>.</td></tr> 200<tr><td>(2)</td><td>Indicates the type of item selected in the lower screen.</td></tr> 201<tr><td>(3)</td><td>When the item selected on the lower screen is an archive, the format parameters of that archive are displayed.<br />Their meanings are as follows. 202 <table class="table"><tbody> 203<tr><td>LimitSize</td><td>(not used at present)</td></tr> 204<tr><td>LimitDir</td><td>the maximum number of directories that can be created</td></tr> 205<tr><td>LimitFile</td><td>the maximum number of files that can be created</td></tr> 206<tr><td>Dup</td><td>whether there is duplication</td></tr> 207 </tbody></table> 208This is not displayed on the SD Tab. 209 </td></tr> 210<tr><td>(4)</td><td>When an error occurs during an archive mount or during an operation on an item selected from the lower screen, its <CODE>Result</CODE> value is displayed.<br />To learn more about the content of errors, see the <a href="../nn/fs/briefing/descriptionList.html">Description List</a> for the fs library. 211 </td></tr> 212<tr><td>(5)</td><td>When the item selected in the lower screen is a file, its size is displayed.</td></tr> 213<tr><td>(6)</td><td>The operations guide is displayed.</td></tr> 214 </tbody></table> 215 </div> 216 217<a name="UserTab"><h2>User Tab</h2></a> 218 <div class="section"> 219This tab is for manipulating save data.<br /> 220 221<h3>List Display Mode</h3> 222 <div class="section"> 223When this tab is selected, a list showing the CTR Card and download applications appears.<br />In addition to "CTR Card," this list shows the unique IDs of the download applications imported to the SD Card. 224<pre> 225CTR Card 226F7FFF 227FFFFF 228 : 229</pre> 230If an archive is corrupted, the corresponding <CODE>Result</CODE> value appears on the upper screen when it is mounted. 231 </div> 232 233<h3>Filer Mode</h3> 234 <div class="section"> 235When an item is selected from the list, the content of its save data is displayed on the lower screen. 236<pre> 237../ 238Dir1/ 239Dir2/ 240File1 241<font color="red">File2 : Read Error (0-512)</font> 242File3 243 : 244</pre> 245When an error occurs during file operations, such as a damaged file, the filename is displayed in red. To display the corresponding <CODE>Result</CODE> value on the upper screen, align the cursor with the filename. The function that was invoked when the error occurred will also be displayed next to the filename. 246 <table class="table"><tbody> 247<tr><th>Display</th><th>Description</th></tr> 248<tr><td>Open Error</td><td>An error was returned from <CODE><a href="../nn/fs/FileStream/TryInitialize.html">nn::fs::FileStream::TryInitialize</a></CODE>. There was a failure in opening the file.</td></tr> 249<tr><td>Read Error</td><td>An error was returned from <CODE><a href="../nn/fs/FileStream/TryRead.html">nn::fs::FileStream::TryRead</a></CODE>. There was a failure when reading the file.<br />At the same time, the byte at which the read error occurred is also displayed. (<CODE>SaveDataFiler</CODE> reads in units of 1MB, so the actual region where the error occurs may be smaller than this.)</td></tr> 250<tr><td>Size Error</td><td>An error was returned from <CODE><a href="../nn/fs/FileStream/TryGetSize.html">nn::fs::FileStream::TryGetSize</a></CODE>. There was a failure in getting the file size (metadata).</td></tr> 251 </tbody></table> 252 253 </div> 254 </div> 255 256<a name="ExtDataTab"><h2>ExtData Tab</h2></a> 257 <div class="section"> 258This tab is for manipulating the expanded save data on the SD Card.<br /> 259 260<h3>List Display Mode</h3> 261 <div class="section"> 262When this tab is selected, the expanded save data on the SD Card is displayed in a list. The displayed numbers are the expanded save data numbers. 263<pre> 26400000001 265<font color="red">00000002 -- broken --</font> 26600000003 267 : 268</pre> 269When an archive is damaged (when the <a href="../nn/fs/MountExtSaveData.html"><CODE>nn::fs::MountExtSaveData</CODE></a> function returns an error), the number is displayed in red. When the cursor is aligned above the filename, the <CODE>result</CODE> value is displayed in the upper screen. 270 </div> 271 272<h3>Filer Mode</h3> 273 <div class="section"> 274When an archive is selected from the list, the content of the expanded save data are displayed. The displayed content is the same as for the <a href="#UserTab">User Tab</a>. 275 </div> 276 </div> 277 278<a name="SdTab"><h2>SD Tab</h2></a> 279 <div class="section"> 280This tab is for manipulating the data written to SD Cards.<br /><br /> The data on the SD Card is displayed in a list. 281<pre> 282user : 20110101000000 : 00000000 283user :20110101121530 : 000f7fff 284ext : 20110101000000 : 00000001 285ext : 20110102141516 : 00000002 286 : : : 287 (1) (2) (3) 288</pre> 289 <table class="table"><tbody> 290<tr><th>Number</th><th>Description</th></tr> 291<tr><td>(1)</td><td>Indicates the save data type.<br /> 292 <table class="table"><tbody> 293<tr><td>User</td><td>Save Data</td></tr> 294<tr><td><CODE>ext</CODE></td><td>Expanded Save Data</td></tr> 295 </tbody></table> 296 </td></tr> 297<tr><td>(2)</td><td>This is the directory name (the date and time saved) on the SD Card.</td></tr> 298<tr><td>(3)</td><td>The meaning of this item depends on the save data type.<br /> 299 <table class="table"><tbody> 300<tr><td>User</td><td>For download application data, it is the unique ID;<br />for card application data, <CODE>0</CODE> is displayed.</td></tr> 301<tr><td><CODE>ext</CODE></td><td>Displays the expanded save data number.</td></tr> 302 </tbody></table> 303 </td></tr> 304 </tbody></table> 305 306Select from the list and press the A Button to import the data. When this happens, the save data in the application or the expanded save data on the SD Card is formatted (deleted). 307 </div> 308 309<a name="ResetSharedExtData"><h2>Initializing Shared Expanded Save Data</h2></a> 310 <div class="section"> 311You can delete the shared expanded save data in system NAND memory by pressing L + R + START. (Press the START Button while holding down the L and R Buttons.)<br />If you return to the HOME Menu with the shared expanded save data deleted, the system will not operate correctly. After using this feature, you must restart the system. The data will be rebuilt when the HOME Menu or TestMenu (development menu) launches. (Startup will take a little longer than usual.)<br /> 312 </div> 313 314<a name="History"><h2>Revision History</h2></a> 315 <div class="section"> 316 <dl class="history"> 317 <dt>2011/04/21</dt> 318<dd>Added a note about file destruction.</dd> 319 <dt>2011/03/23</dt> 320<dd>Added support for save data in download applications.</dd> 321 <dt>2011/03/19</dt> 322<dd>Added feature to initialize shared expanded save data.</dd> 323 <dt>2011/02/18</dt> 324<dd>Initial version.</dd> 325 </dl> 326 </div> 327 <hr><p>CONFIDENTIAL</p></body> 328</html>