VOGONS


First post, by Zup

User metadata
Rank Oldbie
Rank
Oldbie

I've been installing some old games in Dosbox, and I've found that "mount" is a miracle tool that easily does better job than 0cd and fakecd. But sadly, "mount" needs absolute paths and Dosbox shell can not use environment variables.

Let's talk about Fast Attack (Sierra). To make it work, I've installed the game (it makes a directory C:\FAST with a few .bat files and savegames). On that directory, I made another one (CDROM) with some files from the CDROM. To make it work, I must mount both directories so the proper commands would be:

mount c: d:\games\dosbox
mount d: d:\games\dosbox\fast\cdrom -t cdrom -label FAST_ATTACK

(note that -label prevents me from using "subst", that can use relative paths)

I do the first mount in the [autoexec] section of Dosbox config file, but I like to do the second one on a .bat that launches the game. So my FAST.BAT file contains:

@ECHO OFF 
mount d: d:\games\dosbox\fast\cdrom -t cdrom -label FAST_ATTACK
D:\ROOT\FAST.EXE %1 %2 %3 %4

That doesn't seem very portable (i.e.: I can not copy FAST folder to another Dosbox and make it work without changing the file). It's funny that Dosbox provides an environment variable (%dosboxdir%) that shows the "real" (outside Dosbox) path mounted on C:, but it can't be used.

Some alternatives I'd like to use would be:

mount d: cdrom -t cdrom -label FAST_ATTACK
mount d: .\cdrom -t cdrom -label FAST_ATTACK
mount d: %dosboxdir%\fast\cdrom -t cdrom -label FAST_ATTACK

Note that the last alternative can be used via 4DOS (but you need to have it installed), if you defined such an environment variable.

So I was thinking about making my own version of "mount" (rmount?), that mount relative paths. That tool would

  • Convert that relative paths into real paths.
  • Expand environment variables (checking if that variable refers to a virtual or real path).
  • Execute "mount" with the path obtained and other parameters on command line.

I have two questions about this:

  • Is there any plan to allow "relative" paths into Dosxbox (=making this tool obsolete)?
    • How can I get real paths for mounted drives?
    Thanks in advance.
Last edited by Zup on 2021-06-02, 07:39. Edited 1 time in total.

I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!

Reply 1 of 3, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

relative paths do work, (to current working directory) (mount C .\. for example)
And the SVN supports paths relative to the last loaded configuration file as well (mount -pr)

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 3, by Zup

User metadata
Rank Oldbie
Rank
Oldbie

Sorry, but I made a mess of a post up there... what I meant was "virtual" paths (inside Dosbox), opposed to "real" paths (on the computer HDDs).

An example (trying to make my intentions clearer):

  • I've got Dosbox installed on c:\program files\dosbox.
  • My Dosbox data directory (a.k.a. virtual HDD) is placed at d:\games\dosbox (so it's not relative to dosbox executable).
  • I've mounted that directory in [autoexec] section of dosbox (mount c d:\games\dosbox).
  • I've installed a game (Fast Attack) in c:\fast (virtual path, the actual files would be on d:\games\dosbox\fast).
  • I've copied some files from CDROM to c:\fast\files (again is a virtual path, the real one would be d:\games\dosbox\fast).
  • Every following command will be executed inside Dosbox (using the shell or a .bat file).

So, after being inside Dosbox, placed in the FAST directory, I'd like to do:

  • mount d files -t cdrom -label FAST_ATTACK -> The "files" part should be expanded to a full virtual path (c:\fast\files) and then to a full real path (d:\games\dosbox\fast\files) before being passed to the mount command. The other parameters should be passed without any change.
  • mount d .\files -> Same thing as above. Note that, in this case, subst will work nicely.
  • mount e %temp%\install -> This is a little more complex. %temp% should be readed from Dosbox environment variables (in my Dosbox, it is defined as c:\windows\temp), expanded (so this path is converted to c:\windows\temp\install) and then check if that path exists inside Dosbox. If it does exist, it would be expanded further to d:\games\doxbox\windows\temp\install and passed to mount; if it does not exist, it would be tried to mount without any changes.

So, again, my questions:

  • Is this going to be a feature? I mean, using mount with virtual paths (paths inside Dosbox).
  • Can I get real paths for mounted drives (without resorting to parse mount output)?

Thanks.

I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!