Page 1 of 1

DOS. Games can't write to files (save game/save sound settings etc)

Posted: Sun Jan 08, 2023 3:37 pm
by ritchie_singer

Greetings!

I've create a VHD (using VirtualBox or Windows 10 inbox tool), install MS DOS 6.22 and required drivers on it. Everything looks fine.

After that I've copied some games on VHD and try to play. And I found that games can't write to files - can't save games (some games crashes with errors of open files or files are damaged, some games just freeze), can't save sound settings (setsound.exe etc) with similar error descriptions and crashes.

Meanwhile I can create/edit/delete any file myself.And these games works perfectly in dosbox without any errors.

Most likely this is not the ao486 problem, cause same errors I get while try to run the same VHD on VirtualBox machine, but I can't find solution in google (even can't find similar problem). Maybe someone here knows what I'm doing wrong?


Re: DOS. Games can't write to files (save game/save sound settings etc)

Posted: Tue Jan 10, 2023 1:12 am
by Newsdee

Perhaps the files are flagged as read only in the drive?


Re: DOS. Games can't write to files (save game/save sound settings etc)

Posted: Tue Jan 10, 2023 1:18 am
by Malor

Yeah, that sounds like you might have the read-only bit set on some or all of the files. If you go into the game directory, typing:

Code: Select all

attrib -r *.*

should remove that flag from all the files there. If there are subdirectories, I think you have to go into each one and do that. I don't think it will recurse through directories, but I haven't really tested that.


Re: DOS. Games can't write to files (save game/save sound settings etc)

Posted: Tue Jan 10, 2023 6:57 pm
by ritchie_singer

Thanks a lot! It works! :D
I don't know when files get readonly attr, perhaps when I create a cd image to copy them to vhd.


Re: DOS. Games can't write to files (save game/save sound settings etc)

Posted: Tue Jan 10, 2023 11:21 pm
by Malor

I vaguely remember that being a little weird. It wouldn't shock me if an ISO image lists all the files with the readonly bit set, and then copy perhaps preserves that bit.

You might find it easier to use the 'shared' directory. You run the misterfs program under DOS with the drive letter you want, and suddenly your /games/AO486/shared directory becomes that drive letter. You can load that up from another OS, and then copy into your VHDs. That's likely to fix the read-only problem in the future.