Search found 352 matches

by elhobbs
Wed Jun 05, 2013 1:33 pm
Forum: Off Topic
Topic: Help with Arrays
Replies: 9
Views: 10976

Re: Help with Arrays

this can vary by platform, but common sizes are: char 8 bit short 16 bit int 32 bit you can use sizeof(int) to see the size in bytes (a byte being 8 bits always). printf("size of unsigned short: %d\n",sizeof(unsigned short)); you have to use base types to create declarations or structs or classes - ...
by elhobbs
Tue May 07, 2013 2:24 am
Forum: DS Development
Topic: Which one is more better, directly setting variables or API?
Replies: 3
Views: 5633

Re: Which one is more better, directly setting variables or

a few questions: why do you want to optimize your code? Is it running too slowly? Is so, then where is it running too slowly? Why do the think it is running slowly in this section? Are you running out of memory? If so, then how much free memory do you have, and how much more do you need? running fas...
by elhobbs
Wed Apr 24, 2013 11:14 pm
Forum: DS Development
Topic: Help with nds virtual keyboard examples
Replies: 5
Views: 6051

Re: Help with nds virtual keyboard examples

Try desmume instead - or better yet, a real ds!
by elhobbs
Tue Apr 23, 2013 5:01 pm
Forum: DS Development
Topic: Help with nds virtual keyboard examples
Replies: 5
Views: 6051

Re: Help with nds virtual keyboard examples

keyboardDemoInit installs the keyboard on the subscreen for layer 3. keyboardInit(NULL, 3, BgType_Text4bpp, BgSize_T_256x512, defaultKeyboard.mapBase, defaultKeyboard.tileBase, false, true); It is hard to give advice for layers and map/tile bases without knowing what (if anything) you want to use - ...
by elhobbs
Thu Apr 11, 2013 1:15 am
Forum: DS Development
Topic: Rotation example
Replies: 5
Views: 5474

Re: Rotation example

The 256_color_bmp example may be a better example to look at. The make file has rules for folders and for files based on extensions. It has rules for processing graphics. I think the rotation example may be older and just references the manually processed graphics.
by elhobbs
Mon Feb 25, 2013 10:50 pm
Forum: DS Development
Topic: Problem Setting Up Backgrounds and VRAM
Replies: 4
Views: 7488

Re: Problem Setting Up Backgrounds and VRAM

you may want to take a look at this in an emulator like desmume. It may be something as simple as layer 1 being active/visible and showing garbage. with an emulator you can look at each layer individually.
by elhobbs
Thu Feb 14, 2013 2:17 pm
Forum: DS Development
Topic: soundPlayX crashes randomly?
Replies: 4
Views: 4985

Re: soundPlayX crashes randomly?

out of curiosity - can you give a little detail about the context where you are calling these functions? Is this taking place in an interrupt handler do you have any error codes - are you using the default exception handler which would dump the stack and registers?
by elhobbs
Tue Dec 18, 2012 9:57 pm
Forum: DS Development
Topic: BG flicker problem
Replies: 4
Views: 7288

Re: BG flicker problem

call swiWaitForVBlank then update your background
by elhobbs
Tue Dec 18, 2012 8:34 pm
Forum: DS Development
Topic: BG flicker problem
Replies: 4
Views: 7288

Re: BG flicker problem

you want to update the map and scroll position during vblank. your code waits for vblank after the updating the map and scroll position.

EDIT: of course you are probably going to have issues trying to read that much data from disk during vblank.
by elhobbs
Sun Dec 02, 2012 12:56 am
Forum: DS Development
Topic: need help allocating and copying sprite tiles efficiently
Replies: 14
Views: 27347

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.