4DWave DOS initialization & TSR utilities
Version 2.6 - Tom Warren - Friday, April 24 1998
FILES:
WaveInit.exe - 4DWave DOS (SB/MIDI/OPL3) init utility. v2.6
WaveTSR.com - 4DWave DOS (SB/MIDI/OPL3) emulation TSR. v2.6
See CHANGES, below, for 2.6 mods.
NOTE: Everyone should read Caveat #8, below, if you intend to
run DOS games in MS-DOS mode (from Windows 95).
DESCRIPTION:
* WaveInit is used to initialize the 4DWave PCI audio card for
SoundBlaster Pro 2 emulation, MPU-401 UART, Adlib OPL3, and
joystick legacy address decoding. WaveInit also handles IRQ
configuration (edge/level & snoop) and legacy/distributed DMA
setup on a core-logic-chipset-dependent basis.
WaveInit will also load one of four (4) GM sample sets into
extended memory (XMS). HIMEM.SYS MUST BE INSTALLED IN CONFIG.SYS.
The GM sample sets are the ones installed by the Win95 audio driver
INF file into the Windows SYSTEM directory (assumed in this release
to be at C:\WINDOWS\SYSTEM). See the command line usage text below
for an example of selecting different sample sets.
NOTE: WaveInit and WaveTSR ARE NOT NEEDED TO LOAD THE WINDOWS AUDIO
DRIVERS!! They are placed in the AUTOEXEC.BAT file as a convenience
to the user, for running DOS games in a pure DOS environment (F8 -
"Command Prompt Only" boot, for example). The Win95 driver will fully
initialize the 4DWave hardware when it's loaded. However, DOS box
support is much more robust when WaveInit/WaveTSR are run before
booting Win95.
Distributed DMA support is provided for the Intel 430TX (PIIX4) and
the Via VP3 (82C586B) PCI-ISA bridges. The Intel 440LX chipset uses
the PIIX4 but the host bridge doesn't support DDMA, so it's not
enabled by WaveInit. Most DOS games will still work on an LX-based
system with WaveTSR 2.1 or greater. A very few games will have sound
quality issues (pauses, popping, clicking) in real-mode DOS. See
CAVEAT #5 and #10, below, for LX issues.
* WaveTSR is used to provide SoundBlaster emulation, Adlib OPL2/3
and MIDI MPU-401 support, and IRQ relocation:
SoundBlaster: WaveTSR will intercept SB DSP commands and update
the sample rate/time constant registers. It also
handles SB Mixer updates.
OPL2/3 (FM): WaveTSR will emulate an OPL2/3 FM music chip. This
capability was new (in release 1.9) and still isn't
perfect.
MIDI (GM): WaveTSR will emulate an MPU-401 UART/GM synth. This
capability was new (in release 1.9) and still isn't
perfect.
IRQ relocation: If the 4DWave board is installed in a PCI slot that
has been assigned an IRQ other than 5 or 7, WaveTSR
will attempt to relocate, or redirect the hardware
IRQ requests to the software handler at IRQ 5. This
allows older DOS games (DOOM, Heretic) to use the
SB-standard IRQ 5 setting transparently.
NOTE: Version 2.0 and up frees up the XMS sample memory when Win95
loads, and deactivates the TSR. SB/MIDI/OPL3 emulation under
Win95 is handled in the VxD for DOS boxes. See caveat #8 for
information on 'Restart in MS-DOS mode' mods.
NOTE: The best configuration is to assign IRQ 5 (via BIOS SETUP) to
the 4DWave board. This will sometimes require moving the
4DWave board to another slot.
NOTE2: For pure Win95 use, the IRQ doesn't matter, and can be any
legal IRQ assigned by the BIOS (5, 7, 9, 10, 11, 12, etc.).
CHANGES:
Waveinit 2.6 - Added support for SiS 5595/5598 DDMA.
Fixed DDMA I/O base calculation.
Waveinit 2.5 - Removed delay & warning text string if PCI command reg
wasn't correctly enabled by the BIOS. This is now a
non-critical error - it's fixed (MEM, I/O and BMASTER
are all enabled) and the init continues with a simple
status message.
Waveinit 2.4 - Force IRQ in BLASTER environment setting to 5 ("I5")
if PCI IRQ is > 7. Fix for Doom/Heretic "cannot use
IRQ greater than 9" message.
Delay for 2 seconds with a message if PCI command reg
wasn't correctly enabled by the BIOS. No longer waits
for a keypress.
Waveinit 2.3 - Fix AKM codec reset (write a 1 instead of a 0).
Add 9753Wave to EMM386 check.
Detect other SBlaster I/O before setting 4DWave
legacy addresses.
Disable legacy I/O if 4DWave is behind a P2P bridge.
/M switch now reprograms the interrupt snoop register
for the DOS 8259 offsets
Waveinit 2.2 - Use the PATH environment variable to locate the
Windows 95 SYSTEM directory for sample set loading.
This allows installations of Win95 in C:\WIN95, for
example).
Fixed an error in DMA 0 channel selection.
Dynamically selects an I/O base for DDMA support by
scanning the installed PCI devices for I/O BARs and
placing the DDMA I/O 256 bytes above the highest I/O.
Warns the user if EMM386 is installed on a 440LX-based
system (Rev B 4DWave only). EMM386 interferes with the
DMA fix implemented in WaveTSR to fix 440LX DOS games.
See CAVEAT #10.
IRQ edge/level setting via ELCRx regs now done on all
chipsets (no longer just Intel).
Removed debugging output to Port 80h.
WaveTSR 2.6 - Added TinyTSR option (/T command) for use in memory-
constrained situations (ie, boot disk for Privateer).
WaveTSR 2.5 - Fixed FM music hang in Duke3D and Dark Forces.
WaveTSR 2.4 - Minor MIDI/FM cleanup.
WaveTSR 2.3 - Use INT_SNOOP register exclusively (no longer mucks
with core-logic edge/level IRQ trigger registers).
Fixes 3 of the 5 rev 2.2 errata.
Detect & exit if 4DWave is behind a PCI-PCI bridge.
Fix 440LX shutdown hang in Windows 95.
Added INT 2Fh function to return 'active' flag address
for Waveinit /M use (because of the 440LX fix, above).
WaveTSR 2.2 - Fixed a bug in SB mixer update during initialization.
Fixed 9753 ELCRx edge/level IRQ trigger setup.
Removed debugging output to Port 80h.
Slight clean-up of MIDI code.
CAVEATS:
1) The GM sample sets must reside in the C:\WINDOWS\SYSTEM directory.
WaveInit will create a XHANDLE.DAT file in this directory to tell
WaveTSR which sample set was loaded into XMS. WAVEINIT.EXE AND
WAVETSR.COM SHOULD BE RUN FROM THIS DIRECTORY!
2) HIMEM.SYS must be loaded in CONFIG.SYS, or WaveInit won't be able
to load a sample set.
3) The SB emulation code uses the timer tick (18.2 Hz) to check for
changes in the SB Mixer & sample rate registers.
4) The MIDI/OPL3 emulation code uses the real-time clock (RTC, 1KHz)
to check for MIDI messages or OPL3 operator updates.
5) DOS games should now run on 440LX-based Pentium II systems.
DOOM2, Duke3D, Blood, Shadow Warrior, etc. have been tested with
WaveTSR v2.1 and above. YOU'LL NEED TO ADJUST THE SAMPLE RATE AND
MONO\STEREO SETTINGS ON 3DREALM'S GAMES (DUKE3D, ShadowWarrior,
Redneck Rampage, Blood, etc.). Usually, 16K mono & 11K stereo are
OK. If you here crackling/breaking up of the sound IN THE GAME,
then adjust to sample rate down or go to mono.
Note that some games (Descent, MDK) are noisy no matter what. The
sample rate on these games can't be adjusted. A future release may
address this issue with these games (if there's a SW workaround).
6) DOOM2 (and other games) SETUP may warn you that 'you cannot use
an IRQ greater than 9' if you have an IRQ greater than 8 assigned
to the 4DWave. Don't worry - do nothing except press ESC. The IRQ
relocation code in WaveTSR will handle everything.
7) This code has been pretty thoroughly tested on a 430TX ASUS
motherboard with a 4DWave Rev B chipset, mostly at IRQ 5, using
distributed DMA and the default legacy addresses (220/330/388/201).
Version 2.x has been tested a little on a 440LX-based P2 system.
8) If you choose to 'Restart in MS-DOS mode' from Win95 (to play a
DOS game), then you'll need to add the following line to your
DOSSTART.BAT file (in the WINDOWS directory):
C:\WINDOWS\SYSTEM\WAVEINIT /M /Gx [where x is 0-3]
The /Gx parameter should correspond to the setting in your
AUTOEXEC.BAT file (typically nothing, or /G1, which uses the
1.5MB GM sample set). This selects the GM sample set for use
by the DOS MIDI TSR. Since it was unloaded by WaveTSR when
it detected Win95 startup, it needs to be reloaded for MIDI
playback in DOS games.
The /M parameter will re-enable MIDI support (RTC interrupt
enable and MIDI FIFO setup). This was disabled when WaveTSR
detected Win95 loading.
9) WaveInit 2.x won't load from a DOS box under Windows. If you
need to re-initialize 4DWave, do it from real DOS.
10) WaveTSR 2.x SB DMA won't work correctly with EMM386 loaded on
440LX-based systems (Rev B 4DWave only). WaveInit 2.2 will warn
you if it detects EMM386, a 440LX chipset, and a Rev B 4DWave.
11) In a DOS box under Windows 95, it's best to select the actual
IRQ in use by 4Dwave (see the BLASTER environment variable).
This is because the IRQ isn't relocated under Win95. Most modern
DOS games allow the user to select IRQ 2, 5, 7 or 10.
BUGS:
1) On very rare occasions, the sound would 'go away' (no MIDI music,
no sound effects). Sometimes, the AC'97 codec volume levels would
be muted, and running WaveInit a second time would correct them.
At other times, the AC'97 levels were correct, but the chip was
making no sound. A complete reset of the system was necessary to
restore audio output. I haven't seen it happen in v2.x, but it
could still occur. Let us know if it does, what was running, etc.
I've noticed it most frequently with Blue Byte's Extreme Assault
and Warcraft II and Flight Sim 5.1.
2) On even more rare occasions, the entire system would lock up in
the middle of a game. No explanation. Again, I haven't seen it
in v2.x, but it might still appear. Let us know if it does, etc.
USAGE:
WAVEINIT /Axxx /Dx /Pxxx /Lxxx /Jxxx /Tx /Gxx /q /v /n /m /b freq
/Axxx = SB base address, 220 or 240 [optional, default = 220]
/Dx = DMA channel, 0 or 1 [optional, default = 1]
/Pxxx = MIDI base address, 330 or 300 [optional, default = 330]
/Lxxx = ADLIB base address, 388 or 38C [optional, default = 388]
/Jxxx = joystick address, 200 or 208 [optional, default = 200]
/Tx = SB Version, T2 = SBPro, T4 = SB16 [optional, default = 2]
/Gxx = GM sampleset, 0-3 (1MB/1.5MB/2MB/6MB) [optional, default = 1]
/q = Set audio IRQ to edge-triggered [optional, default = off]
/v = verbose, print info about the PCI audio card
/n = No DDMA, don't enable DDMA even if Intel PIIX4 chip found
/m = MIDI init for WaveTSR (used when restarting in MSDOS mode)
/b = Boost microphone gain by 20dB [optional, default = off]
freq = SB default freq, 8K - 48K [optional, default = 22K]
NOTE: All settings are OPTIONAL - typical usage is 'WaveInit /v'
NOTE: You can disable the joystick by specifying /J666. [v2.1+]
You can re-run WaveInit as many times as you want (to reinit the
AC'97 levels to maximum, for instance).
WAVETSR /T
Specifying the /T command line option will load the TSR without
MIDI or FM music support. This saves ~23KB of conventional memory.
This may be necessary for games such as Privateer that require huge
amounts (>570KB) of low RAM to run. The game can still be configured
for FM/MIDI music, but nothing will be heard.
If you re-run WaveTSR, it will attempt to unload itself from memory
(if it was the last TSR loaded). It DOES NOT unload the sample set
from XMS, though, unless it detects Win95 loading. Run it a third
time to reload the TSR.
Good luck!
Tom Warren
Trident Microsystems, Inc.
Arizona Product Group
twarren@tridmicr.com
(602) 892-5240
Release 2.6 - Friday, April 24 1998
Download Driver Pack
After your driver has been downloaded, follow these simple steps to install it.
Expand the archive file (if the download file is in zip or rar format).
If the expanded file has an .exe extension, double click it and follow the installation instructions.
Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.
Find the device and model you want to update in the device list.
Double-click on it to open the Properties dialog box.
From the Properties dialog box, select the Driver tab.
Click the Update Driver button, then follow the instructions.
Very important: You must reboot your system to ensure that any driver updates have taken effect.
For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.