This is intended for homebrew/ROM-hack developers.
See it on GitHub: github.com/felixjones/ezfo-disc_io
I created this project to enable SD card filesystem access for EZ Flash Omega homebrew, as this is a feature I've been craving from EZ Flash for a very long time, so I went ahead and inspected the open-source kernel implementation of the file system and saw where that matches up with DISC_INTERFACE of libfat.
The original goal was (and sort of still is) to add EZ Flash Omega to devkitpro's libgba's rather dated list of inbuilt disc interfaces, however the need to execute OS mode related code in memory has put me off completing this task. Some help is needed here.
Another issue is NOR game support isn't here. The issue is not knowing what ROM page to return to for NOR games. I've done a lot of work with detecting what page a loaded NOR game is in, but it is incredibly slow (involves hashing ROMs - yuck!) and fails for identical ROMs (which isn't really a problem, just a small bit of grossness). As a result, I've decided to remove NOR support until a better method is found.
An example source file of using this system is also in the repository. The example reads a file from the SD card (if it exists), increments the number written in the file and writes the new number into the file (or creates the file if needed).
Basic usage is:
This is an open-source project, so contributions, improvements and fixes would be much appreciated. If we can get this to a state where it is suitable for devkitpro inclusion then the goal would be to get it merged into libgba and made part of the default disc interfaces.
See it on GitHub: github.com/felixjones/ezfo-disc_io
I created this project to enable SD card filesystem access for EZ Flash Omega homebrew, as this is a feature I've been craving from EZ Flash for a very long time, so I went ahead and inspected the open-source kernel implementation of the file system and saw where that matches up with DISC_INTERFACE of libfat.
The original goal was (and sort of still is) to add EZ Flash Omega to devkitpro's libgba's rather dated list of inbuilt disc interfaces, however the need to execute OS mode related code in memory has put me off completing this task. Some help is needed here.
Another issue is NOR game support isn't here. The issue is not knowing what ROM page to return to for NOR games. I've done a lot of work with detecting what page a loaded NOR game is in, but it is incredibly slow (involves hashing ROMs - yuck!) and fails for identical ROMs (which isn't really a problem, just a small bit of grossness). As a result, I've decided to remove NOR support until a better method is found.
An example source file of using this system is also in the repository. The example reads a file from the SD card (if it exists), increments the number written in the file and writes the new number into the file (or creates the file if needed).
Basic usage is:
Code:
const bool ismount = fatMountSimple( "fat", &_io_ezfo ); // _io_ezfo from io_ezfo.h
if ( ismount ) {
const int cderr = chdir( "fat:/" ); // Change working directory to fat:/ device
if ( cderr == 0 ) {
// Mount success
} else {
// Change directory fail
}
} else {
// Mount fail
}
This is an open-source project, so contributions, improvements and fixes would be much appreciated. If we can get this to a state where it is suitable for devkitpro inclusion then the goal would be to get it merged into libgba and made part of the default disc interfaces.