Search found 12 matches

by Shy Guy
Sat Oct 15, 2011 1:54 pm
Forum: devkitARM
Topic: How to create position independent code for dynamic loading?
Replies: 0
Views: 2586

How to create position independent code for dynamic loading?

How can I create position independent code, which I may load dynamically into memory for use? That feature might be useful if I have to use a lot of memory for other things and don't have enough space for ALL functions being loaded in the same time.
by Shy Guy
Wed Jul 27, 2011 3:23 pm
Forum: DS Development
Topic: Reading/Writing Files
Replies: 17
Views: 9763

Re: Reading/Writing Files

you need to use a loader that supports argv. there are probably other ways to get this, but you can replace the default loader with HomebrewMenu and it will work. HomebrewMenu is not pretty (text only) but it is fast and functional. you can get it here: http://sourceforge.net/projects/devkitpro/fil...
by Shy Guy
Wed Jul 27, 2011 1:23 pm
Forum: DS Development
Topic: Reading/Writing Files
Replies: 17
Views: 9763

Re: Reading/Writing Files

The nitrofs thing is working now for me in Emulator, but trying to initialize it on the hardware (with DSTT) it always get stuck!
It's also the same problem using the nitrodir example.

What should I do? Do I have to live with that the rom internal filesystem will not work on my hardware?
by Shy Guy
Wed Jul 27, 2011 1:03 pm
Forum: DS Development
Topic: Reading/Writing Files
Replies: 17
Views: 9763

Re: Reading/Writing Files

The default arm7 initialises maxmod yes. Please use an arm9 only project template, custom arm7 code *will* cause you grief. Providing support for people who use custom arm7 code causes us so much grief that we're reluctant to do it. There are very few reasons why you would need to change the arm7 c...
by Shy Guy
Wed Jul 27, 2011 11:43 am
Forum: DS Development
Topic: Reading/Writing Files
Replies: 17
Views: 9763

Re: Reading/Writing Files

Hm, what do I have to change in which makefile to get files from a certain directory into my rom? Yes, I indeed have 3 makefiles, one for arm9, one for arm7 and the general one. And I don't want to change that structure, because some minor edits of the arm7 executable might be useful for me (I don't...
by Shy Guy
Wed Jul 27, 2011 1:17 am
Forum: DS Development
Topic: Reading/Writing Files
Replies: 17
Views: 9763

Re: Reading/Writing Files

have a look at the nitrodir example under filesystem/nitrofs - it adds files to nitrofs. Ah okay, that might solve my issue. Can I initialize fat AND nitrofs both in my project, so that I'm able to read nitrofs files and read/write fat files at any time? Would be fopen("test.txt", "rt") then read t...
by Shy Guy
Tue Jul 26, 2011 11:49 am
Forum: DS Development
Topic: Reading/Writing Files
Replies: 17
Views: 9763

Re: Reading/Writing Files

Ah, I see, no support by emulators (like no$gba and DeSmuMe)? Okay, I've tested some code on my DS: if(!fatInitDefault()) printf("Init FAT: Error!\n"); else { FILE *fp = fopen("fat:/test.bin", "rb"); if(!fp) printf("Reading fat:/test.bin: Error!\n"); else { fclose(fp); } fp = fopen("fat:/Tetris.sav"...
by Shy Guy
Mon Jul 25, 2011 9:07 pm
Forum: DS Development
Topic: Reading/Writing Files
Replies: 17
Views: 9763

Reading/Writing Files

How do I read and write files (using libfat)? I've searched all the internet, but I never can read or write a file. I use fatInitDefault(), and I linked to -lfat! It always returns false. Also, whenever using fopen() after "initializing" (with "test.txt" or "fat:/test.txt"), either reading or writin...
by Shy Guy
Wed Jul 06, 2011 5:33 pm
Forum: DS Development
Topic: How is "saving" supposed to be done?
Replies: 3
Views: 3147

How is "saving" supposed to be done?

How should I do saving? Do I have to use the filesystem, where I also could create several save files, or is there another way supposed to use?
by Shy Guy
Wed Jul 06, 2011 5:31 pm
Forum: DS Development
Topic: Alpha Blending (Layers or Sprites)
Replies: 5
Views: 3878

Re: Alpha Blending (Layers or Sprites)

the libnds documentations arent the final word on the libnds features. libnds features arent the final word on nds features. libnds contains REG_BLDCNT, REG_BLDY, and REG_BLDALPHA. study the operations of these regs on gbatek Okay, thanks. I've tested different values, with the help of gbatek, and ...