#include <revolution/gx.h>
void GXInitFifoBase(
GXFifoObj* fifo,
void* base,
u32 size);
| fifo | A pointer to the FIFO structure. |
|---|---|
| base | A pointer to the 32-byte aligned MEM1 memory to use for the FIFO. |
| size | The FIFO size in 32-byte multiples. The minimum size is 64KB (GX_FIFO_MINSIZE). |
None.
This function sets up the main memory to be used for the graphics FIFO in the fifo structure. The FIFO base pointer base must be 32-byte aligned. The size parameter size must also be a multiple of 32 bytes and have a value greater than the 64KB defined by GX_FIFO_MINSIZE.
The FIFO region must be allocated in internal memory (MEM1 region) of the system. Note: The external memory (MEM2 region) cannot be allocated.
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 DCInvalidateRange function may be used for this purpose.
The GXInit function initializes the FIFO based on the base and size arguments and attaches the FIFO to both the CPU and GP. Therefore, it is not necessary to call the GXInitFifoBase function unless you want to resize the default FIFO sometime after the GXInit function has been called or if you are creating a new FIFO.
Since the GXInitFifoBase function initializes the read pointer and write pointer to the same value as base, it is not normally needed to call the GXInitFifoPtrs function when initializing the FIFO. In addition, the GXInitFifoBase function sets the FIFO's high water mark to (size -16KB) and the low water mark to (size / 2), so it is not necessary to call the GXInitFifoLimits function unless you want to use special settings.
GXInitFifoPtrs, GXInitFifoLimits
2006/03/01 Initial version.
CONFIDENTIAL