Search found 352 matches

by elhobbs
Fri Oct 30, 2009 7:54 pm
Forum: devkitARM
Topic: Struct assignment problem.
Replies: 2
Views: 2374

Re: Struct assignment problem.

the problem is most likely the memcpy call. gcc can use memcpy to copy structs like this. memcpy may choose to do 8 bit writes so you need to avoid using it where it may be writing to ds/gba memory that does not support 8 bit writes. you are probably best off using one of the dma copy functions.
by elhobbs
Sat Oct 10, 2009 12:01 am
Forum: DS Development
Topic: Sizes for images to be used as 3D textures..
Replies: 6
Views: 3228

Re: Sizes for images to be used as 3D textures..

It depends on what you want. There is no requirement that texture space match world space. Though it certainly can. You could stretch a texture across a world space that is twice as big- for instance to save VRAM . The ds screens are pretty low resolution so it might not make a difference.
by elhobbs
Fri Oct 09, 2009 5:48 pm
Forum: DS Development
Topic: Sizes for images to be used as 3D textures..
Replies: 6
Views: 3228

Re: Sizes for images to be used as 3D textures..

3d texture sizes /*! \brief Enums for size of a texture, specify one for horizontal and one for vertical related functions: glTexImage2d(), glTexParameter() */ enum GL_TEXTURE_SIZE_ENUM { TEXTURE_SIZE_8 = 0, /*!< 8 texels */ TEXTURE_SIZE_16 = 1, /*!< 16 texels */ TEXTURE_SIZE_32 = 2, /*!< 32 texels ...
by elhobbs
Wed Oct 07, 2009 12:22 am
Forum: DS Development
Topic: Culling...
Replies: 6
Views: 3260

Re: Culling...

backface culling is nice but keep in mind you are still sending the vertex data (maybe color and normals too) to the 3d hardware - which is not free, moving data takes time and the 3 pipeline still needs to process it to determine if it should be culled. so you will need to still do some software vi...
by elhobbs
Tue Oct 06, 2009 11:56 pm
Forum: DS Development
Topic: Trouble with timers.h (SOLVED)
Replies: 6
Views: 3219

Re: Trouble with timers.h

neither irqSet or irqEnable are required for the second approach. if you had waited 1000 seconds you would have seen milliseconds change... the original code was for seconds - so multiple by a 1000 not divide. I tested this code and it works #include <nds.h> #include <stdlib.h> #include <stdio.h> //...
by elhobbs
Tue Oct 06, 2009 8:20 am
Forum: DS Development
Topic: Trouble with timers.h (SOLVED)
Replies: 6
Views: 3219

Re: Trouble with timers.h

you are just missing a call to enable the irq after the timer is setup

Code: Select all

irqEnable(IRQ_TIMER0);
you may want to take a look at the following thread as this setup has been known to cause issues http://forum.gbadev.org/viewtopic.php?t ... highlight=
by elhobbs
Tue Oct 06, 2009 6:58 am
Forum: DS Development
Topic: Culling...
Replies: 6
Views: 3260

Re: Culling...

culled triangles do not count towards the ~2000 trangle limit.
by elhobbs
Sat Oct 03, 2009 8:20 am
Forum: DS Development
Topic: Doubling my buffer, quadruples my anguish. (SOLVED)
Replies: 4
Views: 3121

Re: Doubling my buffer, quadruples my anguish.

There is a double buffer example in the nds examples.one issue is that you do not have enough VRAM mapped. One bank is not enough for 2 16bit backgrounds.so you are alternating between a black screen and the white image , making it look gray as it alternates at 60fps.
by elhobbs
Sat Oct 03, 2009 2:59 am
Forum: DS Development
Topic: Doubling my buffer, quadruples my anguish. (SOLVED)
Replies: 4
Views: 3121

Re: Doubling my buffer, quadruples my anguish.

Code: Select all

i = touch.px - 2 ; i < touch.py + 2
px and py mismatch.thesame in the inner loop.you are also going to have issues with edge cases. If px or py is 0 you could end up writing outside the frame. Certainly in the wrong place.
by elhobbs
Fri Sep 25, 2009 5:12 pm
Forum: DS Development
Topic: Problem connecting DS to a C++ Server
Replies: 3
Views: 5221

Re: Problem connecting DS to a C++ Server

I am not sure that the loopback address is implemented on the ds. can you try to connect to a different computer?