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 table.table td.index 97 { 98 background : #cde; 99 } 100 101 --></style> 102<title>SaveDataFiler </title> 103 </head> 104 <body> 105<h1><CODE>SaveDataFiler</CODE> </h1> 106<h2>Table of Contents</h2> 107 <ul> 108<li><a href="#Summary">Overview</a></li> 109 <ul> 110<li><a href="#Summary_Usage1">Usage 1: Importing Data to System NAND Memory</a></li> 111<li><a href="#Summary_Usage2">Usage 2: Start From CTR Card (or Emulation Memory)</a></li> 112 </ul> 113<li><a href="#Controller">How to Use</a></li> 114 <ul> 115<li><a href="#Controller_Export">Writing to SD Cards</a></li> 116<li><a href="#Controller_DestroyFile">Destroying Files</a></li> 117 </ul> 118<li><a href="#UpperScreen">Upper Screen</a></li> 119<li><a href="#UserTab">User Tab</a></li> 120<li><a href="#ExtDataTab">ExtData Tab</a></li> 121<li><a href="#SdTab">SD Tab</a></li> 122<li><a href="#ResetSharedExtData">Initializing Shared Expanded Save Data</a></li> 123<li><a href="#History">Revision History</a></li> 124 </ul> 125 126<a name="Summary"><h2>Overview</h2></a> 127 <div class="section"> 128The <CODE>SaveDataFiler</CODE> tool provides features to view, import, and export the following types of data.<br /> <br /> 129 <ul> 130<li>Save data on CTR cards</li> 131<li>Save data for download applications on SD Cards</li> 132<li>Expanded save data on SD Cards</li> 133<li>Rollback prevention values in the system save region</li> 134 </ul> 135You can use the import and export features to save save data, expanded save data, and rollback prevention values in a format that can be edited on a PC. You can also use this to rewrite save data for another CTR card, and expanded save data for an SD Card used by another system. 136 137<h3><a name="Summary_Usage1">Usage 1: Importing Data to System NAND Memory</a></h3> 138 <div class="section"> 139The <CODE>SaveDataFiler</CODE> binary is in the following location in the CTR-SDK. 140<pre> 141$CTRSDK_ROOT/tools/TargetTools/CTR-TS/Release/SaveDataFiler.cia 142</pre> 143Copy 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>.)<br /> <br /> 144 145<h4><a name="Summary_Usage1_Warning1"><font color="red"><B>Note 1:</B> Handling Extended Save Data</font></a></h4> 146The expanded save data specifications only allow access from the system that created the data. <CODE>SaveDataFiler</CODE> is no exception; it cannot access expanded save data that was created on another system. If you want to use expanded save data on another system, you must first export it to an SD Card (see <a href="#Controller_Export">Writing to SD Cards</a>), and then import it once more to the system that you want to access it from. In other words, you must import the <CODE>SaveDataFiler</CODE> on both the original system, and the system you want to access the data from. 147 148<h4><a name="Summary_Usage1_Warning2"><font color="red"><B>Note 2:</B> Handling Save Data in Backup Memory</font></a></h4> 149The save-data specifications prevent access if there is badly formatted ROM data (data that is not recognized as a valid CTR application) in the ROM area of the CTR card (or emulation memory). This applies to the emulation memory immediately after the debugger is powered on, as well as to CTR cards to which a System Updater has been written.<br /><br /><br /> It also may not be possible to correctly import or export save data if the application written to the CTR card (or loaded into emulation memory) is different from the application that created the save data.<br /> In other words, the save data may not be exported correctly if the procedure below is followed. (The same applies to importing data.)<br /> <br /> 150 <ol> 151<li>Create save data with application A.</li> 152<li>Write the <CODE>.cci</CODE> file for application B to the CTR card.</li> 153<li>Launch <CODE>SaveDataFiler</CODE> and export the save data.</li> 154 </ol> 155Due to the two reasons above, make sure that the CCI file of the application that created the save data is written to the CTR card (or loaded into emulation memory) when importing or exporting that save data. 156 </div> 157 158<h3><a name="Summary_Usage2">Usage 2: Start From CTR Card (or Emulation Memory)</a></h3> 159 <div class="section"> 160You can also launch <CODE>SaveDataFiler</CODE> from a CTR card (or emulation memory). 161<pre> 162$CTRSDK_ROOT/tools/TargetTools/CTR-TS/Release/SaveDataFiler.csu 163</pre> 164Use the debugger to write the binary above to the CTR card (or to load it into emulation memory). You can also start it from the HOME or Test Menu. <br /> 165 166<h4><a name="Summary_Usage2_Warning"><font color="red"><B>Note:</B> Handling Save Data in Backup Memory</font></a></h4> 167Because <CODE>SaveDataFiler</CODE> itself does not store save data, it cannot access backup devices when it is launched from a CTR card (or emulation memory). An error such as the following is displayed on the screens. 168 169<p> 170<Upper Screen> 171<pre> 172File Type : broken user save data 173 174Level : -7 175Summary: 9 176Module : 17 177Desc : 230 178</pre> 179</p> 180 181<p> 182<Lower Screen> 183<pre> 184<font color="red">CTR Card -- broken --</font> 185</pre> 186</p> 187Import the <CODE>SaveDataFiler</CODE> into system NAND memory, and use this information to import and export user save data to and from backup memory. </div> 188 </div> 189 190<a name="Controller"><h2>How to Use</h2></a> 191 <div class="section"> 192The method of operations is 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. 193 194 <table class="table"><tbody> 195<tr><th>Button</th><th>Operation</th></tr> 196<tr><td class="index" colspan=2>Shared</td></tr> 197<tr><td>↑↓</td><td>Move the cursor within the list</td></tr> 198<tr><td>←→</td><td>Change tab</td></tr> 199<tr><td>A</td><td>Select / Run</td></tr> 200<tr><td>B</td><td>Cancel</td></tr> 201<tr><td>L+R+START</td><td>Initializes shared expanded save data.※(<B>Note:</B> See <a href="#ResetSharedExtData">Initializing Shared Expanded Save Data</a>)</td></tr> 202<tr><td class="index" colspan=2>List Display Mode (<a href="#UserTab">User Tab</a>)</td></tr> 203<tr><td>X</td><td>Write selected save data back to factory defaults</td></tr> 204<tr><td>Y</td><td>Write the selected save data to the SD Card (<B>Note:</B> See <a href="#Controller_Export">Writing to SD Cards</a>)</td></tr> 205<tr><td>R+Y</td><td>Write the rollback prevention values for the selected save data to the SD Card (<B>Note:</B> See <a href="#Controller_SecureValue">Rollback Prevention Values</a>)</td></tr> 206<tr><td>R+X</td><td>Delete the rollback prevention values for the selected save data (<B>Note:</B> See <a href="#Controller_SecureValue">Rollback Prevention Values</a>)</td></tr> 207<tr><td class="index" colspan=2>List Display Mode (<a href="#ExtDataTab">Ext Tab</a>)</td></tr> 208<tr><td>X</td><td>Deletes save data</td></tr> 209<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> 210<tr><td class="index" colspan=2>Filer Mode</td></tr> 211<tr><td>X</td><td>Delete the selected item</td></tr> 212<tr><td>R+Y</td><td>Thoroughly destroy the selected files (<B>Note:</B> See <a href="#Controller_DestroyFile">Destroying Files</a>)</td></tr> 213<tr><td>L+Y</td><td>Destroy only the selected files (not supported for rendundant save data). (<B>Note:</B> See <a href="#Controller_DestroyFile">Destroying Files</a>.)</td></tr> 214 </tbody></table> 215 216<a name="Controller_Export"><h3>Writing to SD Cards</h3></a> 217 <div class="section"> 218You 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. It can then be edited from a PC or other device. 219<pre> 220sdmc:/filer/ 221 +--- UserSaveData/ 222 | +--- <The date and time saved>/ 223 | +--- <Unique ID>/ ←Data is saved below here. 224 | +--- <Unique ID& gt.dat ← File that contains format parameters. 225 +--- ExtData/ 226 | +--- <The date and time saved>/ 227 | +--- <expanded save data number>/ ←Data is saved below here. 228 | +--- <expanded save data number>.dat ←File storing format parameters. 229 +--- SecureValue/ 230 +--- <The date and time saved>/ 231 +--- <expanded save data number>/ ←Data is saved below here. 232 +--- SecureValue.dat ←File that stores format parameters. 233 234</pre> 235Data saved in the previous locations can be restored from the <a href="#SdTab"><B>SD</B> Tab</a>. <br /> 236 </div> 237 238<a name="Controller_DestroyFile"><h3>Destroying Files</h3></a> 239 <div class="section"> 240The goal of destroying files is to put them in a state where the <CODE><a href="../api/nn/fs/ResultVerificationFailed/Overview.html">nn::fs::ResultVerificationFailed</a></CODE> 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 />There are two features for destroying files: 241 <dl> 242<dt>- Thoroughly destroy the selected files (R+Y)</dt> 243<dd>Can always destroy the selected files.</dd> 244<dd>This action may destroy other files or directories as well.</dd> 245<dt>- Only destroy the selected files (L+Y)</dt> 246<dd>Not supported for redundant save data.</dd> 247<dd>This may fail to destroy the selected files.</dd> 248<dd>It will never affect other files or directories, regardless of whether the destruction is successful.</dd> 249 </dl> 250If destruction is successful, an error appears in the file list. (See <a href="#UserTab">User Tab</a>)<br /> 251 </div> 252 253<a name="Controller_SecureValue"><h3>Rollback Prevention Values</h3></a> 254 <div class="section"> 255 You can write rollback prevention values to the SD Card and delete them for debugging purposes. <br /><br /> The following three features are related to rollback prevention values. 256 <dl> 257<dt>・ Write the selected title's rollback prevention values to the SD Card (R+Y)</dt> 258<dd>Writes 64 bit values within the system save region.</dd> 259<dt>・ Load the selected title's rollback prevention values from the SD Card (<B>SD</B> tab)</dt> 260<dd>Overwrites 64 bit values within the system save region with content saved on SD Card.</dd> 261<dt>・ Delete selected title's rollback prevention values (R+X)</dt> 262<dd>Deletes 64 bit values within the system save region.</dd> 263 </dl> 264Usage of rollback prevention values will be different for each application.<br />When debugging applications that use rollback prevention values, save data and rollback prevention values must be handled as a pair.<br /> 265 </div> 266 267 </div> 268 269<a name="UpperScreen"><h2>Upper Screen</h2></a> 270 <div class="section"> 271This is a description of the content of the upper screen.<br /> 272<pre> 273Revision : 34302 --- (1) 274 275File Type : file --- (2) 276 | LimitSize | LimitDir | LimitFile | Dup | --- (3) 277 | --- | 16 | 16 | ON | 278Level : -5 279Summary: 8 280Module : 17 281Desc : 392 --- (4) 282 283File Size : 1024 bytes --- (5) 284 285X: delete this file --- (6) 286R+Y: destroy this file 287 : 288 289</pre> 290 <table class="table"><tbody> 291<tr><th>Number</th><th>Description</th></tr> 292<tr><td>(1)</td><td>Revision number for the <CODE>SaveDataFiler</CODE>.</td></tr> 293<tr><td>(2)</td><td>Indicates the type of item selected in the lower screen.</td></tr> 294<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. 295 <table class="table"><tbody> 296<tr><td>LimitSize</td><td>(not used at present)</td></tr> 297<tr><td>LimitDir</td><td>the maximum number of directories that can be created</td></tr> 298<tr><td>LimitFile</td><td>the maximum number of files that can be created</td></tr> 299<tr><td>Dup</td><td>whether there is duplication</td></tr> 300 </tbody></table> 301This is not displayed on the SD Tab. 302 </td></tr> 303<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="../api/nn/fs/briefing/descriptionList.html">Description List</a> for the fs library. 304 </td></tr> 305<tr><td>(5)</td><td>When the item selected in the lower screen is a file, its size is displayed. -1 is displayed if the size could not be obtained.</td></tr> 306<tr><td>(6)</td><td>The operations guide is displayed.</td></tr> 307 </tbody></table> 308 </div> 309 310<a name="UserTab"><h2>User Tab</h2></a> 311 <div class="section"> 312This tab is for manipulating save data.<br /> 313 314<h3>List Display Mode</h3> 315 <div class="section"> 316When 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. 317<pre> 318CTR Card 319F7FFF 320FFFFF 321 : 322</pre> 323If an archive is corrupted, the corresponding <CODE>Result</CODE> value appears on the upper screen when it is mounted. 324 </div> 325 326<h3>Filer Mode</h3> 327 <div class="section"> 328When an item is selected from the list, the content of its save data is displayed on the lower screen. 329<pre> 330../ 331Dir1/ 332Dir2/ 333File1 334<font color="red">File2 : Read Error (0-512)</font> 335File3 336 : 337</pre> 338When an error has occurred 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. <br /><br /> In addition, the function that was called when the error occurred is displayed next to the filename. 339 <table class="table"><tbody> 340<tr><th>View</th><th>Description</th></tr> 341<tr><td>Open Error</td><td><CODE><a href="../api/nn/fs/FileStream/TryInitialize.html">nn::fs::FileStream::TryInitialize</a></CODE> returned an error. There was a failure in opening the file.</td></tr> 342<tr><td>Read Error</td><td><CODE><a href="../api/nn/fs/FileStream/TryRead.html">nn::fs::FileStream::TryRead</a></CODE> returned an error. There was a failure when reading the file.<br />At the same time, the byte at which the read error occurred in the file is also displayed. <CODE>SaveDataFiler</CODE> reads in units of 1 MB, so the actual region where the error occurs may be smaller than this. This may also appear when there is an unwritten area in the file. See the note to <a href="../api/nn/fs/ResultVerificationFailed/Overview.html"><CODE>nn::fs::ResultVerificationFailed</CODE></a> for details. 343 </td></tr> 344<tr><td>Size Error</td><td><CODE><a href="../api/nn/fs/FileStream/TryGetSize.html">nn::fs::FileStream::TryGetSize</a></CODE> returned an error. There was a failure in getting the file size (metadata).<br />However, if the system fails to get the metadata, it will also fail to open the file. Thus, an <CODE>Open Error</CODE> will generally be displayed.</td></tr> 345 </tbody></table> 346 347 </div> 348 </div> 349 350<a name="ExtDataTab"><h2>Ext Tab</h2></a> 351 <div class="section"> 352This tab is for manipulating the expanded save data on the SD Card.<br /> 353 354<h3>List Display Mode</h3> 355 <div class="section"> 356When 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. 357<pre> 35800000001 359<font color="red">00000002 -- broken --</font> 36000000003 361 : 362</pre> 363When an archive is corrupt (when the <CODE><a href="../api/nn/fs/MountExtSaveData.html">nn::fs::MountExtSaveData</a></CODE> 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. 364 </div> 365 366<h3>Filer Mode</h3> 367 <div class="section"> 368When 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>. 369 </div> 370 </div> 371 372<a name="SdTab"><h2>SD Tab</h2></a> 373 <div class="section"> 374This tab is for manipulating the data written to SD Cards. <br /><br /> The data on the SD Card is displayed in a list. 375<pre> 376user : 20110101000000 : 00000000 377user : 20110101121530 : 000f7fff 378ext : 20110101000000 : 00000001 379ext : 20110102141516 : 00000002 380 : : : 381 (1) (2) (3) 382</pre> 383 <table class="table"><tbody> 384<tr><th>Number</th><th>Description</th></tr> 385<tr><td>(1)</td><td>Indicates the data type.<br /> 386 <table class="table"><tbody> 387<tr><td>User</td><td>Save Data</td></tr> 388<tr><td><CODE>ext</CODE></td><td>Expanded Save Data</td></tr> 389<tr><td>secure</td><td>Rollback prevention values</td></tr> 390 </tbody></table> 391 </td></tr> 392<tr><td>(2)</td><td>This is the directory name (the date and time saved) on the SD Card.</td></tr> 393<tr><td>(3)</td><td>The meaning of this item depends on the save data type.<br /> 394 <table class="table"><tbody> 395<tr><td>User</td><td>Displays the unique ID.<br />Displays <CODE>0</CODE> when data is exported from a card application by using a tool prior to CTR-SDK 4.2.0.</td></tr> 396<tr><td><CODE>ext</CODE></td><td>Displays the expanded save data number.</td></tr> 397<tr><td>secure</td><td>Displays the unique ID.<br />Displays <CODE>0</CODE> when data is exported from a card application by using a tool prior to CTR-SDK 4.2.0.</td></tr> 398 </tbody></table> 399 </td></tr> 400 </tbody></table> 401 402Select from the list and press the A Button to import the data to the media from which it is later exported. Application save data, expanded save data on the SD Card, and rollback prevention values in the system save region are all deleted at this time.<br /><br /><br /> For save data, you can specify the location to import to and then import the save data by pressing the L+A Buttons or the R+A Buttons.<br /><br /> If you export data from a card application by using a tool prior to CTR-SDK 4.2.0, you cannot import that data to an SD Card. <br />Use a tool from CTR-SDK 4.2.1 or later, or convert the data by using <a href="../tools/ctr_FilerDataMigrator.html"><CODE>ctr_FilerDataMigrator</CODE></a>. 403 </div> 404 405<a name="ResetSharedExtData"><h2>Initializing Shared Expanded Save Data</h2></a> 406 <div class="section"> 407You 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 /> 408 </div> 409 410<a name="History"><h2>Revision History</h2></a> 411 <div class="section"> 412 <dl class="history"> 413 <dt>2013/03/11</dt> 414<dd>Added information about the destruction of redundant save data files.</dd> 415 <dt>2012/06/15</dt> 416<dd>Added a note about specifying the location to which to import save data.</dd> 417 <dt>2012/04/27</dt> 418<dd>Updated description about rollback prevention value operations.</dd> 419 <dt>2011/10/20</dt> 420<dd>Added information about two features for destroying files.</dd> 421 <dt>2011/10/11</dt> 422<dd>Added conditions for displaying a read error when there is an unwritten area.</dd> 423 <dt>2011/09/30</dt> 424<dd>Updated description of destroying user save data.</dd> 425 <dt>2011/09/29</dt> 426<dd>Revised note about differences due to method of launching <CODE>SaveDataFiler</CODE>.</dd> 427 <dt>2011/06/22</dt> 428<dd>Added note about differences due to method of starting <CODE>SaveDataFiler</CODE>.</dd> 429 <dt>2011/06/13</dt> 430<dd>Added description of usage.</dd> 431<dd>Changed error message upon failure to destroy file.</dd> 432 <dt>2011/04/21</dt> 433<dd>Added a note about file destruction.</dd> 434 <dt>2011/03/23</dt> 435<dd>Added support for save data in download applications.</dd> 436 <dt>2011/03/19</dt> 437<dd>Added feature to initialize shared expanded save data.</dd> 438 <dt>2011/02/18</dt> 439<dd>Initial version.</dd> 440 </dl> 441 </div> 442 <hr><p>CONFIDENTIAL</p></body> 443</html>