1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>CARD Demos</title>
10</head>
11
12<body>
13
14<h1>Card Sample Demo</h1>
15<h2>Location</h2>
16
17<p><CODE>$REVOLUTION_SDK_ROOT/build/demos/</CODE>c<CODE>arddemo</CODE></p>
18
19<h2>Compilation</h2>
20
21<P>Go to <CODE>$REVOLUTION_SDK_ROOT/build/demos/carddemo/</CODE> and type &quot;<CODE>make</CODE>&quot;. The executable (<CODE>.elf</CODE> file) will be generated under <CODE>$REVOLUTION_SDK_ROOT/build/demos/carddemo/bin/RVL/</CODE>.</P>
22<h2>Execution</h2>
23
24<P>Change directories to <code>$REVOLUTION_SDK_ROOT/build/demos/carddemo/bin/RVL/</code> and do one of the following:</P>
25<ul>
26<li>To execute the program, run the <code>ndrun</code> script using a <code>.elf</code> file as an argument.</li>
27<li>Run <CODE>ide</CODE> with a <CODE>.elf</CODE> file as an argument (if you want to debug with CodeWarrior).</li>
28</ul>
29
30<h2>Description</h2>
31
32<table border="1">
33  <tr>
34<td><em><strong><code><CODE>format</CODE></code></strong></em></td>
35<td>Explains how to format a Memory Card.</td>
36  </tr>
37  <tr>
38<td><em><strong><code>create</code></strong></em></td>
39<td>Explains how to create a file on a Memory Card. The file name is specified using ndrun's -a option.</td>
40  </tr>
41  <tr>
42<td><em><strong><code>list</code></strong></em></td>
43<td>Outputs Memory Card files to debug output.</td>
44  </tr>
45    <TR>
46<TD><B><I><TT>create-1icon</TT></I></B></TD>
47<TD>Creates a file with 1 icon.</TD>
48    </TR>
49    <TR>
50<TD><B><I><TT>create-8icon</TT></I></B></TD>
51<TD>Creates a file with 8 icons (animation).</TD>
52    </TR>
53    <TR>
54<TD><B><I><TT>create-bnr-4icon</TT></I></B></TD>
55<TD>Creates a file with a banner and 4 icons (animation).</TD>
56    </TR>
57    <tr>
58<td><em><strong><code>listdemo</code></strong></em></td>
59<td>A full-scale demo that explains the following:
60      <UL>
61<LI>How to save and display Memory Card animated icons and the banner image.
62<LI>How to save game data safely to the Memory Card. (Try removing the Memory Card from the slot while saving the data.)&nbsp;
63<LI>When and how to format the Memory Card.&nbsp;
64<LI>How to use the reset function (TBD) to return to the memory card screen on the Revolution system menu when the Memory Card is full.&nbsp;
65<LI>How to display a progress bar while formatting the Memory Card and saving/deleting a file.&nbsp;
66<LI>How the Revolution main unit menu shows the game title and memory card file comments using the IPL ROM font. Note that only the text characters inside green boxes are actually displayed in the IPL file browser.
67      </UL>
68<p><b><i>Note:</i></b> Examples of animated icon and banner images are stored in the <tt>tpl</tt> directory.</td>
69  </tr>
70  <tr>
71<td><em><strong><code>save</code></strong></em></td>
72<td>Save files located on an optical disc to the Memory Card. The file is specified using ndrun's -a option.</td>
73  </tr>
74
75</table>
76
77<h2>Snapshots of listdemo</h2>
78<H4><strong>Slot Selection Screen</strong></H4>
79Use the Control Stick or +Control Pad to choose Memory Card Slot A or B. Next, press the A Button to go to file list screen. Note that text outside the green boxes will not be shown in the Revolution memory card screen.
80<p><img src="screen1.gif" alt="screen1.gif (18387 ???)" width="640" height="440"></p>
81<H4>File List Screen</H4>
82Use the Control Stick or +Control Pad to select the file or an &lt;Open&gt; entry. Press the A Button to select [Save] or [Erase]. By selecting the &lt;Open&gt; entry, you can create a new file if there are enough free blocks on the Memory Card. Each row of the file list displays from left to right the animated icon, filename, file entry number, and file block size. (Note that filename are not displayed on the memory card screen of the Revolution main menu.) The comment strings of the currently selected file are shown inside the green boxes in the lower right part of the screen. Note that text outside the green boxes will not be shown in the Revolution memory card screen. In the lower left corner, the card file banner image, animated icon, and all the icon animation patterns are displayed. Generally, the card file banner image should look the same as the disk banner image. <b>Note:</b> the disk banner image must be in RGB5A3 format, but the card file banner image can be in RGB5A3 or C8 with RGB5A3 TLUT to save space.
83<p><img src="screen2.gif" alt="screen2.gif (25073 ???)" width="640" height="448"></p>
84
85<h2>See Also</h2>
86
87<p><a href="../../card/toc.html"><code>CARD APIs</code></a></p>
88<H2>Revision History</H2>
89<P>2007/08/02 Added an explanation to <STRONG>Description</STRONG> on the option that specifies the file name.<br>2006/03/01 Initial version.</P>
90<hr>
91<P>CONFIDENTIAL</p>
92</BODY>
93</HTML>