#177327 - atomen - Sat Apr 14, 2012 5:49 pm
Hi!
I've been doing some GBA coding lately and now I've started working with files which requires far more
memory than what is possible with normal binary files (.h and .c). Therefore I've started looking on some
file systems for the GBA. From my understanding there are two different viable choices; GBFS and libfat (both
are supplied with the devkitPro toolchain). Since GBFS has far more examples than libfat (excluding NDS),
GBFS seems like a better choice, but I have two problems.
With GBFS I've had no success using either gbfs, ungbfs and lsgbfs (these are all tools supplied with
GBFS). The gbfs tool creates invalid .gba files (which does not work). Both ungbfs and lsgbfs has no
output (even if I am using them on a valid .gba file; in this case, the one which is supplied with GBFS
(NOTE: the gba file supplied with GBFS works flawlessly on the emulators I've tried)).
After looking on the source code for the tools, the function which check the information of the appended
data (in the .gba file) return 0 (file count and file offset, in lsgbfs.c and ungbfs.c. NOTE: the function to
observe is fgeti16). This is the output when I use the tools on the supplied .gba file. If used on a .gba
file compiled on my own, only garbage is printed using lsgbfs and ungbfs says the file can not be found.
I've tested the executables/tools using the supplied ones, and by compiling them myself. I've even tried on Ubuntu
and Windows 7 (both 64-bit, could this be an issue?). Does anyone have a clue why I can not get these to function
properly?
The other filesystem is libfat, which seems a lot more up to date. The problem with libfat is the lack of documentation
on the GBA. It seems pretty easy to use but there is one thing I do not get; how do you supply the files to the
.gba file? Is it like GBFS and you're supposed to append them to the .gba file?. And if that is the case, which application
are you supposed to use so the files are appended in the FAT format?
I'm sorry for the long post, but to conclude:
GBFS; what am I doing wrong/can you get it to work(?), and if so, how?
LibFAT; how do you use libfat with .gba files, or rather, how do you include your own files for use?
I've been doing some GBA coding lately and now I've started working with files which requires far more
memory than what is possible with normal binary files (.h and .c). Therefore I've started looking on some
file systems for the GBA. From my understanding there are two different viable choices; GBFS and libfat (both
are supplied with the devkitPro toolchain). Since GBFS has far more examples than libfat (excluding NDS),
GBFS seems like a better choice, but I have two problems.
With GBFS I've had no success using either gbfs, ungbfs and lsgbfs (these are all tools supplied with
GBFS). The gbfs tool creates invalid .gba files (which does not work). Both ungbfs and lsgbfs has no
output (even if I am using them on a valid .gba file; in this case, the one which is supplied with GBFS
(NOTE: the gba file supplied with GBFS works flawlessly on the emulators I've tried)).
After looking on the source code for the tools, the function which check the information of the appended
data (in the .gba file) return 0 (file count and file offset, in lsgbfs.c and ungbfs.c. NOTE: the function to
observe is fgeti16). This is the output when I use the tools on the supplied .gba file. If used on a .gba
file compiled on my own, only garbage is printed using lsgbfs and ungbfs says the file can not be found.
I've tested the executables/tools using the supplied ones, and by compiling them myself. I've even tried on Ubuntu
and Windows 7 (both 64-bit, could this be an issue?). Does anyone have a clue why I can not get these to function
properly?
The other filesystem is libfat, which seems a lot more up to date. The problem with libfat is the lack of documentation
on the GBA. It seems pretty easy to use but there is one thing I do not get; how do you supply the files to the
.gba file? Is it like GBFS and you're supposed to append them to the .gba file?. And if that is the case, which application
are you supposed to use so the files are appended in the FAT format?
I'm sorry for the long post, but to conclude:
GBFS; what am I doing wrong/can you get it to work(?), and if so, how?
LibFAT; how do you use libfat with .gba files, or rather, how do you include your own files for use?