--->Diese Seite gibts auch in Deutsch.

Optimizing autoexec.bat and config.sys for DOS/Win9x

Here you can find some sample configuration files you can use for a DOS setup in order to run old software properly. Note that there is also a lot of room for specific optimization if you are running DOS programs under win9x as well.

msdos.sys

When running Win9x with DOS 7.0 or later, you should check the following options within msdos.sys:

[Options]
;set to 1 if you have another version of DOS installed on the same partition as Win9x
BootMulti=0

;use this in order to allow booting into plain DOS 7.x command line rather than Win9x
BootGUI=0

;use this to preserve memory unless you use DoubleSpace or DriveSpace drive compression
DblSpace=0
DrvSpace=0

;disable the Win9x boot logo, might be helpful to see information produced during config.sys and autoexec.bat processing
Logo=0

;save some memory, might cause problems on some systems though
LoadTop=1

config.sys

The first example is a simple version. Note that if you use UMBPCI, the memory area used for it might need to be changed depending on your size and location of the graphic BIOS ROM (as well as other ROMs installed) and you should make sure that a 64k page frame remains unused if you want to use EMS. If you use a different version than DOS 7.0, change all occurences c:\windows to your DOS directory instead:

[common]
rem Enable additional config.sys options
SWITCHES=/f

rem Disable automatic loading of DOS drivers by windows since we can do better
DOS=NoAuto

rem Load DOS into upper memory to conserve conventional memory below 640k
DOS=high,umb

rem Reserve some handles and buffers for DOS functions.
rem Larger numbers provide more buffers at the cost of memory,
rem thus you might need to experiment with them a bit if you
rem experience problems with file access
BUFFERSHIGH=40
FILESHIGH=20
FCBSHIGH=1
LASTDRIVEHIGH=m

rem If you can use UMBPCI by Uli Siebers use the following configuration
rem YouŽll also need the QHIMEM driver for getting out the best of it:
DEVICE=c:\drivers\qhmboot.sys
DEVICE=c:\drivers\umbpci.sys /i=e000-efff
DEVICEHIGH=c:\drivers\qhimem.sys /n48

rem If you cannot or do not want to use UMBPCI or QHIMEM, use the standard
rem himem.sys instead:
DEVICE=c:\windows\himem.sys

rem If you are not using the Win9x GUI you might want to run the EMS driver
rem This will also provide UMB memory by using the "ram" option if UMBPCI is not used.
rem Note that this driver is not needed for EMS support while Win9x is running
DEVICEHIGH=c:\windows\emm386.exe ram auto

rem This helper driver is only needed for the Win9x GUI, not for plain DOS:
DEVICEHIGH=c:\windows\ifshlp.sys

rem If you want USB mass storage support under plain DOS, load the USB drivers
rem which can be found on the net:
DEVICEHIGH=c:\drivers\usbaspi.sys /v
DEVICEHIGH=c:\drivers\di1000dd.sys

rem Load a mouse driver if needed
rem Note that Win9x will provide mouse support by its own, thus not needing a mouse driver
rem CuteMouse is recommended due to its low memory footprint and it will load into high memory by default
INSTALL=c:\drivers\ctmouse.exe

rem Load a CDROM driver if necessary
rem Here, QCDROM is used in combination with SHCDX (a MSCDEX replacement) in order
rem to minimize memory usage again
rem Note that Win9x will provide its own driver, thus the following lines are only
rem useful under plain DOS
DEVICEHIGH=c:\drivers\qcdrom.sys /D:mycdrom
INSTALL=c:\drivers\shcdx33a.com /D:mydrom

rem ***insert your soundcard config.sys driver here (if needed)***

The second one bases on the first one and offers a boot menu where you can select between Win9x and various DOS scenarios

[COMMON]
SWITCHES=/f
DOS=NoAuto
DOS=high,umb
BUFFERSHIGH=40
FILESHIGH=20
FCBSHIGH=1
LASTDRIVEHIGH=m

[MENU]
MENUITEM = win, Windows 95
MENUITEM = emm, DOS mit EMM386
MENUITEM = min, DOS nur mit HIMEM
MENUITEM = dos, DOS-Standard mit USB und CDROM
MENUITEM = nix, DOS ohne alles
MENUDEFAULT = win, 10
MENUCOLOR = 7,0

[win]
DEVICE=c:\drivers\qhmboot.sys
DEVICE=c:\drivers\umbpci.sys /i=e000-efff
DEVICEHIGH=c:\drivers\qhimem.sys /n48
DEVICEHIGH=c:\windows\ifshlp.sys

[emm]
DEVICE=c:\drivers\qhmboot.sys
DEVICE=c:\drivers\umbpci.sys /i=e400-efff
DEVICEHIGH=c:\drivers\qhimem.sys /n48
INSTALL=c:\drivers\ctmouse.exe

[min]
DEVICE=c:\drivers\qhmboot.sys
DEVICE=c:\drivers\umbpci.sys /i=d000-efff
DEVICEHIGH=c:\drivers\qhimem.sys /n48
INSTALL=c:\drivers\ctmouse.exe

[dos]
DEVICE=c:\drivers\qhmboot.sys
DEVICE=c:\drivers\umbpci.sys /i=e400-efff
DEVICEHIGH=c:\drivers\qhimem.sys /n48
DEVICEHIGH=c:\windows\emm386.exe ram auto
DEVICEHIGH=c:\drivers\usbaspi.sys /v
DEVICEHIGH=c:\drivers\di1000dd.sys
DEVICEHIGH=c:\drivers\qcdrom.sys /d:mycdrom
INSTALL=c:\drivers\shcdx33a.com /d:mycdrom
INSTALL=c:\drivers\ctmouse.exe

[nix]

[COMMON]
rem ***insert your soundcard config.sys driver here (if needed)***

autoexec.bat

The first example is a simple version. If you use a different version than DOS 7.0, change all occurences c:\windows to your DOS directory instead:

@ECHO OFF

rem Prettify the command prompt:
PROMPT $P$G

rem Optional: Set a compact DIR listing if preferred
SET DIRCMD=/w

rem Set important directories in the search path (extend it as you need)
PATH=c:\windows;c:\windows\command;c:\windows\system\;

rem Set the Win9x temp directory
SET TEMP=c:\windows\temp
SET TMP=c:\windows\temp

rem ***Insert your soundcard autoexec.bat driver here (if needed)***

rem If the soundcard driver does not set it on its own, you might need to set the BLASTER and
rem maybe the ULTRASND variable as well (make sure the settings fit your hardware configuration)
SET ULTRASND=240,7,7,7,7
SET BLASTER=A220 I5 D1 H5 P330 T4

rem Start windows by hand if autostarting it was disabled in msdos.sys
win

The second one bases on the first one and works with the boot menu as shown above:

@ECHO OFF

PROMPT $P$G
SET DIRCMD=/w

PATH=c:\windows;c:\windows\command;c:\windows\system\;

SET TEMP=c:\windows\temp
SET TMP=c:\windows\temp

rem ***Insert optional autoexec.bat drivers needed under both Win9x and plain DOS here***

rem ***Insert your soundcard autoexec.bat driver here (if needed)***

SET ULTRASND=240,7,7,7,7
SET BLASTER=A220 I5 D1 H5 P330 T4

GOTO %CONFIG%

:win

rem ***Insert optional autoexec.bat drivers only needed under Win9x here***

win
GOTO ende

:emm
:min
:nix
:dos

rem ***Insert optional autoexec.bat drivers not needed under Win9x here***

:ende

system.ini

When running DOS programs under Win9x, some options within the system.ini might be useful:

[386Enh]
;Tell Win9x to use the memory between D000 and E000 for an EMS page frame
;Thus, there is no longer the need for EMM386, thus conserving conventional memory
;Make sure the selected memory area is compatible with the one left free by UMBPCI
EMMPageFrame=D000

;Load some parts of Win9x up, this can conserve memory but also cause problems on some machines
LocalLoadHigh=1

;If there are problems with the video BIOS, tell Win9x not to use the memory occupied by it
EMMExclude=C000-CFFF

Links

Mail the Author: webmeister@deinmeister.de

Homepage Programming Win32Asm Downloads Software Hardware Cartoons Sitemap