Heya, I wanted to modify the loader so that if you click to open a SAV file it'll search for a HEX file with the same name and open that one instead.
I got that part working however the whole eeprom saving stuff doesn't seem to be working now, as in the files created are empty and me finding a ton of trash files on my micro SD
So, I wonder, do I do something obvious wrong? https://github.com/Sorunome/Gamebuino/b ... r.ino#L198
Beware when trying this, I couldn't delete the garbage files other than re-formatting my SD card
EDIT: After some intense debugging it seems like the garbage files are created while saving the eeprom https://github.com/Sorunome/Gamebuino/b ... eeprom.ino
This is very surprising to me as I didn't change it at all and when I enable the debugging messages it does save to the correct file.
What might also be noteworthy is that the SAV file is empty afterwards.
EDIT2: out of curiosity, why do the save files save the upper and lower bytes separate? Wouldn't that just bloat the size of the savefile? Or is that to make sure that \0 is the end of the file?
EDIT3: The thing is that the garbage files are only created/the SAV file is empty if, when the debugging messages enabled, allow the saving to the (Correctly-named) SAV file.
Ironically if I comment out the file.writeLn(buffer); it does not create garbage files, which is pretty odd to me.
EDIT4: an fsck turns all the garbage files into folders and truncates the saves created...what is even happening o.O I don't even.....
I use the tinyFAT library provided in the Gamebuino repo.
EDIT5: I'm compiling on archlinux x86_64, do i need to set any compiler flags or something manually?