

#include <nitro/gx/gx_load.h>
void GX_LoadBGExtPltt(const void *pSrc, u32 destSlotAddr, u32 szByte);
| pSrc | Pointer to transfer origin |
| destSlotAddr | Address to inside of the transfer source BG expanded palette slot |
| szByte | Transfer size (in bytes) |
None.
Uses DMA to transfer BG palette data to the Main 2D Engine BG Extended palette. The transfer destination address (in the BG Extended palette) can be specified. The DMA channel to use here is GX_DMAID (defined in gxcommon.h). Both destSlotAddr and szByte must be 4-byte aligned. Call this function between the GX_BeginLoadBGExtPltt and GX_EndLoadBGExtPltt functions.
Note 1: 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 DC_FlushRange.
Note 2: If the regions for transfer source and transfer destination overlap, the operation result is undefined.
Note 3: Do not call the GX_SetBankForSubBGExtPltt, GX_ResetBankForSubBGExtPltt, or GX_DisableBankForSubBGExtPltt function between GXS_BeginLoadBGExtPltt and GXS_EndLoadBGExtPltt.
Note 4: The memory space available to use for palettes varies according to the BG surface. For a BG2 palette, you must place palette data in 0x4000-0x5FFF (slot 2). For a BG3 palette, you must place palette data in 0x6000-0x7FFF (slot 3). You can use the G2S_SetBG0Control function to select either 0x0000-0x1FFF (slot 0) or 0x4000-0x5FFF (slot 2) for BG0, and the G2S_SetBG1Control function to select either 0x2000-0x3FFF (slot 1) or 0x6000-0x7FFF (slot 3) for BG1.
GX_BeginLoadBGExtPltt
GX_EndLoadBGExtPltt
2009/07/24 Revised description of palette data placement restrictions.
2004/03/01 Added note about restrictions on placing palette data.
2004/02/09 Revised and expanded Description.
2004/01/19 Initial version.
CONFIDENTIAL