Creative Developers' Corner - Programmer's Handbook

Developer Kit for Sound Blaster Series FAQ

  1. What is the SBK2?
  2. What are the contents and features of the SBK2?
  3. What are the prerequisites for developers to use the SBK2?
  4. What cards does the SBK2 support?
  5. What platforms/OS does the SBK2 support?
  6. What programming languages and compilers does the SBK2 support?
  7. Does the SBK2 contain low-level programming information?
  8. How do I obtain the SBK2? Is there any cost involved?
  9. What audio files are supported by the SBK2 library and drivers?
  10. Since the SBK2 is for DOS, how do I program the audio card in Windows?
  11. Does the SBK2 support protected mode programming?
  12. What MIDI support does the SBK2 provide?
  13. How do I control the SB Mixer, such as volume setting and audio source selection, from my program?
  14. Can my application control SoundFonts on my AWE32 using the SBK2?
  15. How do I program the 3D Positional Audio on my AWE32?
  16. Why does my DOS program sometimes hang when running under Windows 3.1x DOS-box?
  17. Can I control the functioning of the CD-ROM drive as a CD player?
  18. Can I program 2 SB cards on the same PC simultaneously?
  19. Can my program, which is written for the SBPro, run on the SB16?
  20. Where can I get file formats for .VOC, .WAV and .MID?
  21. How do I program the FM Synthesizers OPL-2 & OPL-3?
  22. Can I configure DMA and Interrupt settings on my SB32 PnP card by writing to Mixer registers 80h and 81h of the card?

What is the SBK2?

SBK2 stands for the Developer Kit for Sound Blaster Series, 2nd Edition. It is designed for any third party DOS developer or user who wants to write programs that exploit the features of Creative's line of Sound Blaster audio cards.

Return to Menu


What are the contents and features of the SBK2?

The SBK2 contains the following documentation:

The library functions supporting the drivers are categorized as follow:

Digitized Sound Input & Output
for playback and recording of digital audio data.
FM Synthesized Music Output
MIDI Port Input & Output
allows interfaces with the FM Synthesizer and other external MIDI devices.
Mixer Control
allows adding of special effects like fade and pan to digitized sound and music, volume control and selection of recording and playback source.
CD-ROM Driver Audio Interface
for controlling the CD-ROM like an audio CD player.

The Hardware Programming Reference covers the following sections:

Hardware Overview
provides an anatomy of Sound Blaster family of audio cards
Introduction to Digital Sound Processor Programming
covers basic concept of programming the Digital Sound Processor
Digitized Sound I/O Programming
covers Direct-mode and DMA mode programming of digitized audio with sample procedures on all the 8-bit and 16-bit transfer modes
Mixer Chip Programming
provides programming sequence and descriptions of features and register functions for the various versions of Mixer chips
MIDI Port I/O Programming
covers MIDI port I/O programming for both SB-MIDI mode and MPU-401 UART mode.
Sound Blaster I/O Address Maps
provides I/O address maps for the range of Sound Blaster family of audio cards.

Return to Menu


What are the prerequisites for developers to use the SBK2?

You should be familiar with any of the common programming languages like C, Pascal, Basic or Assembly; have some knowledge in writing DOS program. Some understanding in music, digital audio will be an added advantage.

Return to Menu


What cards does the SBK2 support?

The SBK2 supports Sound Blaster, Sound Blaster Pro, Sound Blaster 16, and Sound Blaster 32 as well as Sound Blaster AWE32.

Return to Menu


What platforms/OS does the SBK2 support?

Only DOS is supported by the SBK2 libraries and drivers. However the hardware programming information is useful for development of drivers on other PC-based platforms.

Return to Menu


What programming languages and compilers does the SBK2 support?

It supports:

Return to Menu


Does the SBK2 contain low-level hardware programming information?

Yes, the SBK2 includes a Hardware Programming Reference document that describes hardware architecture for developers and users who intend to do hardware-level programming.

Return to Menu


How do I obtain the SBK2? Is there any cost involved?

The SBK2 is available to public for free.

You can download it now (1,143k).

Return to Menu


What audio files are supported by the SBK2 library and drivers?

The SBK2 library and drivers support VOC, WAV and MID file formats.

Return to Menu


