Monday, October 20, 2008

DOSBox v0.72 - Internal Programs

DOSBox supports most of the DOS commands found in command.com.
To get a list of the internal commands type "HELP" at the prompt.
In addition, the following commands are available:
MOUNT "Emulated Drive letter" "Real Drive or Directory"
[-t type] [-aspi] [-ioctl] [-noioctl] [-usecd number] [-size drivesize]
[-label drivelabel] [-freesize size_in_mb]
[-freesize size_in_kb (floppies)]
MOUNT -cd
MOUNT -u "Emulated Drive letter"
Program to mount local directories as drives inside DOSBox.
"Emulated Drive letter"
The driveletter inside DOSBox (eg. C).
"Real Drive letter (usually for CD-ROMs in Windows) or Directory"
The local directory you want accessible inside DOSBox.
-t type
Type of the mounted directory. Supported are: dir (default),
floppy, cdrom.
-size drivesize
Sets the size of the drive, where drivesize is of the form
"bps,spc,tcl,fcl":
bps: bytes per sector, by default 512 for regular drives and
2048 for CD-ROM drives
spc: sectors per cluster, usually between 1 and 127
tcl: total clusters, between 1 and 65534
fcl: total free clusters, between 1 and tcl
-freesize size_in_mb size_in_kb
Sets the amount of free space available on a drive in megabytes
(regular drives) or kilobytes (floppy drives).
This is a simpler version of -size.
-label drivelabel
Sets the name of the drive to "drivelabel". Needed on some
systems if the cd label isn't read correctly. Useful when a
program can't find its CD-ROM. If you don't specify a label and no
lowlevel support is selected (that is omitting the -usecd # and/or
-aspi parameters or specifying -noioctl):
For win32: label is extracted from "Real Drive".
For Linux: label is set to NO_LABEL.
If you do specify a label, this label will be kept as long as the drive
is mounted. It will not be updated !!
-aspi
Forces use of the aspi layer. Only valid if mounting a CD-ROM under
Windows systems with an ASPI-Layer.
-ioctl
Forces use of ioctl commands. Only valid if mounting a CD-ROM under
a Windows OS which support them (Win2000/XP/NT).
-noioctl
Forces use of the SDL CD-ROM layer. Valid on all systems.
-usecd number
Forces use of SDL CD-ROM support for drive number.
Number can be found by -cd. Valid on all systems.
-cd
Displays all detected CD-ROM drives and their numbers. Use with -usecd.
-u
Removes the mount. Doesn't work for Z:\.
Note: It's possible to mount a local directory as CD-ROM drive.
Hardware support is then missing.
Basically MOUNT allows you to connect real hardware to DOSBox's emulated PC.
So MOUNT C C:\GAMES tells DOSBox to use your C:\GAMES directory as drive C:
in DOSBox. It also allows you to change the drive's letter identification
for programs that demand specific drive letters.

For example: Touche: Adventures of The Fifth Musketeer must be run on your C:
drive. Using DOSBox and its mount command, you can trick the game into
believing it is on the C drive, while you can still place it where you
like. For example, if the game is in D:\OLDGAMES\TOUCHE, the command
MOUNT C D:\OLDGAMES will allow you to run Touche from the D drive.
Mounting your entire C drive with MOUNT C C:\ is NOT recommended! The same
is true for mounting the root of any other drive, except for CD-ROMs (due to
their read-only nature). Otherwise if you or DOSBox make a mistake you may
loose all your files.
It is recommended to put all your applications/games into a subdirectory
and mount that.
General MOUNT Examples:
1. To mount c:\DirX as a floppy :
mount a c:\DirX -t floppy
2. To mount system CD-ROM drive E as CD-ROM drive D in DOSBox:
mount d e:\ -t cdrom
3. To mount system CD-ROM drive at mountpoint /media/cdrom as CD-ROM drive D
in DOSBox:
mount d /media/cdrom -t cdrom -usecd 0
4. To mount a drive with ~870 mb free diskspace (simple version):
mount c d:\ -freesize 870
5. To mount a drive with ~870 mb free diskspace (experts only, full control):
mount c d:\ -size 512,127,16513,13500
6. To mount /home/user/dirY as drive C in DOSBox:
mount c /home/user/dirY
7. To mount the directory where DOSBox was started as D in DOSBox:
mount d .
MEM
Program to display the amount of free memory.
CONFIG -writeconf localfile
CONFIG -writelang localfile
CONFIG -set "section property=value"
CONFIG -get "section property"
CONFIG can be used to change or query various settings of DOSBox
during runtime. It can save the current settings and language strings to
disk. Information about all possible sections and properties can
be found in section 11 (The Config File).
-writeconf localfile
Write the current configuration settings to file. "localfile" is
located on the local drive, not a mounted drive in DOSBox.
The configuration file controls various settings of DOSBox:
the amount of emulated memory, the emulated soundcards and many more
things. It allows access to AUTOEXEC.BAT as well.
See section 11 (The Config File) for more information.
-writelang localfile
Write the current language settings to file. "localfile" is
located on the local drive, not a mounted drive in DOSBox.
The language file controls all visible output of the internal commands
and the internal DOS.
-set "section property=value"
CONFIG will attempt to set the property to new value. At this moment
CONFIG can not report whether the command succeeded or not.
-get "section property"
The current value of the property is reported and stored in the
environment variable %CONFIG%. This can be used to store the value
when using batch files.
Both "-set" and "-get" work from batch files and can be used to set up your
own preferences for each game.

