setup-windows-sound  Revised 4-8-2003  Release 6 RTCM Corvin

Introduction | Collecting Sound Card Settings | Setting up the Game | ISA and PCI Legacy knowledge and Facts |
Game Setup Errors/Trouble shooting | PCI Bug | No Sound after exiting WINDOS BOX


Setting up the soundcard to work correctly is one of the most difficult steps in configuring your game.

This document assumes your sound card has been working properly with Windows 95 and 98 based games and you have the latest Drivers and Software installed or handy. This document is offered as a step by step guide. It does not cover any other versions of Windows (It may be useful for WinME users). The Document is tailored for Sound Blaster Cards (the dos standard) However the information below will prove useful for others.

This document was developed based on the Duke3D/Apogee Sound System and should prove to be compatible with other BUILD Games.
Further development maybe required for some BUILD Games.

Collecting Sound Card Settings


  • Locate your Autoexec.bat  file. It's in your root directory.
  • Open it with text editor and locate your sound cards setup line:
    Typical examples would be something like this:
    • SET BLASTER=A220 I5 D1 T2
    • C:\Program Files\CREATIVE\SBLIVE\DOSDRV\sbeset -A240 -I5 -D1 -H5   (H is the 16-Bit DMA)
    • SET BLASTER=A220 I5 D1 H5 P330 T6
    • Copy the SET BLASTER line down on paper.

In Control Panel:

  • Open your Windows Control panel and click on the System Icon.
  • Find the line "Sound,video and game controllers" and click on your Sound card. If you have more than one sound card device listed, you're looking for the one that's labeled with ISA, DOS, or Legacy.
  • Once you have the Driver open, locate the DOS settings and copy them down. ISA users will only have one group of settings while PCI soundcards may have all or multipliable sound features. Typically you're looking for something like these:
    • Sound Blaster Pro Settings: Port 220 - IRQ 5 - DMA 1
    • Sound Scape Settings: Base/MIDI Port 330 - MIDI IRQ 5 - Wave Port 534 - Wave IRQ 5 - DMA 1
    • MPU-401 Settings: Port 330 - IRQ 5 - AdLib Settings - Port 338
    • Copy the settings down on paper.
  • If your sound card driver/software doesn't supply you with the above information, use the Resource Tab
    • Interrupt Request = IRQ
    • Direct Memory Request = DMA
    • Input/Output Range = Port (you will only need the first 4 digits to get the Base Port value)
    • Input/Output Range (MPU-Midi Playback) = Port
  • Typically your looking for something like this:
    • Interrupt Request 5
    • Direct Memory Request 1
    • Input/Output Range 220
    • Input/Output Range 330 - For Midi
    • Input/Output Range 338
    • Copy the settings down on paper
  • Compare all the settings and make sure they match. If they don't match each other, you may have to do some configuring, See  ISA / Legacy Knowledge Section  below for more help.
  • Wave IRQ and DMA settings are for SB emulation of your PCI Legacy Device.
  • Note: If your systems motherboard has a built-in or on-board sound card, check to make sure it's set up correctly in your BIOS. You usually need Legacy Sound on in order to use it. If your using a separate audio card, rather than the onboardboard card. You may still need to Turn on Legacy sound in your BIOS. But do it as a last resort to prevent unwanted drivers from loading.

Check For EMM386.EXE

  • Locate your Config.sys file. It's in your root directory.
  • Open it with a text editior and locate the memory manager line.
  • Typical example:
  • This managers presence is required for your PCI DOS Driver. You can add NOEMS to the end of the line to prevent Expanded memory from being used.( This can be set from your Windows DOSBox shortcut, See: the RTCM Run In Windows Document)

Check For  PCI Legacy DOS Mode Initialization:

PCI snd cards tend to modified Initialization there DOS drivers in different ways. However they all modifie a important files. These include: "Exit to MSDOS.PIF" , AUTOEXEC.BAT , SYSTEM.INI ,  DOSSTART.BAT to intialize the card, the locations are typicaly based on driver install options or forced options. But these methods ensure your PCI card is intialized if you use an alternative method of reaching MS-DOS Mode, such as a shortcut to an MS-DOS application like Duke3D.

Below we deal with a standard that's familiar with standards dealing with DOS Only Games. In other words where trying not to deal with Windows highly sensitive files. Rather we override them on a safer level. Follow the steps below to initialization your DOS Drivers for PCI Cards.

