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>VIConfigure</title>
10</head>
11
12<body>
13
14<h1 align="left">VIConfigure</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">#include &lt;revolution/vi.h&gt;
18#include &lt;revolution/gx/GXStruct.h&gt;
19
20void VIConfigure(const <a href="../gx/Structures/GXRenderModeObj.html">GXRenderModeObj</a>* rm);
21</pre></dd></dl>
22
23<h2>Arguments</h2>
24<TABLE class="arguments" border="1" >
25<TBODY>
26  <tr>
27<th rowspan="10">rm</th>
28<td colspan="2">Render Mode. <BR>The following is a description of the members of the structure handled by <CODE>VIConfigure</CODE>.</td>
29  </tr>
30  <tr>
31<td rowspan="2" bgcolor="#fffff8"><em>viTVMode</em></td>
32<td>Screen Mode.</td>
33  </tr>
34  <tr>
35    <td>
36<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. <CODE>VI_TVMODE_EURGB60_PROG</CODE> sets the EURGB60 progressive mode.<br>
37    </td>
38  </tr>
39  <tr>
40<td width="100" bgcolor="#fffff8"><em>viXOrigin</em></td>
41<td>On-screen X position, in pixels.</td>
42  </tr>
43  <tr>
44<td width="100" bgcolor="#fffff8"><em>viYOrigin</em></td>
45<td>On-screen Y position, in pixels.</td>
46  </tr>
47  <tr>
48<td width="100" bgcolor="#fffff8"><em>viWidth</em></td>
49<td>Screen width, in pixels.</td>
50  </tr>
51  <tr>
52<td width="100" rowspan="2" bgcolor="#fffff8"><em>xFBmode</em></td>
53<td>External frame buffer mode. <BR>Takes one of the following values:</td>
54  </tr>
55  <tr>
56<td><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.</td>
57  </tr>
58  <tr>
59<td width="100" bgcolor="#fffff8"><em>xfbHeight</em></td>
60<td>Height of the external frame buffer (XFB).</td>
61  </tr>
62  <tr>
63<td width="100" bgcolor="#fffff8"><em>fbWidth</em></td>
64<td>Width of the external frame buffer (XFB).</td>
65  </tr>
66</TBODY>
67</table>
68
69<h2>Return Values</h2>
70<p>None.</p>
71
72<h2>Description</h2>
73<p>This function configures the TV screen and external frame buffer. The following members of the <a href="../gx/Structures/GXRenderModeObj.html"><code>GXRenderModeObj</code></a> structure are used in this function.</p>
74
75<p><em>viTVmode, viXOrigin, viYOrigin, viWidth, fbWidth, xfbHeight, xFBmode</em></p>
76
77<p><em>viXOrigin</em> and <em>viYOrigin</em> specify a position on the TV screen. <em>viWidth</em> specifies the x-directional size of the screen. <em>viTVmode</em> specifies whether to set the screen to NTSC, PAL, or EURGB60 and whether the mode is double-strike, interlaced, or progressive. <EM>fbWidth</EM> and  <EM>xfbHeight</EM> specify the size of the external frame buffer. <EM>xFBmode</EM> specifies whether the frame buffer is set for single-field or double-field. Here, the term &quot;single-field frame buffer&quot; indicates that the frame buffer contains the image of a single field, whereas &quot;double-field buffer&quot; indicates that the buffer contains the images of two consecutive fields.</p>
78
79<p>Be aware that screen height does not have to be specified. This information is included in <EM>xfbHeight</EM> and <EM>xFBmode</EM>. If <EM>xFBmode</EM> is double-field, the screen height is the same as <EM>xfbHeight</EM>. If <EM>xFBmode</EM> is single-field, the screen height is twice that of <EM>xfbHeight</EM>.</p>
80
81<p>The change does not take effect until <a href="VIFlush.html"><code>VIFlush</code></a> is called. For more details on when changes take effect, see the <a href="VIFlush.html"><code>VIFlush</code></a> function manual.</p>
82
83<p>Pan information is cleared when <EM>VIConfigure</EM> is called. Call <a href="VIConfigurePan.html"><code>VIConfigurePan</code></a> if it is necessary for pan settings to remain in effect.</p>
84
85<p>Due to hardware restrictions, at least two fields need to elapse to switch modes safely when <EM>viTVmode</EM> has been changed. When using <code>VIConfigure</code> to change modes (especially TV mode), call <code>VIConfigure</code>, then call <a href="VIWaitForRetrace.html"><code>VIWaitForRetrace</code></a> twice to make sure that changes are made safely.</p>
86
87<p>A list of argument restrictions is given below.
88<ul>
89<li>To understand the restrictions on <EM>viXOrigin</EM>, <EM>viYOrigin</EM>, and <EM>viWidth</EM>, see section 6.1, &quot;Render Mode Customization&quot; in the Video Interface manual. </li>
90<li>There is a restriction on the left edge (<EM>viXOrigin</EM>) and right edge (<EM>viXOrigin</EM> + <EM>viWidth</EM>) of a TV image.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em>viXOrigin</em> &lt;= 307     (NTSC/EURGB60), 300 (PAL)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em>viXOrigin</em> + <em>viWidth</em> &gt;= 307     (NTSC/EURGB60), 300 (PAL) </li>
91<li>Screen height must always be an even number. This means that <EM>xfbHeight</EM> must be an even number in double-field frame buffer mode. (For single-field frame buffer mode, the screen height is always an even number because it is twice that of <EM>xfbHeight</EM>.)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<EM>xfbHeight</EM> must be set to an even number when <EM>xfbMode</EM> == <EM>VI_XFBMODE_DF</EM>. </li>
92</ul>
93
94<h2>See Also</h2>
95<P class="reference">
96<a href="VIConfigurePan.html">VIConfigurePan</a>,
97<a href="VIFlush.html">VIFlush</a>,
98<a href="VIWaitForRetrace.html">VIWaitForRetrace</a>
99</p>
100
101<h2>Revision History</h2>
102<p>
1032008/04/08 Corrected a mention of MPAL that had escaped deletion.<br>2007/12/04 Deleted the description of MPAL.<br>2006/08/15 Added EURGB60 and MPAL progressive modes.<br>2006/03/01 Initial version.<br>
104</p>
105
106<hr><p>CONFIDENTIAL</p></body>
107</html>