Suggestion for DosBox Pure, for easy launch/close of Windows 9X games

With the above, you will be able to launch and close Windows 9X games from the frontend easily and without worrying about properly shutting down Windows at the same time.

2 Likes

What you are asking for does not seem possible to me, because when you install something, there are always changes to the system.

As you know, the only way to shut down the core with Windows active and without damaging it is with ā€˜Discard’. This option only affects the C drive.

If you use this option, the idea is to disable it to install the game or make any changes that affect the system, enable it, and close the core.

As I have some experience with Windows (a little over 30 years), I recommend: - disabling the option -installing the game -restarting windows -closing Windows -activating Discard -closing the core, every time a new game is installed.

To run a task per game…

The easy option, you need to use the D drive, which is unique for each game. Create the task that points to a link in D:GAME.LNK.
With the game installed, create a link to the executable, rename it to GAME.LNK, and move that link to the root of drive D. Do you get the idea?

A more advanced option is a batch file that starts the game when you boot up and closes Windows when you shut down the game.
Leaving us on the ā€œIt’s now safeā€¦ā€ screen. Until it implements ACPI like other emulators.

1 Like

Can i actually place those game specific batch files in the D drive? Right now i have therm inside the windows folder and edit the ā€œwin.iniā€ file in order to run this automatically like this: ā€œrun= game.batā€

But because these are in the C drive, i have to use the CDRIVE option for each game, which means the ā€œdiscardā€ option won’t work with it. But if i could place the batch files in D and point Windows to them, that would solve the issue since i would no longer need the per-content CDRIVE method.

Edit: You were right. I moved the batch file in D:\ (for each game) and told windows to run this file from there. As such, i can use discard changes on C: so i won’t need to shut down Windows normally anymore and the D: drive will have it’s own launch batch for each game.

Thanks :slight_smile:

1 Like

Now having a CDRIVE.sav for each game is still useful because this way you can keep your Windows clean, without each game having to save it’s registry entries there, they are kept in the CDRIVE.sav file.

This also makes it easier to remove games from your collection since you don’t need to uninstall them anymore, just delete the sav files and you are done. So the issue i opened still has it’s usage.

Though some games are portable by nature…

Also, it would be nice if the ā€œdiscardā€ option would also affect the D drive (optionally) for when you jsut want to mess around and not play a game to save your progress. Because the disc check will still engage for the D drive sometimes.

I just made a backup of my freshly installed Win98 on a 4GB virtual disk with the 3DFX drivers.

Using CLI qemu-img resize --shrink after a defrag, that 7z backup is now only 250MB but still working fine so far, defrag and full scandisk are just reinflating the img size back to its full size like no shrink happened.

Here it is if you want to test it, just unzip the img file in \retroarch\system : https://mega.nz/file/GcRHCQRK#tCQ98eMbYxvTfE0ZSkwwXuQapbnZE_AfTMjLnoP1ahI

I tried to freeze the install and use D: for the saves but it’s making installing or modifying new stuff a pita and I dont think the .sav file would save in real time. It’s doing it’s own incremental backup thing, so it’s also far less easier than mounting the img file and copying to export.

Also, some games wont install on D: at all, some noCD cracks wont work if the game is not installed in its default folder, and you’ll still need to unfreeze and clutter your registry anyway.

So I’ll just treat my virtual win98 like a spare clone, I just need to duplicate my backup.

Just had some regcleaner for win98 also preinstalled btw: https://www.majorgeeks.com/files/details/regcleaner.html

Can you post instructions on how to do that? Mine is only 512MB but i would like to try it on other VMs i have for 86box.

I dont think you’ll be able to shrink below 450 MB which was the install size of C:\WINDOWS, but you could try:

https://www.qemu.org/docs/master/tools/qemu-img.html

I had the package already installed here on pop!_OS, although I dont know where it came from.

Command was a simple

qemu-img resize --shrink file.img 600M

