#134616 - c99koder - Sat Jul 14, 2007 8:38 pm
Hi,
I have some tile code that runs in mode 0, however I would like to take advantage of DS's hardware scaling, so I'm trying to get it to work in mode 2 (rotation backgrounds). My mode 0 code uses 16 color mode with 16 palettes, however rotation backgrounds only support 256 color mode so I am trying to use extended palettes to get different palettes per tile. I can get the tiles to display using the BG_PALETTE palette, but it doesn't seem to want to use the extended palletes. Here's my initialization code:
The tile data only uses the 1st color (it's a font). Also, since the map data for rotation backgrounds is only 8 bits per tile, how do I specify which palette to use for that tile?
I have some tile code that runs in mode 0, however I would like to take advantage of DS's hardware scaling, so I'm trying to get it to work in mode 2 (rotation backgrounds). My mode 0 code uses 16 color mode with 16 palettes, however rotation backgrounds only support 256 color mode so I am trying to use extended palettes to get different palettes per tile. I can get the tiles to display using the BG_PALETTE palette, but it doesn't seem to want to use the extended palletes. Here's my initialization code:
Code: |
DISPLAY_CR = MODE_2_2D | DISPLAY_BG2_ACTIVE | DISPLAY_BG_EXT_PALETTE;
BG2_CR = BG_RS_64x64 | BG_MAP_BASE(0) | BG_TILE_BASE(1); vramSetBankA(VRAM_A_MAIN_BG); memcpy((void*)BG_TILE_RAM(1), zztascii_bin, zztascii_bin_size); vramSetBankE(VRAM_E_LCD); VRAM_E_EXT_PALETTE[2][0][1] = RGB15(0, 31, 0); vramSetBankE(VRAM_E_BG_EXT_PALETTE); |
The tile data only uses the 1st color (it's a font). Also, since the map data for rotation backgrounds is only 8 bits per tile, how do I specify which palette to use for that tile?