dosbox-pure icon indicating copy to clipboard operation
dosbox-pure copied to clipboard

DOSBOX Pure changing name of .sav file when game ZIP file contents are changed (Win98)

Open greenchili2 opened this issue 3 years ago • 3 comments
trafficstars

Hello. First off I want to say thanks for creating such a great product. Dosbox Pure makes PC gaming so much easier..

I've been testing and installing various Windows based games and for the most part things work pretty well. However occasionally I like to add stuff to the original game ZIP ( documentation, my own notes, etc ). Sometimes I don't want to add a 2nd or 3rd CD until I'm sure the game actually runs decent in my configuration. But when I do add/change stuff DOSBOX Pure decides to change the name of the .SAV file by appending some type of CRC to it? Also in some cases I'd like to be able to just do a full install of a game and then remove the disc image from the original game ZIP in order to save space on my drives.

As a result windows is unable to find the original install to the D: drive because it has changed. In one case I was unable to "re-install" a game ( Test Drive 4 ) because it could not find the associated .uninst file. I had to go into the registry and delete the "Test Drive 4" entry to correct the issue.

I also I've tried removing all save and config files for the above said game to get it to reset the name back to just "Test Drive 4".. but it insists on appending the CRC to the name. I'm not sure where dosboxpure is storing the data to keep track of these things but it is making things a little difficult to do.

I'm also worried this will inhibit my ability to transport some of these games to other systems that I have retroarch running on.

greenchili2 avatar Aug 19 '22 07:08 greenchili2

Hi there! First you need to understand how DOSBox Pure is able to get the contents of a .ZIP file to the D: drive of Windows and how it is able to keep changes made there.

So it simulates a hard drive with one partition with a FAT32 (or FAT16) file system that has the same structure as the loaded ZIP file. Now the OS is free to do anything with this simulated hard drive. It might do something simple like modify a file without changing its size. Or it might do something crazy like shuffling all the files around by running defrag or even formatting the drive with a different file system. When the emulator is shut down and started again, the changes need to be exactly the same otherwise the OS could get confused. This is especially true if using save states.

So that's why for booting into an installed OS, the modifications made to the D: drive are stored into an opaque .sav file which contains all the raw hard drive sectors that were modified by the OS. The emulator doesn't really know what these changes are it just knows they are modifications done from the starting point that is the simulated hard drive it made from exactly that ZIP file that was loaded. Now if the ZIP file were to change, the layout of the simulated hard drive would also change and thus the differences in that .sav file don't apply anymore. And that's why there is a CRC at the end of it and no way around the behavior you're seeing...

If you have any ideas or suggestions that would lead to a better experience I'm certainly open to hearing them because I understand it's not great as it is currently. Maybe a tool that takes an original <GAME>.ZIP, one of the <GAME>-<CRC>.SAV and merge them into a new .ZIP file? Though I'm not sure where such a tool would exist... somewhere in a menu? External and thus not available on all platforms RetroArch exist?

schellingb avatar Aug 19 '22 16:08 schellingb

Yeah it sounds like a bit of a pickle now that you explain what it is doing. I was just trying to figure out a way to do an install and then create a no CD image needed install. I do this a lot with DOS games because it is easy and saves on space overall for sure. Then I can stash the original CD images elsewhere.

I'm just wondering why it still creates a CRC if I remove all of the SAV, ZIP and config files from the retroarch systems folders. I guess for now I'll just create a fake name until I get the install process down and THEN do it with the name I prefer.

But we certainly don't want to mess up the savestates! A tool sounds like a possibility but running it from within retroarch may be clumsy and ultimately may create more head aches of people reporting issues because they mis used the tool.

Is there some other place I can ask some questions? Or is here fine? I dug up a mouse to joystick, key to joystick driver ( PPJOY ) which I use for games that insist on using only the joystick ( cough * Star Wars X-wing * cough * ). I was wondering if there is a possibility that Joystick support will some day make it in there. I would think that if the emulator is simulating certain joysticks it would be possible. But then again I could be waaaay wrong.

Thank you

greenchili2 avatar Aug 20 '22 08:08 greenchili2

Are there any message forums or something I can reach you at.. or at least somewhere I can post dosboxpure specific questions and get some help?

Basically what I have been finding lately is a lot of Windows 98 games have protection. Now I suspect if I dump my original images in the proper format that dosboxpure can "emulate" that protection? If that is the case what disc software is the best to use? Clone CD, Neo, Alcohol 120%? I've been kind of lazy and using ISO Buster. But I don't think it grabs all of the protection data.

I have several original CD's for PC games that I picked up over the years that I can use for testing.

Thanks

greenchili2 avatar Dec 21 '22 10:12 greenchili2