tile graphics wont reload

support for the ARM toolchain
Post Reply
scrasun
Posts: 2
Joined: Sun Feb 14, 2010 3:58 pm

tile graphics wont reload

Post by scrasun » Sun Feb 14, 2010 4:06 pm

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

User avatar
coreyh2
Posts: 33
Joined: Tue Feb 02, 2010 12:43 am

Re: tile graphics wont reload

Post by coreyh2 » Fri Feb 19, 2010 4:38 am

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

scrasun
Posts: 2
Joined: Sun Feb 14, 2010 3:58 pm

Re: tile graphics wont reload

Post by scrasun » Fri Feb 19, 2010 5:16 pm

That seems to work fine

Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests