1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
4<head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta http-equiv="Content-Style-Type" content="text/css" />
7    <link rel="stylesheet" href="../../css/manpage.css" type="text/css" />
8</head>
9<body>
10
11<h1><CODE>fs</CODE> Demo</h1>
12
13<h2>Description</h2>
14<div class="section">
15  This sample code demonstrates error handling for archive and file operations in the FS library.
16</div>
17
18<h2>Required Environment</h2>
19<div class="section">
20  <ul>
21    <li>To start this demo as a card-based application, a CTR Card with built-in backup memory must be inserted in the system on which you start the demo. If not inserted, the error <CODE>C8804497</CODE> occurs at startup.</li>
22    <li>An SD Card is required. However, if no SD Card is inserted, this demo performs the appropriate error handling for that situation.</li>
23  </ul>
24</div>
25
26<h2>How to Use</h2>
27<div class="section">
28  <ul>
29    <li>None.</li>
30  </ul>
31</div>
32
33<h2>Notes</h2>
34<div class="section">
35  <ul>
36    <li>
37      This demo does not display anything on the screen. Logs are all displayed in debug output.<BR> Therefore, operations under a release build cannot be confirmed.
38    </li>
39  </ul>
40</div>
41
42<h2>Execution Procedure</h2>
43<div class="section">
44A log similar to the following is displayed when the demo is run.
45<pre class="code">
46=== fs sample demo start ===
47FsSampleCheckSaveData() start.
48FsSampleCheckSaveData() succeed.
49FsSampleMountRom() start.
50FsSampleMountRom() succeed.
51FsSampleRomFile() start.
52FsSampleRomFile() succeed.
53FsSampleMountSaveData() start.
54FsSampleMountSaveData() succeed.
55FsSampleCreateSaveDataFile() start.
56FsSampleCreateSaveDataFile() succeed.
57FsSampleReadSaveDataFile() start.
58FsSampleReadSaveDataFile() succeed.
59FsSampleMountExtSaveData() start.
60FsSampleMountExtSaveData() succeed.
61FsSampleCreateExtSaveDataFile() start.
62FsSampleCreateExtSaveDataFile() succeed.
63FsSampleReadExtSaveDataFile() start.
64FsSampleReadExtSaveDataFile() succeed.
65FsSampleMountSdmcWriteOnly() start.
66FsSampleMountSdmcWriteOnly() succeed.
67FsSampleCreateSdmcWriteOnlyFile() start.
68FsSampleCreateSdmcWriteOnlyFile() succeed.
69FsSampleUnmount(rom:) start.
70FsSampleUnmount(rom:) succeed.
71FsSampleUnmount(data:) start.
72FsSampleUnmount(data:) succeed.
73FsSampleUnmount(extdata:) start.
74FsSampleUnmount(extdata:) succeed.
75FsSampleUnmount(sdmcwo:) start.
76FsSampleUnmount(sdmcwo:) succeed.
77=== fs sample demo end ===
78</pre>
79<br />The following is an example log when no SD Card is inserted.
80<pre class="code">
81=== fs sample demo start ===
82FsSampleCheckSaveData() start.
83FsSampleCheckSaveData() succeed.
84FsSampleMountRom() start.
85FsSampleMountRom() succeed.
86FsSampleRomFile() start.
87FsSampleRomFile() succeed.
88FsSampleMountSaveData() start.
89FsSampleMountSaveData() succeed.
90FsSampleCreateSaveDataFile() start.
91FsSampleCreateSaveDataFile() succeed.
92FsSampleReadSaveDataFile() start.
93FsSampleReadSaveDataFile() succeed.
94FsSampleMountExtSaveData() start.
95  Level:       LEVEL_STATUS (-7)
96  Summary:     SUMMARY_NOT_FOUND (4)
97  Module:      MODULE_NN_FS (17)
98  Description: DESCRIPTION_SDMC_NO_DEVICE (171)
99MountExtSaveData() failed : No SD card!
100FsSampleMountSdmcWriteOnly() start.
101  Level:       LEVEL_STATUS (-7)
102  Summary:     SUMMARY_NOT_FOUND (4)
103  Module:      MODULE_NN_FS (17)
104  Description: DESCRIPTION_SDMC_NO_DEVICE (171)
105MountSdmcWriteOnly() failed : No SD card!
106FsSampleUnmount(rom:) start.
107FsSampleUnmount(rom:) succeed.
108FsSampleUnmount(data:) start.
109FsSampleUnmount(data:) succeed.
110FsSampleUnmount(extdata:) start.
111  Level:       LEVEL_STATUS (-7)
112  Summary:     SUMMARY_NOT_FOUND (4)
113  Module:      MODULE_NN_FS (17)
114  Description: DESCRIPTION_ARCHIVE_NOT_FOUND (101)
115extdata: is not found!
116FsSampleUnmount(sdmcwo:) start.
117  Level:       LEVEL_STATUS (-7)
118  Summary:     SUMMARY_NOT_FOUND (4)
119  Module:      MODULE_NN_FS (17)
120  Description: DESCRIPTION_ARCHIVE_NOT_FOUND (101)
121sdmcwo: is not found!
122=== fs sample demo end ===
123</pre>
124</div>
125
126<h2>Revision History</h2>
127<div class="section">
128  <dl class="history">
129    <dt>2011/11/10</dt>
130    <dd>Added an unmounting process for archives.</dd>
131    <dt>2011/06/14</dt>
132    <dd>Added the demo SdmcWriteOnlyArchive.</dd>
133    <dt>2011/03/25</dt>
134    <dd>Explained the error that occurs when no card with built-in backup memory is inserted.</dd>
135    <dt>2011/03/15</dt>
136    <dd>Initial version.</dd>
137  </dl>
138</div>
139
140
141<hr><p>CONFIDENTIAL</p></body>
142</html>