And 7zip got it down to 250MB.

You can keep the image file in a 7z archive and still work? Or it’s just your emergency backup?

My Windows 98 installation is 250MB on a 512MB virtual disk. The rest is empty space. The 7z file get at 68MB.

No the core wont load the 7z file you need to unzip it in /retroarch/system

512MB is not a lot for Win98 you wont even install Planescape Torment with that…

I know but since i install every game in it’s own D drive, which is saved in a separate file, i don’t need to fill the main image with anything else other than drivers or some odd utilities here and there.

So far, every game i tried runs well from the D drive. I also don’t use cracks since i prefer loading the isos/cues.

Also here’s a funny thing. I don’t have to unfreeze the main Windows image to install games.

After i install a game on the D drive, the game files are saved there but all registry entries and anything else in C: gets lost. However, the games still run after that, with just the game files on D:.

Which means most games become portable after installation. You could just copy-paste the game files on some other Windows machine and they would still work.

Obviously, not ALL games will work like this but so far, i have around 10 games and all of them work this way.

It’s much better this way. You keep your Windows clean, without anything installed and all you have to do to delete a game is to delete it’s .sav file from the saves folder (which is the game’s D drive).

And you can also keep your main windows image frozen when you play in order to be able to force close the games, without shutting down Windows normally.

I dont think .SAV files are portable. Maybe point me to the relevant documentation about that? For me installing on D: and using the incremental saves was really for freezing the system and limit user in kiosk mode. As for portability and backup, I only had success with the img files.

SAV files generated with ā€œrun installed OSā€ is a very specific system. It’s not as simple as with pure DOS apps. I’ve yet to find a way to open them and extract or transfer files as easily as what DOSBox pure is doing with the .pure.zip files.

My win98 install, latest SE, is already 350MB. With the 3D drivers, Adobe acrobat and the few patch files for the game I was installing, it’s already 450MB and I shrinked my img to 600MB to be safe.

So far for me they work that way. The C drive is untouched (i can confirm that by looking at the last time modified) and the .cav files for each game seems to be the D drive, where i install the game files. I also save the autorun batch files in there, since each game needs it’s own.

I deleted a few games that don’t work by just deleting the .sav file and it works as i described.

This is not recommended, as Windows performs checks and restores modified system files. That’s what autoecex.bat is for, but it can’t be edited manually either.
For these cases, use Start > Run ā€œmsconfig.ā€ In the Autoexec.bat tab, add the command ā€œWIN C:/GAME.LNKā€ or .BAT.

image

If you use a link, you must create a link to the executable, rename it, and move it to D: If you use the batch file, you have to edit the file and write the complete line of the executable.

The thing is, if the game is installed, it always creates registry entries, even if they are minimal.

But this is done (partially) by ā€œSave Difference Per Content.ā€ When the option is activated, the C drive freezes and SAV works like a patch. All changes and registrations can even be installed on C, and when you open another game, there are no traces left behind. Of course, you have to shut down Windows properly.

1 Like

Which ones cannot be installed?

I know, this is how i had my whole setup working before. But now that i can just run the games from their game files, without their registry entries existing, i don’t need the ā€œper contentā€ .CDRIVE.sav files. And without them, i don’t have to shut down Windows normally since the C drive is frozen. So it’s a win-win.

If i stumble on a game that needs it’s registry to work, i can make an override for it to save a CDRIVE sav and only shut down for that specific game.

1 Like

I’m sure it works for you, no doubt and so the thread is a bit moot, yes, but my question was about .SAV file being portable. I dont think they are, nothing in the documentation told me so. In my understanding they’re incremental backups, unusable alone, as is. I dont know how to edit or read them, it’s not as easy as getting everything from /saves on syncthing like the pure.zip files.

IIRC I had issues with Age of Mythology only working on C;, and also the mandatory noCD crack from whatever DRM they used back in the days.

1 Like