0mhz-net / 0mhz-collection

A curated collection of configurations for individually bootable DOS games for the ao486 core on MiSTer
64 stars 4 forks source link

use a different vhd file for saves #55

Closed onaryc closed 7 months ago

onaryc commented 7 months ago

Perhaps there is already a way to address this pb, but it seems that the saves are done within the game vhd file. Thus, each time the vhd file is updated, the saves are erased. I do not know if it is possible but having a separate vhd for saves, like amigavision with hdf, would allow to solve this pb.

keungk commented 7 months ago

Sometimes the updated vhd is suffixed, or I rename the old vhd and attach it as a secondary hard disk and copy the saves to the primary vhd in DOS after exiting the game.

italiangrandma commented 7 months ago

The easiest way to do this is probably to modify the MGL files of the games that save and mount a secondary "saves" drive. Then, you could figure out where the save file is located and copy it over to the other VHD. You could even write a batch script that automatically copies the save from your main drive over to the saves VHD. I think if you called that batch script after calling your main game EXE, it would autorun after you exit the game? The option that would for sure work is to transfer the saves over to your other VHD before the game starts.

The one problem is, you'd pretty much have to do this on an individual basis, because depending on the game, the location and name of the save file(s) would be different. There'd likely be no "one size fits all" solution.

I think you'd also have to treat it as backup drive as you wouldn't be able to get all games to read their save from the other VHD. So, if a VHD got updated, you'd have to transfer your save file back over to the newer VHD.

emubastard commented 7 months ago

@italiangrandma has pointed out the problem with implementing this. We can't really fix this at this time.