Feature Request, or clarification- Mount archive as a drive
Firstly, I really appreciate the work you're doing here!
In my use case I'm looking to keep the games in archive format untouched, and use a neighbouring
It's possible the ability to mount archives as drives already exists, but if so I've not been able to locate the specific detail need.
Could you please clarify, or consider adding capability?
@schellingb for reference, I'll describe what I'm experiencing currently, that might help identify A) that I'm using poor syntax, in which case I'd love to be guided + the issue closed + I'll back away slowly, B) the core is doing something it shouldn't, C) the core doesn't have the capability at present.
Setup: Windows 10, RetroArch 1.20, DOSBox Pure Core 1.0-preview1
Folder/Files Structure (not actual names):
C:\
GAMES\
game.conf
game.dosz\
gamefoldermain\
gamefoldersub
cdfolder
I have deliberately commented out the later loading lines in game.conf so I can debug the steps prior.
When I load the game.dosz from RetroArch I see it mounts C: as the root location of the archive, without anything in the .conf to tell it to. I validate this by running
C:\>dir
seeing only gamefoldermain in the directory. I thought that should be useful, because then using relative paths (update to DOSBox Pure Dec 2024) I could add to the .conf or type in the CLI:
mount x .\gamefoldermain
mount -u c
remount x c
And we'd be away laughing. However, mount x .\gamefoldermain returns a result:
Directory C:\GAMES\.\gamefoldermain doesn't exist
Not so nice...so it looks like when trying to use relative paths, it looks at the right location, but can't reconcile game.dosz as the .\ level....unless I'm using an incorrect syntax?
Hence why I thought if I can mount game.dosz as a drive, I can work with that instead
To make a drive out of a (emulated) DOS directory, just like in real DOS, you can use the SUBST command. Basically instead of what you wrote above that didn't work (mount+mount -u+remount) you should be able to do this:
remount C X
subst C: X:\GAMEFOLD
C:
So first we swap C: to be X:, then we make C: a substitute for X:\GAMEFOLD, then switch to that C: drive which now should have your files and directories from that. But be aware it can't be named "gamefoldermain" because DOS directory names are limited to 8 characters, so make sure you match your naming with what you see with DIR in the command line. Ideally you would only have 8 character long file and directory names in your game.dosz to avoid confusion.
But honestly, it sounds much easier to just have game.dosz reflect to what you want as the C: drive, then nothing like this would be necessary. But if you need it, REMOUNT and SUBST are there. The SUBST command is a relatively new addition in DOSBox Pure, it was introduced sometime last year, and publicly released for the first time in 1.0-preview1.
Thanks for clarifying. Yeah the generic gamefoldermain etc. labels were just for illustrative purposes. As you mentioned, the actual names are all 8x or less characters.
- Method 1:
Launching the .dosz or .zip directly in RA, with a named .conf beside it. Confirming that
remount c x
subst c: x:\gamefoldermain
and
imgmount d x:\gamefoldermain\cd\game.iso -t cdrom
Does load the game as intended. The subst command works well for this method, and therefore presents an option to launch and work with archives.
- Method 2:
Loading at a level outside the .dosz or .zip e.g. from the neighbouring .conf, or from commands directly in the CLI.
Am I correct in saying that if we aren't loading from the archive in RA, therefore we start outside the archive, it's currently not possible to provide a command to a) mount the archive as a drive, or b) refer to a path within the archive? If so, this method wouldn't be enabled via the subst command method.
You're right, currently you can't mount a .DOSZ as a drive via the command line.
Support for mounting a .ZIP or .DOSZ file with imgmoung as read only would be somewhat simple. It becomes more complicated if we wanted to support storing modifications made to a drive mounted from such an archive. When loading a .DOSZ as the content in RetroArch, it gets mounted as C: and modifications get stored in the RetroArch saves directory with <contentname.pure.zip>.
So let's say we support something like mount C C:\GAMES\game.dosz, it probably would need to store changes into a "game.pure.zip" file so it allows you to mount multiple DOSZ as multiple drives. But what if one mounted the same DOSZ into two drives... Some weird edge cases would need to be dealt with, not sure it's worth adding the complexity really. After all, the recommended/intended way to use DOSBox Pure is without mount/imgmount.