Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 1.48 KB

README.md

File metadata and controls

68 lines (49 loc) · 1.48 KB

libsysgba

workflow FOSSA Status

Standard system call implementations for Game Boy Advance.

Dependency

It needs libsysbase in devkitPro to work.

Build

make
make test

Feature

Support File I/O in C++ and C

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();

Access Backup Media as File

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+");

License

FOSSA Status