Examples:
1. To create a configfile in your current directory:
config -writeconf dosbox.conf
2. To set the cpu cycles to 10000:
config -set "cpu cycles=10000"
3. To turn ems memory emulation off:
config -set "dos ems=off"
4. To check which cpu core is being used.
config -get "cpu core"
LOADFIX [-size] [program] [program-parameters]
LOADFIX -f
Program to reduce the amount of memory available. Useful for old programs
which don't expect much memory to be free.
-size
number of kilobytes to "eat up", default = 64kb

-f
frees all previously allocated memory

Examples:
1. To start mm2.exe and allocate 64kb memory
(mm2 will have 64 kb less available) :
loadfix mm2
2. To start mm2.exe and allocate 32kb memory :
loadfix -32 mm2
3. To free previous allocated memory :
loadfix -f
RESCAN
Make DOSBox reread the directory structure. Useful if you changed something
on a mounted drive outside of DOSBox. (CTRL - F4 does this as well!)

MIXER
Makes DOSBox display its current volume settings.
Here's how you can change them:

mixer channel left:right [/NOSHOW] [/LISTMIDI]

channel
Can be one of the following: MASTER, DISNEY, SPKR, GUS, SB, FM.

left:right
The volume levels in percentages. If you put a D in front it will be
in decibel (example mixer gus d-10).

/NOSHOW
Prevents DOSBox from showing the result if you set one
of the volume levels.
/LISTMIDI
Lists the available midi devices on your PC (Windows). To select a
device other than the Windows default midi-mapper, add a line
'config=id' to the [midi] section in the configuration file, where
'id' is the number for the device as listed by LISTMIDI.
IMGMOUNT
A utility to mount disk images and CD-ROM images in DOSBox.

IMGMOUNT DRIVE [imagefile] -t [image_type] -fs [image_format]
-size [sectorsbytesize, sectorsperhead, heads, cylinders]
imagefile
Location of the image files to mount in DOSBox. The location can
be on a mounted drive inside DOSBox, or on your real disk. It is
possible to mount CD-ROM images (ISOs or CUE/BIN) as well, if you
need CD swapping capabilities specify all images in succession.
The CDs can be swapped with CTRL-F4 at any time.

-t
The following are valid image types:
floppy: Specifies a floppy image or images. DOSBox will automatically
identify the disk geometry ( 360K, 1.2MB, 720K, 1.44MB, etc).
iso: Specifies a CD-ROM iso image. The geometry is automatic and
set for this size. This can be an iso or a cue/bin.
hdd: Specifies a harddrive image. The proper CHS geometry
must be set for this to work.
-fs
The following are valid file system formats:
iso: Specifies the ISO 9660 CD-ROM format.
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 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:
"imgmount 3 d:\test.img -size 512,63,16,142 -fs none"
(without the quotes) Compare this with a mount to read the
drive in DOSBox, which would read as:
"imgmount e: d:\test.img -size 512,63,16,142"
-size
The Cylinders, Heads and Sectors specification of the drive.
Required to mount hard drive images.

An example how to mount CD-ROM images:
1a. mount c /tmp
1b. imgmount d c:\myiso.iso -t iso
or (which also works):
2. imgmount d /tmp/myiso.iso -t iso
BOOT
Boot will start floppy images or hard disk images independent of the
operating system emulation offered by DOSBox. This will allow you to
play booter floppies or boot other operating systems inside DOSBox.
If the target emulated system is PCjr (machine=pcjr) the boot command
can be used to load PCjr cartridges (.jrc).
BOOT [diskimg1.img diskimg2.img .. diskimgN.img] [-l driveletter]
BOOT [cart.jrc] (PCjr only)
diskimgN.img
This can be any number of floppy disk images one wants mounted after
DOSBox boots the specified drive letter.
To swap between images, hit CTRL-F4 to change from the current disk
to the next disk in the list. The list will loop back from the last
disk image to the beginning.
[-l driveletter]
This parameter allows you to specify the drive to boot from.
The default is the A drive, the floppy drive. You can also boot
a hard drive image mounted as master by specifying "-l C"
without the quotes, or the drive as slave by specifying "-l D"

