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 > problems with tiles in text background modes

#4805 - delbogun - Thu Apr 10, 2003 9:54 am

I've managed to display a correct map with tiles in rotation background using screen mode 1 and background 2 (using dovoto's tutorial).

But when I try to display the map in text background mode using screen mode 0, the map doesn't look like as it suppose to do. Displaying wrong tiles in wrong location.

I'm using this:
REG_BG3CNT = TXTBG_SIZE_256x256 | CHAR_BASEBLOCK_0 | SCRN_BASEBLOCK_16 | BG_COLOR_256;

Does the map for rotation background have a different layout than the map for text background (since i'm using same map to both examples)? If so, what is the layout for both maps and where can I get a mapeditor that can convert into both layouts?

#4812 - delbogun - Thu Apr 10, 2003 4:14 pm

I found out what I did wrong. (A stupid mistake actually =P). When I loaded the map, I did this:

REG_DMA3SAD = (u32) mapData;
REG_DMA3DAD = (u32) BGMapData;
REG_DMA3CNT = (32*32/2) | DMA_ENABLE | DMA_16;

But should have used [x+y*MAP_LENGTH] for mapData instead. Can I still do that with DMA even if the calculation in the source is different than the destination?

#4816 - delbogun - Thu Apr 10, 2003 5:17 pm

ARGH!! what went wrong?

#4839 - niltsair - Fri Apr 11, 2003 6:17 pm

You can tell us if you only wanted to boost your nb. of posts under your username, on the left part of the screen. :-) :-)

#4840 - delbogun - Fri Apr 11, 2003 7:41 pm

lol.. no i don't care about the number of posts. what a awful way to boost up nb of post. i had problem posting a reply. i could enter the forum, but when i tried to post i got a 'can't connect to database' message. i reload the page, but no reply. so i posted a reply again, but got the error message again... and so on until i updated and saw several of my messages >=(

please could any mod delete all those?