gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Texture management system

#76276 - Chris Holmes - Mon Mar 20, 2006 2:49 am

I'm working on a personal NDS project that involves loading quite a few textures and other binaries.

The method of loading textures in the devkitpro examples is to link the binaries into the project.

I'm looking for suggestions on the best way to handle lots of textures. Is it best to link them all into the final binary and just load them? I'm a little fuzzy on where the linked textures live. If the linked textures live in the active code memory, that would obviously be bad for large scale storage.
If the data that lives in the NDS just live off in some other mapped memory section, I'm very fuzzy on how to access that.

I intend to test my development on an SCSD equipped system, so I can always just store the textures in a binary file on the FAT filesystem. I don't know how "portable" that technique would be though to the emulators and to other flash card solutions.

Any advice would be wonderful.

Chris

#76278 - tepples - Mon Mar 20, 2006 3:28 am

Chris Holmes wrote:
I'm looking for suggestions on the best way to handle lots of textures. Is it best to link them all into the final binary and just load them? I'm a little fuzzy on where the linked textures live. If the linked textures live in the active code memory, that would obviously be bad for large scale storage.

If you have dealt with the GBA before, then consider linking everything into the .nds as analogous with making a multiboot.

Quote:
If the data that lives in the NDS just live off in some other mapped memory section, I'm very fuzzy on how to access that.

In commercial Nintendo DS games, the .nds file stored on the DS Game Card has an appended Nitro-FAT file system that is accessed through a library that reads and writes the Card I/O registers. In homebrew, Chishm's MS-FAT compatible file system code is the closest equivalent.

Quote:
I intend to test my development on an SCSD equipped system, so I can always just store the textures in a binary file on the FAT filesystem. I don't know how "portable" that technique would be though to the emulators and to other flash card solutions.

SuperCard CF, M3 CF, and GBAMP CF can use Chishm's MS-FAT code.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#76308 - Chris Holmes - Mon Mar 20, 2006 12:53 pm

Quote:
If you have dealt with the GBA before, then consider linking everything into the .nds as analogous with making a multiboot.


I haven't dealt with GBA before, so I don't know what you mean.

Quote:
In commercial Nintendo DS games, the .nds file stored on the DS Game Card has an appended Nitro-FAT file system that is accessed through a library that reads and writes the Card I/O registers. In homebrew, Chishm's MS-FAT compatible file system code is the closest equivalent.


Thanks. I'll dig through the devkitpro filesystem examples. That looks like what I need, more or less.

Thanks,
Chris