VMU free blocks - Free vs Game and defrag curiosities

General Dreamcast discussion applies here. Before posting here please check the other forums in the Dreamcast section to see if your topic would fit better in those categories.

Moderators: pcwzrd13, mazonemayu

Forum rules
Please check the other forums in the Dreamcast section before posting here to see if your topic would fit better in those categories. Example: A new game/homebrew release would go in the New Releases/Homebrew/Emulation section: http://dreamcast-talk.com/forum/viewforum.php?f=5 or if you're having an issue with getting your Dreamcast to work or a game to boot it would go in the Support section: http://dreamcast-talk.com/forum/viewforum.php?f=42
User avatar
edenist
shadow
Posts: 11
Contact:

VMU free blocks - Free vs Game and defrag curiosities

Post#1 » Sun Apr 30, 2023 1:53 am

I've been messing around with my VMUs and looking into the technical specifications. I noticed that in the File management page it lists "Free"
and "Game", with the corresponding blocks free. In a VMU with a fresh filesystem, it lists Free: 200 and Game: 128.

The maximum size of a VMU game is 128 blocks, but I was curious about there being a separate field. As the VMU fills up with game saves, though, the Game field will drop below 128 even if there is more than 128 blocks free.
For example, I had Free: 90, Game: 32 at one stage. This piqued my curiosity.

I couldn't find any discussion about this elsewhere, but based on the fact that the VMU flash storage uses a FAT filesystem [which is nicely documented in various places and explains where the extra 40 blocks come from if enabled], I have assumed that a game install requires a contiguous number of blocks to install to, and thus the value of "32" means there is a section of the FAT storage with 32 blocks free, but other areas are fragmented. Even further, does this 128 blocks perhaps need to be at the very beginning or end of the filesystem? Based on the limited resources of the VMU, having a statically defined address to run code from would make sense.

I've got VMU explorer which of course has a defrag function, but I haven't used it yet. But interestingly, I tried installing the mini game from sonic-adventure 1 with Free: 130 Game: 52, and it did succeed in installing the game. It did take quite a while longer to install than anticipated, which makes me wonder if SA1 [or any other games] perform their own defrag if necessary?

User avatar
BlueCrab
Developer
Posts: 843

Re: VMU free blocks - Free vs Game and defrag curiosities

Post#2 » Sun Apr 30, 2023 6:38 pm

Yes, the game blocks are in one specific part of the filesystem (I believe at the beginning). Game saves usually go at the other end of the storage, and yes, it can get fragmented if you end up deleting saves often.

User avatar
edenist
shadow
Posts: 11
Contact:

Re: VMU free blocks - Free vs Game and defrag curiosities

Post#3 » Tue May 02, 2023 8:06 am

Thanks for confirming that. That make sense, in particular having save blocks start at the end. I'm quite curious now about SA's defrag ability, and wonder if any other games do the same thing or perhaps just the large ones [SA uses the full 128 blocks].
Given some reports of data corruptions with the implementation in VMU explorer I wonder if there are differences in how it is done.

Investigations on that matter shall continue :-)

TapamN
letterbomb
Posts: 149

Re: VMU free blocks - Free vs Game and defrag curiosities

Post#4 » Tue May 02, 2023 4:07 pm

I remember from one time back in 2001, that SA2 does NOT defrag the VMU, and displays an error message if there's not enough contiguous room for Chao Adventure 2.

User avatar
OlivusPrime
dirty sailor
Posts: 177

Re: VMU free blocks - Free vs Game and defrag curiosities

Post#5 » Tue May 02, 2023 6:59 pm

It's funny you should mention this - this evening, I tried defragmenting my VMU through VMU Tool, as I couldn't work out what the "game" blocks on it were being used for and wanted to see if they would clear.

Turns out, it was a bad idea, and I would NOT recommend defragging through VMU Tool. It effectively "offset" all of the saves on the VMU, corrupting some and making others outright disappear.

Luckily, after some fiddling, it seems like my Worms World Party save was the only one that was deleted entirely (the data was there, but no applications on the console could recognise it as a save file), but I haven't yet found out if some of the other remaining files have been adversely affected.

  • Similar Topics
    Replies
    Views
    Last post

Return to “Lounge”

Who is online

Users browsing this forum: Majestic-12 [Bot]