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 3.0"> 7<meta http-equiv="Content-Style-Type" content="text/css"> 8<link rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 9<title>VIConfigure</title> 10</head> 11 12<body> 13 14<h1 align="left">VIConfigure</h1> 15 16<h2>C Specification</h2> 17 18<dl> 19<dd><pre><code>#include <revolution/vi.h> 20#include <revolution/gx/GXStruct.h></code></pre> 21 </dd> 22<dd><pre><code>void VIConfigure(const <a href="../gx/Structures/GXRenderModeObj.html">GXRenderModeObj</a>* <em>rm</em>)</code></pre> 23 </dd> 24</dl> 25 26<h2>Arguments</h2> 27 28<table border="1" cellpadding="3" cellspacing="0.1"> 29<TBODY> 30 <tr> 31<td width="100" rowspan="10" bgcolor="#ffffe8"><em><strong><code>rm</code></strong></em></td> 32<td width="520" colspan="2">Render Mode <BR>The following is a description of members of the structure handled by <CODE>VIConfigure</CODE>.</td> 33 </tr> 34 <tr> 35<td width="100" rowspan="2" bgcolor="#fffff8"><em>viTVMode</em></td> 36<td width="520">Screen Mode</td> 37 </tr> 38 <tr> 39 <td width="520"> 40<CODE>VI_TVMODE_NTSC_DS</CODE> sets the NTSC double-strike mode.<br><CODE>VI_TVMODE_NTSC_INT</CODE> sets the NTSC interlaced mode.<br><CODE>VI_TVMODE_NTSC_PROG</CODE> sets the NTSC progressive mode.<br><CODE>VI_TVMODE_PAL_DS</CODE> sets the PAL double-strike mode.<br><CODE>VI_TVMODE_PAL_INT</CODE> sets the PAL interlaced mode.<br><CODE>VI_TVMODE_EURGB60_DS</CODE> sets the EURGB60 double-strike mode.<br><CODE>VI_TVMODE_EURGB60_INT</CODE> sets the EURGB60 interlaced mode.<br><CODE>VI_TVMODE_EURGB60_PROG</CODE> sets the EURGB60 progressive mode.<br><CODE>VI_TVMODE_MPAL_DS</CODE> sets the MPAL double-strike mode.<br><CODE>VI_TVMODE_MPAL_INT</CODE> sets the MPAL interlaced mode.<br><CODE>VI_TVMODE_MPAL_PROG</CODE> sets the MPAL progressive mode.<br> 41 </td> 42 </tr> 43 <tr> 44<td width="100" bgcolor="#fffff8"><em>viXOrigin</em></td> 45<td width="520">The on-screen X position in pixels</td> 46 </tr> 47 <tr> 48<td width="100" bgcolor="#fffff8"><em>viYOrigin</em></td> 49<td width="520">The on-screen Y position in pixels</td> 50 </tr> 51 <tr> 52<td width="100" bgcolor="#fffff8"><em>viWidth</em></td> 53<td width="520">The screen width in pixels.</td> 54 </tr> 55 <tr> 56<td width="100" rowspan="2" bgcolor="#fffff8"><em>xFBmode</em></td> 57<td width="520">The external frame buffer mode <BR>Takes one of the following values:</td> 58 </tr> 59 <tr> 60<td width="520"><CODE>VI_XFBMODE_DF</CODE> sets the double-field frame buffer mode.<br><CODE>VI_XFBMODE_SF</CODE> sets the single-field frame buffer mode. <br></td> 61 </tr> 62 <tr> 63<td width="100" bgcolor="#fffff8"><em>xfbHeight</em></td> 64<td width="520">The height of the external frame buffer (XFB)</td> 65 </tr> 66 <tr> 67<td width="100" bgcolor="#fffff8"><em>fbWidth</em></td> 68<td width="520">The width of the external frame buffer (XFB)</td> 69 </tr> 70</TBODY> 71</table> 72 73<h2>Return Values</h2> 74 75<p>None.</p> 76 77<h2>Description</h2> 78 79<p>This function configures the TV screen and external frame buffer. The following members of the <code><a href="../gx/Structures/GXRenderModeObj.html">GXRenderModeObj</a></code> structure are used in this function.</p> 80 81<p><em>viTVmode, viXOrigin, viYOrigin, viWidth, fbWidth, xfbHeight, xFBmode</em></p> 82 83<p><em>viXOrigin</em> and <em>viYOrigin</em> specify a position on the TV screen. <em>viWidth</em> specifies the size of the screen in the x-direction. <em>viTVmode</em> sets the screen to NTSC, PAL, EURGB60, or MPAL and the mode to double-strike, interlaced, or progressive. <em>fbWidth</em> and <em>xfbHeight</em> specify the size of external frame buffer. <em>xFBmode</em> specifies whether the frame buffer is set for single-field or double-field. Here, the term 'single-field frame buffer' indicates that the frame buffer contains the image of a single field, whereas the term 'double-field buffer' indicates that the buffer contains the images of two consecutive fields.</p> 84 85<p>Be aware that the height of the screen need not be specified. This information is included in <CODE>xfbHeight</CODE> and <CODE>xFBmode</CODE>. If <CODE>xFBmode</CODE> is double-field, the height of the screen is the same as <CODE>xfbHeight</CODE>. If <CODE>xFBmode</CODE> is single-field, the height of the screen is twice that of <CODE>xfbHeight</CODE>. </p> 86 87<p>The change does not take effect until <code><a href="VIFlush.html">VIFlush</a></code> is called. See the <code><a href="VIFlush.html">VIFlush</a></code> function manual for more details on when changes take effect. </p> 88 89<p>Note that pan information is cleared when <code>VIConfigure</code> is called. Call <code><a href="VIConfigurePan.html">VIConfigurePan</a></code> if it is necessary for pan settings to remain in effect.</p> 90 91<p>Due to hardware restrictions, at least two fields need to elapse to switch modes safely when <CODE>viTVmode</CODE> has been changed. When using <code>VIConfigure</code> to change modes (especially to the TV mode), call <a href="VIWaitForRetrace.html"><code>VIWaitForRetrace</code></a> twice after calling <code>VIConfigure</code> to make sure changes are made safely. </p> 92 93<p>A list of argument restrictions is given below. 94 95<ul> 96<li>To understand the restrictions on <CODE>viXOrigin</CODE>, <CODE>viYOrigin</CODE>, and <CODE>viWidth</CODE>, see section 6.1 "Render Mode Customization" in the Video Interface manual. </li> 97<li>There is a restriction on the left edge (<em>viXOrigin</em>) and the right edge (<em>viXOrigin</em> + <em>viWidth</em>) of image on the TV.<br> <em>viXOrigin</em> <= 307 (NTSC/EURGB60/MPAL), 300 (PAL)<br> <em>viXOrigin</em> + <em>viWidth</em> >= 307 (NTSC/EURGB60/MPAL), 300 (PAL) </li> 98<li>The screen height must always be an even number. This means that <CODE>xfbHeight</CODE> must be an even number in double field frame buffer mode. (For single-field frame buffer mode, the height of the screen is always an even number because it is twice that of <em>xfbHeight</em>.)<br> <em>xfbHeight</em> must set to an even number when <em>xfbMode</em> == <code>VI_XFBMODE_DF</code>. </li> 99</ul> 100 101<p><B>Note:</B> NTSC and MPAL are compatible. For example, if you make a game for NTSC and NTSC was specified for <code>VIConfigure</code> in the game, MPAL will operate properly using VI functionality. What happens here is that when NTSC/MPAL has been specified, <code>VIConfigure</code> checks if the Revolution system is NTSC or MPAL and configures the system accordingly.</p> 102 103<h2>See Also</h2> 104 105<p><code><a href="VIConfigurePan.html">VIConfigurePan</a></code>, <a href="VIFlush.html">VIFlush</a></code>, <code><a href="VIWaitForRetrace.html">VIWaitForRetrace</a> </code></p> 106 107<h2>Revision History</h2> 108 109<p> 1102006/08/15 Added EURGB60 and MPAL progressive modes.<BR>2006/03/01 Initial version. <BR> 111</p> 112<hr> 113<P>CONFIDENTIAL</p> 114</BODY> 115</HTML> 116