(Flycast) Free space from memory card (VMU) while in-game

This is a weird one, let me give some context. I started playing Skies of Arcadia for the Dreamcast (Flycast), and when I tried to start a new game it told me that I didn’t have enough free blocks on the VMU (memory card) so it wouldn’t be able to save. No problem, I thought. I’m just going to use save states and free some space from the memory card tomorrow.

What I didn’t know at the time was that save states would also encompass the contents of the memory card, which makes sense when you think about it… but now I’m in a pickle were I can only use save states from now on. And while I’m sure that I can finish the game using only save states, I wondered I I couldn’t find a way to free some blocks within the snapshot itself.

A quick look at the save state file shows RZIP in the header, some sort of compression it seems. A search on this forum came up with bad news it seems: Savestate and savefile compression on older files

The other option is trying to change the process memory on the fly, which seems to work but I haven’t got the tech details down. For example, I can use Cheat Engine and remove save files from the memory card, but since I’m removing only the indexing to the save file, it never actually recovers the used space, This is where I’m at.

I know this is a non-issue most of the time, especially seeing how Flycast has a per-game VMU option, which is awesome and I wish I had enabled before starting the game, but at this point I’m really trying to see if this is actually something that I could pull-off. Would be great to have someone throwing some suggestions on how to actually make the system reclaim or update the free space to be able to load the save state, change the memory, save to VMU memory.

It was feasible after all, and not very difficult (in hindsight).

I did a short video showing the process, shown below.

1 Like

After posting the last video I realized that the issue that it fixed didn’t account for locked save files, those which are copy-protected and can’t be moved to another VMU.

While the first demonstration didn’t necessarily require the save file to be copied, it did leave a mess inside the VMU from freeing blocks in use, and this mess was efficiently solved by copying the important data to a 2nd VMU, formatting the 1st VMU and finally moving the data back.

So I checked how this was possible and recorded the short video below.

NOTE: At one point I boot a game and get back to the BIOS immediately afterwards, this is because changing the VMU memory on the fly doesn’t really change how the BIOS has already interpreted the VMU data, so the only purpose of that was to refresh what the BIOS is seeing.