take a step back.
how much memory are you trying to allocate? the ds only has 4MB of ram that is shared with both code and data. use the arm-none-eabi-size.exe program to see how much code and static data you have. that will let you know how much main ram will be available for use with malloc. is ...
Search found 358 matches
- Fri Jun 28, 2013 1:18 am
- Forum: DS/DSi Development
- Topic: Get ram usage data
- Replies: 19
- Views: 31443
- Thu Jun 27, 2013 5:25 pm
- Forum: DS/DSi Development
- Topic: Get ram usage data
- Replies: 19
- Views: 31443
Re: Get ram usage data
try searching for mallinfo.
keep in mind that on a system with limited resources like the ds you can run into issue where you have enough free memory but it is fragmented - so you do not have a free chunk that is big enough to satisfy a malloc request. it can even come down to the order that ...
keep in mind that on a system with limited resources like the ds you can run into issue where you have enough free memory but it is fragmented - so you do not have a free chunk that is big enough to satisfy a malloc request. it can even come down to the order that ...
- Tue Jun 25, 2013 9:30 pm
- Forum: DS/DSi Development
- Topic: connect to router in game?
- Replies: 2
- Views: 8631
Re: connect to router in game?
the ds lite does not have a builtin utility to edit the wifi connection data like the dsi or 3ds. however you can scan for access points using dswifi. you would need a way to select the right ap and provide a wep key if needed. the dswifi source wifi_arm9.c in particular Wifi_AutoConnect and Wifi ...
- Mon Jun 17, 2013 6:45 pm
- Forum: devkitARM
- Topic: Help with example projects keyboard and both screens ?
- Replies: 2
- Views: 12430
Re: Help with example projects keyboard and both screens ?
no - libnds would have been better than devkitarm
you would need to create something custom to get that functionality. the libnds console code is not setup to handle that use case. it is not impossible, but it would probably be easier to create something custom. take a look at the source code and ...
you would need to create something custom to get that functionality. the libnds console code is not setup to handle that use case. it is not impossible, but it would probably be easier to create something custom. take a look at the source code and ...
- Thu Jun 13, 2013 1:41 pm
- Forum: GBA Development
- Topic: Running out of channels (on GBA)
- Replies: 16
- Views: 32157
Re: Running out of channels (on GBA)
are you sure this is referring to the number of channels and not the size of an internal data structure?
- Wed Jun 05, 2013 7:43 pm
- Forum: Off Topic
- Topic: Help with Arrays
- Replies: 9
- Views: 48885
Re: Help with Arrays
before you go too far down this path - a better question would be why would you want to do this? just store it in a byte array and be done with it.
a common situation where this type of manipulation occurs is to write to a framebuffer in vram for updating the display. the ds can use a 16 bit ...
a common situation where this type of manipulation occurs is to write to a framebuffer in vram for updating the display. the ds can use a 16 bit ...
- Wed Jun 05, 2013 1:33 pm
- Forum: Off Topic
- Topic: Help with Arrays
- Replies: 9
- Views: 48885
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 ...
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 ...
- Tue May 07, 2013 2:24 am
- Forum: DS/DSi Development
- Topic: Which one is more better, directly setting variables or API?
- Replies: 3
- Views: 10325
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 ...
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 ...
- Wed Apr 24, 2013 11:14 pm
- Forum: DS/DSi Development
- Topic: Help with nds virtual keyboard examples
- Replies: 5
- Views: 11551
Re: Help with nds virtual keyboard examples
Try desmume instead - or better yet, a real ds!
- Tue Apr 23, 2013 5:01 pm
- Forum: DS/DSi Development
- Topic: Help with nds virtual keyboard examples
- Replies: 5
- Views: 11551
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 ...
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 ...