GX_SetOBJVRamModeChar

C Specification

#include <nitro/gx/gx.h>
void GX_SetOBJVRamModeChar(GXOBJVRamModeChar mode);

Arguments

mode Mapping mode

Return Values

None.

Description

This function sets OBJ-VRAM capacity for a character OBJ, and sets mapping mode.

GX_OBJVRAMMODE_CHAR_2D Selects 2D mapping mode.
GX_OBJVRAMMODE_CHAR_1D_32K Sets 1D mapping mode with the first character name boundary of 32 bytes. The maximum capacity of OBJ-VRAM is 32 Kilobytes.
GX_OBJVRAMMODE_CHAR_1D_64K Sets 1D mapping mode with the first character name boundary of 64 bytes. The maximum capacity of OBJ-VRAM is 64 Kilobytes.
GX_OBJVRAMMODE_CHAR_1D_128K Sets 1D mapping mode with the first character name boundary of 128 bytes. The maximum capacity of OBJ-VRAM is 128 Kilobytes.
GX_OBJVRAMMODE_CHAR_1D_256K Sets 1D mapping mode with the first character name boundary of 256 bytes. The maximum capacity of OBJ-VRAM is 256 Kilobytes.

Mapping mode specifies the first character name boundary and is not related to the bank capacity of VRAM that is actually allocated.

The following are GXOBJVRamModeChar matrix format type definitions.

typedef enum
{
GX_OBJVRAMMODE_CHAR_2D = (0 << REG_GX_DISPCNT_OBJMAP_SHIFT) | (0 << REG_GX_DISPCNT_EXOBJ_SHIFT),
GX_OBJVRAMMODE_CHAR_1D_32K = (1 << REG_GX_DISPCNT_OBJMAP_SHIFT) | (0 << REG_GX_DISPCNT_EXOBJ_SHIFT),
GX_OBJVRAMMODE_CHAR_1D_64K = (1 << REG_GX_DISPCNT_OBJMAP_SHIFT) | (1 << REG_GX_DISPCNT_EXOBJ_SHIFT),
GX_OBJVRAMMODE_CHAR_1D_128K = (1 << REG_GX_DISPCNT_OBJMAP_SHIFT) | (2 << REG_GX_DISPCNT_EXOBJ_SHIFT),
GX_OBJVRAMMODE_CHAR_1D_256K = (1 << REG_GX_DISPCNT_OBJMAP_SHIFT) | (3 << REG_GX_DISPCNT_EXOBJ_SHIFT)
}
GXOBJVRamModeChar;

See Also

GX_SetOBJVRamModeBmp, GX_GetOBJVRamModeChar

Revision History

08/03/2004

02/09/2004

01/19/2004 Initial version