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>DVD Demos</title>
10</head>
11
12<body>
13
14<h1>DVD Sample Demos</h1>
15
16<h2>Location</h2>
17
18<p><CODE>$REVOLUTION_SDK_ROOT/build/demos/dvddemo</CODE></p>
19
20<h2>Compilation</h2>
21<P>Change the directory to <CODE>$REVOLUTION_SDK_ROOT/build/demos/dvddemo</CODE> and enter <CODE>make</CODE>. The executable (<CODE>.elf</CODE>) file will be generated under the path <CODE>$REVOLUTION_SDK_ROOT/build/demos/dvddemo/bin/RVL/</CODE>.</P>
22
23<h2>Execution</h2>
24<P>You must configure <CODE>DVDRoot</CODE> before execution. Copy the <CODE>$REVOLUTION_SDK_ROOT/dvddata</CODE> directory to the emulation hard disk and specify this directory as <CODE>DVDRoot</CODE>.</P>
25<P>Change directories to <CODE>$REVOLUTION_SDK_ROOT/build/demos/dvddemo/bin/RVL/</CODE> and do one of the following:</P>
26<ul>
27<li>To simply run the application, execute the <code>ndrun</code> script, using the ELF file as an argument.</li>
28<li>Run <CODE>ide</CODE> with the ELF file as an argument if you want to debug with CodeWarrior.</li>
29</ul>
30
31<h2>Description</h2>
32<table class="demo_list" border="1" width="95%">
33  <tr>
34<th>dvddemo1</th>
35<td>Shows how to use the <A href="../../dvd/DVDRead.html"><CODE>DVDRead</CODE></A> function.<BR>This demo reads a file from the DVD, using the <A href="../../dvd/DVDRead.html"><CODE>DVDRead</CODE></A> function, and then prints the content to the debug output.<BR>The file content is [ abcdefg...z ] (four times).</td>
36  </tr>
37  <tr>
38<th>dvddemo2</th>
39<td>Shows how to use the <A href="../../dvd/DVDReadAsync.html"><CODE>DVDReadAsync</CODE></A> function. This demo reads a file from DVD, using the <A href="../../dvd/DVDReadAsync.html"><CODE>DVDReadAsync</CODE></A> function, then prints the content to the debug output. The file content is [ abcdefg...z ] (four times).</td>
40  </tr>
41  <tr>
42<th>dvddemo3</th>
43<td>This sample demonstrates how to use the queue feature of the <A href="../../dvd/DVDReadAsync.html"><CODE>DVDReadAsync</CODE></A> function.<BR>Without waiting for the first read to finish, this demo loads two different files from DVD, using the <A href="../../dvd/DVDReadAsync.html"><CODE>DVDReadAsync</CODE></A> function, and prints the content to the debug output.<BR>The file contents are [ abcdefg....z ] (four times) and [ ABCDEFG...Z ] (four times).</td>
44  </tr>
45  <tr>
46<th>directory</th>
47<td>Shows how to use the <CODE><A href="../../dvd/DVDOpenDir.html">DVDOpenDir</CODE></A>, <A href="../../dvd/DVDReadDir.html"><CODE>DVDReadDir</CODE></A>, and <A href="../../dvd/DVDCloseDir.html"><CODE>DVDCloseDir</CODE></A> functions.<BR>This demo operates like <CODE>ls -lR</CODE>. Names of all files and directories under <CODE>DVDRoot</CODE> are shown recursively. Also shown are file lengths.</td>
48  </tr>
49  <TR>
50<TH>errorhandling</TH>
51<TD>Shows methods for handling errors.<BR>Use the Control Stick or +Control Pad to select a command to run from the command list. To see how these errors are handled in the program, eject the disc and replace it while the drive is executing a command in order to generate an error.<br>When you select the <A href="../../dvd/DVDChangeDisk.html"><code>DVDChangeDisk</code></A> function from the command list, you are asked to enter the disc number to change (255 corresponds to any disc number). Use NDEV to insert the disc that has the selected disc number. This action completes the disc exchange sequence.<BR><strong><STRONG>Note:</STRONG> Controller input wait state will not be supported in the near term.</strong>
52    </TD>
53  </TR>
54  <TR>
55<TH>dvdfatal</TH>
56<TD>This sample shows how to use the <A href="../../dvd/DVDSetAutoFatalMessaging.html"><CODE>DVDSetAutoFatalMesseaging</CODE></A> function. This demo turns on the auto fatal message mode and afterwards continues to read a file (<CODE>texts/test1.txt</CODE>). When a fatal error is issued with NDEV, the device driver will automatically show an appropriate error message on the TV screen.</TD>
57  </TR>
58  <TR>
59<TH>checkdisk</TH>
60<TD>This sample gets disc status using functions such as <A href="../../dvd/DVDGetDriveStatus.html"><CODE>DVDGetDriveStatus</CODE></A>, <A href="../../dvd/DVDCheckDiskAsync.html"><CODE>DVDCheckDiskAsync</CODE></A>, and <A href="../../dvd/DVDIsDiskIdentified.html"><CODE>DVDIsDiskIdentified</CODE></A>.<BR>It is possible to check onscreen what kind of value is returned by various functions for each respective state by performing operations as disc eject, insert, and file (<CODE>abc.ecd</CODE>) loading while running this demo.</TD>
61  </TR>
62</table>
63
64<h2>See Also</h2>
65<P>
66<a href="../list.html">Optical Disc (DVD) API Function List</a>
67</p>
68
69<H2>Revision History</H2>
70<P>
712009/01/16 Added the sample demo <CODE>checkdisk</CODE>. Added links to functions.<BR>2006/09/19 Removed the confirmation procedure for the controller input standby status.<BR>2006/09/07 Added a method for checking the controller input standby status of a drive.<BR>2006/03/01 Initial version.<BR>
72</P>
73
74<hr><p>CONFIDENTIAL</p></body>
75</html>