cart.jrc (PCjr only)
When emulation of a PCjr is enabled, cartridges can be loaded with
the BOOT command. Support is still limited.
IPX
You need to enable IPX networking in the configuration file of DOSBox.
All of the IPX networking is managed through the internal DOSBox program
IPXNET. For help on the IPX networking from inside DOSBox, type
"IPXNET HELP" (without quotes) and the program will list the commands
and relevant documentation.
With regard to actually setting up a network, one system needs to be
the server. To set this up, type "IPXNET STARTSERVER" (without the quotes)
in a DOSBox session. The server DOSBox session will
automatically add itself to the virtual IPX network. For every
additional computer that should be part of the virtual IPX network,
you'll need to type "IPXNET CONNECT ".
For example, if your server is at bob.dosbox.com,
you would type "IPXNET CONNECT bob.dosbox.com" on every non-server system.

To play games that need Netbios a file named NETBIOS.EXE from Novell is
needed. Establish the IPX connection as explained above, then run
"netbios.exe".
The following is an IPXNET command reference:
IPXNET CONNECT
IPXNET CONNECT opens a connection to an IPX tunnelling server
running on another DOSBox session. The "address" parameter specifies
the IP address or host name of the server computer. You can also
specify the UDP port to use. By default IPXNET uses port 213 - the
assigned IANA port for IPX tunnelling - for its connection.
The syntax for IPXNET CONNECT is:
IPXNET CONNECT address
IPXNET DISCONNECT
IPXNET DISCONNECT closes the connection to the IPX tunnelling server.
The syntax for IPXNET DISCONNECT is:
IPXNET DISCONNECT
IPXNET STARTSERVER
IPXNET STARTSERVER starts an IPX tunnelling server on this DOSBox
session. By default, the server will accept connections on UDP port
213, though this can be changed. Once the server is started, DOSBox
will automatically start a client connection to the IPX tunnelling server.
The syntax for IPXNET STARTSERVER is:
IPXNET STARTSERVER
If the server is behind a router, UDP port needs to be forwarded
to that computer.
On Linux/Unix-based systems port numbers smaller than 1023 can only be
used with root privileges. Use ports greater than 1023 on those systems.
IPXNET STOPSERVER
IPXNET STOPSERVER stops the IPX tunnelling server running on this DOSBox
session. Care should be taken to ensure that all other connections have
terminated as well, since stopping the server may cause lockups on other
machines that are still using the IPX tunnelling server.
The syntax for IPXNET STOPSERVER is:
IPXNET STOPSERVER
IPXNET PING
IPXNET PING broadcasts a ping request through the IPX tunnelled network.
In response, all other connected computers will respond to the ping
and report the time it took to receive and send the ping message.
The syntax for IPXNET PING is:
IPXNET PING
IPXNET STATUS
IPXNET STATUS reports the current state of this DOSBox session's
IPX tunnelling network. For a list of all computers connected to the
network use the IPXNET PING command.
The syntax for IPXNET STATUS is:
IPXNET STATUS
KEYB [languagecode [codepage [codepagefile]]]
Change the keyboard layout. For detailed information about keyboard
layouts please see Section 7.
[languagecode] is a string consisting of two (in special cases more)
characters, examples are GK (Greece) or IT (Italy). It specifies
the keyboard layout to be used.
[codepage] is the number of the codepage to be used. The keyboard layout
has to provide support for the specified codepage, otherwise the layout
loading will fail.
If no codepage is specified, an appropriate codepage for the requested
layout is chosen automatically.
[codepagefile] can be used to load codepages that are yet not compiled
into DOSBox. This is only needed when DOSBox does not find the codepage.
Examples:
1) To load the german keyboard layout (automatically uses codepage 858):
keyb gr
2) To load the russian keyboard layout with codepage 866:
keyb ru 866
In order to type russian characters press ALT+RIGHT-SHIFT.
3) To load the french keyboard layout with codepage 850 (where the
codepage is defined in EGACPI.DAT):
keyb fr 850 EGACPI.DAT
4) To load codepage 858 (without a keyboard layout):
keyb none 858
This can be used to change the codepage for the freedos keyb2 utility.
For more information use the /? command line switch with the programs.

No comments: