# GX_SetOBJVRamModeChar

## C Specification

      #include <nitro/gx/gx.h>

      void GX_SetOBJVRamModeChar(GXOBJVRamModeChar mode);

## 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;

## Argument

`mode` | Mapping mode

## Return Values

None

## See Also

`GX_SetOBJVRamModeBmp`

## Revision History

08/03/2004 Revised the descriptions of 1 dimensional mapping
02/09/2004 Revised the explanation about 2-dimensional mapping
01/19/2004 Initial Version