Note: the DOSSTART.BAT File is in the \Windows folder

  • Locate your Autoexec.bat file. It's in your root directory.
  • Open it with a text editor and locate your snd cards setup line:
    • Typical examples would be something like this:
    • SET BLASTER=A220 I5 D1 T2
  • The three italic lines indicate two separate examples of what your looking for. Keep in mind these are examples and probably will be different from yours. They are commands used to initialize your PCI sound card to ensure you that your Sound Cards DOS Support is operating (loaded) at Windows Startup. For use with a WinDOSBox and when you use START | Shutdown | Restart in MS-DOS mode.
  • If you Rather have the DOS Sound support active Only when opening a WinDOSBox and when you use START | Shutdown | Restart in MS-DOS mode. Then make sure you remove the Initialization command from your Autoexec.bat file. Now locate your dosstart.bat file in your \Windows folder, and add your Initialization command there. So during a Windows session the MS-DOS mode driver is inactive until MS-DOS mode is entered. This is equivalent to switching the emulation off from your drivers control panel if yours has the feature. Also if you where having some window problems as a result of the DOS Drivers being loaded. Then this may elevate some of the problems (do not uninstall the emulation files or software altogether, you need them for your BUILD game)
  • These 'Drivers' can be loaded into High Memory if you have enough room, In most cases this will require you NOT to use the NOEMS as noted above. Use  LH  like it is presented in the last examples above.
  • Note the order in which the lines above are. Make sure your SET BLASTER line is BEFORE your PCI DOS Mode initialize command.
  • If a similar line is not present then you need to read your Sound Cards Manual and review the instructions on how to install its dos drivers and software (including updates) before you continue.
  • Make sure you reboot after making all the above changes.

Setting up the Game

Now we will apply the sound card configuration to Duke (Duke Setup.exe is located in your duke game directory).

  • Go to Sound Setup
  • Choose Sound FX Card to match your brand. Typical is Sound Blaster. Setup will then try to detect your cards settings.
  • Change Address, you want this to match your cards Port number.
  • If there's an option to Change Sound Card Type (model), choose the least demanding. Typical is Sound Blaster or compatible. Newer cards may work with the SoundBlaster Pro v2(new) setting. The SBLive! Card should use Sound Blaster 16 or AWE32
  • Change Interrupt to match your cards IRQ number.
  • Change 8-Bit DMA Channel to match your cards low  8-bit DMA number.
  • Change 16-Bit DMA Channel to match your cards high 16-bit DMA number (if your card supports it, see "collecting sound card settings" above)
  • Now once your done click on the "Use these settings and continue" line.
  • You will see several configure options, for now use these values.
    • Number of voices, select 8
    • Number of Channels, select Mono if your card supports it
    • Mixing Rate, select 11khz
  • Once you get back to the main Sound Setup menu, select test sound FX card.
    Warning: System MAY crash or lock up. Use ALT+CTRL+DEL to close the setup.exe program. Restart your computer.
  • You should hear the test sounds.
  • If the sound is crackling or crappy or simply won't play recheck your system's configuration and recheck your settings in setup. Choosing a closer match or model of the sound card may provided better performance.
  • Once you get the sound to playback in a stable and clear manner. Go back and Select the Stereo option.
  • Go back to the main Sound Setup menu, select test sound FX card.
  • If the sounds play in the incorrect speaker according to the text on the screen. Select Reverse Stereo.

Duke Nukem's setup: is very flexible. It will allow you two select General MIDI music (Highest Quality Snd) and Sound Blaster digital audio. The SoundBlaster menu then requires you to select what type or model of SoundBlaster you would like. A PCI Legacy card should choose SoundBlaster Pro I as their first choice, pro II as their second. If your PCI card supports Soundcape (ENSONIQ), this should be your first choice before considering a SoundBlaster or General Midi. Use what ever gives you the richest snd, no cracking noise, or drop outs.


ISA and PCI Legacy Knowledge and Facts


PCI Wavesets: MIDI Synthesizer Wavesets/Wavetable; The highest quality MIDI snd your card can produced. Typical Wavesets are 2, 4, and 8MB. 4meg is ideal for hardware wavetable replacement or substitution. Your BUILD game will use these wavesets. Locked or Unlocked, Regardless if you have this option checked or unchecked in your soundcards control panel. Your entire waveset is locked into memory for DOS Box and MS-DOS Mode if your DOS sound drivers are loaded. Otherwise you may notice a delay during the games startup sequence. It will have to wait for the Wavsets to load.


Sound Card Mixer: In DOS or MS-DOS Mode the Windows Mixer is not used. Your sound cards DOS Mixer is independent. Note: Running Windows then shutting down to DOS-Mode will not reset your DOS Mixer.


Windows DOS Emulation: PCI sound cards when in DOS emulation, Use a virtual device (software) to emulate the resources that "old" ISA-based (aka Legacy) soundcards used. When your PCI card is Legacy Emulation enabled in your settings tab(The Legacy Device can be disabled from within in Windows if you have this feature. ) The Legacy Device will appear in the Device Manager. Drivers: Always use your sound cards Install wizard to handle any updates..etc...


