Hacking GW slow ROM scrolling even after SD Formatter

Searinox

"Dances" with Dragons
OP
Member
Joined
Dec 16, 2007
Messages
2,073
Trophies
1
Age
36
Location
Bucharest
XP
2,203
Country
Romania
I ended up reformatting the microSD card today. After putting all the ROMs back on, I put it in the 3DS and noticed the list now took 2 seconds instead of 1 to appear. Scrolling to the right takes 1 second but scrolling back one title takes a terrible 2 seconds. In other words the list has suddenly become very slow.

I tried the SD Formatter, with alignment, a full format, then EaseUS Partition Master, resized partition to cover ALL space including the 16MB unallocated the SD Formatter does, then I tried the same but checked Optimize for SSD... whatever I do the ROM scrolling is terribly slow.

The thing is, the card behaves very well on PC. It reads and lists files very fast, benchmarks give good scores all around, and even on Gateway, once I select a ROM and load it, it loads very fast. 18 games tested with no running issues. Pokemon games, which save on the microSD, all save very fast and without hiccups.... so in other words it's just the ROM list that is slow!

I even tried FAT Sorter... it didn't help either. Then 32MB cluster size since fewer clusters should be faster. Again nothing.

Anyone else here got slow scrolling ROM menu?
 

Searinox

"Dances" with Dragons
OP
Member
Joined
Dec 16, 2007
Messages
2,073
Trophies
1
Age
36
Location
Bucharest
XP
2,203
Country
Romania
L/R take 2 seconds to list 5 games at a time, which is indeed faster, but still much slower than before. L has pretty much become my only option for scrolling back since as I said scrolling back is much slower than forward.
 

Rizzorules

"What are you doing?" "Something unexpected."
Member
Joined
Aug 17, 2013
Messages
994
Trophies
0
XP
1,066
Country
Argentina
Thats strange if you dont find any solution you should install those games as CIA or try another micro sd card
 

WaterBotttle

Well-Known Member
Member
Joined
Dec 19, 2014
Messages
163
Trophies
0
Age
34
XP
307
Country
Try another mirco sd if you have a spare one laying around. If that doesn't help get an SD card and install your games a CIA files.
 

Searinox

"Dances" with Dragons
OP
Member
Joined
Dec 16, 2007
Messages
2,073
Trophies
1
Age
36
Location
Bucharest
XP
2,203
Country
Romania
It's just this one card that has an issue. Looking for advice with it. Those games are 24GB worth of stuff I'm not gonna buy a bigger SD card and spend time converting everything to CIA just because the list won't scroll fast!
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,283
Trophies
4
Location
Space
XP
13,838
Country
Norway
Mine has always been slow at scrolling, I hope they make the browser 2-dimensional eventually.
I didn't know about the L/R trick though, that helps considerably.
 

Searinox

"Dances" with Dragons
OP
Member
Joined
Dec 16, 2007
Messages
2,073
Trophies
1
Age
36
Location
Bucharest
XP
2,203
Country
Romania
Mine is the same brand, but microSDHC Class 10 32GB. I have no problems with scrolling.
I have a 32GB SanDisk Class 10 and I also have no problems with it. I was wondering for this specific model. Anyone know how the file table is stored on exFAT? Might have something to do with it since performance outside everything but scrolling is fine.
 

Pedeadstrian

