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.

Coding > Text backgrounds

#25706 - whodoo - Fri Aug 27, 2004 2:21 pm

How?s the map splitted up when using text backgrounds?

#25708 - poslundc - Fri Aug 27, 2004 2:44 pm

http://www.cs.rit.edu/~tjh8300/CowBite/CowBiteSpec.htm#Text%20Background%20Map%20Format%3A

Dan.

#25714 - whodoo - Fri Aug 27, 2004 5:38 pm

is a 256x256 map also splitted up? or just larger maps

#25715 - Ethos - Fri Aug 27, 2004 5:51 pm

whodoo wrote:
is a 256x256 map also splitted up? or just larger maps


larger maps

#25716 - Ethos - Fri Aug 27, 2004 5:54 pm

Ethos wrote:
whodoo wrote:
is a 256x256 map also splitted up? or just larger maps


larger maps


lol...well at least for loading, load the map in 256x256 chunks.
But when you reference using x_scroll, y_scroll you can just use full coordinates.

#25719 - whodoo - Fri Aug 27, 2004 6:26 pm

Cause I?m in mode 1..and I try to use a 256x256 text background map, but it is not working. It works with a rotation background but not with a textbackground, the map looks weird when using a textbackground

#25721 - poslundc - Fri Aug 27, 2004 6:30 pm

You're doing it wrong. Text maps aren't the same format as rotational maps. Read the docs.

Dan.

#25722 - whodoo - Fri Aug 27, 2004 6:35 pm

what do you mean? I aint got no docs, I?ve been using this before, just been away for a year, I know it doesnt take much to fix it

#25724 - Ethos - Fri Aug 27, 2004 6:42 pm

map data for Text is u16, rot is u8

#25725 - whodoo - Fri Aug 27, 2004 6:45 pm

thanks man, works great now :)
Just a question, why?s that? Why is the data u16 and u8 for the rotation maps? I mean of course the u8 prevents me from using more than 256 tiles, but why?

#25727 - poslundc - Fri Aug 27, 2004 6:59 pm

Have a look at http://www.cs.rit.edu/~tjh8300/CowBite/CowBiteSpec.htm#Text%20Background%20Map%20Format%3A for the answer.

Which is, ironically, the same URL I gave you before.

Dan.

#25728 - Ethos - Fri Aug 27, 2004 7:01 pm

whodoo wrote:
thanks man, works great now :)
Just a question, why?s that? Why is the data u16 and u8 for the rotation maps? I mean of course the u8 prevents me from using more than 256 tiles, but why?


Probably speed, at least for the 256 = 8 bit reference. When you are rotating, zooming, this probably is a factor.

Or it could be in the working memory? Since a rotational map takes 2x memory than a text map, since it has to hold state data.

Just guesses, would like to hear the real answer :)

#25729 - Ethos - Fri Aug 27, 2004 7:08 pm

poslundc wrote:
Have a look at http://www.cs.rit.edu/~tjh8300/CowBite/CowBiteSpec.htm#Text%20Background%20Map%20Format%3A for the answer.

Which is, ironically, the same URL I gave you before.

Dan.


Can you hilight the answer to the question? Cause it doesn't contain that answer.

#25733 - poslundc - Fri Aug 27, 2004 8:26 pm

Ethos wrote:
Can you hilight the answer to the question? Cause it doesn't contain that answer.


Text background entries are u16s instead of u8s because they include horizontal and vertical flip bits, palette information, and extra bits to select an additional 768 tiles. Rotational background entries are u8s instead of u16s because they don't have these features, and therefore consume half the space.

Dan.

#25736 - Ethos - Fri Aug 27, 2004 10:19 pm

poslundc wrote:
Ethos wrote:
Can you hilight the answer to the question? Cause it doesn't contain that answer.


Text background entries are u16s instead of u8s because they include horizontal and vertical flip bits, palette information, and extra bits to select an additional 768 tiles. Rotational background entries are u8s instead of u16s because they don't have these features, and therefore consume half the space.

Dan.


Duh! He knows that, he is wondering why they address only 256 tiles, READ THE QUESTION!

#25738 - sajiimori - Fri Aug 27, 2004 11:01 pm

Dan's answer was reasonable. Let's keep the tone civil.

#25739 - poslundc - Fri Aug 27, 2004 11:02 pm

Ethos wrote:
Duh! He knows that, he is wondering why they address only 256 tiles, READ THE QUESTION!


I did read the question, thank you. And I answered it: text backgrounds have extra features that rotational backgrounds don't support. And I'm not assuming that he knows anything, especially when he couldn't read the difference between a textmap entry and a rotmap-entry right out of Cowbite.

Dan.