Windows DOS Box: The recommended method for Installing and playing DOS games with systems that use PCI snd cards is to open a MS-DOS virtual machine (DOS Box). You can However Load Windows and then START | Shutdown | Restart in MS-DOS Mode if your system is configured that way. See the "Check For  PCI Legacy DOS Mode Initialization" section above about dosstart.bat


Windows DOS Mode: Sometimes your game will beunable to run in a DOS Box. An Incompatible with Windows may be one example. Most if not all BUILD Games CAN be Run at or near 100% in Windows. A Windows98 DOS Box is more stable then the Windows95 DOS Box with default settings. However Windows95 DOS Box can become of equal performance with the default settings tweaked. Basicly your more likely not to have to tinker with a user defined ms-dos shortcut with Win98.
Another common problem, your system might not have enough system resources to play the game with Windows loaded. If this is the case use the mechanism called DOS Mode which loads only the real-mode portions of the operating system.

Restart in MS-DOS Mode:

This is an alternative to using a WinDOSBox.  DOS Mode runs outside of windows, while technically your still in Windows.

  • To enter the Windows DOS Mode, restart your computer in MS-DOS mode from the shutdown display.
  • START | Shutdown | Restart in MS-DOS mode

When the computer is restarted into DOS from Windows a Program Information File (PIF) named "Exit to DOS.PIF." is run. This PIF contains the information needed to shutdown/unload most (not all) of Windows GUI properly and configure the system for MS-DOS mode. The DOSSTART.BAT file is then executed to initialized any commands necessary for MS-DOS mode to function. Then your system is placed in DOS Mode. Supporting normal DOS or Legacy sound depending if your using a ISA or PCI card.


Game Setup Errors - Trouble Shooting
Setup Error/Error Solution/Advice
SoundBlaster Pro emulation is not recognized
or OPL2 FM emulation is not recognized
Switch PCI wave IRQ between 7 and 5, use DMA 1 and Wave port 220
Soundscape emulation is not recognized Use Base/MIDI port 330, use Wave port 534, Wave and MIDI IRQ 5 or 7, DMA 1
MPU-401 emulation is not recognized Try port address 330
a True ISA hard coded IRQ IRQ 9 Hard coded , set to 2 in setup.exe and vise versa.
IRQ Duke3D No limit on IRQ
IRQ Blood and Shadow Warrior Set IRQ less than 9
Playback failed, possibly due to an invalide or conflicting DMA channel. Recheck your systems configuration and recheck your settings in setup.
Playback failed, possibly due to an invalid or conflicting IRQ.  
PnP ISA and PnP PCI If you can't do ANYTHING else to acquire the resources you need. Placing the PnP sound card in the last slot on the motherboard will usually allow your snd card to acquire the standard settings needed. Make sure to reboot first after removing the card before you reinsert the card in a new slot.  This procedure is typically done if your systems/motherboard BIOS dose not provide options to configure your settings. In the future, if you plan on upgrading your system and still want to run DOS games. remember to place your card in the last slot. Normally this is where your ISA?PCI Controller will default to.
Game lockups up on "Sound Inits" prior to playing a Mulitplayer game. This is actually a problem with v1.5 using the command line switch /f4. This is not related to a sound setup error.
Not responding on selected port. Try switching off stereo. On rare occasions this may occur

What about these Popular ISA Resource Settings, what are they?
PCI Legacy Devices request the most popular resource settings when installed. These resources would normally be available to the ISA bus.
The majority of the resources in a system can easily be reserved for the ISA bus because all PCI devices in a system can share a single interrupt (IRQ steering, see "PCI Steering below"). Only a few PCI devices, using distributed DMA, need a DMA channel to be available. (DMA is only required for PCI cards when used in any mode of DOS)

My DOS Game ,,DOS Extender and IRQ problems ?
Some older dos extenders (Most Build Games use v1.97 dos extenders- newer) have problems handling IRQ bus 10 events that occur in protected mode, this may crash the DOS extender. (Note: This is not the PCI based IRQ, but rather the ISA or ISA mode IRQ; The Base PCI-IRQ is for system/windows use). , So the ISA IRQ 10 should not be assigned, it should be reserved else where. However BLOOD and shadow Warrior require an IRQ below 9.

Why should I leave open IRQ 5 ?
Reserve IRQ 5 for the ISA bus instead to allow your Legacy Device to acquire it. Use your system BIOS setup to manual change the PCI ISA-IRQ. Using the BIOS setup is the preferred method for manually setting up your PCI snd card, never use windows settings as you would with a real ISA snd card, see PCI steering below ) IRQ 7 and 9 are also often used by Legacy Devices and should be reserved for the ISA bus. Note: At least one interrupt (IRQ) must be available to the PCI bus. PCI-IRQ 11 is a good interrupt to leave for the PCI bus.

