16-bit color tiled backgrounds (non-paletted)?

Post Reply
User avatar
slomp
Posts: 5
Joined: Sun Sep 13, 2009 11:35 am

16-bit color tiled backgrounds (non-paletted)?

Post by slomp » Sun Sep 13, 2009 12:03 pm

Hello,

It's just a simple question but I couldn't find the answer elsewhere so here we go:

I wonder if it is possible to use non-paletted 16-bit color tiles with either backgrounds or sprites.
I'm aware that some graphic modes support "extended" backgrounds which allow 16-bit color bitmap backgrounds, but no tiles.
I've tried to look at GBATek's NDS Reference (http://nocash.emubase.de/gbatek.htm) for the proper register setup but couldn't find the answer.
I'm assuming that it is not possible.

Any ideas?

I'm not sure if libnds is the right thread in the devkitPro's forum to ask this kind of question...
I apologize in advance if I was mistaken.
I've tried to search for this question in this forum but without success.
If it was already posted, please redirect me to the referred thread.

Thank you in advance for your cooperation,
Marcos Slomp

User avatar
slomp
Posts: 5
Joined: Sun Sep 13, 2009 11:35 am

Re: 16-bit color tiled backgrounds (non-paletted)?

Post by slomp » Sun Sep 13, 2009 12:19 pm

Just a quick update:

"16-bit sprites, (that is to say, they don’t have a palette). However, these sprites are not used to often, as they use a lot more of video RAM, and takes up far too much space to be used."

Ok, 16-bit color sprites are possible.
Still wondering if 16-bit color tiled backgrounds is possible. =)

User avatar
vuurrobin
Posts: 219
Joined: Fri Jul 11, 2008 8:49 pm
Location: The Netherlands
Contact:

Re: 16-bit color tiled backgrounds (non-paletted)?

Post by vuurrobin » Sun Sep 13, 2009 12:51 pm

AFAIK, you can't have 16 bit color tiled backgrounds, just 16 bit color bitmap backgrounds or 16 bit index tiled backgrounds.

sprites can have 16 bit colors, but AFAIK, they are bitmap sprites, not 16 color tiled sprites.

User avatar
slomp
Posts: 5
Joined: Sun Sep 13, 2009 11:35 am

Re: 16-bit color tiled backgrounds (non-paletted)?

Post by slomp » Sun Sep 13, 2009 1:04 pm

Thanks, vuurrobin

This clears the 16-bit color tiled background question.

I'll try to play around with some 16-bit sprites now and check the performance.
If they are actually bitmaps that means one could (theoretically) have arbitrary sizes (no more 8x8 bounding).
This leads to another question:
How do I setup the OAM for such sprites?
More specifically:
a) how to set 16-bit color mode
b) how to specify the width and height
c) how to arrange the memory (row-ordering?)

Thanks in advance.

StevenH
Posts: 133
Joined: Sun Feb 22, 2009 7:59 pm

Re: 16-bit color tiled backgrounds (non-paletted)?

Post by StevenH » Sun Sep 13, 2009 4:44 pm

They are bitmaps, but they are still bounded by the 8x8 sizes in the OAM structures - 8x8, 8x16, 16x32, etc...
If you look in the examples folder there's an example of how to use the BMP sprites, as they are setup in the same way as a normal sprite, memory allocation is done on a 128 or a 256 byte basis, depending on how you tell the libnds sprite aloocation functions your memory is layed out. IIRC the BMP sprites are stored in a 1D order.

User avatar
slomp
Posts: 5
Joined: Sun Sep 13, 2009 11:35 am

Re: 16-bit color tiled backgrounds (non-paletted)?

Post by slomp » Sun Sep 13, 2009 4:55 pm

Thanks, StevenH!

Your answer solves all my questions.

Just to support your answer: meanwhile I made a few tests and realized that there is no alternative way to specify sprite sizes other than the OAM's standards. I've tried 1D ordering and works fine. Did not tried 2D yet, though. But that's not really important.

Many thanks to all! =)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests