ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Developer Kit For Sound Blaster Series ³ ³ Second Edition ³ ³ Copyright (c) Creative Technology Ltd, 1992-1993. ³ ³ All Rights Reserved. ³ ³ ³ ³ README.TXT ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ This README.TXT file contains information not printed in the manual. Please read this file carefully before you install the software. This README.TXT comprises the following sections: Important note after installation . . . . . . . . . 1 Versions of Sound Blaster supported by SBK . . . . . 2 Compilers supported by SBK . . . . . . . . . . . . 3 Files listing before and after installation . . . . 4 Important information about the Code Examples and Drivers . . . . . . . . . . . . . . . . . . . . . . 5 Errata . . . . . . . . . . . . . . . . . . . . . . . 6 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ 1. Important note after installation. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ a. After installing SBK, you must add the following lines in your CONFIG.SYS file :- For Sound Blaster 16 card : DEVICE=C:\SB16\DRV\CSP.SYS /UNIT=0 /BLASTER=A:220 DEVICE=C:\SB16\DRV\CTSB16.SYS /UNIT=0 /BLASTER=A:220 I:5 D:1 H:5 DEVICE=C:\SB16\DRV\CTMMSYS.SYS For Sound Blaster Pro and Pro 2 cards : DEVICE=C:\SBPRO\DRV\CTSBPRO.SYS /UNIT=0 /BLASTER=A:220 I:5 D:1 DEVICE=C:\SBPRO\DRV\CTMMSYS.SYS For Sound Blaster 2.0 card : DEVICE=C:\SB\DRV\CTSB2.SYS /UNIT=0 /BLASTER=A:220 I:5 D:1 DEVICE=C:\SB\DRV\CTMMSYS.SYS For Sound Blaster 1.0 and below cards : DEVICE=C:\SB\DRV\CTSB.SYS /UNIT=0 /BLASTER=A:220 I:5 D:1 DEVICE=C:\SB\DRV\CTMMSYS.SYS Note that this /BLASTER= setting and the BLASTER= environment string in your AUTOEXEC.BAT file must tally. For the /UNIT=x setting, you should increase x by one if you have another hardware dependent driver (e.g., CTSBPRO.SYS) installed. b. After adding the above lines, run the program USECARD in your \SBK directory to update your existing Sound Blaster drivers and programs in your Sound Blaster directory. The syntax to run USECARD is as follows: USECARD where cardname := SB1.0 for Sound Blaster 1.0 SB1.5 for Sound Blaster 1.5 SB2.0 for Sound Blaster 2.0 SBPRO for Sound Blaster Pro SBPRO2 for Sound Blaster Pro 2 SB16 for Sound Blaster 16 SBMCV for Sound Blaster Micro-Channel Version SBPROMCV for Sound Blaster Pro Micro-Channel Version existing Sound Blaster path := Path of existing Sound Blaster software. For example C:\SB16 Note: The path and cardname are not case-sensitive but the order of the command argument is important. The file USECARD.CFG is used by the USECARD program. Do not delete it. c. Reboot your system for the modifications to take effect. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ 2. Versions of Sound Blaster supported by SBK ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ The Developer Kit for SB Series supports Sound Blaster 16 (Advanced Signal Processor) or lower versions of Sound Blaster cards. You should note that the code examples were written primarily to exploit the features of Sound Blaster 16. If you are using Sound Blaster PRO 2 or a lower version, some of the functions in the code examples will not work and the effects may not be so good. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ 3. Compilers supported by SBK ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ SBK supports the following programming languages: - Microsoft Assembler version 4.0 or later - Microsoft C version 6.0 and 7.0 - Microsoft Visual C++ version 1.0 - Turbo C version 2.0 - Turbo C++ version 1.0 - Borland C++ version 2.0, 3.0 and 3.1 - Microsoft Quick Basic version 4.5 - Microsoft Basic Professional Development System version 7.1 - Microsoft Visual Basic for DOS version 1.0 - Turbo Pascal version 6.0 and 7.0 If you choose to install the SBK fully, you will have three sets of code examples (e.g., C, PASCAL, and BASIC) which performs the same functions. With a partial installation, you could choose to install only the code examples pertaining to the language(s) or compiler(s) you desire. Note : C Language refers to all C or C++ codes and compilers. BASIC refers to all Basic codes and compilers. PASCAL refers to all Pascal codes and compilers. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ 4. Files listing before and after installation. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Before the installation, you will see the following files in you diskette(s). disk.id install.exe cspcodes.pvl drivers.pvl examples.pvl helper.pvl include.pvl library.pvl lowlevel.pvl util.pvl readme.com readme.txt After the installation, the following files will reside in the target drive :- \SBK directory, README.TXT - This file. README.COM - Program to read README.TXT file. USECARD.EXE - Program to update your Sound Blaster drivers. USECARD.CFG - Configuration file for USECARD program. \SBK\CSP directory WI0006.CSP - aLAW compression code WI0007.CSP - uLAW compression code WI0200.CSP - Creative ADPCM compression code WO0006.CSP - aLAW decompression code WO0007.CSP - uLAW decompression code WO0200.CSP - Creative ADPCM decompression code \SBK\DRV directory Three types of driver:- Loadable drivers i.e. AUXDRV.DRV - Auxiliary driver for Mixer Chip control. BLASTER.DRV - Text-to-speech hardware dependent driver. CTTS.DRV - Text-to-speech interface driver. CTMIDI2.DRV - MIDI driver for SB1.0, SB1.5, SB2.0 and SBMCV. CTMIDIP.DRV - MIDI driver for SBPRO. CTMIDIP2.DRV - MIDI driver for SBPRO2 and SBPROMCV. CTMIDI16.DRV - MIDI driver for SB16. CT-VOICE.DRV - .VOC Memory mode driver. CTVDSK.DRV - .VOC Disk Double Buffering mode driver. CTWMEM.DRV - .WAV Memory mode driver. CTWDSK.DRV - .WAV Disk Double Buffering mode driver. Device drivers i.e. CSP.SYS - Creative Advanced Signal Processor driver. CTMMSYS.SYS - Creative Multimedia System driver. CTSB16.SYS - SB16 hardware dependent driver. CTSBPRO.SYS - SBPRO and SBPRO2 hardware dependent driver. CTSB2.SYS - SB2.0 hardware dependent driver. CTSB.SYS - SB or lower version hardware dependent driver. SBCD.SYS - Creative hardware drpendent CDROM driver. Terminate and Stay Resident drivers i.e. SBTALKER.EXE - Text-to-speech engine. SBTALK.BAT - Batch file to load SBTALKER.EXE driver. REMOVE.EXE - Program to remove SBTALKER.EXE from memory. Note : Not all the files listed below will be installed in your directory. The files listed will depend on the type of language version you have installed. \SBK\INCLUDE directory To distinguish different types of programming languages, the character '?' is used to denote 'H', 'BI' and 'INC' for C language, Basic and PASCAL respectively. CTSTDDEF.H - General C language macros, constants and type definitions. CTMMLL.H - Header file for CTMMSYS.SYS driver interface. CTMMSYS.H - Header file for CTMMSYS.SYS driver interface. SBKAUX.? - Header file for AUXDRV.DRV driver interface. SBKCD.? - Header file for SBCD.SYS driver interface. SBKMIDI.? - Header file for CTMIDI.DRV driver interface. SBKTS.? - Header file for CTTS.DRV driver interface. SBKVOICE.? - Header file for CT-VOICE.DRV and CTVDSK.DRV drivers interface. SBKWAVE.? - Header file for CTWMEM.DRV and CTWDSK.DRV drivers interface. SBKMACRO.H - Macros for Microsoft C, Turbo C and Borland C compilers. SBKX.? - Header file for helper functions. LOADDRV.C - General function to load a loadable driver into memory. \SBK\LIB directory BASIC version libraries :- SBKBC7.LIB - MS Basic PDS version 7.1 library. SBKBC7.QLB - MS Basic PDS version 7.1 Quick library. BC7SBKX.LIB - MS Basic PDS version 7.1 helper library. SBKQB45.LIB - MS Quick Basic version 4.5 library. SBKQB45.QLB - MS Quick Basic version 4.5 Quick library. QBSBKX.LIB - MS Quick Basic version 4.5 helper library. SBKVB.LIB - MS Visual Basic (DOS) version 1.0 library. SBKVB.QLB - MS Visual Basic (DOS) version 1.0 Quick library. VBSBKX.LIB - MS Visual Basic (DOS) version 1.0 helper library. C language version libraries :- SBKLIBS.LIB - Small memory model library. SBKLIBC.LIB - Compact memory model library. SBKLIBM.LIB - Medium memory model library. SBKLIBL.LIB - Large memory model library. CSBKX.LIB - Memory model independent helper library. PASCAL version units :- SBKTP6.TPU - Turbo Pascal version 6.0 unit. TP6SBKX.TPU - Turbo Pascal version 6.0 helper unit. SBKTP7.TPU - Turbo Pascal version 7.0 unit. TP7SBKX.TPU - Turbo Pascal version 7.0 helper unit. \SBK\HELPER directory ADDXADJ.ASM - BSTRING.ASM - CVTTYPE.ASM - Source for helper functions. CTMMSYS.ASM - DOSRW.ASM - For detail information, read the header FILEIO.ASM - of each individual file. MEMORY.ASM - XMSRTN.ASM - SBKMODEL.INC - SBKHELP.TXT - Describes SBK helper functions in detailed. \BASIC sub-directory MSBKX.BAS - BASIC helper source for MS PDS version 7.1 and MS Visual Basic (DOS) version 1.0 QSBKX.BAS - BASIC helper source for MS Quick Basic version 4.5. MKBHLP.MK - BASIC libraries make file. BHLP.BAT - Batch file to build BASIC libraries. \CLANG sub-directory MKCHLP.MK - C libraries make file. CHLP.BAT - Batch file to build C libraries. \PASCAL sub-directory SBKX.PAS - PASCAL helper source. MKPHLP.MK - PASCAL units make file. PHLP.BAT - Batch file to build PASCAL units. \SBK\EXAMPLES directory The character '?' is used to denote 'BAS', 'C' and 'PAS' for BASIC, C and PASCAL respectively. In below "xxxx" can be "BASIC" "CLANG" or "PASCAL. It depends on the type of language version installed. \xxxx\CDROM sub-directory DEMOCD.? - Sample program to play Compact Disc player. DEMOCD.MAK - Make file for Borland C and Turbo C compiler. \xxxx\GENERAL sub-directory SBKBLST.? - Sample program to interpret BLASTER environment settings. SBKVER.? - Program to check SBK library's version. \xxxx\MIDI sub-directory DEMOMIDI.? - Sample program to play MIDI files. DEMOMIDI.MAK - Make file for Borland C and Turbo C compiler. MIDIIN.? - Sample program to perform MIDI input (record) with time-stamped. MIDIIN.MAK - Make file for Borland C and Turbo C compiler. MIDIOUT.? - Sample program to perform MIDI output note by note. MIDIOUT.MAK - Make file for Borland C and Turbo C compiler. \xxxx\MIXER sub-directory DEMOMIX.? - Sample program to control Creative Mixer chip. Set volume, tone etc. DEMOMIX.MAK - Make file for Borland C and Turbo C compiler. DEMOFADE.? - Sample program to demonstrate fading effect. DEMOFADE.MAK - Make file for Borland C and Turbo C compiler. DEMOPAN.? - Sample program to demonstrate panning effect. DEMOPAN.MAK - Make file for Borland C and Turbo C compiler. \xxxx\SPEECH sub-directory DEMOCTTS.? - Sample program to demonstrate text to speech operation. DEMOCTTS.MAK - Make file for Borland C and Turbo C compiler. \xxxx\VOICE sub-directory DEMOVMR.? - Sample program to record Voice direct to conventional memory. DEMOVMR.MAK - Make file for Borland C and Turbo C compiler. DEMOVXP.? - Sample program to play Voice direct from extended memory. DEMOVXP.MAK - Make file for Borland C and Turbo C compiler. DEMOVXR.? - Sample program to record Voice direct to extended memory. DEMOVXR.MAK - Make file for Borland C and Turbo C compiler. DEMOWDP.? - Sample program to play a Wave file direct from disk. DEMOWDP.MAK - Make file for Borland C and Turbo C compiler. DEMOWDR.? - Sample program to record a compressed/ uncompressed Wave file direct to disk. DEMOWDR.MAK - Make file for Borland C and Turbo C compiler. DEMOWMP.? - Sample program to play Wave direct from memory. DEMOWMP.MAK - Make file for Borland C and Turbo C compiler. VOCWALK.? - Sample program to interpret Creative Voice File Format. VOCWALK.MAK - Make file for Borland C and Turbo C compiler. \SBK\EXAMPLES\LOWLEVEL directory \MIDI\ sub-directory CTMIDILL.ASM - Sample program to demonstrate direct hardware programming for MIDI operation. \VOICE\ sub-directory These two programs access CTMMSYS.SYS directly. CTMMPLAY.C - Sample program to play raw digitized data direct from disk. CTMMPLAY.MAK - Make file for Borland C and Turbo C compiler. CTMMREC.C - Sample program to record raw digitized data direct to disk. CTMMREC.MAK - Make file for Borland C and Turbo C compiler. \SBK\VOCUTIL directory Update version of digitized sound playback and recording utils. VPLAY.EXE - Creative Voice playback util. VREC.EXE - Creative Voice recording util. WPLAY.EXE - Microsoft Wave playback util. WREC.EXE - Microsoft Wave recording util. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ 5. Important information about the Code Examples and Drivers ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ  CODE EXAMPLES a. Code examples are provided to show you the basic steps to program the Sound Blaster family of cards. If you find the sub-functions in the examples useful, feel free to extract and use these functions. b. Please note that the code examples assume that the memory allocated will be freed by DOS upon their termination. c. Before you compile and execute the code examples, please read through the header of each individual file to get a detailed description of each program. d. If you are executing the code under Quick Basic or Microsoft Basic PDS environment, you may get an error message indicating insufficient memory space. This is because the code examples requires a large memory buffer for the I/O process.  DRIVERS a. The MIDI drivers CTMIDI2.DRV, CTMIDIP.DRV, CTMIDIP2.DRV and CTMIDI16.DRV are hardware dependent. You need to copy one of these drivers to CTMIDI.DRV, depending on the version of Sound Blaster card you are using. For a description of these drivers, please read the section, "3. Files listing before and after installation", in the \SBK\DRV directory. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ 6. ERRATA ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Please take note of the following printing errors in the Library Reference manual. a. On page 5-11 // DISK_INFO should be DISC_INFO // DISKxINFO should be DISCxINFO sbcdGetDiscInfo(DISK_INFO far *lpBuffer) sbcdGetDiscInfo(var lpBuffer: DISK_INFO): integer sbcdGetDiscInfo%(SEG lpBuffer AS DISKxINFO) b. On page 3-7 // The message CSPDM_STATE_Query is missing. // The following source has been added to // CTMMSYS.H file under the \INCLUDE directory: /*** For CSPDM_STATE_Query * * Invocation * ---------- * CSPSTATE CspState; --- THE END --- * * MmSysProc(hDev, MMDEVICE_CSP, CSPDM_STATE_Query, * (DWORD)(LPCSPSTATE)&CspState, PARAM_UNUSED); * * Return value * ------------ * MMSTATUS_SUCCESS * MMSTATUS_BAD_HANDLE */ typedef DWORD CSPSTATE; typedef CSPSTATE FAR *LPCSPSTATE; #define CSPSTATE_INACTIVE 0 #define CSPSTATE_STANDBY 1 #define CSPSTATE_ACTIVE 2 c. On page 4-6 ctmdGetEnvSettings // Under section "Remarks", the following addition notes are added: NOTE: The driver only analyses the syntax of the BLASTER environment string and will not responsible for ensuring the physical hardware setting is set correctly. No default settings will be assumed in this case, application needs to quit if the call is failed. // Under section "Return Value", the error messages have been changed // as following: Return Value Zero if successful or else a word with following bit(s) set to indicate error: Bit 0 - unrecognised Base I/O Address Bit 1 - unrecognised IRQ Bit 2 - unrecognised MPU-401 Base I/O Address Bit 15 - calling sequence error d. On page 4-8 ctmdGetMidiEnvSettings // Under section "Remarks" the following note is added: NOTE: If the call is failed, application can still proceed, driver will use the default value. // Under section "Return Value" the errror messages have been changed // as following: Return Value Zero if successful or else a word with the following bit(s) set to indicate error: Bit 0 - unrecognised SYNTH:option Bit 1 - unrecognised MAP:option Bit 15 - calling sequence error -- THE END --