Search found 353 matches

by elhobbs
Sun Dec 02, 2012 12:56 am
Forum: DS Development
Topic: need help allocating and copying sprite tiles efficiently
Replies: 14
Views: 27958

Re: need help allocating and copying sprite tiles efficientl

Don't forget to flush data cache before dma. You should be able to find an optimized asm memcpy if you search this forum. It seam to remember that it may be best at main to main copies. It may require aligned buffers but so does dma.
by elhobbs
Wed Nov 28, 2012 3:32 pm
Forum: DS Development
Topic: need help allocating and copying sprite tiles efficiently
Replies: 14
Views: 27958

Re: need help allocating and copying sprite tiles efficientl

not sure if this has already been mentioned, but DMA copies are best for main ram to vram copies. main ram to main ram copies do not perform as well with DMA copies.
by elhobbs
Tue Nov 13, 2012 10:19 pm
Forum: devkitARM
Topic: Odd behaviour of the compiler when using loops
Replies: 4
Views: 6887

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 c...
by elhobbs
Tue Nov 13, 2012 8:28 pm
Forum: devkitARM
Topic: Odd behaviour of the compiler when using loops
Replies: 4
Views: 6887

Re: Odd behaviour of the compiler when using loops

you are not quite right...
for(i=0;i<6;i+2){...}
is not valid

more like this

Code: Select all

for(initialize;condition;evalute after each loop before condition) {
    //do stuff
}
it works like this

Code: Select all

initialize;
while(condition) {
    //do stuff
    evalute after each loop before condition
}
by elhobbs
Thu Nov 08, 2012 12:35 am
Forum: libfat
Topic: loading textured models from fat?
Replies: 7
Views: 14105

Re: loading textured models from fat?

glTexImage2D and glCallList do not take filenames as parameters. where you are specifying filenames they are actually looking for buffers where the data representing the object have been loaded. look at the libfat examples for how to read data from files. of course this assumes that the data in the ...
by elhobbs
Fri Oct 12, 2012 12:05 am
Forum: DS Development
Topic: Clearing a tiled background memor
Replies: 3
Views: 5104

Re: Clearing a tiled background memor

Why do you need to clear? Just load the new background over the old one.
by elhobbs
Sun Sep 30, 2012 9:12 am
Forum: Gamecube/Wii Development
Topic: What does this bit do?
Replies: 3
Views: 5624

Re: What does this bit do?

The console refers to a text console. It is where the text from printf is displayed. Without this call it if not going to display stdout. The parameters to the function describe the screen resolution and the region of the screen to print to. In particular the 20, 20 values set the start x and y valu...
by elhobbs
Wed Sep 26, 2012 3:50 pm
Forum: Gamecube/Wii Development
Topic: Simple program gone wrong... Problem with devkitpro compiler
Replies: 14
Views: 15409

Re: Simple program gone wrong... Problem with devkitpro comp

your code example does not reflect the question you are asking, so it is a little hard to answer. in the question you asked the variable should change to 7 since you did not indicate that a new local variable was created. In the code example you provided you did create a new local variable. That bei...
by elhobbs
Wed Sep 26, 2012 10:56 am
Forum: Gamecube/Wii Development
Topic: Simple program gone wrong... Problem with devkitpro compiler
Replies: 14
Views: 15409

Re: Simple program gone wrong... Problem with devkitpro comp

You need to read up on "scope" and local variables in C. The { character creates a new scope. Variables created at in a scope go away when the matching } character is reached. These variables are called local variables. I think you will find learning C/C++ by forum posting to be very frustrating. I ...
by elhobbs
Tue Sep 18, 2012 5:27 pm
Forum: DS Development
Topic: using included function crashes DS
Replies: 10
Views: 8592

Re: using included function crashes DS

if they are a static size then you can also make them global.