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

How to avoid Scan Disk when shutdown windows 98 by close content directly?

Open guozanhua opened this issue 1 year ago • 3 comments

When I closed Windows 98, I used an abnormal shutdown method. For example, while playing a Windows 98 game, clicking "Close Content" directly from RetroArch may result in scanning the disk the next time Windows 98 is launched. Is there any way to avoid it?

guozanhua avatar Jul 18 '24 09:07 guozanhua

Start>Run>msconfig, advanced>Disable Scandisk after bad shutdown

Alternatively you can skip the first 700 frames of rendering, which should get past a routine scandisk and immediately have you at a desktop

leilei- avatar Jul 19 '24 09:07 leilei-

Keep in mind pressing "Close Content" when running Windows 98 inside DOSBox is equal to unplugging the power of a real computer running Windows 98. It can cause file system errors (some fixable by ScanDisk and some not).

The core can be configured to discard any changes made to the C: drive. Then "Close Content" is much less likely to cause problems. Though some games or procedures will probably not work if changes to C: are discarded.

schellingb avatar Jul 19 '24 22:07 schellingb

I do not recommend to disable the scandisk, it is a system protection system.

Pure has the option 'Discard' in System/OS Disk Modifications. This freezes the C disk, you can close it as you want. Keeping in mind that if you want to install a new game, you must disable the Discard.

Before activating it, I recommend you to start windows, reboot, close windows and before closing the core, activate the option.

alexb3d avatar Jul 20 '24 04:07 alexb3d

It's possible to do a adhoc discard to system modifications even on the original dosbox if you do Linux tricks, namely using the dosbox autoexec section to copy a (in effect unmodifiable after setup) OS image to /dev/shm (a Linux filesystem that holds a representation of your free memory where you can place or delete files).

Then copy the OS image there and mount and boot that alongside the actual game drive. To auto start games you just have a shortcut that starts on boot that boots a generic bat (start.bat or similar) on another drive, which holds the game. 1 shared OS drive, many games drives, 2 mounts per game.

This has the problem this doesn't prevent your games drive from initiating scandisk in a hard shutdown so it's mostly useless (it's better because not ALL games keep files open in the game dir, unlike the OS tempfile, so it doesn't trigger many times), but that's the only way to have save games or config modifications unfortunately. It's possible to protect the game drive too using a copy on write filesystem, but those still show the scandisk, it's just you can delete the modifications to get back to the original image. And it can be slow the first time if the game drive is large. CoW filesystems are intended for small single files, not huge disk image files and unfortunately dosbox only mounts image files for windows 95\98\xp

If you do this you probably want to use a script that deletes the OS image on shutdown to start dosbox so even closing it doesn't keep 100-600mb of occupied system memory uselessly filled.

i30817 avatar Nov 27 '24 13:11 i30817