First post, by Kronuz
- Rank
- Member
I believe DOSBox has a problem on the way mounted stuff is mounted and how it works. This is my attempt to improve the mount command syntax, and this is only a request for comments about a new DOSBox mount command syntax.
The idea behind the new command is to get rid of the imgmount command and to standardize the current mount; also, I want to make the command more flexible and powerful. There are some major changes in this new syntax and the changes also include new features. One of the new things in this command is the possibility of mounting zipped files (using the PhysFS library) and also the possibility of mounting not only to new drives, but also, in some cases, to folders inside already mounted drives. Another change I'm suggesting, and this is not only for the mount command, is the addition of a way to differentiate and refer to real physical directories and files vs. DOSBox folders and files. I propose references to real files and directories start with symbol '!'; this way '!c:\DOSBox' would refer to the real directory in the drive C:, '!~/dosbox' would refer to the dosbox directory inside the user's home directory, but 'C:\DOSBOX' would refer to the virtual DOSBox folder 'C:\DOSBOX' spawned during the mounting of the drive C. The last great change/improvement over the current mounting commands is that I'm suggesting to be able to unmount anything that the user has mounted (images, zips, drives, anything!).
Without any further delays, let me propose the first version of my suggested new syntax. Please be free to criticize any part of the syntax proposing ways to improve it. Also, if you have a suggestion to add a new feature, please don't hesitate and post your comments.
mount <channel|drive[:[directory]]> <[!]source[path][:filesystem][:media]> ...
[-t type[(<size|geometry>)]] [-l label]
mount -u <channel|drive[:[directory]]>
channel or drive
ATA Channel or disk drive on which the mount is taking place.
If an ATA channel is being specified, only one source,
and must be an image, can exist in the sources list.
directory
Mounting point in the drive.
The mounting point will be root ('\') by default.
!
If the source begins with '!', it is considered a real file or path; otherwise,
it's considered to be a DOSBox file or path inside a mounted drive in DOSBox.
source
Sources list, it's a list of folders, zips and/or images to be mounted.
If the first source in the list is a writable folder; all writes will go to
that folder, read-only access is granted otherwise. Source can be either
a local DOSBox or a real (if starts with '!'):
folder: Folder path.
zip: Compressed file.
image: Image file.
path
If specified, path states the directory inside the file or image that will
be mounted. This path can use either the '/' or '\' directory separator,
but must start with either one of them. Ex. /games/samnmax or \games/kyrandia
filesystem
If specified, states the filesystem used for the file to be mounted. If the
source is not a file, filesystem is ignored. If filesystem is not specified,
DOSBox attempts to guess it from the file format and the mount type.
iso: Specifies the ISO 9660 CD-ROM format.
zip: Specifies a zipped file.
fat: Specifies that the image uses the FAT file system. DOSBox will
attempt to mount this image as a drive in DOSBox and make the files
available from inside DOSBox
none: DOSBox will make no attempt to read the file system on the disk.
This is useful if you need to format it or if you want to boot
the disk using the BOOT command. When using the "none"
filesystem, you must specify the drive channel number (2 or 3,
where 2 = master, 3 = slave) rather than a drive letter.
For example, to mount a 70MB image as the slave drive device,
you would type:
mount 3 !d:\test.img:none:hdd(142,16,63,512)
Compare this with a mount to read the drive in DOSBox:
mount e: !d:\test.img:hdd(142,16,63,512)
media
Media type of the source, ignored if the source is not an image. If media is not
specified, DOSBox will try to automatically identify the geometry from the image.
cdrom The geometry is automatic and set for this size.
This can be an iso or a cue/bin.
floppy DOSBox will automatically identify the disk geometry from the
image size ( 360K, 1.2MB, 720K, 1.44MB, etc).
hdd(c,h,s,b) The geometry is specified:
c = cylinders
h = heads
s = sectors/track
b = bytes/sector
-l or --label
label
Specifies or changes the label of the given drive
-t or --type
type
Type of the mounted drive.
floppy: Specifies a Floppy Drive.
cdrom: Specifies a CD-ROM Drive (making MSCDEX available for it.)
dir: Specifies a regular directory (this is the default.)
size
The total size of the new mounted channel or drive; it's in bytes by default,
but other units can be specified: KB, MB if specified. Ex. 720KB, 7MB.
geometry
The geometry of the new mounted channel of drive, in case it needs to be
override. Specified as (c,h,s,b):
c = cylinders
h = heads
s = sectors/track
b = bytes/sector
Examples:
1. To mount a DOSBox folder in the drive D: as a CD-ROM:
mount d e:\ -t cdrom
2. To mount the real directory 'c:\DOSBox\floppy' as a floppy in drive A:
mount a !c:\DOSBox\floppy -t floppy
3. To mount the real directory 'c:\DOSBox\c' as drive C: with the label DOSBOX:
mount c !c:\DOSBox\c -label DOSBOX
4. To mount the real directory in 'f:\prince' inside the DOSBox directory
'c:\games\prince' (drive is created if it doesn't exist yet):
mount c:\games\prince !f:\prince
5: To mount the zipped game in the DOSBox file 'c:\zips\dott.zip' inside the
DOSBox directory 'c:\games\dott' (drive is created if it doesn't exist yet):
mount c:\games\dott !c:\DOSBox\Writes\dott c:\zips\dott.zip
6. To mount a CD-ROM image in the drive D: forcing the SOME_LABEL label:
mount d image.iso -label SOME_LABEL -t cdrom
7. To mount a drive of 800 MB (simple version):
mount c !d:\ -t hdd(800)
8. To mount a drive of 800 MB (experts only, full control):
mount c d:\ -size 800,16,128,512
Note how I'm calling "folder" to the folders inside a mounted drive in DOSBox and directories to the directories in the real physical file system. This is just a convention I decided to use to make it easy to distinguish between the two concepts.
Kronuz
"Time is of the essence"