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>GXInitFifoBase</title> 10</head> 11 12<body> 13 14<h1 align="left">GXInitFifoBase</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/gx.h> 19 20void GXInitFifoBase( 21 <a href="../Structures/GXFifoObj.html">GXFifoObj</a>* fifo, 22 void* base, 23 u32 size); 24</pre></dd></dl> 25 26<h2>Arguments</h2> 27<TABLE class="arguments" border="1" > 28 <tr> 29<TH>fifo</TH> 30<TD>A pointer to the FIFO structure.</TD> 31 </tr> 32 <tr> 33<TH>base</TH> 34<TD>A pointer to the 32-byte aligned MEM1 memory to use for the FIFO.</TD> 35 </tr> 36 <tr> 37<TH>size</TH> 38<TD>The FIFO size in 32-byte multiples. The minimum size is 64KB (<code>GX_FIFO_MINSIZE</code>).</TD> 39 </tr> 40</TABLE> 41 42<h2>Return Values</h2> 43<p>None.</p> 44 45<H2>Description</H2> 46<P>This function sets up the main memory to be used for the graphics FIFO in the <SPAN class="argument">fifo</SPAN> structure. The FIFO base pointer <SPAN class="argument">base</SPAN> must be 32-byte aligned. The size parameter <SPAN class="argument">size</SPAN> must also be a multiple of 32 bytes and have a value greater than the 64KB defined by <CODE>GX_FIFO_MINSIZE</CODE>.</P> 47 48<P>The FIFO region must be allocated in internal memory (MEM1 region) of the system. <B>Note: The external memory (MEM2 region) cannot be allocated.</B></P> 49 50<P>The CPU's write-gather pipe is used to write data to the FIFO. Therefore, the FIFO memory area must be forced out of the CPU cache prior to use. The <A href="../../os/Cache/DCInvalidateRange.html"><CODE>DCInvalidateRange</CODE></A> function may be used for this purpose. </P> 51 52<P>The <A href="../Management/GXInit.html"><CODE>GXInit</CODE></A> function initializes the FIFO based on the <SPAN class="argument">base</SPAN> and <SPAN class="argument">size</SPAN> arguments and attaches the FIFO to both the CPU and GP. Therefore, it is not necessary to call the <A href="GXInitFifoBase.html"><CODE>GXInitFifoBase</CODE></A> function unless you want to resize the default FIFO sometime after the <A href="../Management/GXInit.html"><CODE>GXInit</CODE></A> function has been called or if you are creating a new FIFO.</P> 53 54<P>Since the <A href="GXInitFifoBase.html"><CODE>GXInitFifoBase</CODE></A> function initializes the read pointer and write pointer to the same value as <SPAN class="argument">base</SPAN>, it is not normally needed to call the <A href="GXInitFifoPtrs.html"><CODE>GXInitFifoPtrs</CODE></A> function when initializing the FIFO. In addition, the <A href="GXInitFifoBase.html"><CODE>GXInitFifoBase</CODE></A> function sets the FIFO's high water mark to (<SPAN class="argument">size</SPAN> -16KB) and the low water mark to (<SPAN class="argument">size</SPAN> / 2), so it is not necessary to call the <A href="GXInitFifoLimits.html"><CODE>GXInitFifoLimits</CODE></A> function unless you want to use special settings.</P> 55 56<h2>See Also</h2> 57<P class="reference"> 58<A href="GXInitFifoPtrs.html">GXInitFifoPtrs</A>, 59<A href="GXInitFifoLimits.html">GXInitFifoLimits</A> 60</P> 61 62<H2>Revision History</H2> 63<P> 642006/03/01 Initial version.<br> 65</P> 66 67<hr><p>CONFIDENTIAL</p></body> 68</HTML>