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 > Graphic conversion, Tiles

#127726 - Funky Gibbon - Fri May 04, 2007 9:53 am

Hi,
Could someone please explain Tile to me?

I want to display a 512x512 scrolling background
I converted a 512x512 .bmp with gfx2gba with switches -fsrc -m and end up with test.raw.c, test.map.c and master.pal.c
the display is garbled

doing the same with a 256x256 .bmp and it sisplays the pcture fine
i know i should use the -t8 switch but what does it do?
as i understand it splits the bmp into tiles 8x8, now i dont understand how to put the tiles back together on the ds screen to make one image

Thanks

#127740 - Cearn - Fri May 04, 2007 12:23 pm

Funky Gibbon wrote:
Hi,
Could someone please explain Tile to me?

Tonc: tiled backgrounds. Yes, that's GBA, but it's almost the same thing for NDS.

Funky Gibbon wrote:
I want to display a 512x512 scrolling background
I converted a 512x512 .bmp with gfx2gba with switches -fsrc -m and end up with test.raw.c, test.map.c and master.pal.c
the display is garbled

doing the same with a 256x256 .bmp and it sisplays the pcture fine
i know i should use the -t8 switch but what does it do?
as i understand it splits the bmp into tiles 8x8, now i dont understand how to put the tiles back together on the ds screen to make one image

Thanks

For larger maps, the map-data if the background is grouped into sets of 256x256 pixels (i.e., one screenblock). In a 512x512 background, the map is divided into four quadrants (4x32x32 tiles), not as a single matrix of 64x64 tiles. See the section on map layout and the first demo for details. I think that adding "-mm 32" to the gfx2gba flags should solve it, but I haven't tested that.

#127744 - Funky Gibbon - Fri May 04, 2007 1:07 pm

Thanks for the link Cearn, im at work at the moment but 'll have a good read later

Shaun