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 > Palette for each layer

#145838 - kiwicode - Fri Nov 23, 2007 5:24 pm

Hi all,

I'm in MODE_5_2D and I would like to use two different palettes ( one for BG2 and the other one for BG3 ) instead of BG_PALETTE. Is that possible? I've read old posts about using extended palettes so it sounds like possible but I haven't found any example about that. Any help?

Thanks in advance.

#145857 - jetboy - Fri Nov 23, 2007 10:40 pm

kiwicode wrote:
Hi all,

I'm in MODE_5_2D and I would like to use two different palettes ( one for BG2 and the other one for BG3 ) instead of BG_PALETTE. Is that possible? I've read old posts about using extended palettes so it sounds like possible but I haven't found any example about that. Any help?

Thanks in advance.


Its possible on official devkit. I haven tried homebrew much, but i dont see a reason why wouldnt it be possible.
_________________
Colors! gallery -> http://colors.collectingsmiles.com
Any questions? Try http://colors.collectingsmiles.com/faq.php first, or official forums http://forum.brombra.net

#145897 - Lazy1 - Sun Nov 25, 2007 2:28 am

If you manage to get this working let me know, I am interested as well.

#145899 - tepples - Sun Nov 25, 2007 3:22 am

From my reading of GBATEK: Read the sections that cover extended palettes and 256-color tiled modes. Then try filling BG2's map with 0x0000 through 0x02FF and BG3's map with 0x1000 through 0x12FF.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#145900 - wintermute - Sun Nov 25, 2007 3:26 am

Have a look at the current rotscale text demo in the libnds examples. That's the release version - the CVS version has been changed to normal 256 color mode.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#145954 - kiwicode - Mon Nov 26, 2007 9:31 am

Thank you all,

I'll let you know about it...

#145970 - PypeBros - Mon Nov 26, 2007 10:33 pm

You may want to get a look at the code of TetAtt DS: its author uses those extended palettes. Be aware, though, that they are a bit odd to program: you need to map the memory bank as "LCD" while you change its content and then remap it as "EXTPAL" to have it "commited" to the video core.

Oh, and make sure you double-checked the support of the feature by your favourite emulator: it's something that is typically overlooked in the early releases and buggy in the next ones, afaik.
_________________
SEDS: Sprite Edition on DS :: modplayer