Vram I Sub Spr Ext Pal
Posted: Sun Mar 08, 2009 2:38 am
Code: Select all
/** \brief Allowed VRAM bank I modes */
typedef enum {
VRAM_I_LCD = 0,
VRAM_I_SUB_BG_0x06208000 = 1,
VRAM_I_SUB_SPRITE = 2,
VRAM_I_SUB_SPRITE_EXT_PALETTE = 3,
}VRAM_I_TYPE;
/** \brief an array of 256 15-bit RGB values*/
typedef u16 _palette[256];
/** \brief An array of 16 256-color palettes */
typedef _palette _ext_palette[16];
/** \brief Used for accessing vram E as an external palette */
#define VRAM_E_EXT_PALETTE ((_palette *)VRAM_E)
/** \brief Used for accessing vram F as an external palette */
#define VRAM_F_EXT_PALETTE ((_palette *)VRAM_F)
/** \brief Used for accessing _palette G as an external palette */
#define VRAM_G_EXT_PALETTE ((_palette *)VRAM_G)
/** \brief Used for accessing vram H as an external palette */
#define VRAM_H_EXT_PALETTE ((_palette *)VRAM_H)
The hope was to be able to do something like this:
Code: Select all
vramSetBankI(VRAM_I_LCD);
dmaCopy(spritePal, &VRAM_I_EXT_PALETTE[i], 512);
vramSetBankI(VRAM_I_SUB_SPRITE_EXT_PALETTE);
Thanks for all the hard work and help!