1. steelseth

    OP steelseth GBAtemp Regular
    Member

    Joined:
    Jan 25, 2016
    Messages:
    179
    Country:
    Cyprus
    Im reading about the possibility of corruption of the save file when turning off the device while the cart is saving.

    As simple solution would be.

    1. Dont overwrite the existing save file.
    2. Save a new file game.tmp.
    3. On reboot/reset check for *.tmp files in the save folder, if they exist check they are not corrupt (file size ?).
    4. If .tmp is ok then rename to .sav and overwrite old save file.

    Another way would be.
    1. Dont overwrite the existing save file.
    2. Save a new file game.tmp.
    3. When save is finished rename .sav file to .old
    4. Rename .tmp to .sav
    5. Delete .old

    This way if the file is corrupt you still loose the latest save but atleast if you have 20 hours play on a game you dont loose everything.
     
    Last edited by steelseth, Jun 21, 2018
    LarryD likes this.
  2. spkuja

    spkuja GBAtemp Fan
    Member

    Joined:
    May 7, 2007
    Messages:
    305
    Country:
    OR just don't turn it off while saving... You wouldn't do it with a proper game.
     
  3. steelseth

    OP steelseth GBAtemp Regular
    Member

    Joined:
    Jan 25, 2016
    Messages:
    179
    Country:
    Cyprus
    "Please wait at least 2-3 seconds after in-game save behavior, then power off the game console or reset game."
    I dont wait 2-3 after I save in a proper game.
    Do you ?
    Does anyone ?
     
  4. spkuja

    spkuja GBAtemp Fan
    Member

    Joined:
    May 7, 2007
    Messages:
    305
    Country:
    If given clear instructions to do so, then yes, I would
     
  5. migles

    migles All my gbatemp friends are now mods, except for me
    Member

    Joined:
    Sep 19, 2013
    Messages:
    8,034
    Country:
    China
    I do, even with official games or anything that saves.

    I guess you also hate to safety disconnect thumb drives or sd cards and then come to the 3ds section blaming the cfw for corrupting your stuff?
     
  6. steelseth

    OP steelseth GBAtemp Regular
    Member

    Joined:
    Jan 25, 2016
    Messages:
    179
    Country:
    Cyprus
    LOL.
    I forgot how toxic GBAtemp can be.
    Do any of you even own a EZ Omega ?
     
    GameBoyColor likes this.
  7. Localhorst86

    Localhorst86 Robert'); DROP TABLE members;--
    Member

    Joined:
    Jul 17, 2014
    Messages:
    2,415
    Country:
    Germany
    What is it lately with the tone of some responses? OPs suggestion is really not that outrageous, tbh. He's offering thoughtful input on how @EZ-Flash2 can improve their product.

    That being said, I haven't experienced any save corruption thus far, to me it's not that big of a hassle to count to 3 in my mind before I turn off my GBA. But from what I can gather from a few posts complaining about the issue, isn't the issue that the whole "SAVER" folder gets corrupted? So even if the EZ-Flash team was to implement this suggestion, the backed up save would be corrupted as well, wouldn't it?
     
    LarryD and GameBoyColor like this.
  8. kuwanger

    kuwanger GBAtemp Advanced Maniac
    Member

    Joined:
    Jul 26, 2006
    Messages:
    1,510
    Country:
    United States
    Yea, it's unclear to me what's precisely going on. I've had save corruption, and it really does seem very random at times. I want to blame at least 99% of it on dirty contacts + possible microSD incompatibility, but I have still gotten very infrequent corruption elsewhere and AFAIK it has had nothing to do with not waiting long enough. The problem, of course, is that it's just too random (and infrequent) of a thing to be 100% sure it's not me.

    So, I definitely appreciate the idea for suggestions. But given that corruption currently isn't isolated to just the save file, I don't think the suggestion is enough on its own. I do like the idea, though, of automatic versioning saves. Under such a scheme with 100 games and 100 revisions per game start, an average of 32KB/save would only be ~312.5MB. Drop that down to 10 revisions per game start, and that'd be only ~31.25MB which is actually a very reasonable number.

    The real catch is, it only seems like a good idea to me if this actual translates into less corruption risk. Ie, having saves only write to the cluster(s) of the save file and having the meta data only updated once at startup. Presumably that'd isolate the risk actually down to a save. That, of course, presumes that the corruption from power off midwrite can actually be isolated. That, to me, is the real question.

    Otherwise, you're just best either (1) doing lots of regular backups and having a computer handy for a restore or (2) waiting really long (closer to 5-10 seconds) to be really, really sure there can't possibly be corruption.
     
  9. Drumaster

    Drumaster Member
    Newcomer

    Joined:
    Jun 15, 2018
    Messages:
    38
    Country:
    France
    Having a very fast microSD card is an option as well I guess as it should reduce the time needed to write save on the card. No corruption for me yet after many saves on my Samsung Pro (80MB/s write). But maybe it's too soon for me to say that as I got my Omega only a few days ago (finger crossed).
     
  10. steelseth

    OP steelseth GBAtemp Regular
    Member

    Joined:
    Jan 25, 2016
    Messages:
    179
    Country:
    Cyprus
    I didnt realize that the whole save directory or even other files got corrupted.
    If Im not mistaken only writing new data as opposed to overwriting/deleting data has a better chance of not corrupting the filesystem in case of a powerloss.
     
  11. Localhorst86

    Localhorst86 Robert'); DROP TABLE members;--
    Member

    Joined:
    Jul 17, 2014
    Messages:
    2,415
    Country:
    Germany
    well, at least that's how I understood it. I could be wrong though, so it would probably be reasonable to see if someone who had this issue wants to provide further input :)

    @kuwanger you seem to have run into this issue. Does the corruption only affect single files or the whole folder? Or maybe even the entire SD card?
     
  12. EZ-Flash2

    EZ-Flash2 Official EZ-FLASH Stuff
    Member

    Joined:
    Jul 16, 2003
    Messages:
    706
    Country:
    China
    in my daily basis usage, a nobrand 8gb microsd with exfat, testing a lot of games with power on/off. unless I intend to power off quickly. I have not seen the error codes over months, no any corruption either.

    btw, about the feature request, a huge suprise awating. do it by yourself.
     
  13. dcervi

    dcervi Newbie
    Newcomer

    Joined:
    May 22, 2015
    Messages:
    3
    Country:
    I've also thought you can add a menu option to backup and restore the saves folder to the NOR flash. With the fast RAM loading few people are using it for games.

    Using this method, you have a backup in a different place, even in the case the hole SD card gets corrupted.

    Enviado desde mi SM-G950F mediante Tapatalk
     
  14. kuwanger

    kuwanger GBAtemp Advanced Maniac
    Member

    Joined:
    Jul 26, 2006
    Messages:
    1,510
    Country:
    United States
    It effects the folder. At least one time an unrelated game in a separate folder was corrupted. That's the part that makes me mostly convinced that the corruption can't really be isolated to the saver folder. :/ I'm not trying to speak ill of the EZ Omega mostly because when I have attempted to recreate corruption issues, I ironically have failed to succeed. It's one reason why for people who do have issues, it'd be great to know if they can reproduce the error and make a video demonstrating it or if it's really very random/hard to reproduce.
     
  15. steelseth

    OP steelseth GBAtemp Regular
    Member

    Joined:
    Jan 25, 2016
    Messages:
    179
    Country:
    Cyprus
    Im not sure if its a language issue but Im pretty sure you told me to go F*** myself.
    Thats a new level in customer service and public relations, way to go. :yay:

    [​IMG]
     
  16. migles

    migles All my gbatemp friends are now mods, except for me
    Member

    Joined:
    Sep 19, 2013
    Messages:
    8,034
    Country:
    China
    obviously its a language barrier\issue, it looks like he told to do it yourself, i am sure that's not he mean... the person had no intention to say that...
    i seen the ez flash writing even weirder stuff i couldn't figure out the exact meaning
     
  17. EZ-Flash2

    EZ-Flash2 Official EZ-FLASH Stuff
    Member

    Joined:
    Jul 16, 2003
    Messages:
    706
    Country:
    China
    Yes. you misunderstood completely. wait and see. what is the "do it by yourself" means.
     
  18. Cartoni

    Cartoni Advanced Member
    Newcomer

    Joined:
    Oct 23, 2017
    Messages:
    74
    Country:
    Netherlands
    Hahah the misunderstanding in this thread is really high

    Ooooh, exciting! This makes me wonder if you have found a solution to the whole corruption errors. Can't wait to see the new feature(s)
     
  19. Drumaster

    Drumaster Member
    Newcomer

    Joined:
    Jun 15, 2018
    Messages:
    38
    Country:
    France
    As he said he can't reproduce save corruption bug, I think he won't fix anything as it may not even be an issue. I have NOT experienced this issue neither after a lot of saves during a few days. I don't say there is no issue at all, but at least EZ staff does not seem to experience it.

    Have you tried with another freshly formatted microSD card with the proper file system/cluster size? Your card may be defective at some points when trying to write on some areas.
     
    Last edited by Drumaster, Jun 22, 2018
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Feature, request, FLASH