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>FragDisk</title>
98  </head>
99  <body>
100    <h1><CODE>FragDisk</CODE></h1>
101    <h2>Overview</h2>
102    <div class="section">
103      <p>
104        <CODE>FragDisk</CODE> is a program for fragmenting the free regions in the FAT file systems on SD Memory Cards.<br> <br> When an application is imported to an SD Card that is fragmented, the application also becomes fragmented.<br> By running the application in this state, you can check how it runs when it is fragmented.<br>
105      </p>
106    </div>
107    <h2>Screen Description</h2>
108    <div class="section">
109      <p>
110        The commands that are executed are displayed on the upper screen.<br> You can scroll through the command log that is displayed on the upper screen by moving the Circle Pad up and down.<br> You can clear the command log on the upper screen by pressing the X Button.<br> <br> A user interface for selecting commands and configuring parameter settings is displayed on the lower screen. <br> <B>IsSdmcInserted</B> on the upper portion of the lower screen indicates whether an SD Card is inserted. (<CODE>1</CODE> = SD Card inserted, <CODE>0</CODE> = No SD Card inserted)<br>
111      </p>
112    </div>
113    <h2>How to Use</h2>
114    <div class="section">
115      <p>
116        <table class="table"><tbody>
117          <tr><th>Button</th> <th>Operation</th></tr>
118          <tr><td>↑↓</td> <td>Navigate menu</td></tr>
119          <tr><td>A</td> <td>Select / Run</td></tr>
120          <tr><td>B</td> <td>Back / Cancel</td></tr>
121        </tbody></table>
122      </p>
123    </div>
124    <h2>Set Parameters</h2>
125    <div class="section">
126      <p>
127        Configure the fragmentation parameters.
128        <table class="table"><tbody>
129          <tr><th>Button</th> <th>Operation</th></tr>
130          <tr><td>↑↓</td> <td>Navigate menu</td></tr>
131          <tr><td>X</td> <td>Run</td></tr>
132          <tr><td>B</td> <td>Cancel</td></tr>
133        </tbody></table>
134      </p>
135      <p>
136        The following items can be selected.
137        <ul>
138          <li><a href="#SetDefaultParameters"><CODE>SetDefaultParameters</CODE></a></li>
139          <li><a href="#FreeRegion"><CODE>FreeRegion</CODE></a></li>
140          <li><a href="#Fragment"><CODE>Fragment  32KB</CODE></a></li>
141          <li><a href="#Fragment"><CODE>Fragment  64KB</CODE></a></li>
142          <li><a href="#Fragment"><CODE>Fragment  128KB</CODE></a></li>
143          <li><a href="#Fragment"><CODE>Fragment  256KB</CODE></a></li>
144          <li><a href="#Fragment"><CODE>Fragment  512KB</CODE></a></li>
145          <li><a href="#Fragment"><CODE>Fragment  1MB</CODE></a></li>
146          <li><a href="#Fragment"><CODE>Fragment  2MB</CODE></a></li>
147          <li><a href="#Fragment"><CODE>Fragment  4MB</CODE></a></li>
148          <li><a href="#Fragment"><CODE>Fragment  8MB</CODE></a></li>
149          <li><a href="#Fragment"><CODE>Fragment  16MB</CODE></a></li>
150          <li><a href="#Fragment"><CODE>Fragment  32MB</CODE></a></li>
151          <li><a href="#Fragment"><CODE>Fragment  64MB</CODE></a></li>
152        </ul>
153      </p>
154      <p>
155      <a name="SetDefaultParameters">
156      <h3><CODE>SetDefaultParameters</CODE></h3>
157      </a>
158        <p>
159          Returns all parameters to their default values.<br> The following table contains the default values for each parameter.<br> These default values were set based on sample data extracted from an SD Card that was actually used with a CTR, and represent realistic usage conditions.<br>
160          <table class="table"><tbody>
161            <tr><th>Item</th> <th>Default</th></tr>
162            <tr><td><CODE>FreeRegion</CODE></td> <td>100000 KB</td></tr>
163            <tr><td><CODE>Fragment  32KB</CODE></td> <td>  123 regions</td></tr>
164            <tr><td><CODE>Fragment  64KB</CODE></td> <td>   88 regions</td></tr>
165            <tr><td><CODE>Fragment  128KB</CODE></td> <td>   76 regions</td></tr>
166            <tr><td><CODE>Fragment  256KB</CODE></td> <td>   53 regions</td></tr>
167            <tr><td><CODE>Fragment  512KB</CODE></td> <td>   59 regions</td></tr>
168            <tr><td><CODE>Fragment  1MB</CODE></td> <td>    9 regions</td></tr>
169            <tr><td><CODE>Fragment  2MB</CODE></td> <td>   10 regions</td></tr>
170            <tr><td><CODE>Fragment  4MB</CODE></td> <td>    5 regions</td></tr>
171            <tr><td><CODE>Fragment  8MB</CODE></td> <td>    3 regions</td></tr>
172            <tr><td><CODE>Fragment  16MB</CODE></td> <td>    2 regions</td></tr>
173            <tr><td><CODE>Fragment  32MB</CODE></td> <td>    4 regions</td></tr>
174            <tr><td><CODE>Fragment  64MB</CODE></td> <td>    2 regions</td></tr>
175          </tbody></table>
176      </p>
177      <a name="FreeRegion">
178      <h3><CODE>FreeRegion</CODE></h3>
179      </a>
180      <p>
181        Enables you to set the size of the free region on the SD Memory Card.<br> After you select a value with the +Control Pad, confirm your setting with the B Button.<br> Ultimately, the size that you specify is rounded to the nearest multiple of 32 KB, and then used as the value for the size of the free region.<br> <br> If the size of the free region is much larger than the size of the application to import, fragmenting the application is more difficult.<br> Setting the size of the free region as close as possible to the size of the application to import results in fragmentation that is closer to the specified fragmentation parameters.<br>
182      </p>
183      <a name="Fragment">
184      <h3>Fragment 32KB-64MB</h3>
185      </a>
186      <p>
187        These parameters enable you to specify the size and number of the fragmented regions that are created during fragmentation.<br> After you select a value with the +Control Pad, confirm your setting with the B Button.<br> For example, selecting &quot;Fragment 1MB: 10 regions&quot; fragments the free space into 10 consecutive regions, each with a size of 1 MB.
188      </p>
189      </p>
190    </div>
191    <h2>Start Fragmentation</h2>
192    <div class="section">
193      <p>
194        Executes the fragmentation of the SD Card according to the parameters configured in Set Parameters.<br> The status of the fragmentation process is displayed on the upper screen.<br> After the fragmentation process is complete, &quot;=== EndFragmentation ===&quot; displays on the upper screen.<br>
195        <table class="table"><tbody>
196          <tr><th>Button</th> <th>Operation</th></tr>
197          <tr><td>A</td> <td>Run</td></tr>
198        </tbody></table>
199        Specifically, the fragmentation process performs the following procedure.<br> <br> 1) A large number of files with names like &quot;sdmc:/FragDisk/d0000<I>XXXX</I>/f0000<I>YYYY</I>&quot; (<I>XXXX</I>, <I>YYYY</I> = sequential numbers) are created on the SD Card.<br> The files for which <I>YYYY</I> is an odd number are given a size of 1 byte.<br> For files for which <I>YYYY</I> is even, the file size is the value from 32 KB to 64 MB that is selected in Set Parameters.<br> <br> 2) Next, all of the even-numbered files are deleted.<br> At this point, the free region on the SD Card is fragmented according to the parameters configured in Set Parameters.<br> <br> 3) Dummy files with names like &quot;sdmc:/dummy/dummy<I>XXX</I>&quot; (<I>XXX</I> = sequential numbers) are created on the SD Card.<br> The total free region on the SD Card is adjusted to the value set for <CODE>FreeRegion</CODE> by adjusting the sizes of these dummy files.<br> <br>
200      </p>
201    </div>
202    <h2>Stop Fragmentation</h2>
203    <div class="section">
204      <p>
205        Stops the fragmentation process.
206        <table class="table"><tbody>
207          <tr><th>Button</th> <th>Operation</th></tr>
208          <tr><td>A</td> <td>Stop fragmentation</td></tr>
209        </tbody></table>
210      </p>
211    </div>
212    <h2>Defragmenting the SD Card</h2>
213    <div class="section">
214      <p>
215        You can defragment the free region in the FAT file system on the SD Card by reformatting the card, or by deleting the <CODE>FragDisk</CODE> folder in the root directory of the SD Card.
216      </p>
217    </div>
218    <h2>Effects of Fragmenting Applications</h2>
219    <div class="section">
220      <p>
221        Applications imported from the CTR tend to fragment easily into small regions as you go further back in the storage region. Access performance gets increasingly worse as fragments become smaller.<br> As a result, the severity of the effect on access to files in the <CODE>ROMFS</CODE> archive changes depending on the location of those files.<br> <br> Also, with regard to the relative positions of files in the <CODE>ROMFS</CODE> archive, the file names are exported in the build output <CODE>.cci</CODE> and <CODE>.xml</CODE> files in the order that they are located in the <CODE>ROMFS</CODE> archive.<br>
222      </p>
223    </div>
224    <h2>Precautions</h2>
225    <div class="section">
226      <p>
227        ・ If the free region on the SD Card is already fragmented prior to running the <CODE>FragDisk</CODE> program, the number of fragments specified in Set Parameters might not be created.<br> (There may be more fragments than the number specified.) <br> We recommend formatting SD Cards before you use the <CODE>FragDisk</CODE> tool.<br> <br> ・ If the total size of all the fragments is larger than the free space available on the SD Card prior to the fragmentation process, the number of fragments specified in Set Parameters might not be created.<br> (There may be fewer fragments than the number specified.) <br> <br> ・If the total size of all the fragments is larger than the size specified for <CODE>FreeRegion</CODE>, the number of fragments specified in Set Parameters might not be created. (The larger the size of the individual fragments, the farther the number of fragments that are actually created are below the specified number of fragments.) <br> <br>
228      </p>
229    </div>
230    <h2>Revision History</h2>
231    <div class="section">
232      <dl class="history">
233        <dt>2012/07/20</dt>
234        <dd>Initial version.<br /></dd>
235      </dl>
236    </div>
237  <hr><p>CONFIDENTIAL</p></body>
238</html>