Homebrew Question Retroarch + exFat = corruption?

Did you had any corruption issue while using Retroarch?

  • Yes

    Votes: 70 56.0%
  • No

    Votes: 55 44.0%

  • Total voters
    125

Tomobobo

Champion.
Member
Joined
Nov 26, 2005
Messages
1,310
Trophies
1
XP
2,146
Country
United States
I'm not sure which is the problem, reading or writing, but I'm assuming Minecraft is doing both.

To clarify, I'm pretty sure Minecraft does a lot of SD card access while running, and I haven't had corruption issues so far on ofw.
 
Last edited by Tomobobo,

SeongGino

The Average One
Member
Joined
May 20, 2015
Messages
939
Trophies
0
Age
25
Location
Jersey, Jersey
Website
www.twitter.com
XP
1,932
Country
United States
I'm not sure which is the problem, reading or writing, but I'm assuming Minecraft is doing both.

To clarify, I'm pretty sure Minecraft does a lot of SD card access while running, and I haven't had corruption issues so far on ofw.

Except for the fact that nothing is being written to the SD card to begin with...?
 

ZachyCatGames

Well-Known Member
Member
Joined
Jun 19, 2018
Messages
3,398
Trophies
1
Location
Hell
XP
4,209
Country
United States
I'm not sure which is the problem, reading or writing, but I'm assuming Minecraft is doing both.

To clarify, I'm pretty sure Minecraft does a lot of SD card access while running, and I haven't had corruption issues so far on ofw.
No official applications are allowed to write to the SD card. All savegame data is written to the emmc USER partition, which is formatted as fat32
 
Last edited by ZachyCatGames,
  • Like
Reactions: matt! and Tomobobo

duckbill007

Well-Known Member
Member
Joined
May 5, 2011
Messages
691
Trophies
1
XP
2,480
Country
Russia
AFAIK exFat has file access time attribute and its constantly updates even if apps only reads files from SD. that's why folder records are open with write access on exfat.

FAT32 has no such attribute and SD in FAT32 is true read-only.
 

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,287
Country
United States
What about minecraft? I'm pretty sure that game is reading/writing to sd, no?

No? It writes to savedata like any other game. Which is A) on the eMMC user partition and B) uses a different API from raw filesystem access.

AFAIK exFat has file access time attribute and its constantly updates even if apps only reads files from SD. that's why folder records are open with write access on exfat.

FAT32 has no such attribute and SD in FAT32 is true read-only.

It's common sense to only rewrite the atime field when updating atimes and not the whole record. Nintendo rewrites the whole record. I know not whether it has to do with atimes or not, but the approach they use is not sane.

Aside from that, why should a game console be using atimes? They don't provide any useful information to the OS, and literally nobody except archivists needs to care about atimes.
 
  • Like
Reactions: Tomobobo

tabzer

This place is a meme.
Member
Joined
Feb 15, 2019
Messages
5,844
Trophies
1
Age
39
XP
4,911
Country
Japan
so FAT32 is the best option for my new 400gb card?
It is the safest option. With USB installs, 4GB+ files are not even a thing, because Nintendo Switch breaks down the installs into pieces meant for Fat32. Unless you are loading blue-ray rips that are at a resolution too high for the Switch to handle, there is no point. Exfat doesn't offer any benefit. Only more risk. The whole point of Exfat is to handle 4+ GB files, and if you are installing NSPs via USB, then you don't have to worry about it. It's just stupid that this is even a topic.

For people who are putting 4GB+ nsps on their SD cards: shame on you! If you want to be so inefficient, then just buy your games.
 
Last edited by tabzer,
  • Like
Reactions: naddel81

duckbill007

Well-Known Member
Member
Joined
May 5, 2011
Messages
691
Trophies
1
XP
2,480
Country
Russia
Switch not breaks file into pieces.

It just uses custom FS to support big files.
As LFN was added to standard FAT as extra records as nintendo extends FAT for 4Gb+ files: it uses several records for this. One folder record with archive attibute and 1+ file records for file chunks.
It is only windows that sees this as separate files. FS driver in the HOS shows this as a single large FILE, not folder.

Just did some quick tests with python and fuse: it is very easy to write custom fs diver for linux, that will see this nintendo specific big files.
 

tabzer

This place is a meme.
Member
Joined
Feb 15, 2019
Messages
5,844
Trophies
1
Age
39
XP
4,911
Country
Japan
Switch not breaks file into pieces.

It just uses custom FS to support big files.
As LFN was added to standard FAT as extra records as nintendo extends FAT for 4Gb+ files: it uses several records for this. One folder record with archive attibute and 1+ file records for file chunks.
It is only windows that sees this as separate files. FS driver in the HOS shows this as a single large FILE, not folder.

Just did some quick tests with python and fuse: it is very easy to write custom fs diver for linux, that will see this nintendo specific big files.

So it's literally a matter of interpretation. Is it easy to write a custom driver that will automatically write large (4GB+) in the same manner?
 

cracker

