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

ritchie_singer
Posts: 2
Joined: Sun Jan 08, 2023 3:36 pm
Has thanked: 3 times

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

Unread post 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?

User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

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

Unread post by Newsdee »

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

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

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

Unread post 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.

ritchie_singer
Posts: 2
Joined: Sun Jan 08, 2023 3:36 pm
Has thanked: 3 times

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

Unread post 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.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

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

Unread post 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.

Post Reply