1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<title>GXS_LoadBGExtPltt</title>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</head>
10<body>
11<h1 align="left">GXS_LoadBGExtPltt <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<dl>
14  <dd>
15<PRE>
16<CODE>#include &lt;nitro/gx/gx_load.h&gt;</CODE><BR>
17<CODE>void GXS_LoadBGExtPltt(const void *pSrc, u32 destSlotAddr, u32 szByte);</CODE></PRE></dd>
18</dl><h2>Arguments</h2>
19<TABLE border="1" width="100%">
20  <TBODY>
21    <TR>
22      <TD width="190"><em><strong><font face="Courier New">pSrc</font></strong></em></TD>
23      <TD width="512">Pointer to transfer origin</TD>
24    </TR>
25    <TR>
26      <TD width="190"><em><strong><font face="Courier New">destSlotAddr</font></strong></em></TD>
27      <TD width="512">Address to inside of the transfer source BG expanded palette slot</TD>
28    </TR>
29    <TR>
30      <TD width="190"><em><strong><font face="Courier New">szByte</font></strong></em></TD>
31      <TD width="512">Transfer size (in bytes)</TD>
32    </TR>
33  </TBODY>
34</TABLE>
35<h2>Return Values</h2>
36<p>None.</p>
37<H2>Description</H2>
38<P>This function uses DMA to transfer BG palette data to the sub-2D Engine BG Extended palette. The transfer destination address (in the BG Extended palette) can be specified. Use the <code>GX_DMAID</code> DMA channel (defined in <code>gxcommon.h</code>). Both <em><strong><code>destSlotAddr</code></strong></em> and <em><strong><code>szByte</code></strong></em> must be 4-byte aligned. Call this function between the <CODE><A href="GXS_BeginLoadBGExtPltt.html">GXS_BeginLoadBGExtPltt</A></CODE> and <CODE><A href="GXS_EndLoadBGExtPltt.html">GXS_EndLoadBGExtPltt</A></CODE> functions.<BR><BR> <B>Notes:</B> Because the DMA transfer is carried out internally, the transfer source data must be written to main memory in advance using a function such as <CODE><A href="../../os/cache/DC_FlushRange.html" target="_self">DC_FlushRange</A></CODE>.<BR>If the regions for transfer source and transfer destination overlap, the operation result is undefined. Do not call <A href="GX_SetBankForSubBGExtPltt.html"><CODE>GX_SetBankForSubBGExtPltt</CODE></A>, <A href="GX_ResetBankForSubBGExtPltt.html"><CODE>GX_ResetBankForSubBGExtPltt</CODE></A>, or <A href="GX_DisableBankForSubBGExtPltt.html"><CODE>GX_DisableBankForSubBGExtPltt</CODE></A> between <CODE><A href="GXS_BeginLoadBGExtPltt.html">GXS_BeginLoadBGExtPltt</A></CODE> and <CODE><A href="GXS_EndLoadBGExtPltt.html">GXS_EndLoadBGExtPltt</A></CODE>.<BR>The memory space that you can use for palettes varies according to the BG surface. For a BG2 palette you must place palette data in 0x4000-0x6000 (slot 2). For a BG3 palette you must place palette data in 0x6000-0x8000 (slot 3). You can use the <CODE><A href="../g2/G2S_SetBG0Control.html">G2S_SetBG0Control</A></CODE> function to select either <CODE>0x0000-0x2000</CODE> (slot 0) or <CODE>0x4000-6000</CODE> (slot 2) for BG0, and the <CODE><A href="../g2/G2S_SetBG1Control.html">G2S_SetBG1Control</A></CODE> function to select either <CODE>0x2000-0x4000</CODE> (slot 1) or <CODE>0x6000-8000</CODE> (slot 3) for BG1.</P>
39<h2>See Also</h2>
40<P><code><A href="GXS_BeginLoadBGExtPltt.html">GXS_BeginLoadBGExtPltt</A></code><BR> <code><A href="GXS_EndLoadBGExtPltt.html">GXS_EndLoadBGExtPltt</A></code></P>
41<H2>Revision History</H2>
42<P>2004/03/01</P>
43<UL>
44  <LI>Added caution about restrictions on placing palette data.
45</UL>
46<P>2004/02/09 Initial version.</P>
47<hr><p>CONFIDENTIAL</p></body>
48</html>
49