Libfat Alpha Version Now Ready for Testing

NDSChishm has been at work on his libfat for months now, and finally he has the application ready for testing. This alpha version now fully supports Neoflash MK2/3, GBAMP CF, M3 CF, M3 SD, SC CF, and Flash Carts with unconfirmed support for Max Media Player/Dock and EFA2.

You’ll need malloc for this libfat to work. As each page of this chishm creation takes about 550 bytes of memory, you’ll need to use more pages for extra speed when randomly accessing files. A minimum of two cache pages is needed to operate this efficiently.

To install chishm’s libfat, just extract the archive to your libnds directory so you should have /path/to/devkitpro/libnds/include/fat.h and /path/to/devkitpro/libnds/lib/libfat.a.

Chishm shares how this application can be used:

To use, you’ll need to #include <fat.h> in the file where the library will be initialised, and #include <stdio.h> in any source file that needs file access. In your makefile, add libfat to the list of libraries, before libnds. You’ll also need to link in libnds. Eg:

Code:
LIBS   :=  -lfat -lnds9

In your program initialisation code, add a call to fatInitialise. The first parameter specifies the size of the sector cache in pages and the second parameter determines if this is to be the default file driver. For 4 cache pages and setting this as the default I/O device, use:

Code:
if (fatInitialise(4, true)) {
    // Success
} else {
    // Failure
}

Directory listing is not yet available in this app as DevKitPro r19a – which is needed to run libfat – does not have this functionality.

Download: [chishms’ libfat Alpha Version]

Via chishm

NDSChishm has been at work on his libfat for months now, and finally he has the application ready for testing. This alpha version now fully supports Neoflash MK2/3, GBAMP CF, M3 CF, M3 SD, SC CF, and Flash Carts with unconfirmed support for Max Media Player/Dock and EFA2.

You’ll need malloc for this libfat to work. As each page of this chishm creation takes about 550 bytes of memory, you’ll need to use more pages for extra speed when randomly accessing files. A minimum of two cache pages is needed to operate this efficiently.

To install chishm’s libfat, just extract the archive to your libnds directory so you should have /path/to/devkitpro/libnds/include/fat.h and /path/to/devkitpro/libnds/lib/libfat.a.

Chishm shares how this application can be used:

To use, you’ll need to #include <fat.h> in the file where the library will be initialised, and #include <stdio.h> in any source file that needs file access. In your makefile, add libfat to the list of libraries, before libnds. You’ll also need to link in libnds. Eg:

Code:
LIBS   :=  -lfat -lnds9

In your program initialisation code, add a call to fatInitialise. The first parameter specifies the size of the sector cache in pages and the second parameter determines if this is to be the default file driver. For 4 cache pages and setting this as the default I/O device, use:

Code:
if (fatInitialise(4, true)) {
    // Success
} else {
    // Failure
}

Directory listing is not yet available in this app as DevKitPro r19a – which is needed to run libfat – does not have this functionality.

Download: [chishms’ libfat Alpha Version]

Via chishm

Add a Comment

Your email address will not be published. Required fields are marked *