Can you Edit DOSBox Hard Disk Images from the Windows Console?

General information and assistance with DOSBox.

Can you Edit DOSBox Hard Disk Images from the Windows Console?

Postby Magstriker » 2019-9-04 @ 04:30

I apologize if this was asked in the wrong area of this forum or if this question was asked and answered already. Please direct me to the solution or proper place to ask before closing this thread.

I'm currently on Windows 10 Pro 64Bit running DOSBox 0.74-3. I am trying to pass files to and from MS-DOS 6.22 to a folder on the host Windows 10 filesystem for automation and portability in some customizable front-end I'm making.

The idea is to:
copy a game save into a hard disk image,
mount said image when launching DOSBox,
boot into MS-DOS 6.22,
copy the save file from the image into the proper game directory,
run the game,
quit the game,
copy new save file onto the disk image,
quit DOSBox,
copy save file off the disk image to a final location somewhere on the host filesystem.

The problem I am running into is that Windows cannot edit the disk image formats that DOSBox can mount. I can create and edit .ISO files but those cannot be written to by DOSBox. Is there some way, possibly without images at all, to send files in and out of this virtual machine on Windows 10 entirely through the command prompt? I have already figured out the automation once DOSBox starts, but the outside half with disk image manipulation has stumped me. Is there a Windows 10 console-based application that allows me to edit DOSBox's hard disk image files? I know bximage from Bochs can create images but I cannot find an application to mount them in windows, or inject and extract files without mounting the images.

I am assuming MacOS and Linux have built-in tools like "dd" and "mount" to solve this issue, but if they do not could you please tell me how to swap files around on those OS's too?

In summary: Need R/W access to host filesystem (Win10, but also maybe MacOS, & Ubuntu) from DOSBox while running a guest OS.
Magstriker
Newbie
 
Posts: 8
Joined: 2019-8-29 @ 22:28

Re: Can you Edit DOSBox Hard Disk Images from the Windows Console?

Postby jmarsh » 2019-9-04 @ 05:43

Start DOSBox (without booting into MS-DOS), mount the image and the host directory you want to copy files to/from as different drives.
jmarsh
Member
 
Posts: 241
Joined: 2014-1-04 @ 09:17

Re: Can you Edit DOSBox Hard Disk Images from the Windows Console?

Postby Magstriker » 2019-9-04 @ 05:54

Boy am I stupid. Thank you!
Magstriker
Newbie
 
Posts: 8
Joined: 2019-8-29 @ 22:28

Re: Can you Edit DOSBox Hard Disk Images from the Windows Console?

Postby Magstriker » 2019-9-04 @ 07:44

Wait. That works for getting files onto the booted image. How do I get files off the image back onto the host? The only method I can think of is to relaunch DOSBox a second time with a different config file to tell it to copy from instead of copy to the image then quit DOSBox instead of booting MS-DOS 6.22. Can I somehow quit the virtual OS I booted from back to DOSBox's original state with the Z: drive and all that without relaunching the program?
Magstriker
Newbie
 
Posts: 8
Joined: 2019-8-29 @ 22:28

Re: Can you Edit DOSBox Hard Disk Images from the Windows Console?

Postby Magstriker » 2019-9-04 @ 09:35

More Importantly, The DOSBox copy command removes long file names. I can use doslfn once MS-DOS 6.22 is booted but it will not work under vanilla DOSBox outside its guest OS. Is there any way to get vanilla DOSBox to preserve long file names when copying? Are there any DOS programs that can manage this without needing to run under a guest OS?
Magstriker
Newbie
 
Posts: 8
Joined: 2019-8-29 @ 22:28

Re: Can you Edit DOSBox Hard Disk Images from the Windows Console?

Postby collector » 2019-9-04 @ 15:14

Do you really need to boot an image? Doesn't your game run OK in DOSBox without? Have you even tried?
User avatar
collector
l33t
 
Posts: 4378
Joined: 2003-1-15 @ 10:39

Re: Can you Edit DOSBox Hard Disk Images from the Windows Console?

Postby Magstriker » 2019-9-07 @ 03:08

I have tried many times with many methods and my game cannot run under DOSBox natively. It requires an image.
Magstriker
Newbie
 
Posts: 8
Joined: 2019-8-29 @ 22:28


Return to DOSBox General

Who is online

Users browsing this forum: No registered users and 2 guests