GXS_SetOBJVRamModeChar

C Specification

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

Arguments

mode Mapping mode

Return Values

None.

Description

This function sets OBJ-VRAM capacity for sub 2D Engine character OBJs 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 This setting is prohibited with a sub-2D engine.

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) // * prohibited setting
}
GXOBJVRamModeChar;

See Also

GXS_SetOBJVRamModeBmp, GXS_GetOBJVRamModeChar

Revision History

08/03/2004

02/09/2004 Initial version.