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 > Affine background and 16 color tiles?

#168677 - sverx - Fri May 15, 2009 12:56 pm

Hi there,
I'm struggling to understand if I'm experiencing a serious bug somewhere in my code or if is that 'affine' background (for instance BG3 in MODE_1_2D, the background I'm using in my code) can't have 16 color (4bpp) tiles. I've done a lot of seaching on the forum and on the net but the only thing somehow related I found is the sentence "extended affine doesn't include 16-color modes" in gbatek, here, but I think it has to do exclusively with 'extended affine' backgrounds and not with plain "affine"...

Help appreciated :)

Edit: if you find that somewhere it's written that it's not possible, please I want to read it! :)

#168678 - Cearn - Fri May 15, 2009 1:46 pm

You can pretty much consider the NDS 2D engine to be the GBA 2D engine plus a few extras. If you can't find what you're looking for in the NDS section of GBATek, look in the GBA parts. In this case, what you're looking for is at gbatek:lcdvrambgscreendataformatbgmap

Quote:
Rotation/Scaling BG Screen (1 byte per entry)
In this mode, only 256 tiles can be used. There are no x/y-flip attributes, the color depth is always 256 colors/1 palette.

#168684 - sverx - Fri May 15, 2009 4:35 pm

Cearn wrote:
In this case, what you're looking for is at gbatek:lcdvrambgscreendataformatbgmap


...wow! I never noticed that section :|

Thank you so much! :)