Homebrew Question Deleted Contents of "switch" Directory

Dax_Fame

Annoying Member
OP
Member
Joined
Jan 16, 2015
Messages
495
Trophies
0
Age
33
Location
Mom's house
XP
1,274
Country
United States
So there I was, playing Retroarch on Atmosphere 0.9.4 emuMMC, as I've done many times before.

I was playing Symphony of the Night for PSX and trying to glitch out of the gate right in the beginning, so to spare me the agony of doing the intro over and over again I was using save states.

Everything was going fine... Well, no so much for performing the glitch but the save states were loading as they should.

It wasn't until I made a second save states, closer to the moment to perform the action. Upon loading it, the screen would show a garbled mess of graphics with the music playing. Reloaded via Retroarch menu a few times, same thing.

I decided to restart Retroarch and noticed hbmenu now finding anything in the switch Directory... Hmmm.. look around online, figure it's an issue with exFat (which I'm using for my non-emuMMC partition) I also notice at this time my last in-game screenshot is now corrupt in the album on sMMC.

I pop the SD into my reader to copy my files and reformat to FAT32, my switch Directory is empty! (RIP half-life save) and that screenshot is nowhere to be found in the Nintendo folder.

TLDR:
  • Playing Retroarch
  • While creating a save-state it freaked out
  • Contents of "switch" Directory suddenly deleted
  • Random screenshot corruption and file deletion
Was this the Switch's amazing exFat driver at work or is there a possibility of something more sinister at hand? If so, how might I discover the cause so it may be addressed?
 

Mythical

Well-Known Member
Member
Joined
May 11, 2017
Messages
2,153
Trophies
1
Age
25
XP
3,003
Country
United States
Probably the exfat driver or just corruption in general. It can technically happen whenever the card is written to.
 

sj33

Well-Known Member
Member
Joined
Oct 22, 2013
Messages
4,072
Trophies
2
XP
4,726
Country
Japan
exFAT corrupted the directory. Reformating to FAT32 is the correct thing to do, but the folder is still going to be corrupted/deleted. RIP.
 

Dax_Fame

Annoying Member
OP
Member
Joined
Jan 16, 2015
Messages
495
Trophies
0
Age
33
Location
Mom's house
XP
1,274
Country
United States
Figured it was just exFat. Finally got me! Been riding that line for a long time.

Reformatted to FAT32 and everything for the most part seems fine... Until I notice my corrupted botw save or something awful like that lol

The strange thing is I was in emuMMC and it corrupted things in the Nintendo Directory for sMMC... Coincidence?!
 

Rahkeesh

Well-Known Member
Member
Joined
Apr 3, 2018
Messages
2,178
Trophies
1
Age
42
XP
3,261
Country
United States
You're lucky the entire card wasn't corrupted, as often happens with exFAT on Switch. There may be more things messed up that you don't know about yet.
 

Dax_Fame

Annoying Member
OP
Member
Joined
Jan 16, 2015
Messages
495
Trophies
0
Age
33
Location
Mom's house
XP
1,274
Country
United States
I couldn't even recover the files, they were just gone-gone. I've never seen anything quite like it. Pretty amazingly shitty job there, Nintendo.

I can't wait for the system update that forces people to use exFat, just to make our lives more difficult.
 

RHOPKINS13

Geek
Member
Joined
Jan 31, 2009
Messages
1,354
Trophies
2
XP
2,618
Country
United States
Reformatted to FAT32 and everything for the most part seems fine... Until I notice my corrupted botw save or something awful like that lol
Your game saves are stored in the internal memory. Of course, you're using emuMMC, so your "internal memory" is still on the card, but it's not part of the exFAT partition. It should be ok.
The strange thing is I was in emuMMC and it corrupted things in the Nintendo Directory for sMMC... Coincidence?!
That's not how a file system works. Your data is not laid out on your microSD in a nice and organized manner like it shows up on your PC. There is a "file table" which is basically a "table of contents," with information about your files, what "directories" they're in, and what sectors they're in within the "data region." When you move a file between folders, the actual file in the data region does not get moved, it only gets changed in the "file table" region. This means that files that are completely unrelated and in different folders often reside next to each other in the data region, and with the Switch it's very easy for all sorts of things to get corrupted while using homebrew, ESPECIALLY RetroArch.
 

Dax_Fame

Annoying Member
OP
Member
Joined
Jan 16, 2015
Messages
495
Trophies
0
Age
33
Location
Mom's house
XP
1,274
Country
United States
Your game saves are stored in the internal memory. Of course, you're using emuMMC, so your "internal memory" is still on the card, but it's not part of the exFAT partition. It should be ok.

That's not how a file system works. Your data is not laid out on your microSD in a nice and organized manner like it shows up on your PC. There is a "file table" which is basically a "table of contents," with information about your files, what "directories" they're in, and what sectors they're in within the "data region." When you move a file between folders, the actual file in the data region does not get moved, it only gets changed in the "file table" region. This means that files that are completely unrelated and in different folders often reside next to each other in the data region, and with the Switch it's very easy for all sorts of things to get corrupted while using homebrew, ESPECIALLY RetroArch.
Hmmm I guess that would explain why my MOST RECENT screen shot got corrupted then, as whatever data went wonky from the creation of the save state was "near" the same sector?

Also if all my save data is stored in the sMMC memory I'll be fine. I only play legit games on sMMC and emuMMC is purely for HB...... And SD card corruption loo

I'm curious why you say especially Retroarch... Is there something about it that corrupts data?
 
Last edited by Dax_Fame,

RHOPKINS13

Geek
Member
Joined
Jan 31, 2009
Messages
1,354
Trophies
2
XP
2,618
Country
United States
I'm curious why you say especially Retroarch... Is there something about it that corrupts data?
With exFat, yes. To be honest it's a little over my head. But from their thread:
Using an SD formatted as exFat is NOT officially supported.
If you are using RetroArch on Switch, FAT32 is the recommended and only way supported officially by the team.
Any questions related to exFat or file corruption might be ignored.

m4xw has said numerous times in various threads not to use exFat with retroarch as well. I think a lot of the time it depends on how often the homebrew is writing to the microSD card, and whether you close it correctly or back out using the home button. Emulation is still far from perfect on Switch, and it's not uncommon to run in to the occasional freeze. And some games save frequently.

I saw a much better write-up somewhere about this, but I can't find it now. I used to use exFat, and if you're only playing Switch games with it you might be ok, but I ended up with some corruption as well after playing some N64 roms, and that was enough to get me to switch. Luckily I didn't lose anything important, but all my rom filenames showed up as gibberish in Retroarch.
 
  • Like
Reactions: Dax_Fame

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    S @ salazarcosplay: how are you @SylverReZ