Code: Select all
FILE *f = fopen("gameSave.bin", "wb");
fwrite(data, dataLen, 1, f);
fclose(f);
I came across the example found at "devkitPro\examples\nds\card\eeprom", however could not get it to work for saving data to the flashcard.
I tried adding this code to the example (while keeping all of the init stuff like sysSetBusOwners(true, true);):
Code: Select all
memset(data, 'a', 512);
cardWriteEeprom(0, data, 512, type);
cardReadEeprom(0, data, 512, type);