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 > Help on file systems: Which is recommended? Any tutorial?

#166442 - Emmanuel - Sun Feb 08, 2009 9:26 am

Well, I just moved from PAlib to libnds... I'm remaking my code, and I used EFS on PAlib, but I've heard about something called NitroFS and I've seen that gbfs is the default for embedding in libnds, but it will be deprecated...
So:
Should I use file embed or fat?
Any tutorial? any help?

My game is going to be 2D, but the tutorial on examples is 3d and I'm a noob in this (not on coding, but on graphics and file opening closing and so)
Should I use grit to convert the graphics and use in fat or embed? How can I load a grit converted file?

Any help you can give to someone who quit PAlib? I don't want to downgrade libnds just for some "easiness", I know I just need to adapt...

I'd like to adapt to a file system ASAP because my project will be large... everything worked before on PAlib, I just need to adapt and learn more libnds

#166443 - hacker013 - Sun Feb 08, 2009 9:51 am

just use libfat.
and for 2d grapics you can look for the library's from dragonminded.
_________________
Website / Blog

Let the nds be with you.

#166444 - Emmanuel - Sun Feb 08, 2009 9:55 am

hacker013 wrote:
just use libfat.
and for 2d grapics you can look for the library's from dragonminded.


You mean libfatDragon? http://www.dragonminded.com/?loc=ndsdev/LibFATDragon
It says it's for the oldlib fat... will it still work? and it says it's for r20...

#166445 - hacker013 - Sun Feb 08, 2009 9:56 am

Emmanuel wrote:
hacker013 wrote:
just use libfat.
and for 2d grapics you can look for the library's from dragonminded.


You mean libfatDragon? http://www.dragonminded.com/?loc=ndsdev/LibFATDragon
It says it's for the oldlib fat... will it still work? and it says it's for r20...


no, i mean libfat wich is included in devkitARM and for grapics handling and loading and saving to look for the librarys from dragonminded.
_________________
Website / Blog

Let the nds be with you.

#166446 - Emmanuel - Sun Feb 08, 2009 10:22 am

hacker013 wrote:

no, i mean libfat wich is included in devkitARM and for grapics handling and loading and saving to look for the librarys from dragonminded.


btw, how can I get to use grit files with fat? (As far as I know, using normal pic formats is slow...) Do I just need to open that file and store it in a FILE object? and how do I call for example:

Code:
dmaCopyHalfWords(DMA_CHANNEL,
                     title_backBitmap, /* This variable is generated for us by
                                    * grit. */
                     (uint16 *)BG_BMP_RAM(0), /* Our address for main
                                               * background 2 */
                     title_backBitmapLen); /* This length (in bytes) is generated
                                        * from grit. */


to work with a file loaded through fat?