GBAtemp's Official frill-necked lizard.
Member
Joined
Oct 12, 2012
Messages
3,966
Trophies
2
Location
Sandy Eggo
XP
3,891
Country
United States
I have a 32GB SanDisk Class 10 and I also have no problems with it. I was wondering for this specific model. Anyone know how the file table is stored on exFAT? Might have something to do with it since performance outside everything but scrolling is fine.
You could always copy all the files to your computer (if they're not already there), format to FAT32, and see if the performance improves.
 

Searinox

"Dances" with Dragons
OP
Member
Joined
Dec 16, 2007
Messages
2,073
Trophies
1
Age
36
Location
Bucharest
XP
2,203
Country
Romania
I've figured it out and fixed it. Leaving this here for others since I was unable to find anyone else complaining about slow scrolling and it is likely an obscure issue.

First some background:

I do something weird. Fragmentation errors occur when a ROM is fragmented in more than 32 pieces of non-contiguous clusters, or when it occupies the last 2 clusters. For this reason I always do the following:
-I use a very large cluster size(32MB), afterall ROMs are perfectly divisible by this unit and even trimmed there is very little space loss when you only have a few tens of large files
-I create about 2000 1-byte files, each occupying 32MB because that's how clusters work. I assume that on a fresh partition they are allocated sequentially, until I fill up the entire drive. I then take the last 2 files I created and make them read-only, hidden, and system to prevent their deletion since they should be occupying the last 2 clusters making sure no ROMs are written. I then delete the other 2000 files

This last step was screwing GW over. Gateway has a very poor implementation of file seeks for the microSD as evidenced by the fact that you need a third party tool to rearrange files in the menu by modifying the order of their IDs in the partition table. This same poor implementation was screwing me over with my 2000 files routine.

Since I create those files before putting any ROMs on, they probably bump up the first available free entry within the thousands, and kind of like how when you delete files only a flag is changed but the data is left still there, these IDs would persist after deletion until god knows when they'd be replaced by new file entries. Then, even after deletion, any subsequent ROMs put on the card, will have their entries stored at those higher IDs. And my guess is that when GW parses the file list, it doesn't try to read only valid IDs and instead parses the entire list until it gets to the ROMs. I was able to confirm my suspicion by creating another 1000 files, deleting the ROMs, and writing them back again, therefor bumping up this ID even more. And sure enough, the next time I put the microSD in and popped the menu up, it took a full FIVE SECONDS for the ROMs to be listed, and the list was even slower.

So what I did this time around was the following: I created a folder in the root, and inside that folder I ran my 2000 files routine. Locked the last 2 clusters in, deleted the files, then copied the ROMs on the root. And now the microSD was blazing fast. It loaded in half a second and is browsing very fast.

What this means for non-crazy users:

If you have in the past used the microSD to store a lot of files without format, or use it as a multipurpose storing other files alongside ROMs, back up your stuff, reformat, and on the root put ROMs and ONLY ROMs. If necessary, store everything else inside a folder, because repeated creation and deletion of files in the root bumps up the file table entries there a lot and in time adds more and more lag to the ROM menu. Jdbye this one is aimed at you. If you've not formatted before or if you use the card for other things, do a fresh quick format with only ROMs in the root and see how it goes.

Also, call me crazy, but I wouldn't be doing this if GW didn't have such quirks with occupied clusters, and now, it seems, also file table. ...................also random trivia: FAT Sorter crashes with 1024+ files in the root. XD
 
  • Like
Reactions: WzsEeee and cearp

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,283
Trophies
4
Location
Space
XP
13,838
Country
Norway
When did you last format it and how many files have you moved on and off the root since? The more files you move on and off the root, the slower menu browsing becomes. Though this should only start to become noticeable after 200+ new/deleted files.
I don't normally delete files from it, I've only done so a few times. Probably less than 10.
I guess I should try formatting it, I doubt it will help much but any improvement is good.
 

Searinox

"Dances" with Dragons
OP
Member
Joined
Dec 16, 2007
Messages
2,073
Trophies
1
Age
36
Location
Bucharest
XP
2,203
Country
Romania
If not, you might be having a different issue than I had. How slow are we talking here? My old card fired up the menu in .5 seconds, this one lists them in 1. Before I figured out the cause of this, it would take 2 seconds to show the menu, same amount to scroll back, and 1 to scroll forward.
 

Classicgamer

Well-Known Member
Member
Joined
Aug 20, 2012
Messages
646
Trophies
1
XP
982
Country
United States
I've figured it out and fixed it. Leaving this here for others since I was unable to find anyone else complaining about slow scrolling and it is likely an obscure issue.

First some background:

I do something weird. Fragmentation errors occur when a ROM is fragmented in more than 32 pieces of non-contiguous clusters, or when it occupies the last 2 clusters. For this reason I always do the following:
-I use a very large cluster size(32MB), afterall ROMs are perfectly divisible by this unit and even trimmed there is very little space loss when you only have a few tens of large files
-I create about 2000 1-byte files, each occupying 32MB because that's how clusters work. I assume that on a fresh partition they are allocated sequentially, until I fill up the entire drive. I then take the last 2 files I created and make them read-only, hidden, and system to prevent their deletion since they should be occupying the last 2 clusters making sure no ROMs are written. I then delete the other 2000 files

This last step was screwing GW over. Gateway has a very poor implementation of file seeks for the microSD as evidenced by the fact that you need a third party tool to rearrange files in the menu by modifying the order of their IDs in the partition table. This same poor implementation was screwing me over with my 2000 files routine.

Since I create those files before putting any ROMs on, they probably bump up the first available free entry within the thousands, and kind of like how when you delete files only a flag is changed but the data is left still there, these IDs would persist after deletion until god knows when they'd be replaced by new file entries. Then, even after deletion, any subsequent ROMs put on the card, will have their entries stored at those higher IDs. And my guess is that when GW parses the file list, it doesn't try to read only valid IDs and instead parses the entire list until it gets to the ROMs. I was able to confirm my suspicion by creating another 1000 files, deleting the ROMs, and writing them back again, therefor bumping up this ID even more. And sure enough, the next time I put the microSD in and popped the menu up, it took a full FIVE SECONDS for the ROMs to be listed, and the list was even slower.

So what I did this time around was the following: I created a folder in the root, and inside that folder I ran my 2000 files routine. Locked the last 2 clusters in, deleted the files, then copied the ROMs on the root. And now the microSD was blazing fast. It loaded in half a second and is browsing very fast.

What this means for non-crazy users:

If you have in the past used the microSD to store a lot of files without format, or use it as a multipurpose storing other files alongside ROMs, back up your stuff, reformat, and on the root put ROMs and ONLY ROMs. If necessary, store everything else inside a folder, because repeated creation and deletion of files in the root bumps up the file table entries there a lot and in time adds more and more lag to the ROM menu. Jdbye this one is aimed at you. If you've not formatted before or if you use the card for other things, do a fresh quick format with only ROMs in the root and see how it goes.

Also, call me crazy, but I wouldn't be doing this if GW didn't have such quirks with occupied clusters, and now, it seems, also file table. ...................also random trivia: FAT Sorter crashes with 1024+ files in the root. XD



who does that? good job fixing the problem you created :P
 

Searinox

"Dances" with Dragons
OP
Member
Joined
Dec 16, 2007
Messages
2,073
Trophies
1
Age
36
Location
Bucharest
XP
2,203
Country
Romania
It's hardly normal that when you put ROMs on a storage media that is empty, but some time in the past has had a few thousands of files on its root, causes lag. The files have been deleted, and the card was empty. No OS, not even the NDS era firmwares, had this problem. A medium with hardly 20 files on it should move fast regardless of what was there in the past. It's an obscure issue and if you're not aware that it exists, you'll be left wondering why it happens.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Veho @ Veho: The cybertruck is a death trap.