1<html>
2
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
6<base target="main">
7<title>NAND Processing Sequence</title>
8</head>
9
10<body>
11
12<h1>NAND Processing Sequence</h1>
13<p>
14The processing sequence shown here is just one example. The application does not need to follow this exactly.
15</p>
16
17<hr>
18<A target="_self" name="sequence_0"></A> <img src="./seq0.png">
19<center>- Figure 1 -</center>
20<h3>Description (Figure 1)</h3>
21<p>
22<ul>
23<li>When there is insufficient free space and insufficient free inodes at the same time, give priority to messages that send a notification about insufficient free space.
24</ul>
25</p>
26
27<hr>
28<A target="_self" name="sequence_1"></A> <img src="./seq1.png">
29<center>- Figure 2 -</center>
30<h3>Description (Figure 2)</h3>
31<p>
32<ul>
33<li>The green box in the upper-right corner of Figure 2 shows general NAND function calls. However, the situation is slightly different for <CODE>NANDSimpleSafe</CODE>-type functions (or <CODE>NANDSafe</CODE>-type functions, which are not recommended). Refer to Figure 3 and its explanation.
34<li>The <code>NAND_RESULT_CORRUPT</code> error code indicates that all Wii system memory has been corrupted to an irreparable state. If all Wii system memory has been corrupted, you also cannot expect the Wii to restart. Therefore, if this error is encountered, not only must you stop any application program processes, but also disable the reset/shutdown processes (which are normally enabled) that correspond to the RESET/POWER buttons, and as much as possible give first priority to notifying the player of the contents of this error message.
35<li>The appearance of <code>NAND_RESULT_UNKNOWN</code> or an unexpected error code is strongly suspected to be an SDK bug. As you might expect, the system's operation cannot be guaranteed if these errors are encountered, so we recommend that you display the prescribed error message and do not let control return to the original processing routine of the application program.
36</ul>
37</p>
38
39<hr>
40<A target="_self" name="sequence_2"></A> <img src="./seq2.png">
41<center>- Figure 3 -</center>
42<h3>Description (Figure 3)</h3>
43<p>
44<ul>
45<li>Figure 3 does not give the flow when a call to the NAND API returns error codes such as <code>NAND_RESULT_CORRUPT</code>, <code>NAND_RESULT_BUSY</code>, and <code>NAND_RESULT_ALLOC_FAILED</code>. See the description of Figure 2.
46<li>If <code>NAND_RESULT_ECC_CRIT</code> or <code>NAND_RESULT_AUTHENTICATION</code> is returned from a call to the <CODE>NANDSimpleSafeOpen[Async]</CODE> functions, the original file may be corrupted. As a result, after calling the <CODE>NANDSimpleSafeCancel[Async]</CODE> functions to deallocate resources, proceed to notify the player that the save file has been corrupted, and ask for confirmation to delete the file (refer to Figure 2).
47<li>If <code>NAND_RESULT_ECC_CRIT</code> or <code>NAND_RESULT_AUTHENTICATION</code> is returned from a call to the <CODE>NANDRead[Async]</CODE> or <CODE>NANDWrite[Async]</CODE> functions in the center of Figure 3, this indicates that the temporary files created internally by the <CODE>NANDSimpleSafe</CODE>-type functions are corrupted (the content of the original file is most likely unchanged). In contrast to the above case, do not proceed directly to the confirmation of deletion of the damaged file; instead, redo the save process from the beginning.
48</ul>
49</p>
50
51<hr>
52
53<H2>Revision History</H2>
54<p>
552009/02/03 Modified Figure 2. Deleted flow to <CODE>NAND_RESULT_MAXBLOCKS</CODE> and <CODE>NAND_RESULT_MAXFILES</CODE>. In line with this change, deleted the descriptions of these errors.<br> 2007/06/xx Revised Figure 2. Added the flow of <CODE>NAND_RESULT_UNKNOWN</CODE> and of unexpected result codes.<br>2007/05/09 Added an explanation for each figure.<br>2007/05/09 Added a figure for the error processing sequence when <CODE>NANDSimpleSafe</CODE>-related functions are in use.<br>2007/05/09 Moved the explanation for supplementary items.<br>2007/02/xx Added a supplementary note concerning the case in which both free space and free inodes are insufficient at the same time.<br>2006/11/30 Added support for the error codes <CODE>NAND_RESULT_ALLOC_FAILED</CODE>, <CODE>NAND_RESULT_MAXBLOCKS</CODE> and <CODE>NAND_RESULT_MAXFILES</CODE>.<br>2006/09/19 Standardized terminology. Deleted the word &quot;entry.&quot;<br>2006/08/30 Initial version.
56</p>
57
58
59<hr><p>CONFIDENTIAL</p></body>
60</html>
61