# GX_SetBankForSubBG

## C Specification

  `#include <nitro/gx/gx_vramcnt.h>`
  `void GX_SetBankForSubBG(GXVRamSubBG bg);`

## Description

This function allocates the specified VRAM bank to the sub 2D Engine's BG. If the specified VRAM bank is either disabled or allocated to LCDC, that VRAM bank is allocated to the sub 2D Engine BG.

`GX_VRAM_SUB_BG_NONE` | A VRAM bank is not allocated to BG.
`GX_VRAM_SUB_BG_128_C` | 128 kilobytes are reserved in BG. VRAM-C is allocated.
`GX_VRAM_SUB_BG_32_H` | 32 kilobytes are reserved in BG. VRAM-H is allocated.
`GX_VRAM_SUB_BG_48_HI` | 48 kilobytes are reserved in BG. VRAM-H and -I are allocated.

The following is the type definition for `GXVRamSubBG` types.

    typedef enum
    {
        GX_VRAM_SUB_BG_NONE = 0x0000,
        GX_VRAM_SUB_BG_128_C = GX_VRAM_C,
        GX_VRAM_SUB_BG_32_H = GX_VRAM_H,
        GX_VRAM_SUB_BG_48_HI = GX_VRAM_H | GX_VRAM_I
    }
    GXVRamSubBG;

## Arguments

`bg` | Specifies a VRAM bank to allocate to the sub 2D Engine's BG

## Return Values

None

## See Also

`GX_GetBankForSubBG`, `GX_ResetBankForSubBG`, `GX_DisableBankForSubBG`, `GX_GetSizeOfSubBG`

## Revision History

02/09/2004 Initial Version