VOGONS

Common searches


Reply 20 of 26, by Rekrul

User metadata
Rank Member
Rank
Member
Dominus wrote:

- when I wrote the part of OS independence I assumed using Dosbox like Dos where you typically had one drive C:/ where everything got installed to. So "mount c somepath" is all one needs to adjust in the default config. Then have the batch files in somepath/batch and add c:/batch to the PATH environment via main config.
Have all cd-rom images in somepath/images and when you need to imgmount for a game use "imgmount d c:/images/game.iso" in the game.bat.

There are two different factors at work here; The emulated file system and the real host file system.

All of the DOS programs and commands running in DOSBox only know about the emulated file system, and are completely oblivious to the real file system. In other words, if you give the command "mount c C:\DOSGames" and then type the command "dir c:" it will show you the contents of "DOSGames" rather than your real C: drive.

However, the mount and imgmount commands only know about the real file system and are completely oblivious to the emulated one. For example, let's say that you give the command "mount c C:\DOSGames". Then you create a sub-directory in there called "Stuff" so that you have "C:\DOSGames\Stuff". If you were to then type "dir C:\Stuff" in DOSBox, it would show you the contents of the "Stuff" sub-directory. However, if you were to give the command "mount e C:\Stuff", it would not mount that sub-directory as the E: drive. It would look on your ACTUAL C: drive for a directory called "Stuff".

Therein lies the problem. In order to be portable, the batch files can only contain relative paths. In other words, "mount c DOSGames" is portable between different OSs, but "mount c C:\DOSGames" is not, because other OSs don't use letters to designate the drive. So the batch files can only reference sub-directories which are accessible from the current directory. However, the current directory for the mount & imgmount commands can't be set from within DOS, because that's an element of the real file system.

Unless you have some way to designate the directory with all your games as the working directory, all the relative path assignments in the mounts commands will fail.

The problem is compounded if you have the CD images stored elsewhere. For example, let's say that you have;

C:\DOSGames
C:\Images

All of your games are installed in "DOSGames" but all your ISO files are in "Images". If you set the working directory to "DOSGames", there's no way that you can then reference the "Images" directory using only a relative path. You would need to use an absolute path, and then the batch file is no longer portable.

In a normal Windows installation of DOSBox 0.74, the working directory defaults to "C:\Program Files\DOSBox 0.74". Unless you change it, any relative path in the mount commands will be looked for in the DOSBox directory.

This is why I favor putting all the game's files, including the ISO file, into a sub-directory and then calling DOSBox with a Windows BAT file. When the BAT file runs, the working directory is automatically set to whatever directory the BAT file was in. All relative paths then work. It may not be OS portable, but it makes that entire directory portable. I imagine that with slight editing of the BAT file, it would work on other OSs as well.

Don't the Mac and Linux have their own scripting language where you can issue commands like "DOSBox -conf game.conf"?

Reply 21 of 26, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Please don't lecture me about the real and emulated file system in regard to Dosbox. I've been using it for years on Windows and OS X.
I will have to try again but AFAIK dosbox can use both real and emulated file system for mounting images (if the images are indeed on a mounted drive).

Linux and OS X can of course use the command line options of Dosbox. I wrote the AppleScript launcher for multiple conf files that can be found in the Dosbox wiki some years ago.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 23 of 26, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Awesome 😉
Don't mind us discussing the fine points... 😉

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 24 of 26, by Rekrul

User metadata
Rank Member
Rank
Member
Dominus wrote:

I will have to try again but AFAIK dosbox can use both real and emulated file system for mounting images (if the images are indeed on a mounted drive).

Yes, I stand corrected about the imgmount command. If the given path exists on an emulated drive, DOSBox will use it. If it finds a CD image on both a real path and an emulated path, it will use the real one. Also, images on emulated paths must be referenced with their DOS 8.3 names.

However, it doesn't work for the mount command. All paths are treated as real.

Reply 25 of 26, by collector

User metadata
Rank l33t
Rank
l33t

@Rekrul, you may not want to lecture the older members or moderators here on the usage of DOSBox, especially one that has written official DOSBox guides. Most of them are probably far more familiar with the usage of DOSBox than you seem to want to give them credit.

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers

Reply 26 of 26, by RocknRollTim

User metadata
Rank Newbie
Rank
Newbie
Dominus wrote:

Awesome 😉
Don't mind us discussing the fine points... 😉

Not at all Dominus, I like it when forum users collaborate, it helps users like me to understand how DOSBox can be used in order to get DOS applications to run on modern operating systems, I really appreciate what you all do on this forum in order to help users like me. 😀

Many thanks,

RocknRollTim