http://crest.untergrund.net/
home | news | scene | reports | diskmag pack | new zealand | down | links | about

dosbox tips & tricks

how to run classic dos demos

—

there are several things that you will need for running classic dos demos (classic means mostly demos from the early and mid 90s). for the hardware you will need a pc with at least 2 isa slots and in the ideal case a gravis ultrasound (gus) and a sb16 card (both isa because it's really a mess to make pci soundcards work under dos). the gus should have at least 1 mb ram and is a must because it was a standard in the demoscene for several years and especially with many intros you won't have sound without a gus. together with the sb16 you will have sound in a decent quality in nearly every demo or intro. most demos are running with modern nvidia or ati graphics adapters (don't use voodoo cards because they don't support some often used video modes properly). it seems that ati radeon cards have a better vesa bios, i can run some more dos demos since i have a radeon 9000. old pci cards like the et6000 or s3 trio64 are also nice for watching dos demos and you can make use of univbe aka scitech display doctor (a software which provides not directly from the graphics adapter supported video modes).

the used dos should be msdos 6.2x or 7.1 (especially when you want to access fat32 partitions within dos), the following is my used config.sys and autoexec.bat (msdos 7.1).

config.sys:
SHELL=C:\NDOS.COM @C:\DOS\NORTON\NDOS.INI /P
COUNTRY=049,,C:\DOS\COUNTRY.SYS
FILES=70
BUFFERS=20
FCBS=1,0
STACKS=0,0
[Menu]
menuitem=Himem+UMBPCI, Himem/UMBPCI mit CD & Maus (628K)
menuitem=LessMemory, Himem ohne ANSI/Maus (609K)
menuitem=EMM386+CDROM, Himem/EMM386 mit CD & Maus (623K)
[Himem+UMBPCI]
DEVICE=C:\DOS\HIMEM.SYS /NUMHANDLES=66 /TESTMEM:OFF
DEVICE=C:\DOS\UMBPCI.SYS /I=E000-EFFF
DEVICEHIGH=C:\DOS\CDROM.SYS /D:MSCD000
DEVICEHIGH=C:\DOS\ANSI.SYS
LASTDRIVE=G
DOS=HIGH,UMB
[LessMemory]
DEVICE=C:\DOS\HIMEM.SYS /NUMHANDLES=66 /TESTMEM:OFF
LASTDRIVE=G
DOS=HIGH
[EMM386+CDROM]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE RAM MIN=32768 X=B000-B7FF D=64
DEVICEHIGH=C:\DOS\CDROM.SYS /D:MSCD000
DEVICEHIGH=C:\DOS\ANSI.SYS
LASTDRIVE=G
DOS=HIGH,UMB

the used ansi driver needs just a bit more than 2 kb, the universal atapi cdrom driver less than 5 kb. i'm using ndos as command.com replacement, but 4dos has the same features. normally i'm using the 'himem+umbpci' or the 'emm386+cdrom' configuration. i'm now working with the great tool UMBPCI (homepage) which provides upper memory blocks without using emm386 on more modern hardware (586 and above). it's chipset dependent, so read the documentation and watch for updates! the used settings in the himem.sys and emm386 lines are just covering the special needs by some demos (same with files=70). the 'LessMemory' configuration is only for the case that a demo isn't expecting that much free conventional memory and refuses to run stable (or at all).

autoexec.bat:
@ECHO OFF
SET INTERWAVE=C:\ULTRASND\IW.INI
SET IWDIR=C:\ULTRASND
SET ULTRASND=240,5,7,11,11
C:\ULTRASND\IWINIT.EXE
SET ULTRADIR=C:\ULTRASND
SET BLASTER=A220 I7 D1 H5 P330 T6
SET SOUND=C:\SB16
SET MIDI=SYNTH:1 MAP:E
C:\SB16\SBMIXER -d -g30 -c20 -b10 -q
SET PATH=C:\;C:\DOS;C:\ULTRASND;C:\DOS\NORTON;E:\FILES\PCPACK
SET NU=C:\DOS\NORTON
SET DIRCMD=/P
SET TEMP=E:\
goto %config%
:Himem+UMBPCI
LH MSCDEX /D:MSCD000 /L:H /M:4
LH CTMOUSE
LH KEYBOARD
goto ende
:LessMemory
KEYBOARD
goto ende
:EMM386+CDROM
LH MSCDEX /D:MSCD000 /L:H /M:4
LH CTMOUSE
KEYBOARD
goto ende
:ende
SET CONFIG=
ALIAS /R ALIASES
PROMPT=(%%@dosmem[K]K) $p$g

the 'ctmouse' mouse driver needs just a bit more than 3 kb (in my case for a serial mouse), the keyboard driver (german keyboard!) less than 1 kb. the 'sbmixer' program is used to initialize the sb16 and for mixer setup, it detects any soundblaster up to awe64. setting the port address for the sb16 to 220h is quite common, same with irq 7 and dma settings. my ultrasound card is a gus pnp (interwave) and the settings are quite common (port address should be 220h when the gus is your only card and you want to use the sb emulation). some demos have trouble with irq's above 7, in this case just use irq 5 for example. the last two lines are dependent from the use of ndos, you have to change or delete them if you are using the original command.com or 4dos. the drivers (ansi, cdrom, mouse, UMBPCI v3.62) and the sbmixer are included in my dos toolbox!

dos demos and windows

normally you should run dos demos not within windows, but here are some configuration tips. you can only run demos which don't require realmode (=no emm386 or multitasking os like windows running). with the slowdown tool 'turbo' (download) you can slow down your pc to start demos which are running to fast or refuse to run because 'runtime error 200' (for more read the section below). don't use a dos tool to slow down a windows system! if your machine is fast enough then you can also make use of the emulator dosbox (also available for linux and other platforms). it's updated regular and is already able to run a quite big number of demos (also the ones with gus sound). a dos keyboard driver will be helpful when you are working with a non us-keyboard.

Win9x:
--------
msdos.sys should look like this:

;support for compressed harddrives is mostly not needed but takes space.
DblSpace=0
DrvSpace=0

;loads command.com (and drvspace.bin if needed) into the high memory area.
LoadTop=1

;if you want to start dos 7 immediately then use this option.
;this is also the way to run demos which require realmode.
;you can start windows later by typing 'win' at the command prompt.
BootGUI=0

config.sys should contain these two additional lines (for the rest watch my example above):

;deactivates automatic loading of drivers and saves again some bytes.
dos=NoAuto

;ifshlp.sys is needed by win9x, but can be loaded in upper memory
;(when emm386 is running). it's not needed for a plain dos 7.
devicehigh=c:\windows\ifshlp.sys

notes: under win98 the ems memory is deactivated by the 'noems' parameter in the emm386 line - delete it and use 'auto ram' for example or my above settings. the german win95osr2 (aka win95b) version needs a patch or himem.sys will take 40 kb of memory. the patch is easy to find in the net.

Win2000/XP:
----------------
there is not much to do here. the dos in win2k is just an emulation (virtual dos machine) and you can't use dos drivers for soundcards etc., but with VDMSound and GUSemu32 there are emulators for soundblaster cards (up to sb16) and gravis ultrasound available. memory settings (e.g. use of emm or dpmi) can be changed in the _default.pif file.

config.nt should contain these lines:

rem loads dos into the high memory area if possible.
dos=high, umb
devicehigh=%SystemRoot%\system32\himem.sys

rem instructs EMM to reserve upper memory for 'loadhigh' and
rem 'devicehigh' commands.
EMM = RAM

files=20

runtime error 200 and other stuff

if you have anything faster than a pentium 200 then you will get 'runtime error 200' messages from several demos and intros. these demos are mostly made with turbo or borland pascal 7 and the reason is a bug in the compiler which prevents the demos from running on fast machines. there are several ways to fix the problem. one way is to disable the L1 and L2 cache in the bios, but some demos are probably running to slow then. another way is to start such demos together with mo'slo, a pc slowdown utility. actually this is the only way to run 'crystal dream 2' by triton on modern pc's because fixing the demo itself doesn't work. the only permanent solution is to fix the bug in the demo or intro. the small program 'tppatch' is doing this job, but only when the demo executable isn't compressed. you can unpack many exe files with the cyberware unpacker (cup) and it's easy to use. the uncompressed file will have the extension .cup, so just rename it. the program 'unlite' will unpack exe files which were compressed with pklite. another unpacker is the 'unp' executable file expander. after uncompressing don't forget that you still have to run tppatch on the exe file. sometimes there is also more than one executable in a demo archive, just with another extension (example: in the demo 'static hype' by proxima there is one file with extension .exe, but several other executables with extension .dta). in this case it can take some time to find and fix all affected files before you can run the demo. if your machine is fast enough then the emulator dosbox (already mentioned above) will be probably much more comfortable.

if you are running msdos 6.2x, then 'RdosUMB' is very useful. this is another program with that you can make use of the upper memory blocks without using emm386 and it's preferred for older computers (pentium and below). so you can give memory hungry demos the amount of ram that they need. it worked here before i have switched from msdos 6.2 to msdos 7.1 - in my himem configuration with RdosUMB i had about 618 kb available ram even after loading cdrom and other drivers. the most mentioned tools (moslo, tppatch, cup, unlite, RdosUMB) are included in my dos toolbox!