Search found 14 matches

by Foxi4
Sat Dec 01, 2012 6:26 pm
Forum: DS/DSi Development
Topic: need help allocating and copying sprite tiles efficiently
Replies: 14
Views: 36130

Re: need help allocating and copying sprite tiles efficientl

I see... so, to conclude: When copying between RAM <---> VRAM, use DMA Copying When copying within RAM, use SWI Copying When all else fails, use the Standard memcpy Copying ...sounds about right? Of course one also has to take into account the size of chunks and all that junk... But sounds alright f...
by Foxi4
Wed Nov 28, 2012 9:49 am
Forum: DS/DSi Development
Topic: need help allocating and copying sprite tiles efficiently
Replies: 14
Views: 36130

Re: need help allocating and copying sprite tiles efficientl

I was lead to believe that you can use all four channels at one time since the DMA controller is separate from the CPU entirely. Even if you can perform only one copy operation though, it's still independent from the CPU and more time-efficient. ;)
by Foxi4
Wed Nov 14, 2012 11:45 pm
Forum: devkitARM
Topic: Odd behaviour of the compiler when using loops
Replies: 4
Views: 9846

Re: Odd behaviour of the compiler when using loops

Perfect! All questions answered then, the thread can be safety locked. :)
by Foxi4
Tue Nov 13, 2012 8:34 pm
Forum: devkitARM
Topic: Odd behaviour of the compiler when using loops
Replies: 4
Views: 9846

Re: Odd behaviour of the compiler when using loops

Well, that explains everything! It must have been a mistake in the example then - thank you for the fast response! I take it that I can still use commas to separate expressions that I want to use together? Like: for(i=0;i<5;i++, foo--){...} Sorry for not checking myself - I'm on mobile so I can't co...
by Foxi4
Tue Nov 13, 2012 7:44 pm
Forum: devkitARM
Topic: Odd behaviour of the compiler when using loops
Replies: 4
Views: 9846

Odd behaviour of the compiler when using loops

I was wondering whether to put this in the libnds section or here, but figured that compilation rules fall under devkitARM. Here's the issue - the standard syntax in a for loop in C is for(StartingExpression; TestingExpression;Count){...} ...so for example for(i=0;i<5;i++){...} and this of course wo...
by Foxi4
Sat Nov 10, 2012 1:26 pm
Forum: DS/DSi Development
Topic: need help allocating and copying sprite tiles efficiently
Replies: 14
Views: 36130

Re: need help allocating and copying sprite tiles efficientl

I'd suggest switching from swiCopy to dmaCopy with cache flushing - it'll likely benefit you performance-wise if you're copying large chunks of data, plus, you can perform 4 copy operations (DMA has 4 channels) at once, asynchronously from the CPU, so you're wasting less time than when using swi or ...
by Foxi4
Sat Nov 10, 2012 1:23 pm
Forum: DS/DSi Development
Topic: Clearing a tiled background memor
Replies: 3
Views: 7762

Re: Clearing a tiled background memor

Techincally you could clear the entirety of the bank by re-initializing it. Another method is to simply fill in the bank with blank data, starting from the adress the background begins and of the sizeof(BackgroundYouWantToClear);, however I don't see how this could be beneficial to you. When a new ...
by Foxi4
Sat Nov 10, 2012 10:50 am
Forum: DS/DSi Development
Topic: libnds Documentation and why is it so gravely outdated
Replies: 7
Views: 14126

Re: libnds Documentation and why is it so gravely outdated

I see that we had polar opposite approaches - I snipped my code to the bare minimum wheras you created a behemoth :lol:. In any case, I noticed that there already is an Ext.Palette example for Sprites within the examples folder, so I suppose that covers it. It'd be nice if the thread was renamed to ...
by Foxi4
Fri Nov 09, 2012 7:04 am
Forum: DS/DSi Development
Topic: libnds Documentation and why is it so gravely outdated
Replies: 7
Views: 14126

Re: libnds Documentation and why is it so gravely outdated

In that case, here's example #1 - Extended Palettes for Tiled Backgrounds : http://www.mediafire.com/?sudabydt20104fm GitHub is all nice and dandy, but not when all you're really showing is a few lines of code. I included two batch files to facilitate Compiling and Cleaning, simply because make'ing ...
by Foxi4
Thu Nov 08, 2012 9:44 am
Forum: DS/DSi Development
Topic: libnds Documentation and why is it so gravely outdated
Replies: 7
Views: 14126

Re: libnds Documentation and why is it so gravely outdated

Thanks for showing support guys - libnds and devkitARM are fantastic programming tools and a great initiative, it would be a shame if using it to its full potential was restricted to a selected few who have the patience to browse .h files, .c files and change logs to stay up-to-date - I'm merely thi...