Do I use DMA 1 or 3 ?
Some Legacy Devices use DMAs 1 and 3 for the ISA bus, this is a rare occasion. However if you do need to change the DMA setting, again use your BIOS setup to manually change them. SoundBlaster Live! may require a DMA of 3.

MY Game doesn't automatically detect my Sound Card, why ?
Older games, such as BUILD based games without the luxury of having a 32-bit Setup Frontend (PaintBrawl Has WinFrontend) may have difficulty detecting your PCI card at certain resource settings. Typically these games would expect an ISA to be at a fixed set of popular ISA resources (or firmware) and would fail to load if those resources were not detected. If you have a BUILD DOS game setup.exe and your systems has this problem , try changing the Legacy Device configuration. If your sound card has problems detecting your resources or behaves erratic, Disable your PCI steering to allow your BIOS to automatically detect it, and not windows.

You can usually change these settings in the Windows Device manager. These changes reflect in a DOS box and MS-DOS Mode.

PCI Steering, how to disable it:

  1. Right click My Computer and select Properties.
  2. Find PCI Bus and double click on it.
  3. Uncheck the checkbox labeled "Enable PCI Steering".


Echo/Reverb Crash - "PCI  Bug"

Newer PCI sound cards tend to crash most build games that use the Apogee Sound Engine, if not all. This may occur in map sectors where the Echo (reverb) settings are switched on Such as water, sewers, subways etc... ).
This error occurs on such cards as SoundBlaster Live, Creative Labs SB or Ensoniq PCI Audio Cards, and cards with the ESxxxx(Software) and ESS(hardware FM synthesis (ESFM)) chip sets. This is a result of Windows backward compatibility problems emulating ISA sound.

Note: Standard ISA and ISA PnP cards, windows XP sound emulator and some On Board software driven sound cards are not effected by this Windows/PCI legacy Bug, known as the "echo crash"

Testing your system for the BUG
To test your Game/Soundcard, first determine that your game runs and operates without any-errors. Next load and try to enter E1L4(the start of the level puts you directly in a nice "PCI Bug" fallout) If the game crashes or freezes..this Bug may be your problem. Make sure you have the CD in the drive, so you don't mistake the normal "Put CD in Drive" game dropout with the Sound crash.

Some other locations this Windows Bug can occur:
Episode 1, Level 2: In the sewer (behind the toilet and under the blown up building)

Episode 1, Level 3: Behind the church (after the cross inverts and room turns red)

Episode 1, Level 4: Crashes immediately!

Basic Help:

  • Playing in pure DOS tends to alleviate this problem for some. (not going into windows at all, direct boot into DOS)
  • If that doesn't work try updating your drivers/soundcard software.
  • Some users simply suggest removing the tagged sectors (Duke) of a map to remove the reverb effect. (Echo effector is as follows: the sprite is MUSICANDSFX (no. 5) with the lotag set to a range of 1000 to 1255 inclusive, any sprites with these settings could be removed to prevent the crash), Keep in mind this takes away from the games atmosphere and is not ideal. I personally advise the Map Builder to continue to use the Echo (reverb) tag and the patch/workaround (see below) together until such a fix is discovered.
  • 3DRealms is aware of the problem, they have no patch/fix for this problem, and will not have one. The problem can be corrected via the source code for the Apogee Sound Engine (unreleased) or from your OS or sound card developers. Contact your sound card manufacture and Microsoft to ask if they can help to resolve this issue. Explain in great detail what is happening and provide them with your system's specs.
    This is not a Apogee Sound Engine "problem" rather it is poor programming in the PCI TO ISA drivers and Windows Controllers.

Workaround: Ken Silverman has released a Echo Snd patch/workaround for Duke3D and Shadow Warrior, It patches the game.exe to switch off Echo playback. However Reverb through out the game is also switched off as a result.
Download The patch Ken-Build Site See the RTCM Other BUILD Games Mini sites and there download sections to see if we have a patch tailored for your game.

No Sound after Exiting a BUILD game from a WinDOS Box.

A tidbit, workaround - no Windows Sound: This problem is not related to the PCI Bug above, with that said...If upon exiting the game in a WinDOSBox, your windows sounds may be "turned off." To re-enable them you need to re-initialize your sound card. Simply open your Mixing controls (usually sits in your task tray, bottom right) and locate your WAV settings, click mute and exit the mixer, wait, reopen then unmute, the WAV sound should be restored for use with Windows. This is more typical when using Windows95.

Final Thoughts....

  • Read your Sound Card Manual
  • Read your Dn3dhelp.exe Manual or your Build Based Games Help Manual