Nyah!
Member
Joined
Aug 24, 2005
Messages
3,619
Trophies
1
XP
2,213
Country
United States
I think @Tomobobo meant constantly writing to SD. If that is the case then: No, even the auto-save isn't constantly writing to the SD (after v1.8.1 which fixed autosaving too frequently).
 

Tomobobo

Champion.
Member
Joined
Nov 26, 2005
Messages
1,310
Trophies
1
XP
2,146
Country
United States
I was confused about it bc my buddy has a shit sd card and seemingly upgrading his card made MC lag much less. But on the switch the game is saving worlds to the game save partition made by horizon, not anywhere normally user accessible whether on SD or NAND. Either way, it's not writing to exfat partition of the SD, contrary to my suspicions.
 

thatrunks

Member
Newcomer
Joined
Dec 20, 2013
Messages
10
Trophies
0
Age
37
XP
131
Country
Netherlands
I'm using an old version of Atmosphere and Retroarch and was about to upgrade to the new Kosmos version.
I was in the process of copying everything to a new microSD card. When all of a sudden the copying process stopped for two save state files, giving me this error;

CorruptSaveState.PNG


So I would play safe as I am doing right now and correctly formatting it into FAT32. I did not knew this. And just Googled this to see the discussion about this.
My feeling is there is a small risk using Exfat concerning corruption, obviously.
I haven't got any file over 4 GB because I only use homebrew and have all my games original as a game card.

I think it really depends on what you want with your Switch.
 

EmulateLife

Well-Known Member
Member
Joined
May 30, 2016
Messages
3,979
Trophies
0
Age
42
XP
1,889
Country
United States
I'm using an old version of Atmosphere and Retroarch and was about to upgrade to the new Kosmos version.
I was in the process of copying everything to a new microSD card. When all of a sudden the copying process stopped for two save state files, giving me this error;

View attachment 178145

So I would play safe as I am doing right now and correctly formatting it into FAT32. I did not knew this. And just Googled this to see the discussion about this.
My feeling is there is a small risk using Exfat concerning corruption, obviously.
I haven't got any file over 4 GB because I only use homebrew and have all my games original as a game card.

I think it really depends on what you want with your Switch.

The corruption comes from using homebrew. That could be Retroarch, or even Tinfoil to install a game. Any homebrew puts you at risk of corruption on ExFAT. It's smart to change to FAT32.

But just FYI if you did want to install a game over 4 gb you still can on FAT32, you just have to install through your usb type c cable.
 
Last edited by EmulateLife,
  • Like
Reactions: thatrunks

Paulsar99

Well-Known Member
Member
Joined
May 15, 2018
Messages
1,095
Trophies
0
XP
2,545
Country
Togo
I'm using an old version of Atmosphere and Retroarch and was about to upgrade to the new Kosmos version.
I was in the process of copying everything to a new microSD card. When all of a sudden the copying process stopped for two save state files, giving me this error;

View attachment 178145

So I would play safe as I am doing right now and correctly formatting it into FAT32. I did not knew this. And just Googled this to see the discussion about this.
My feeling is there is a small risk using Exfat concerning corruption, obviously.
I haven't got any file over 4 GB because I only use homebrew and have all my games original as a game card.

I think it really depends on what you want with your Switch.
Yeah these are minor corruptions that can also happen while being on exfat. It doesn't corrupt your whole card but you will notice that some of the files can no longer be moved or deleted.
 
  • Like
Reactions: thatrunks

GatoFiestero

Well-Known Member
Member
Joined
Jan 21, 2020
Messages
350
Trophies
0
Age
36
XP
1,630
Country
Costa Rica
Last year I reformat to fat32. No errors since then. Full retroarch and all set of brew apps working perfectly.

Don't use exfat
 

stitchxd

Well-Known Member
Member
Joined
Apr 27, 2017
Messages
401
Trophies
0
Location
nope
Website
gnusocial.me
XP
689
Country
United States
I use a 200gb card, I can't use fat32, But I have NO ISSUE
It is true that FAT32 has a max Filesystem size of 32GB, but Most modern OS's can work around this limitation and allow 2TB partitions in FAT32. I have a 256GB SDCard formatted as FAT32 that works as intended in my switch - Almost filled with Games too :)
 

ZachyCatGames

Well-Known Member
Member
Joined
Jun 19, 2018
Messages
3,398
Trophies
1
Location
Hell
XP
4,209
Country
United States
It is true that FAT32 has a max Filesystem size of 32GB, but Most modern OS's can work around this limitation and allow 2TB partitions in FAT32. I have a 256GB SDCard formatted as FAT32 that works as intended in my switch - Almost filled with Games too :)
That's not a filesystem limitation, it's a "microsoft locking it off to force you to use their newer filesystems" thing :P
 

LyuboA

Unknown Entity
Member
Joined
Jun 1, 2018
Messages
530
Trophies
0
XP
919
Country
Bulgaria
exFat is fine after 9.0.0 fw i have all my Switch consoles on ExFat after 9.0.0 never had an issue and even setup quite a few consoles for friends that are complete noobs with ExFat non of them had an single issue
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    DinohScene @ DinohScene: ahh nothing beats a coffee disaronno at work