libnds
|
NitroFS filesystem embedded in a NDS ROM. More...
Functions | |
bool | nitroFSExit (void) |
Exits NitroFS. | |
WARN_UNUSED_RESULT FILE * | nitroFSFopenById (uint16_t id, const char *mode) |
Open a NitroFS file directly by its FAT offset ID. | |
WARN_UNUSED_RESULT bool | nitroFSInit (const char *basepath) |
Initializes NitroFS. | |
int | nitroFSInitLookupCache (uint32_t max_buffer_size) |
This function initializes a NitroFS lookup cache. | |
int | nitroFSOpenById (uint16_t id) |
Open a NitroFS file descriptor directly by its FAT offset ID. | |
NitroFS filesystem embedded in a NDS ROM.
bool nitroFSExit | ( | void | ) |
Exits NitroFS.
WARN_UNUSED_RESULT FILE * nitroFSFopenById | ( | uint16_t | id, |
const char * | mode | ||
) |
Open a NitroFS file directly by its FAT offset ID.
This FAT offset ID can be sourced from functions like
In all other functions, this file behaves identically to one sourced from
id | The FAT offset ID of the file (0x0000..0xEFFF). |
mode | The file open mode. Only "r" and "rb" are supported. |
WARN_UNUSED_RESULT bool nitroFSInit | ( | const char * | basepath | ) |
Initializes NitroFS.
The caller can optionally provide the path of a NDS file to open.
basepath | The .nds file path. If NULL nitroFSInit() will use argv[0] instead. |
int nitroFSInitLookupCache | ( | uint32_t | max_buffer_size | ) |
This function initializes a NitroFS lookup cache.
This lookup cache allows avoiding expensive SD card lookups for large and/or backwards seeks, at the expensive of RAM usage.
This function will return 0 on non-DLDI/SD NitroFS accesses, as lookup caches are unnecessary in these situations.
max_buffer_size | The maximum buffer size, in bytes. |
int nitroFSOpenById | ( | uint16_t | id | ) |
Open a NitroFS file descriptor directly by its FAT offset ID.
This FAT offset ID can be sourced from functions like
In all other functions, this file descriptor behaves identically to one sourced from
id | The FAT offset ID of the file (0x0000..0xEFFF). |