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>VI Demos</title> 10</head> 11 12<body> 13 14<h1>Video Interface (VI) Sample Demos</h1> 15 16<h2>Location</h2> 17<p><CODE>$REVOLUTION_SDK_ROOT/build/demos/videmo</CODE></p> 18 19<h2>Compilation</h2> 20<p>Go to the <CODE>$REVOLUTION_SDK_ROOT/build/demos/videmo</CODE> directory and enter <CODE>make</CODE>. The executable file (<CODE>*.elf</CODE> file) will be created in the <CODE>$REVOLUTION_SDK_ROOT/build/demos/videmo/bin/RVL/</CODE> directory.</p> 21 22<h2>Execution</h2> 23<p>You must configure <CODE>DVDRoot</CODE> before execution. Be sure to specify the folder name <CODE>$REVOLUTION_SDK_ROOT/dvddata</CODE> as the <CODE>"DvdRoot"</CODE> argument of the <CODE>SetNdEnv</CODE> command.</p> 24 25<p>Go to the directory <CODE>$REVOLUTION_SDK_ROOT/build/demos/videmo/bin/RVL/</CODE> and do one of the following: 26<ul> 27<li>To simply run an application, execute the <code>ndrun</code> script, using the <code>.elf</code> file as an argument.</li> 28<li>To debug with CodeWarrior, run <CODE>ide</CODE>, using the <CODE>.elf</CODE> file as an argument.</li> 29</ul> 30 31<h2>Description</h2> 32<TABLE class="demo_list" border="1" > 33<TBODY> 34 <tr> 35<th nowrap>color</th> 36<td>Sample of a double-field frame buffer.<br>This demo paints the whole screen with a single color and changes the color once a second.</td> 37 </tr> 38 <tr> 39<th nowrap>moving</th> 40<td>Sample of single-field 60 Hz rendering (field rendering).<br> This demo renders the screen with a simple pattern and moves it. This sample shows how to use <a href="../VIGetNextField.html"><code>VIGetNextField</code></a> in field-rendering mode.</td> 41 </tr> 42 43 <tr> 44<th nowrap>moving.30Hz</th> 45<td>Sample showing 30-Hz rendering.<br>This demo works similarly to the <CODE>moving</CODE> demo, but in 30 Hz. It shows how to make 30-Hz games.</td> 46 </tr> 47 48 <tr> 49<th nowrap>moving.progressive</th> 50<td>Sample showing progressive display.<br>This demo is the same as the <CODE>moving</CODE> demo, except that it uses progressive scan for the display. This demo shows how to make progressive display settings.</td> 51 </tr> 52 53 <tr> 54<th nowrap>viewer</th> 55<td>BMP file viewer.<br>This demo opens every BMP file under <CODE>DVDRoot/pictures</CODE> and shows it on the screen. Files with the "BMA" and "BMB" extensions are pairs and appear on screen simultaneously. The BMA file is treated as the image for the "above" field and the BMB file is treated as the image for the "below" field. (For an explanation of "above" and "below" fields, see "Video Interface Library (VI)" in the <I>Revolution Graphics Programmer's Guide</I>.))<br>Six versions of the viewer are generated. The <CODE>viewer_NTSC_INT</CODE> viewer is for the NTSC interlaced mode; the <CODE>viewer_NTSC_DS</CODE> viewer is for the NTSC double-strike mode; and so on. To add a picture, place a BMP file in the <CODE>DVDRoot/picture</CODE> directory. Any files with extensions other than BMP, BMA, and BMB are ignored. Subdirectories under the <CODE>pictures</CODE> directory are also ignored.</td> 56 </tr> 57 58 <tr> 59<th nowrap>smp-onetri_PAL</th> 60<td>This is a PAL version of the <CODE>smp-onetri</CODE> sample demo. For more information, see <a href="../../gx/sampledemos/Simple/smp-onetri.html">GX Sample Demo Manual</a>.<br>By default, this demo shows PAL 50 Hz mode using Y scaling. By pressing the A Button, you can toggle the mode to PAL 60, then PAL 50Hz with black bars, and then back to PAL 50Hz using Y scaling.</td> 61 </tr> 62 63 <tr> 64<th nowrap>smp-onetri_Progressive</th> 65<td>This uses the <CODE>smp_onetri</CODE> sample demo to test switching from interlaced to progressive.<br>This sample demo shows how to check the VI retrace interrupt timing and to test for delay when switching from interlace to progressive scan. If the VI retrace interrupt is delayed, the display may not switch to progressive scan correctly. 66 67This demo first carries out interlaced scan and then automatically switches to progressive scan after about five seconds (six seconds with PAL). After switching to progressive scan, the result of the progressive switching test (the number of times the VI retrace interrupt was delayed) is displayed on the console. If there were no problems, the test result is "OK" (VI retrace interrupt delay count = 0). Be aware that this demo always results in "OK".</br> 68 69If the results of similar tests with your application are not OK (VI retrace interrupt delay count < 0), check whether interrupts are being disabled for long periods during gameplay. 70 </td> 71 </tr> 72 73 <tr> 74<th nowrap>frb-vi-gamma</th> 75<td>This test adds a VI gamma correction feature to the GX gamma demo (<a href="../../gx/sampledemos/Framebuffer/frb-gamma.html"><code>frb-gamma</code></a>).<br>Wii has two gamma correction modes. One is GX-based gamma correction; the other is VI-based gamma correction. This program tests both GX and VI gamma correction modes. To toggle between the GX and VI gamma correction modes, use the Z trigger. For details on other operations, see the page about the <a href="../../gx/sampledemos/Framebuffer/frb-gamma.html"><code>frb-gamma</code></a> demo. 76 </td> 77 </tr> 78 79 <tr> 80<th nowrap>cross-color</th> 81<td>This test checks the trap filter feature (<a href="../VISetTrapFilter.html"><code>VISetTrapFilter</code></a>).<br>The trap filter feature is disabled by default under this demo. Press the A button to toggle the trap filter settings between enabled and disabled. The current status of the trap filter settings will be output to the console output. If trap filter settings are disabled, cross-color phenomena will appear on the concentric circles. 82 </td> 83 </tr> 84 85 86 <tr> 87<th nowrap>dimming</th> 88<td>This test checks the functionality of the screen burn-in protection feature (<a href="../VISetTimeToDimming.html"><code>VISetTimeToDimming</code></a> and <a href="../VIGetDimmingCount.html"><code>VIGetDimmingCount</code></a>).<br>The number displayed in the upper screen area (Count to dimming) indicates the count to execution of screen burn-in protection (the <a href="../VIGetDimmingCount.html"><code>VIGetDimmingCount</code></a> value). This value counts down from a set initial value and activates the screen burn-in protection when the count reaches 0.<br> 89 90Pressing the A Button, + Button, or - Button on the Wii Remote changes the time until screen burn-in protection is executed. When the B Button is pressed, <a href="../VIGetDimmingCount.html"><code>VIGetDimmingCount</code></a> will be executed after 500 fields. This is used to check that the count to dimming does not get cleared when <a href="../VIGetDimmingCount.html"><code>VIGetDimmingCount</code></a> is executed.<br> 91 92When the 1 Button is pressed on the Wii Remote, <a href="../VIResetDimmingCount.html"><code>VIResetDimmingCount</code></a> will be executed after 500 fields.<br>The count to dimming is reset at the moment the 1 Button is pressed. It is also reset by <a href="../VIResetDimmingCount.html"><code>VIResetDimmingCount</code></a> after 500 fields.<br> 93 94If the input status of the controller changes, these counts will return to initial values. Please also note that if the burn-in protection settings are turned off in the system settings menu, the burn-in protection will always be disabled. 95 </td> 96 </tr> 97 98 <tr> 99<th nowrap>moving.regions</th> 100<td>This demo uses <a href="../VIGetTvFormat.html"><code>VIGetTvFormat</code></a> to automatically configure the TV type.<br>If you want to support all video formats with a single game image, use this demo for reference. In this demo the value of <a href="../VIGetTvFormat.html"><code>VIGetTvFormat</code></a> is output to console output before and after <a href="../VIInit.html"><code>VIInit</code></a>. Use this to verify how the TV type that is output changes during the process. To execute a restart process using <a href="../../os/Reset/OSRestart.html"><code>OSRestart</code></a>, press the A Button. Use this to also verify the video type after restart. 101 </td> 102 </tr> 103 104 105</TBODY> 106</table> 107 108<h2>See Also</h2> 109<P class="reference"> 110<a href="../toc.html" target="contents">VI Functions</a>, 111<a href="../../gx/sampledemos/Framebuffer/frb-gamma.html">frb-gamma</a> 112</p> 113 114<H2>Revision History</H2> 115<P> 1162008/06/16 The part of <code>moving.regions</code> where progressive mode is determined is now performed by <CODE>VIGetScanMode</CODE>.<br> 2008/05/09 Deleted the <code>cgmsdemo</code> test.<br> 2008/03/07 Added the <code>cgmsdemo</code> test.<br> 2007/07/17 Revised the text of the <code>dimming</code> test.( (Added <CODE>VIResetDimmingCount</CODE>.)<br>2006/10/25 Revised the text of the <code>dimming</code> test. (Added <code>VISetTimeToDimming</code> and removed <code>VIEnableDimming</code>.)<br> 2006/09/22 Added the <code>moving.regions</code> test.<br>2006/09/21 In the descriptions, changed "screen saver" to "burn-in protection".<br>2006/09/13 Revised text about the <code>dimming</code> test.<br>2006/09/07 Added the <code>dimming</code> test.<br>2006/07/22 Added the <code>cross-color</code> test.<br>2006/06/16 Added the <code>frb-vi-gamma</code> test.<br>2006/06/05 Revised the <code>DVDRoot</code> settings description.<br>2006/06/05 Added the <code>moving.progressive</code> and <code>smp-onetri_Progressive</code> tests.<br>2006/03/01 Initial version.<br> 117</P> 118 119<hr><p>CONFIDENTIAL</p></body> 120</html>