N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

## gDPLoadTLUT_pal16 [macro]

Loads a palette for 4-bit color index textures.

Syntax

    #include <ultra64.h>  /* gbi.h */
    gDPLoadTLUT_pal16(Gfx *gdl, u32 pal, u32 dram)
    gsDPLoadTLUT_pal16(u32 pal, u32 dram)

Arguments

- gdl is the display list pointer

- pal is the palette location (0~15)

- dram is the texture lookup table (TLUT) address (64-bit alignment)

Explanation
Transfers a TLUT (dram) to the specified palette location (pal) in texture memory (TMEM). TLUTs are located in the high half of TMEM (the upper 256 words). Accordingly, color index textures are always loaded in the low half (the lower 256 words.) TLUT can use either 16-bit RGBA type texels or 16-bit IA type texels. The palette has 16 entries. These are included in the high half of TMEM, with the location depending on the location of the palette. The texel type is selected with g*DPSetTextureLUT. For a more detailed explanation about this, see Chapter 12, "RDP Programming" and Chapter 13, "Texture Mapping" in the N64 Online Programming Manual.

Notes
Addresses in TMEM are divided into a high half and a low half, as shown below:

See Also
gDPLoadTextureBlock
gDPLoadTextureTile
gDPLoadTLUT_pal256
gDPSetTextureLUT

Revision History
2/1/99 Completely rewritten.

Nintendo® Confidential Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998-1999
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last Updated April, 1999