Sound Blaster SeriesHardware Programming Guide Hardware Overview Digital Sound Processor Mixer MIDI Port
x IntroductionChapter 3, "Digitized Sound I/O Programming", describes the programminginformation for digitized sound I/O. This covers 8-bit
DSP Commands 6-1541hSet digitized sound output sampling rateOutput 41h, wSamplingRate.HighByte, wSamplingRate.LowByteRemarks Valid sampling rates rang
6-16 DSP Commands48hSet DSP block transfer sizeOutput 48h, wBlockSize.LowByte, wBlockSize.HighByteRemarks The DSP will generate an interrupt after tra
DSP Commands 6-1775hCreative 8-bit to 4-bit ADPCM single-cycle DMAmode digitized sound output with reference byteOutput 75h, wLength.LowByte, wLength.
6-18 DSP Commands77hCreative 8-bit to 3-bit ADPCM single-cycle DMAmode digitized sound output with reference byteOutput 77h, wLength.LowByte, wLength.
DSP Commands 6-197FhCreative 8-bit to 3-bit ADPCM auto-init DMA modedigitized sound output with reference byteOutput 7FhRemarks Refer to command 1Fh.S
6-20 DSP Commands90h8-bit high-speed auto-init DMA mode digitizedsound outputOutput 90hRemarks The DSP will generate an interrupt to signal the applic
DSP Commands 6-2198h8-bit high-speed auto-init DMA mode digitizedsound inputOutput 98hRemarks Refer to command 90h.See Also command 90h, 8-bit high-sp
6-22 DSP CommandsA0hSet input mode to monoOutput A0hRemarks The default input mode is mono.See Also command A8h, Set input mode to stereoAvailable1.xx
DSP Commands 6-23BxhProgram 16-bit DMA mode digitized sound I/OOutput bCommand, bMode, wLength.LowByte, wLength.HighByteRemarks The bCommand byte is o
6-24 DSP CommandsCxhProgram 8-bit DMA mode digitized sound I/OOutput bCommand, bMode, wLength.LowByte, wLength.HighByteRemarks Except for the high nib
Introduction xiTo help you to locate and identify information easily, this manual uses visual cuesand standard text formats. The following typographic
DSP Commands 6-25D1hTurn on speakerOutput D1hRemarks The speaker here refers to the connection of the digitized sound output to theamplifier input. I
6-26 DSP CommandsD3hTurn off speakerOutput D3hRemarks The DSP takes a maximum of 220 milliseconds to complete this command.Some important notes:1. On
DSP Commands 6-27D5hPause 16-bit DMA mode digitized sound I/OOutput D5hRemarks This acts on I/O initiated by command Bxh. Applicable to both single-c
6-28 DSP CommandsD8hGet speaker statusOutput D8hRemarks Returns the digitized sound output speaker status. After sending this command, readback a byt
DSP Commands 6-29DAhExit 8-bit auto-init DMA mode digitized sound I/OOutput DAhRemarks Exits at the end of the current 8-bit auto-init DMA block trans
Appendix ASound Blaster I/O Address MapsThis appendix lists the I/O addresses used by Sound Blaster cards.The base I/O addresses are selectable to avo
A-2 Sound Blaster I/O Address MapsSB1.5 I/O Address MapSound Blaster version 1.5 or earlier uses I/O addresses 2x0h - 2xFh, where x isnumber from 1 to
Sound Blaster I/O Address Maps A-3SBMCV I/O Address MapSound Blaster for Micro Channel Version uses I/O addresses 2x0h - 2xFh, where x isa number from
A-4 Sound Blaster I/O Address MapsSB2.0 I/O Address MapSound Blaster 2.0 uses base I/O address 220h or 240h. These are jumper selectable.Base Address
Sound Blaster I/O Address Maps A-5SB2CD I/O Address MapSound Blaster 2.0 CD Interface uses base I/O address 250h or 260h. These arejumper selectable.
xii IntroductionThe following DSP version notations will be used in the discussions:Version Notation Description 1.xx This means DSPs with major ve
A-6 Sound Blaster I/O Address MapsSBPRO I/O Address MapSound Blaster Pro uses base I/O address 220h or 240h. These are jumper selectable.Base Address
Sound Blaster I/O Address Maps A-7The following table lists the functions of the I/O ports on the Sound Blaster Pro that usesthe OPL3 chip:I/O Address
A-8 Sound Blaster I/O Address MapsSBPRO MCV I/O Address MapSound Blaster Pro for Micro Channel Version uses base I/O address 220h or 240h.These are ju
Sound Blaster I/O Address Maps A-9SB16 I/O Address MapSound Blaster 16 uses base I/O address 220h, 240h, 260h or 280h. These are jumperselectable.Bas
A-10 Sound Blaster I/O Address MapsSound Blaster 16 also uses the following I/O addresses for MPU-401 UART modesupport. The base I/O address is jumpe
Appendix BFile FormatThis appendix provides information about the Creative Voice File (.VOC) format andthe Creative ADPCM wave type format registered
B-2 File FormatCreative Voice File (VOC) FormatThe Creative Voice File is organized in two main blocks, the Header Block and DataBlock.The Header Bloc
File Format B-3Offset (Hex) Description18H - 19H .VOC file identification code.This code allows your program to check that this file is a.VOC file.It
B-4 File FormatBlock Type 1This is a digitized sound data block. The Block Header is organized as follows:BYTE bBlockID; // == 1BYTE nBlockLen[3]; //
File Format B-5Some points to note for Block Type 1:1. If this block is preceded by Block Type 8 (discussed later), the digitizedsound attributes on
Introduction xiiiDetermining User's Card SettingsMost of the Sound Blaster card settings are jumper selectable to avoid conflicts withother perip
B-6 File FormatHere is a discussion of various fields:bBlockIDThe Block Type identifier is 3.nBlockLenLength of the block (in bytes), excluding the bB
File Format B-7During digitized sound output, the CT-VOICE and CTVDSK driversupdate the digitized sound status word with this value when the marker is
B-8 File FormatHere is a discussion of various fields:bBlockIDThe Block Type identifier is 6.nBlockLenLength of the block (in bytes), excluding the bB
File Format B-9Block Type 8This is a special block that carries only the digitized sound attributes. It MUST precedeBlock Type 1. Usually, this bloc
B-10 File FormatFor a 22 050Hz sampling rate stereo digitized sound, the Time Constantis calculated as follows:Time Constant = 65536 - (256 000 000 /
File Format B-11nBlockLenLength of the block (in bytes), excluding the bBlockID and nBlockLenfields.The value will be the digitized sound data length
B-12 File FormatCreative ADPCM Wave Type FormatWAVE_FORMAT_CREATIVE_ADPCM, the name for a new .WAV format tag,0x0200 has been registered with Microsof
Appendix CRelevant InformationIf you need more information on the digital audio, MIDI, joystick, ProgrammableInterrupt Controller (PIC) or Direct Memo
C-2 Relevant InformationMIDIFor more information on MIDI, see the following book:MIDI: A Comprehensive introductionJoseph RothsteinA-R Editions, IncPI
IndexA______________________________ADPCM modeauto-initialize8-bit to 2-bit, 3-158-bit to 3-bit, 3-158-bit to 4-bit, 3-15definition, 3-7DSP versions s
Chapter 1Hardware OverviewThis chapter gives an overview of the hardware architecture of the Sound Blasterfamily of audio cards. It is meant for deve
2 IndexSB-MIDI UART mode, 5-3F______________________________FIFO, 1-4, 6-23FM SynthesizersOPL2, 1-3OPL3, 1-3H______________________________High-speed
1-2 Hardware OverviewAnatomy of Sound Blaster Family of AudioCardsThis section describes the major building blocks of the Sound Blaster family of audi
Hardware Overview 1-3Different DSP versions are used on various versions of Sound Blaster family cards.Over the years, the functionality of the DSP ha
1-4 Hardware OverviewBus Interface ChipThe Bus Interface Chip (CT1336) is responsible for providing handshake signals anddata transfer between the ISA
Hardware Overview 1-5These are the main features of the Advanced Signal Processor:16-bit DSP core16-bit x 16-bit => 32-bit Multiplier192 x 16-bi
1-6 Hardware OverviewBlock Diagrams for Sound Blaster Family ofAudio CardsAfter presenting the introduction to the major building blocks of Sound Bla
License Agreement/Limitation And DisclaimerOf WarrantiesPLEASE NOTE : BY DOWNLOADING AND/OR USING THE SOFTWARE AND/OR MANUALACCOMPANYING THIS LICENSE
Hardware Overview 1-7CT1335Mixer ChipCDInterfacePowerAmp.ISABUSISABUSTO CD-ROM DriveSPKRMUSIC INVOICE INCD INFigure 1-3: Block Diagram of the Sound Bl
1-8 Hardware OverviewCT1336BUSINTERFACECHIPJOYSTICKPORTCT1341DSPFMSYNTHESIZERMIDIPORTCDINTERFACEISABUSCONTROLCOMMAND/DATACT1345MIXERCHIPPOWERAMPVOICE
Hardware Overview 1-9CT1746BUSINTERFACECHIPJOYSTICKPORTMIDI PORTSB and MPU-401COMPATIBLECDINTERFACEISABUSCOMMAND/ DATACT1745MIXERCHIPPOWERAMPMIC I
Chapter 2Introduction to DSP ProgrammingThis chapter discusses the essentials for programming the Creative Digital SoundProcessor (DSP). The DSP chip
2-2 Introduction to DSP ProgrammingDSP I/O AddressesThe DSP is programmed through four selectable I/O addresses on the Sound Blastercards. The follow
Introduction to DSP Programming 2-3Sound Blaster card may not be installed or an incorrect I/O address is being used.You should exit the reset process
2-4 Introduction to DSP ProgrammingWriting to DSPDSP commands and data are sent through the Write Command/Data port.Before data is written to the DSP,
Introduction to DSP Programming 2-5Sharing of InterruptsWith DSP version 4.xx, four interrupts use the same Interrupt Request (IRQ) line.These are the
2-6 Introduction to DSP ProgrammingThe following assembly code fragment illustrates the interrupt handling portionwithin a 16-bit DMA mode digitized s
Introduction to DSP Programming 2-7The byte from register 81h is interpreted as follows:D7 D6 D5 D4 D3 D2 D1 D0DMA7DMA6DMA5DMA3DMA1DMA0where the graye
LIMITATION OF LIABILITYIn no event will Creative Technology Ltd., or anyone else involved in the creation, production, and/ordelivery of this software
Chapter 3Digitized Sound I/O ProgrammingThis chapter discusses the techniques of programming the DSP for digitized soundI/O and introduces the operati
3-2 Digitized Sound I/O ProgrammingDigitized Sound Operation ModesThis section describes the digitized sound data format and various digitized soundop
Digitized Sound I/O Programming 3-3The order of the data varies between 8-bit and 16-bit data, and mono and stereoformats. The following show the dat
3-4 Digitized Sound I/O ProgrammingDigitized Sound I/O Transfer RateOther than direct mode, all the digitized sound I/O operation modes require thetra
Digitized Sound I/O Programming 3-5Single-cycle DMA ModeIn single-cycle DMA mode digitized sound I/O transfer, the DSP is programmed tomake one transf
3-6 Digitized Sound I/O ProgrammingThere are two ways to terminate auto-initialize DMA mode transfer:1. Program the DSP to switch to single-cycle DMA
Digitized Sound I/O Programming 3-7ADPCM DMA modeThe compression technique used by the DSP is known as ADPCM (Adaptive DeltaPulse Code Modulation). T
3-8 Digitized Sound I/O ProgrammingDSP Digitized Sound I/O CapabilityBecause the DSP is periodically enhanced, the capabilities of the DSP particularl
Digitized Sound I/O Programming 3-9The tables below list the sampling ranges for the supported DMA modes among thevarious DSP versions. Normal on the
3-10 Digitized Sound I/O ProgrammingDigitized Sound Input CapabilityDSP Version Transfer Mode Data Format Sampling Range4.xx Mono/Normal 8-bit unsigne
ContentsIntroductionWhat You Should Know...ixScope and Man
Digitized Sound I/O Programming 3-11Sample ProceduresThis section provides step by step procedures needed to perform the various DMAmodes of digitized
3-12 Digitized Sound I/O ProgrammingGeneral Procedures for a DMA mode TransferThe general steps for programming the DSP for digitized sound data trans
Digitized Sound I/O Programming 3-138-bit Mono Single-cycle TransferThe following are the steps needed to perform 8-bit mono PCM and ADPCM single-cycl
3-14 Digitized Sound I/O ProgrammingWhen the DSP sends an interrupt, the following steps should be done in the interruptservice routine:1. Program th
Digitized Sound I/O Programming 3-158-bit Mono Auto-initialize TransferThe following are the steps needed to perform 8-bit mono PCM and ADPCMauto-init
3-16 Digitized Sound I/O ProgrammingWhen the DSP sends an interrupt, the following steps should be done in the interruptservice routine:1. Transfer da
Digitized Sound I/O Programming 3-178-bit Mono High-Speed Single-cycle TransferThe following are the steps needed to perform 8-bit mono PCM high-speed
3-18 Digitized Sound I/O ProgrammingAt the end of data transfer:1. Turn off the DAC speaker.outp(wSBCBaseAddx+0xC, 0xD3)2. Disable the interrupt used.
Digitized Sound I/O Programming 3-198-bit Mono High-Speed Auto-initialize TransferThe following are the steps needed to perform 8-bit mono PCM high-sp
3-20 Digitized Sound I/O ProgrammingTo stop high-speed auto-initialize DMA mode, send the reset DSP command.At the end of data transfer:1. Turn off th
Contents vSample Procedures ...3-10General Procedures f
Digitized Sound I/O Programming 3-218-bit Stereo High-speed Single-cycle TransferThe following are the steps needed to perform 8-bit stereo PCM high-s
3-22 Digitized Sound I/O Programming8. Set the DSP block transfer size.outp(wSBCBaseAddx+0xC, 0x48)outp(wSBCBaseAddx+0xC, wBlkSize.LowByte)outp(wSBCBa
Digitized Sound I/O Programming 3-238-bit Stereo High-Speed Auto-initialize TransferThe following are the steps needed to perform 8-bit stereo PCM hig
3-24 Digitized Sound I/O Programming9. Set the DSP block transfer size.outp(wSBCBaseAddx+0xC, 0x48)outp(wSBCBaseAddx+0xC, wBlkSize.LowByte)outp(wSBCBa
Digitized Sound I/O Programming 3-253. Turn off the DAC speaker.outp(wSBCBaseAddx+0xC, 0xD3)4. Disable the interrupt used.5. Restore the original inte
3-26 Digitized Sound I/O Programming8-bit or 16-bit Single-cycle TransferThe following are the steps needed to perform 8-bit or 16-bit and mono or ste
Digitized Sound I/O Programming 3-27bMode is one of the following:bMode Description00h8-bit mono unsigned PCM20h8-bit stereo unsigned PCM10h16-bit mon
3-28 Digitized Sound I/O Programming8-bit or 16-bit Auto-initialize TransferThe following are the steps needed to perform 8-bit or 16-bit and mono or
Digitized Sound I/O Programming 3-29bMode is one of the following:bMode Description00h8-bit mono unsigned PCM20h8-bit stereo unsigned PCM10h16-bit mon
Chapter 4Mixer Chip ProgrammingThree different mixer chips are used on Sound Blaster cards: CT1335, CT1345 andCT1745. CT1335 is used on the Sound Bla
vi ContentsAppendix A Sound Blaster I/O Address MapsSB1.5 I/O Address Map...
4-2 Mixer Chip ProgrammingProgramming SequenceEach mixer chip uses two consecutive I/O ports: 2x4h and 2x5h where x depends onthe jumper selectable se
Mixer Chip Programming 4-3Certain bits in a mixer register may be reserved, in which case their values areundefined. When these bits are accessed, yo
4-4 Mixer Chip ProgrammingCT1335 MixerThis section describes the features and register functions of the CT1335 mixer chipused on the Sound Blaster 2.0
Mixer Chip Programming 4-5The function of each register is discussed below:Register 0x00 (Reset Mixer)Write any 8-bit value to this register to reset
4-6 Mixer Chip ProgrammingCT1345 MixerThis section describes the features and register functions of the CT1345 mixer chipused on the Sound Blaster Pro
Mixer Chip Programming 4-7Stereo Digitized Sound Output SwitchThere is a switch on CT1345 to toggle digitized sound output data between the leftand ri
4-8 Mixer Chip ProgrammingRegister 0x0A (Mic mixing volume)2 bits, giving 4 levels.0 to 3 ⇒ – 46 dB to 0 dB, in approximate 7 dB steps.Default is 0 ⇒
Mixer Chip Programming 4-9Register 0x0E:1 (Stereo Switch)Digitized sound data stereo output switch.This must be switched back to default as soon as st
4-10 Mixer Chip ProgrammingCT1745 MixerThis section describes the features and register functions of the CT1745 mixer chipused on the Sound Blaster 16
Mixer Chip Programming 4-11Microphone Automatic Gain Control (AGC)Helps to maintain the mic input signal at a reasonable level.Gain ControlIndependent
List of Figures and TablesFiguresFigure 1-1 Block Diagram of the Advanced Signal Processor...1-4Figure 1-2 Block Di
4-12 Mixer Chip ProgrammingIndexD7 D6 D5 D4 D3 D2 D1 D00x00Reset Mixer0x04Voice volume.L Voice volume.R0x0AMic volume0x22Master volume. L Master volum
Mixer Chip Programming 4-13Figure 4-4: Logical Schematic of the Output Mixing Paths
4-14 Mixer Chip ProgrammingFigure 4-5: Logical Schematic of the Input Mixing Paths
Mixer Chip Programming 4-15The function of each register is discussed below:Register 0x00 (Reset Mixer)Write any 8-bit value to this register to reset
4-16 Mixer Chip ProgrammingRegisters 0x38/0x39 (Line volume .L/.R)Register 0x3A (Mic volume)5 bits per channel, giving 32 levels.0 to 31 ⇒ – 62 dB to
Mixer Chip Programming 4-17Registers 0x3F/0x40 (Input Gain .L/.R)Registers 0x41/0x42 (Output Gain .L/.R)2 bits per channel, giving 4 levels.0 to 3 ⇒ 0
Chapter 5MIDI Port I/O ProgrammingThis chapter discusses Sound Blaster MIDI (SB-MIDI) and MPU-401 UART modeprogramming. SB-MIDI port is available on
5-2 MIDI Port I/O ProgrammingSB-MIDI ModeSB-MIDI mode provides an interface for MIDI I/O in Normal mode as well as UARTmode. UART mode requires a DSP
MIDI Port I/O Programming 5-3Sending MIDI DataThe following contrasts the difference between sending MIDI data in Normal modeand UART mode:Normal Mode
5-4 MIDI Port I/O ProgrammingReading MIDI DataWhen MIDI data is available from an external MIDI device, it can be read in fromthe DSP data port. As m
IntroductionThis manual covers the hardware programming information for the following SoundBlaster cards:Sound BlasterTM Version 1.5 or earlier (SB1.
MIDI Port I/O Programming 5-5MPU-401 UART ModeOnly the MPU-401 UART (or pass-through) mode is supported on Sound Blaster 16. Inthis mode, the interfa
5-6 MIDI Port I/O ProgrammingChecking the StatusBefore writing a command byte or MIDI data to (or reading a data byte or MIDI datafrom) the MPU-401 in
MIDI Port I/O Programming 5-7Sending a CommandCommands are sent through the Command port to control the operation of the interface.Before sending the
5-8 MIDI Port I/O ProgrammingResetThe command byte 0FFh is used to reset the MPU-401 interface. After resetting theinterface, a Command Acknowledge b
MIDI Port I/O Programming 5-9Enter UART ModeIn order to send or receive MIDI data, the command byte 3Fh must first be sent out toswitch the interface
5-10 MIDI Port I/O ProgrammingSending MIDI DataOnce in UART mode, MIDI data can be sent to an external MIDI device by writing tothe Data port.Example
Chapter 6DSP CommandsThis chapter documents the commands for the Creative Digital Sound Processor(DSP).Many enhancements have been made to the DSP fro
6-2 DSP CommandsCommands by CategoryThe table below categorize the commands according to their functionalities.The commands below are available for DS
DSP Commands 6-3The commands below are available on DSP versions 2.00, 2.01+, 3.xx and 4.xx.Category Cmd# Description8-bit auto-init DMA mode 1Ch Outp
6-4 DSP CommandsThe commands below are only available on DSP version 3.xx.Category Cmd# DescriptionStereo control A0h Set input mode to monoA8h Set in
Introduction ixWhat You Should KnowThis manual assumes you are familiar with system level programming on the IBMPC. This includes programming knowled
DSP Commands 6-5Command DescriptionsThe DSP command descriptions will be presented in the following format:Commandpurpose of the commandOutput The com
6-6 DSP CommandsThe following discusses the DSP commands in ascending order:10h8-bit direct mode single byte digitized soundoutputOutput 10h, bDataRem
DSP Commands 6-716hCreative 8-bit to 2-bit ADPCM single-cycle DMAmode digitized sound outputOutput 16h, wLength.LowByte, wLength.HighByteRemarks Outpu
6-8 DSP Commands1Ch8-bit auto-init DMA mode digitized sound outputOutput 1ChRemarks Output unsigned digitized sound data using auto-init DMA mode. Th
DSP Commands 6-91FhCreative 8-bit to 2-bit ADPCM auto-init DMA modedigitized sound output with reference byteOutput 1FhRemarks Output digitized sound
6-10 DSP Commands24h8-bit single-cycle DMA mode digitized sound inputOutput 24h, wLength.LowByte, wLength.HighByteRemarks Input unsigned digitized sou
DSP Commands 6-1130hPolling mode MIDI inputOutput 30hRemarks Input MIDI data from the MIDI port using polling mode. The proper sequence is:1. Send co
6-12 DSP Commands34hUART polling mode MIDI I/OOutput 34hRemarks For MIDI UART mode, a read from the DSP is taken as reading MIDI data and awrite to th
DSP Commands 6-1336hUART polling mode MIDI I/O with time stampingOutput 36hRemarks For time stamping mode, in-bound MIDI data is tagged with a time st
6-14 DSP Commands38hMIDI outputOutput 38hRemarks Output MIDI data to the MIDI port in non-UART mode. The proper sequence is:1. Send command 38h.2. Se
Kommentare zu diesen Handbüchern