Page 1 of 1

tile graphics wont reload

Posted: Sun Feb 14, 2010 4:06 pm
by scrasun
In a program that I am creating, one screen of tiles is replaced with another screen of tiles

To use this I use:

Code: Select all

dmaCopy(mapx, bgGetMapPtr(bg),  sizeof(mapx));
to copy the tile map (mapx) to the background.

When simulated using DeSmuMe, this works fine, but when I try it on an actual nintendo ds, some of the tiles (completely random) from the previous screen remain in the new screen.

Does anyone know why this is happening or how to solve it

Thanks in advance

Re: tile graphics wont reload

Posted: Fri Feb 19, 2010 4:38 am
by coreyh2
I might know part of this answer from reading Anguna's developer blog.
http://anguna-dev.blogspot.com/2008/08/ ... ching.html

If you look at sprite.c in the libnds source code there is a function used called DC_FlushRange. I haven't looked up the code for it yet but I assumed that it was there to solve the problem Nathan was talking about. Its used right before a dmaCopy.

It isn't something I've dealt with myself yet.

More detailed description
http://ant.simianzombie.com/?p=1114

Re: tile graphics wont reload

Posted: Fri Feb 19, 2010 5:16 pm
by scrasun
That seems to work fine

Thanks