Since the SBK2 is for DOS, how do I program the audio card in Windows?

You can refer to Microsoft Windows API under the Multimedia category which is available in Windows compiler like MS Visual C/C++. You can either use the low-level audio functions or Media Control Interface (MCI) commands.

Return to Menu


Does the SBK2 support protected mode programming?

The SBK2 library and drivers do not support protected mode programming. However, you may use the Hardware Programming Reference to program the Sound Blaster audio cards directly in protected mode.

Return to Menu


What MIDI support does the SBK2 provide?

The SBK2 provides a programming library to do playback and recording of MIDI event codes. The library also supports the playback of Standard MIDI files (.MID). You may use hardware-level programming to control external MIDI devices attached to the SB-MIDI port or the MPU-401 port.

Return to Menu


How do I control the SB Mixer, such as volume setting and audio source selection, from my program?

You could either program the SB Mixer through the AUXDRV.DRV driver or do direct hardware-level programming of the SB Mixer registers.

Return to Menu


Can my application control SoundFonts on my AWE32 using the SBK2?

No, the SBK2 does not cover the SoundFont programming. You will need to refer to the AWE32 Developer Information Pack.

Return to Menu


How do I program the 3D Positional Audio on my AWE32?

You will need to refer to the AWE32 Developer Information Pack, which is available as a separate programming reference.

Return to Menu


Why does my DOS program sometimes hang when running under Windows 3.1x DOS-box?

When your DOS program is producing a sound on the SB, it will need to do a DMA transfer. This DMA transfer is also managed through Windows 3.1x's system's virtual DMA driver. Note that Windows 3.1x is a "protected-mode" operating system. Therefore, when your DOS program, a real-mode program, accesses the DMA controller directly from within a DOS-box (under V86 mode), it may crash with Windows' system's, thus causing a hang. Therefore, when you have a DOS program that runs in the Windows 3.1x DOS-box, your program will need to detect for the presence of the virtual DMA and then access the virtual DMA driver. You will need to refer to the Microsoft virtual DMA programming specification.

Return to Menu


Can I control the functioning of the CD-ROM drive as a CD player?

Yes, you can program the CD-ROM drive via the Creative Multimedia System Driver. Another alternative is to use IOCTL calls to control the MSCDEX.EXE (Microsoft Compact Disc Extension) driver directly to access the CD-ROM drive. You can access the drive status, manipulate audio playback and control the CD-ROM drive tray.

Return to Menu


Can I program 2 SB cards on the same PC simultaneously?

Yes, you may program 2 SB cards concurrently on the same PC by using hardware-level programming, provided that you have enough different base addresses, interrupts and DMA channels for both cards to use. Note that the SBK2 library and drivers do not support multiple cards.

Return to Menu


Can my program, which is written for the SBPro, run on the SB16?

Yes, with the Creative Multimedia System Driver, since it provides a device-independent Application Programming Interface. Therefore, your SBPro program if based on this SBK2 library will still run on the SB16, provided that you have the respective drivers and your program performs actions within the capability of the card.

Return to Menu


Where can I get file formats for .VOC, .WAV and .MID?

For .VOC file format, you can refer to the SBK2 Library Reference. For .WAV file format, you can either contact Microsoft or refer to commercially available reference books on PC digital audio programming. As for .MID file format, you can obtain the MIDI 1.0 Detailed Specification or Standard MIDI Files 1.0 from MIDI Manufacturers Association.

Return to Menu


How do I program the FM Synthesizers OPL-2 & OPL-3?

Hardware programming information of the OPL-2 and OPL-3 are not included in the SBK2. However, if you are interested, you may download a sample file for programming the OPL-3 directly.

Return to Menu


Can I configure DMA and Interrupt settings on my SB32 PnP card by writing to Mixer registers 80h and 81h of the card?

Since all PnP devices are configured by the PnP configuration manager, like Creative Configuration Manager, during boot-up in DOS, the Mixer registers 80h and 81h have been restricted to only the READ operation. Therefore, you cannot change the DMA and Interrupt settings through software. This also applies to the SB AWE32 PnP and PhoneBlaster 28.8 PnP cards.

Return to Menu


Creative Zone Developers' Corner ©1996 Creative Labs, Inc.