emukidid / swiss-gc

Swiss - The swiss army knife of GameCube homebrew
GNU General Public License v2.0
1.28k stars 93 forks source link

Files "fragment" when adding new isos to SD card[Issue]: #763

Closed TechIlliteratePlsHelp closed 1 year ago

TechIlliteratePlsHelp commented 1 year ago

Describe the bug

Hello!

I've been using an SD2SP2 device to run my games from an SD card, to this day I've had no issue bar two times:

-Once, suddenly I got the "Unable to setup file (too fragmented?)" error message. I updated Swiss to a later build and it solved the issue.

-Today, when I tried to add new game ISOs to my SD card and, when going into Swiss to run them, got the same message with those files and also the ones already in there. Updating to the latest build did not solve the issue this time.

As I stated before, I tried updating my Swiss build to v0.6r1400 since updating solved the issue before, but to no avail.

The way I add ISO files to my SD card is just drag and drop, could this be the issue? I consider it unlikely since that's the way I did it before. The card is a 32GB Kingston microSd formatted to exFAT which I insert into my PC via an Adata microSD adapter.

I've also read in the issues section that a clean format is needed to fix this issue, but is it really necessary to do a clean format everytime I add a file?

Any help with how to resolve this issue is appreciated.

Steps to reproduce

-Drag and drop an ISO file to your games folder by drag&dropping it from Windows -Run Swiss -Run the added game

Expected behavior

Swiss will show the "Unable to setup file (too fragmented?)" error message and fail to run the file

Relevant log output

No response

Add screenshots

No response

Papy-G commented 1 year ago

This issue has to be adressed in Windows and recent OSes, as the way they copy "big" files is a mess, even formatting and copying all the files in the same batch may result in fragmented files.

Alternatively writing and erasing random files of different sizes on any disk is not good. That's why on a digital camera, for example, it is advised to never erase a file that isn't the last to have been writtten, to get the most performance off the SD card.

You can try defrag on your SD card, but it may take more time and reduce the Card's lifespan compared to formatting/copying. It may be handy to use it at last to diagnose and look how fragmented is your card.

We would need a file manager utility with hand cluster allocation possibilities, in absence of smarter allocation algorythm in our OSes. I've been looking in other places in that matter, and still have no solution for that.

emukidid commented 1 year ago

This can also depend on the game and patches/config selected. Just format your card and make sure you're placing games on it one at a time.

TechIlliteratePlsHelp commented 1 year ago

Thanks, a little update: I formatted my SD card, added the games again and the games work. This was also the case before, in which I updated Swiss and it solved the issue.

I'll try and download the files directly onto the SD next time instead of drag and dropping when I add a new one and see if that helps.

For now it seems the clean format is the way to go when the issue presents itself, thank you again for your response!