gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Colours in VRAM

#100811 - iainprice - Wed Aug 30, 2006 9:04 pm

If I look at a captured screen in VRAM, how are the colours stored? What format? One hex value? Three rgb values as ints?

#100814 - headspin - Wed Aug 30, 2006 9:23 pm

From gbatek:

Code:
Color Definitions
Each color occupies two bytes (same as for 32768 color BG modes):
  Bit   Expl.
  0-4   Red Intensity   (0-31)
  5-9   Green Intensity (0-31)
  10-14 Blue Intensity  (0-31)
  15    Not used


Bit 15 is alpha bit on DS, so it has to be set when using 32768 color modes. As for 256/16 colour graphic modes, the palettes use the same format X1B5G5R5 but are indexed.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#100815 - iainprice - Wed Aug 30, 2006 9:32 pm

Cheers