(C) 2025 Eric Voirin (oerg866)
VIA_AC97.866 is a driver and mixer configuration program for MS-DOS that lets you configure Legacy Audio features of VIA motherboard south bridges, found on many old VIA-based motherboards in the late 1990s and early 2000s.
These chipsets have hardware-based legacy audio support, with lackluster and barely functional vendor-provided drivers.
VIA_AC97.866 was built using the LIB866D DOS Real-Mode Software Development Library
It consists of two parts:
This utility lets you enable/disable the legacy audio features of your VIA chipset, and lets you set the volumes of all audio inputs and outputs.
Note: Compared to the official VIA drivers, it does not need a TSR to enable basic Sound Blaster, MIDI and Game Port functionality.
In addition, this program lets you change the volume mixer settings, which the VIA drivers do not support.
Without parameters, it uses the values configured by the BIOS and only powers up and unmutes the audio codec.
Additional configuration can be done using command line parameters.
This TSR program provides the software component for the hardware-assisted FM emulation. It is intended to replace VIAFMTSR.EXE.
Since port trapping and NMI assertion is done 100% in hardware, this does not interfere with protected or real-mode DOS software.
- Set up AC97 audio codec
- Configure Sound Blaster Legacy Audio
- Enable/Disable
- Port
- IRQ
- DMA
- Configure MIDI (MPU-401) Port
- Enable/Disable
- Port
- Configure Game Port
- Enable/Disable VIA OPL3 TSR support
- Override BIOS configuration
- Can help with poor BIOS implementations
- Mixer volume settings
- Master Volume
- Wave Out
- PC Speaker
- Microphone
- Line In
- CD Audio
- Video In
- Auxiliary
- Secondary Line Output
- Advanced Codec Settings
- Variable Sample Rate (experimental)
- Enable/Disable "3D Surround Sound"
- Enable/Disable Microphone 20dB Boost
- VIAFMTSR.EXE replacement
- Much higher accuracy using DosBOX OPL3 emulation core
- Works with Real Mode Software
- Works with Protected Mode Software
- Unloadable (TODO)
- UMB capable (It may be, I dunno, need to figure out how to do explicitly otherwise)
- Optimized for memory footprint (TODO)
- 300MHz CPU or higher 500-600MHz recommended for headroom in heavy games/applications
- Supported VIA chipset
- MS-DOS 5.0 or higher, or compatible
- VT82C686
- VT82C686A
- VT82C686B
- VT8231 (VIA EPIA)
These are found on many old Pentium 1/2/3 and Athlon/Duron motherboards, so you may be in luck!
VIA_AC97.EXE <parameters>
VIA_AC97.EXE supports the following command line parameters:
| Argument | Description |
|---|---|
/sb:<port>,<irq>,<dma> |
Enable Sound Blaster |
port: I/O Port (0x220, 0x240, 0x260, 0x280) |
|
irq: IRQ (5, 7, 9, 10) |
|
dma: DMA channel (0, 1, 2 ,3) |
|
Example: /sb:0x220,5,1 |
|
/nosb |
Force Disable Sound Blaster |
/midi:<port> |
Enable MIDI Port |
port: I/O Port (0x300, 0x310, 0x320, 0x330) |
|
/nomidi |
Force Disable MIDI Port |
/fm:<0/1> |
Disable/Enable Adlib/OPL3 (Always hardcoded to port 0x388!) |
NOTE: This just sets a flag to enable H/W Assistance for OPL3 emulation. It requires V97TSR.EXE to function! |
|
/joy:<0/1> |
Disable/Enable Game Port (Always hardcoded to port 0x201!) |
/v_master:<volume> |
Mixer: Set Master Volume (0-31) |
/v_wave:<volume> |
Mixer: Set Wave Volume (0-31) |
/v_pcspk:<volume> |
Mixer: Set PC Speaker Volume (0-15) |
/v_mic:<volume> |
Mixer: Set Mic Volume (0-31) |
/v_cd:<volume> |
Mixer: Set CD Audio Volume (0-31) |
/v_video:<volume> |
Mixer: Set Video Volume (0-31) |
/v_aux:<volume> |
Mixer: Set Auxiliary Volume (0-31) |
/v_line2:<volume> |
Mixer: Set Line Out 2 Volume (0-31) |
/micbooost:<0/1> |
Disable/Enable 20dB Mic Boost |
/3d:<0/1> |
Disable/Enable '3D Surround Sound' |
/rate:<hz> |
Force AC97 Codec Sample Rate (experimental). |
hz: Sample rate in Hertz. |
|
| A value of 0 forcefully disables the variable sample rate in the codec |
V97TSR.EXE <parameter>
| Argument | Description |
|---|---|
r |
Load Driver |
g |
DEBUG: Initialize, play a test tone and wait for key press. Does not load the driver resident. |
p |
DEBUG: Send a test tone on the OPL ports. Does not initialize hardware, works even with other OPLs. Does not load the driver resident. |
-
Any 32/64 Bit Windows (Windows 9x, NT, 2000, XP, Vista, 7, 8, 10, 11, etc.)
- Yes, everything in this tool chain contains 32-Bit executables that still work fine on modern Windows
- Linux with WINE also works
- Building on DOS also works with a DOS extender (DOSXNT, HXDOS, etc.) and DPMI host
-
Microsoft C/C++ Optimizing Compiler Version 8.00c
- Also known as Microsoft Visual C++ 1.52c
- Can also be built with Microsoft C/C++ version 7.00, but due to missing 386 support it is not recommended for performance reasons
-
Microsoft Macro Assembler 6.11 or higher
-
Microsoft Segmented Executable Linker 5.60 (included with C 8.00)
-
Make sure your build environment is set up correctly:
SET BASE=C:\MSC800 SET PATH=%BASE%\BIN;C:\MASM611\BIN; Set LIB=%BASE%\LIB;%BASE%\MFC\LIB;C:\MASM611\LIB; Set INCLUDE=%BASE%\INCLUDE;%BASE%\MFC\INCLUDE;C:\MASM611\INCLUDE Set HELPFILES=C:\MASM611\HELP\*.HLP;%BASE%\HELP\*.HLP Set INIT=%BASE%\INIT SET ASMEX=C:\MASM611\SAMPLES SET TMP=C:\TEMP -
Run
nmakein the repository folder -
That's it!
- None (yet)
DEBUG=1enables debug printouts (at the cost of bigger executable size)NUKED=1enables Nuked-OPL3 core (experimental and very slow compared to the default)DBG_BUFFER=1saves the DMA buffers todump.binwhen exiting doing test tone generationDBG_FILE=1enablesfparameter which plays a 16 Bit 24KHz stereo raw PCM file.\test.sndon the FM DMA channel
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 (CC BY-NC-SA 4.0)
