Standard system call implementations for Game Boy Advance.
It needs libsysbase in devkitPro to work.
make
make test
It allows you to read files in gbfs with C standard library functions and C++ fstream.
int fd = open("xxx.txt", O_RDONLY);
read(fd, dest, size);
int i, j;
FILE *fp = fopen("xxx.txt", "r");
fscanf(fp, "%d %d", &i, &j);
std::ifstream fs("xxx.txt");
std::stringstream ss;
ss << fs.rdbuf();
It allows you to access backup media with File I/O in C++ and C.
Special filenames preserved for that:
sram:
sram_64KB:
sram_512Kb:
eeprom:
eeprom_512B:
eeprom_4Kb:
eeprom_8KB:
eeprom_64Kb:
int fd = open("sram:", O_RDWR);
FILE *fp = fopen("sram:", "r+");
int fd = open("eeprom:", O_RDWR);
FILE *fp = fopen("eeprom:", "r+");