AdLib Sound Driver
Sound Driver | ||||||||
|
The AdLib Sound Driver is a special sound engine written by Ad Lib Inc. to feed sound to their Ad Lib Music Synthesizer Cards. The DOS program was run before the start of a game and ran hidden in the background. The driver does not actually support any file formats (except for a subset of INS); instead, when a game developer wanted to play music or sound effects, they would issue several calls to the driver with a list of note-on, pitch-bend-, volume-, instrument- and tempo-change events and their times (usually parsed by the game program itself from the desired ROL music file and its necessary INS or BNK instruments). The song could be started, paused, cleared, and its end detected. Even as the song plays, you can append more events, play a new note instantly, stop a currently playing one, change its instrument, and transpose the entire song. The driver can be considered more of a roll or queue than a player. On the downside, you cannot easily loop; the queue is emptied as (and only as) the song plays, so you have to input the song repeatedly.
The command line usage is as follows:
SOUND [P####] [B####] [W####]
- P - Port address.
- Default: 388h.
- B - Buffer size in bytes.
- Should be divisible by 10. Any remainder is wasted.
- Default: 4090.
- Minimum: 1000. Anything less is raised to 1000.
- Maximum: The lesser of PSP:06 minus 271 and 65264, minus the file size of SOUND.COM. Anything more results in an error message.
- W - Waiting time between card writes.
- Versions 1.2 up to and excluding 1.5 only.
All numbers are to be hexadecimal. The order of options, the casing and unknown characters are ignored, as are any digits before the last four, any options after the first three, and if the same option is specified multiple times, any before the last one.
Sloppily, the driver's uninstall function is incomplete (and in fact undocumented), so if a game calls it when you still want to use the driver, or the buffer turns out too small for the music or too big for the actual game, you have to reboot.
Version History
Most releases have not been found yet, but are documented (in French) in the file VERSION.MAC by Marc Savary.
Version | Released | Notes |
---|---|---|
1.1 | 1987-??-?? | |
1.2 | 1987-??-?? | Card write fix (W option added). |
1.3 | 1988-??-?? | YM3812 waveform support added. |
1.31 | 1988-??-?? | YM3812 waveform support fixed for Sierra. |
1.5 | 1989-??-?? | Card write fix (W option now ignored), fSDInit improved (instant mute). |
1.51 | 1989-??-?? | Card write fix. |
Output
The driver outputs all sound to the YM3812 (OPL2) chip (usually on the Ad Lib Music Synthesizer Card and later competitors) at port 388h or the port specified using the P option.
Games
Dozens of games, especially those that use ROL format music, utilized Ad Lib Inc.'s sound driver. A few games, including BugBomber and Locomotion, neglect the B option, causing a lot of mute. Corrected minimum sizes should be mentioned on the corresponding game and song pages.
Downloads
Version | Download | Platform | Notes |
---|---|---|---|
1.3, 1.5, 1.51 | Download - (info) | DOS | Binaries only. |
Technical
The driver is called SOUND.COM and runs as a TSR (terminate and stay resident) program that can be called by the main program as follows:
MOV SI,functionnumber ; MSB ignored, possibly unintentional LES BX,arguments INT 65h
All arguments, except for instruments in events, can be freed after call. The interface is preceded by 24 bytes:
51 01 "SOUND-DRIVER-AD-LIB" 01 01 00
where the first stands for the minor version number in BCD. According to VERSION.MAC, only the 19 text characters need be compared to detect the driver's presence; the last two 1s are just a workaround for a bug in early versions.