I was writing some homebrew game and once had the need to save the game progress and I wonder how can I do that in the way commercial games do. I mean, in order to make my game run fine on both hardware and emulators, I want to save 'directly to the card' instead of using the SD card. (this translates to having a "*.sav" file created by the emulator)
I learned that libnds has a predefined SRAM address and tried to follow the steps from the double.nz tutorial to access it, but I didn't manage to make it work. Then I tried the indications in this post which suggest using
Last but not least, I tried the examples\nds\card\eeprom demo which gave me the following result:
I came to the conclusion that (correct me if I'm wrong) the NDS header (or any part of the file) must be configured in order to support SRAM, but I have no idea what or how could I achieve that. Can ndstool do the job or I need to find/write another tool that enables SRAM for my DS game?
I learned that libnds has a predefined SRAM address and tried to follow the steps from the double.nz tutorial to access it, but I didn't manage to make it work. Then I tried the indications in this post which suggest using
fatInitDefault()
, but as excpected I received the "Failed to initialize FAT driver" error.Last but not least, I tried the examples\nds\card\eeprom demo which gave me the following result:
EEPROM: Type: -1 Size: 0
.I came to the conclusion that (correct me if I'm wrong) the NDS header (or any part of the file) must be configured in order to support SRAM, but I have no idea what or how could I achieve that. Can ndstool do the job or I need to find/write another tool that enables SRAM for my DS game?