gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Do any NDS emulators support FAT reading and writing?

#79416 - sofakng - Thu Apr 13, 2006 3:13 pm

It looks like DualiS has the most complete FAT support, but I'm having a problem. What happens is that my file is written successfully, but then if I go to read it I get an error...

Here is example code:
Code:

  FAT_FILE *fp = FAT_fopen("jjk.txt", "w"); // open the file
  char buf[] = "Hello World";
  int bufsize = strlen(buf);
  int bytesWritten = FAT_fwrite(buf, 1, bufsize, fp); // write the data
  FAT_fclose(fp);

  FAT_FILE * fp2 = FAT_fopen("jjk.txt", "r");  // FP = 0  <-- ERROR!

#79423 - GPFerror - Thu Apr 13, 2006 4:55 pm

dualis only supports readonly for now... Hopefully soon it will work with writing too.