General Notice When using this document, keep the following in mind: ntial 1. This document is confidential. By accepting this document you acknowledge that you are bound by the terms set forth in the non-disclosure and confidentiality agreement signed separately and /in the possession of SEGA. If you have not signed such a non-disclosure agreement, please contact SEGA immediately and return this document to SEGA. 2. This document may include technical inaccuracies or typographical errors. Changes are periodi- cally made to the information herein; these changes will be incorporated in new versions of the program(s) described in this document at any time. de document. SEGA may make improvements and/or changes in the product(s) and/or the 3. No one is permitted to reproduce or duplicate, in any form, the whole or part of this document without SEGA’S written permission. Request for copies of this document and for technical information about SEGA products must be made to your authorized SEGA Technical Services representative. nfi 4. No license is granted by implication or otherwise under any patents, copyrights, trademarks, or other intellectual property rights of SEGA Enterprises, Ltd., SEGA of America, Inc., or any third party. describe herein. Co 5. Software, circuitry, and other examples described herein are meant merely to indicate the character- istics and performance of SEGA’s products. SEGA assumes no responsibility for any intellectual property claims or other problems that may result from applications based on the examples 6. It is possible that this document may contain reference to, or information about, SEGA products (development hardware/software) or services that are not provided in countries other than Japan. Such references/information must not be construed to mean that SEGA intends to provide such SEGA products or services in countries other than Japan. Any reference of a SEGA licensed prod- GA uct/program in this document is not intended to state or simply that you can use only SEGA’s licensed products/programs. Any functionally equivalent hardware/software can be used instead. 7. SEGA will not be held responsible for any damage to the user that may result from accidents or any other reasons during operation of the user’s equipment, or programs according to this document. NOTE: A reader's comment/correction form is provided with this document. Please address comments to : SE SEGA of America, Inc., Developer Technical Support (att. Evelyn Merritt) 150 Shoreline Drive, Redwood City, CA 94065 SEGA may use or distribute whatever information you supply in any way it believes appropriate without incurring any obligation to you. (6/27/95- 002) TM ntial de nfi Co Saturn GA SCSP User's Manual SE Doc. # ST-77-R2-052594 © 1994 SEGA. All Rights Reserved. READER CORRECTION/COMMENT SHEET Keep us updated! nti If you should come across any incorrect or outdated information while reading through the attached document, or come up with any questions or comments, please let us know so that we can make the al required changes in subsequent revisions. Simply fill out all information below and return this form to the Developer Technical Support Manager at the address below. Please make more copies of this form if more space is needed. Thank you. General Information: Your Name Phone Document number Document name Corrections: Chpt. pg. # ST-77-R2-052594 Saturn SCSP User's Manual Correction de Date nfi Co GA Questions/comments: SE Fax: Where to send your corrections: (415) 802-3963 Attn: Manager, Developer Technical Support Mail: SEGA OF AMERICA Attn: Manager, Developer Technical Support 275 Shoreline Dr. Ste 500 Redwood City, CA 94065 History First Edition: (November 30, 1993) Second Edition: • New manual (January 8, 1994) • Corrected page numbers ntial Third Edition: (February 24, 1994) • Revisions based on the Feb. 8, 1994, meeting. de nfi Co GA SE Introduction Definitions Terms used in this manual are defined below. SCSP (Saturn Custom Sound Processor) ntial A multi-function game sound generator LSI that combines a PCM sound generator and sound DSP. Data PAN-POT they are called nibbles. de A bit indicates 0 or 1 and is the smallest unit. 8 bits combined together is called a byte, and 16 bits (or 2 bytes) is called a word. When upper and lower grade is divided into 4 bits respectively, Direct Data nfi Determines the direction or location from which the sound seems to come from in localization. Sound that does not pass through the DSP, or even if it did, no effects were applied. Also called “dry data”. Effect Data Co The sound generated, as a result of sending it through DSP with an effect created in the sound generator. Also called “wet data”. MIDI Standard (Musical Instrument Digital Interface) Conversion standard for sound interval and sound length used to communicate between electronic instruments and computers. GA Pulse Code Modulation Sound Generator Sound is converted to PCM data and stored in memory. Refers to the sound source in a method by which sound data is read from memory during performance to generate the sound output. PCM divides the sound (wave form) along the time axis and converts each of the wave high values to digital data. The data that results from this operation is called PCM data. SE FM (Frequency Modulation) Indicates frequency modulation. In the context of a sound genera- tor, it indicates the FM sound generator. i Linear Shows a straight line. This means that the relation of the input and output are proportional. Therefore, if the wave form data is linear, LFO (Low Frequency Oscillator) nti a high wave value proportional to the size of the data is produced. In other words, the quantized step is in equal intervals. al Indicates a functional frequency generator that generates wave forms with frequencies that are below the range that is audible to the human ear. The output wave form of this LFO is used for amplitude and modulation of frequency. DSP (Digital Signal Processor) filter. de This is mainly for calculation (multiplication and addition) and contains a circuit for high-speed calculations. The DSP within SCSP is specially customized for audio editing functions and is used when directing sound effects such as echo, reverb, chorus and Sample Count dB (Decibel) nfi Indicates the data count of the wave form data. A unit for expressing the relative intensity of sounds by using a logarithm to show that unit. The equation would be: Co Sound Ratio [dB] = 20 • LOG10 N N= Sound Volume being compared Standard Sound Volume Specifically, if the comparative volume is twice the standard vol- ume (wave form amplitude). the sound comparitor would be 6 [dB]. Once would be 0 [dB], and three times would be 10 [dB] · · ·. On the other hand, if the comparative volume is smaller than the Modulator GA standard, the value [dB] would be negative (minus value). For example, if it was 1/2 of the standard, it would be -6 [dB]. Indicates the modulator slot when multiple slots are connected. In the diagram below, SLOT0 and SLOT1 are modulators. SE Carrier Indicates the slot which is modulated when multiple slots are connected. In the diagram below, SLOT2 is the carrier. Prescaler This function allows required time to be set when the counter increases one increment. Time selection and settings are done for each timer. ii Symbols The following symbols are used in this manual. Binary ntial Displayed with a “B” at the end. For example, 100 B. However, in the case of 1bit, it may be shortened to just B. Hexadecimal Displayed with an “H” at the end. For example, 00 H, FFH. Units MSB, LSB de 1KByte indicates 1,024 Bytes; 1Mbit indicates 1,048,576bits. In byte and word configuration, left is the high bit (MSB, Most Significant Bit), while right is the low bit (LSB, Least Significant Bit). Undefined bits nfi In the sound generator block register or the DSP block register, bits that are not defined are shown with “–”. When writing data to undefined bits, please write a “0B”. Co GA SE iii Table of Contents Introduction i Definitions Symbols Contents Figures Tables ntial i iii iv v vii Chapter 1 Sound System Configuration 1 1.1 System Configuration 2 Relation to the Main CPU 3 Relation to the Sound CPU 3 Sound Memory Map Relation to the D/A Converter Positioning of the Sound System Starting Up the Sound System Sound System Communication Chapter 2 SCSP Overview de 3 4 4 5 6 9 2.1 LSI Overview 2.2 LSI Specifications 2.3 SCSP Chip Block Diagram Chapter 3 SCSP Functions 3.1 Interface Sound CPU Interface nfi 10 11 13 17 18 18 Main CPU Interface 3.2 Memory Access Control Chapter 4 SCSP Registers 4.1 Register Map 4.2 Sound Source Register Co 18 20 23 24 34 Loop Control Register 35 EG Register 40 FM Modulation Control Register 46 GA Using the FM Sound Generator Method Volume Register PITCH Register LFO Register MIXER Register Slot Status Register Sound Memory Configuration Register MIDI Register 47 72 73 76 80 89 89 89 Timer Register 92 SE Interrupt Control Register DMA Transfer Register 4.3 DSP Memory Control Register Chapter 5 DSP Operation in the SCSP 5.1 DSP Configuration 5.2 DSP Internal RAM 95 101 103 105 106 107 iv Figures (Chapter 1 Sound System Configuration) Figure 1.1 Sound System and Peripherals Figure 1.2 Sound System Configuration Figure 1.3 Memory Map of the Sound Memory Register Figure 1.4 Sound Memory Range Figure 1.5 Interrupt Relations (Chapter 2 SCSP Overview) Figure 2.1 SCSP Chip Block Diagram ntial 2 3 4 5 6 13 (Chapter 3 SCSP Functions) Figure 3.1 Access Overview 18 Figure 3.2 Memory Access Priority 20 (Chapter 4 SCSP Registers) Figure 4.1 SCSP Memory Map (1906W) Figure 4.2 Individual Slot Control Register Figure 4.3 SCSP Common Control Register Figure 4.4 Sound Data Stack Figure 4.5 DSP Control Register de 24 25 28 30 31 Figure 4.6 DSP Micro Program Map Figure 4.7 DSP Internal Buffer Map nfi Figure 4.8 KEY_ON and KEY_OFF Sequence Figure 4.9 Block Diagram Relating to Noise Occurrence and LFO Figure 4.10 Loop Types Figure 4.11 Loop Wave Forms 32 33 35 36 38 39 Co Figure 4.12 KEY_OFF During Attack State Transition Figure 4.13 KEY_OFF During Decay State Transition Figure 4.14 Change in the Attenuation Volume Figure 4.15 Transition (1) from the Attack State to Decay 1 Figure 4.16 Transition (2) from the Attack State to Decay 1 Figure 4.17 Transition (3) from the Attack State to Decay 1 Figure 4.18 SLOT Block Diagram Figure 4.19 Wave Form Address Creation Calculation Block 40 41 42 44 44 45 47 48 Figure 4.20 Creating Wave Form Addresses and Reading Wave Form Data 48 Figure 4.21 Expanded Address Pointer Output Diagram 49 GA Figure 4.22 Frequency Address Pointer Output Value 50 Figure 4.23 Address Pointer Output Value During FM Voice Mixing (1) 50 Figure 4.24 Address Pointer Output Value During FM Voice Mixing (2) 51 Figure 4.25 Normal Loop 51 Figure 4.26 Reversal Loop 52 Figure 4.27 Alternative Loop 52 Figure 4.28 FM Sound Generator Configuration 53 Figure 4.29 Averaging Calculation Equation 54 Figure 4.30 Slot Calculation and Sound Stack Conditions 56 SE Figure 4.31 Time Lag until the Slot Is Written to the Sound Stack 57 Figure 4.32 Slot Averaging Calculation 58 Figure 4.33 4Slot Configuration Algorithm 59 Figure 4.34 SLOT0 Algorithm 60 Figure 4.35 SLOT2 Algorithm 61 Figure 4.36 SLOT2 Algorithm (by Input Slot) 61 Figure 4.37 SLOT3 Algorithm 62 Figure 4.38 MDL Modulation Rate 66 Figure 4.39 Maximum Displacement of the Wave Form Read Address 67 v Figure 4.40 Address Displacement during FM Voice Mixing 68 Figure 4.41 Wave Data During Clipping Process 68 Figure 4.42 Slot Connection Count 69 nti Figure 4.43 Self-Feedback Modulation 69 Figure 4.44 Step Feedback 69 Figure 4.45 Composite Feedback 69 Figure 4.46 Composite Modulation 70 Figure 4.47 FM Configuration Algorithm Pattern 1 Figure 4.48 FM Configuration Algorithm Pattern 2 Figure 4.49 7 SLOT FM Configuration Figure 4.50 Wave Data when TL bit 4=1 Figure 4.51 Relation of OCT and FNS Figure 4.52 LFO Block Diagram Figure 4.53 Digital MIXER Block Diagram Figure 4.54 Direct Component and Effect Component Circuits al 70 71 71 72 73 76 80 81 Figure 4.56 Digital Mixing Block Diagram de Figure 4.55 Fixed Position Calculation through the DSP Figure 4.57 SCSP and DAC Connections Figure 4.58 Memory Address Mapping Diagram Figure 4.59 MIDI-I/F Block Diagram Figure 4.60 MIDI IN Block and the Interrupt Generation Block Figure 4.61 MIDI OUT Block and the Interrupt Generation Block 82 83 88 88 90 91 91 (Chapter 5 DSP Operation in the SCSP) nfi Figure 4.62 Sound Interrupt Signal Connection Diagram Figure 4.63 Interrupt Register Bit Accomodation Figure 4.64 3 bit Code and Register Accomodation Figure 4.65 Format of the Interrupt Level Setting Register Figure 4.66 DMA Controller Block Diagram 95 97 98 99 101 Co Figure 5.1 DSP Configuration Diagram 106 GA SE vi Tables (Chapter 1 Sound System Configuration) Table 1.1 Sound CPU Address 100400H, 100401H Table 1.2 Sound CPU Interrupt Vector Table (Chapter 2 SCSP Overview) Table 2.1 Sound CPU Specifications Table 2.2 SCSP LSI Specifications (1) ntial 5 7 11 11 Table 2.3 SCSP LSI Specifications (2) 12 (Chapter 4 SCSP Registers) Table 4.1 Individual Slot Control Register (1) 25 Table 4.2 Individual Slot Control Register (2) de Table 4.3 Individual Slot Control Register Address Map Table 4.4 SCSP Common Control Register Table 4.5 Sound Data Stack Table 4.6 DSP Control Register Table 4.7 DSP Micro Program Table 4.8 DSP Internal Buffer 26 27 29 30 31 32 33 Table 4.10 KYONB Function nfi Table 4.9 Sound Generator Block Register Allocation Table 4.11 SBCTL Function Table 4.12 SSCTL Internal Configuration Table 4.13 Types of Sound Data Table 4.14 Types of Loops Table 4.15 Register Set Values and the Modulation Rate 34 35 36 37 37 38 46 Co Table 4.16 Relation of MDXSL/MDYSL and SLOT Table 4.17 Address Maximum Displacement Value According to the Register Setting Table 4.18 TL, Attenuation, and Waveform Amplitude Table 4.19 Actual Frequency in Relation to Cent Count Table 4.20 FNS.OCT Parameter Table Table 4.21 Oscillation Frequency of the Oscillator Table 4.22 LFO AM Modulation Wave Form 65 67 72 74 75 77 78 Table 4.23 LFO PM Modulation Wave Form 78 Table 4.24 Degrees of Amplitude and Frequency Modulation 79 Table 4.25 Relation of the Sources Available to Input into “IMXL” and “MIXS” 84 GA Table 4.26 Mix Stack Register Input level 85 SE vii SE GA viii Co nfi de nti al Chapter 1 ntial Sound System Configuration de nfi Co GA Chapter 1 Contents 1.1 System Configuration .................................. 2 Relation to the Main CPU ............................ 3 SE Relation to the Sound CPU ......................... 3 Sound Memory Map .................................... 3 Relation to the D/A Converter ..................... 4 Positioning of the Sound System ................ 4 Starting Up the Sound System ................... 5 Sound System Communication ................... 6 Saturn SCSP User's Manual 1 1.1 System Configuration SCSP is a multi-function game sound generator LSI that consists of a PCM sound the MC68EC000. This CPU controls the various sound blocks. nti generator and a sound DSP. Figure 1.1 shows the sound system and peripheral configuration. The sound processing CPU that makes up the Saturn sound block is al The SCSP creates and processes sound mixes. It contains a 32 slot sound generator and sound effect DSP, digital mixer and timer, and an interrupt controller. The sound memory is connected directly to the SCSP. It has a capacity of 4Mbit (512KByte) and is used to store the sound programs and data sound wave form data, etc. This memory is accessed by the sound CPU, SCSP and the main CPU (SH-2, system. de SCU). Besides the memory, the SCSP is connected to the main CPU, sound CPU and the D/A converter. The sound system can function independently of the main SH-2 SDRAM WORK-RAM nfi SCU MASK-ROM CD-ROM A-BUS MC68EC000Co SCSP B-BUS DAC Lch OUTPUT Audio Out Rch OUTPUT RESET RESET SMPC 4MbitDRAM GA Figure 1.1 Sound System and Peripherals SE 2 Main CPU Sound CPU MC68EC00 (Game Program) Interface nti SCSP al Sound Memory (DRAM) SCPU Program PCM (FM) PCM Sound Data DSP DSP Delay Data de MIXER D/A Converter Relation to the Main CPU nfi Figure 1.2 Sound System Configuration Co The SCSP has a main CPU interface incorporated to allow communication between the sound system and the main system (including the main CPU). As shown in Figure 1.2, the main system can access the memory and registers controlled by the SCSP through the main CPU interface. Relation to the Sound CPU The SCSP also incorporates a dedicated sound processing CPU interface (for the GA MC68EC000) to allow independent operation of the sound system against the main system. From the SCSP’s point of view, the sound CPU is like a controller. Sound Memory Map Saturn has 4Mbit of internal sound memory. The sound memory can be accessed by the sound CPU, the SCSP, and the main CPU (SH-2, SCU). Similarly, the SCSP control register that controls the SCSP sound source (block) and DSP control that are used in the generation and processing of sound can also be accessed. SE Figure 1.3 shows a sound memory map. Be aware that the memory map is refer- enced from the sound block side, making the addresses different when accessing from the main CPU. (See the SCU user’s manual for more details.) Saturn SCSP User's Manual 3 Address Sound Memory Map 000000H 07FFFFH 080000H Sound Memory (RAM) Usable Capacity : 4Mbit ntial Sound Memory Expansion Area Not installed. Access is Forbidden 0FFFFFH 100000H 100EE3H de Control Register Area Figure 1.3 Memory Map of the Sound Memory Register stored in the sound memory. nfi CPU programs and data, wave form data, and DSP work area (DSP delay area) are Relation to the D/A Converter SCSP to analog sound signal. Co The D/A converter converts and outputs the digital sound signal created by the Positioning of the Sound System The sound system (sound CPU, SCSP), based on the sound memory, can operate independently from the main system (main CPU, video system, etc.) During this time, the sound system operates on a RAM base and so it must get the programs and data required for the sound CPU from the main system. Furthermore, since syn- GA chronization between the image and sound is required, an interface for two-way communication is also required. To facilitate this communication the SCSP has an interface for the main system included to enable communication with the main system. The sound CPU cannot independently read data from or write data to the main system. Information exchange between the main system and the sound system is SE accomplished by the main system reading data from or writing data to the sound memory (RAM). 4 Starting Up the Sound System After the sound system power is turned on, it is reset by the SMPC. In this state, neither the sound CPU or SCSP will operate. RESET nti The sound system will operate after the SCSP reset has been released by the SMPC. al The SCSP will initialize the internal registers, etc. for about 30µ sec after the reset has been released. For this reason, access is not allowed during the 30µ sec. After the internal registers, etc., are initialized, the SCSP can be accessed by the main CPU (SH-2, SCU). Once in this state, the sound program can be downloaded. Be- fore downloading anything, make sure to set MEM4MB bit to 1 and DAC18B bit to 0 within the sound CPU (address) 10400H address. Once done, accessing the memory and downloading files can be begun. Table 1.1 Sound CPU Address 100400H, 100401H (100400 H) b15 b14 b13 b12 b11 b10 b9 b8 b7 deb6 b5 VER [3 : 0] (100401 H) b4 b3 b2 b1 MVOL [3 : 0] b0 – 0 – 0 – 0 – 0 – 0 – 0 nfi M4 D8 D3 1 0 D2 D1 D0 M4: MEM4MB D3 D2 D1 D8:DAC18B The sound CPU reads the reset vector from the 8 bits of the sound CPU address D0 (000000H~000007H), so always transfer the CPU reset vector to this area. RESET VECTOR 0 Co Address in the MC68EC000 15 000000 H ·············· Stack Address ·············· 8 7 Upper Word 0 000001H 000002 H Stack Address Lower Word 000003H 000004 H Program Counter Upper Word 000005 H GA RESET VECTOR 1 000006 H DRAM Area Program Counter · · · Lower Word · · · 000007H SE Figure 1.4 Sound Memory Range (MC68EC000, SCSP) After the reset is released, the sound CPU reads the reset vector and jumps to the PC value address. Saturn SCSP User's Manual 5 After download has finished, the sound CPU is reset by the SMPC enabling the sound CPU to operate. Sound System Communication Communication with the Main System Communication between the main system and the sound system takes place ntial through the SCU. The sound CPU cannot access the main system through the SCSP. Access is limited to access from the main system only. Interrupt Signal The main system uses the SCSP interrupt register when it sends an interrupt to the of the interrupt register (SCIPD). de sound CPU (explained in detail later on). This is executed by writing a “1B” to bit 5 All interrupts that can be applied to the sound CPU can be used as interrupts for the main CPU. Please refer to the register explanations for sending interrupts from the sound sys- tem to the main system. Main System nfi SH-2 Interrupt CoSCU Main System (Main CPU) Interrupt SCSP MC68EC000 External Expansion Interrupt (Not yet connected in Saturn) GA Sound CPU Interrupt Interrupt Control Block Figure 1.5 Interrupt Relations Interrupts to the sound CPU use an auto vector method. Vector data is shown in SE Table 1.2. Interrupt levels for the sound CPU can be set at different levels for each interrupt factor. (See register explanations for settings.) 6 Table 1.2 Sound CPU Interrupt Vector Table Vector No. MC68EC000 Address Interrupt Vector Contents 0 000000 H Reset vector initial SSP value nti 000004 H Reset vector initial PC value 2 000008 H Bus error 3 00000C H Address error 7 000010 H Invalid command 5 6 7 8 9 10 11 12 000014 H 000018 H 00001C H 000020 H 000024 H 000028 H 00002C H 000030 H CHK command TRAPV command al Calculation by 0 (Zero) Privilege violation Trace Line 1010 emulator Line 1111 emulator Undefined (Reserved) 13 14 15 16~23 24 25 26 000034 H 000038 H 00003C H 000040 H~00005F H 000060 H 000064 H 000068 H deUndefined (Reserved) Undefined (Reserved) Uninitialized interrupt vector Undefined (Reserved) Spurious interrupt Auto vector level 1 interrupt Auto vector level 2 interrupt 27 28 29 30 31 32~47 nfi 00006C H 000070 H 000074 H 000078 H 00007C H 000080 H~0000BF H Auto vector level 3 interrupt Auto vector level 4 interrupt Auto vector level 5 interrupt Auto vector level 6 interrupt Auto vector level 7 interrupt TRAP command vector 48~63 64~255 Co0000C0 H~0000FF H 000100 H~0003FF H Undefined (Reserved) User interrupt vector Normal use vectors. Vectors open to users. GA Note: The sound development tools supplied by this company use the auto vector level 7 interrupt, so users will not be able to use that level. Interrupt Signals to the Main and the SCU DMA The interrupt signal to the main CPU can also be used as triggers for the DMA transfer start that have a SCU. (Refer to the SCU manual for details.) SE Saturn SCSP User's Manual 7 8 SE GA Co nfi de nti al Chapter 2 ntial SCSP Overview de nfi Co GA Chapter 2 Contents 2.1 LSI Overview ..................................................... 10 SE 2.2 LSI Specifications .............................................. 11 2.3 SCSP Chip Block Diagram ................................ 13 Saturn SCSP User's Manual 9 2.1 LSI Overview Since SCSP was developed with multi-media in mind, the audio features have better and special 3D sound positioning. nti functions and higher quality than before. The calculation block is equipped with synthesizers that have performance comparable to those currently on the market enabling a wide variety of sounds to be produced. Also, with future expansion in al mind, various interfaces are equipped. The DSP block can also produce composite sound stages, and perform special effects such as play back of various sound stages The characteristics of LSI are described below. • Sampling Frequency Wave form data sampling frequency de Sound generator block re-sampling frequency (set playback rate) • Characteristics 44.1KHz 0 (DC) ~ 44.1KHz - 32 slots for FM or PCM use built-in. nfi - One per slot (completely independent) incorporates the total of 32 LFOs. - Incorporation of 32 EGs of 4 segment . - Interface for a built-in CPUs: The main CPU and the sound CPU - Built-in MIDI interface. - Built-in 128 step DSP Co - Built-in input mixer that selects DSP input - Built-in output mixer to mix sound generating output and DSP outputs. - Incorporation of a new FM calculation method. GA SE 10 2.2 LSI Specifications Table 2.1 shows the sound CPU (MC68EC000); tables 2.2 and 2.3 show SCSP LSI detailed specifications. Table 2.1 Sound CPU Specifications SOUND CPU MC68EC000-12 Function CPU commands 12.5MHz version No. Included ntial (Operating frequency 11.2896MHz) Special Comments Command system that is completely compatible with the MC68000 CPU. Interrupt signal level 1~7 interrupt by auto vector . Hardware configuration MC68000 CPU with the MC6800 (8 bit) interface removed Table 2.2 SCSP LSI Specifications (1) de SOUND LSI SCSP (SATURN CUSTOM SOUND PROCESSOR) (Operating frequency 22.5792MHz) Function Sound Source Sound mixing method Sound source block No. Included Special Comments PCM sound mixing and FM sound mixing methods ( 1) noise source (can be used for mixing) 44.1KHz fixed, primary interpolation re-sampling frequency Wave form data format Sound processor slots Maximum number of simultaneous sounds 32 1~32 nfi16 and 8 bit linear 2’S complement method Equal to 1 operator (1slot) in PCM and FM sound sources. When all are 4 operator (slot) type FM sounds: 8 sounds when all are PCM sounds, a total of 32 sounds. (The number of slots per FM sound can be freely set. It is also possible to mix FM and PCM sounds. LFO Co Wave form loop function EG Types of LFO output wave 32 32 4 As long as the total number of slots does not exceed 32, then any combination is possible. Select from normal, reverse and alternative loops for each slot. 4 segment AMPLITUDE-EG (Each slot has 1 base included) Each slot has one installed ( for amplitude/frequency modulation) Four types: sawtooth, rectangular, triangular, and white form noise. Sound source -8~+7 octaves with 1024 steps between octaves GA oscillation frequency (nonlinear) can be set Effect DSP block DSP processor speed 128 steps/Fs (multiple parallel processing type DSP Fs=44.1KHz) Program RAM 128W 1 2 8 wo rd s x 6 0 b it s Coefficient data RAM 64W 6 4 wo rd s x 1 3 b it s Temporary (universal) RAM 128W 1 2 8 wo rd s x 2 4 b it s Multiplier accuracy 2 4 wo rd s x 1 3 b it s = 2 6 b it o u t p u t Adder accuracy 2 6 wo rd s +2 6 b it s = 2 6 b it o u t p u t DSP internal bus width 2 4 b it d at a b u s SE 1 FM sound mixing is not limited to the 4 operator (slot) types used in the past, but 2~32 operators can be freely used for FM connections. You may also freely set the feedback. Saturn SCSP User's Manual 11 Table 2.3 SCSP LSI Specifications (2) Function No. Included Special Comments nti Digital mixer block Output level adjustment 8 steps (for each slot sound, DSP output sound) steps Panpot level adjustment 31 steps (center 1 step, left and right, 15 steps each) al steps DSP effect send channel 16 Able to mix and store multiple slot output in each channel count DSP effect return channel 16 Able to set level and panpot for each channel. count Master volume set function Stereo capable CPU interface Main CPU interface 1 SCU B-BUS interface Sound CPU interface 1 MC68EC000 interface Other functions, interfaces Timer DMAC Interrupt controller MIDI interface Digital audio interface Sound memory interface DAC output interface 3 1 1 1 1 1 de 8 bit timers with prescaler DMA controller for transfer between SCSP~DRAM Interrupt controller for the main and sound CPUs IN: 1 OUT: 1 Input stereo interface: 1 DRAM interface 16 bit/ 18 bit stereo DAC interface External interrupt signal interface DSP program library Various types of effect 3 nfi Not connected/used in the Saturn REVERB (HALL, ROOM, VOCAL, PLATE, ETC.) EARLY REFLECTION ECHO / DELAY (STEREO, MONORAL) PITCH SHIFTER (SINGLE, DOUBLE, TRIPLE) programs Co CHORUS, FLANGER SYMPHONIC, SURROUND VOICE CANCEL, AUTOPAN PHASER, DISTORTION FILTER PARAMETRIC EQUALIZER GA SE 12 2.3 SCSP Chip Block Diagram Figure 2.1 shows the SCSP chip block diagram. SCSP ntial Sound CPU LFO AFLO PLFO Interface Main CPU Interface DMA Transfer Interface MIDI de PLFO Phase Generator Address Pointer ADSR-L PHASE PHASE ADSR-R Interface External Input nfi Envolope Generator ADSR-L ADSR-R Memory Controller Interpolator DATA DATA DATA Co EG PCM-DATA EG ALFO PCM_DATA Level Calculator EXTS MIXS MEMS DSP GA EFREG SEL DIR EFREG Output Mixer SE Figure 2.1 SCSP Chip Block Diagram Saturn SCSP User's Manual 13 Items shown in SCSP Chip Block Diagram Figure 2.1 are explained below. Sound CPU Interface Main CPU Interface nti Interface that connects to the MC68EC000. al Interface that connects the system controller (SCU). DMA Transfer Interface MIDI Interface de This is the SCSP built-in DMA controller. It enables data transfer between the SCSP and the sound memory. This serial interface complies with MIDI specifications; nfi however, some external circuits will be needed to make it compatible with a MIDI connector. External Input (External Digital Audio Input Interface) Interface that inputs a digital audio signal from an exter- L F O (Low Frequency Oscillator) Co nal instrument (external device). Indicates a function generator that generates wave forms of a frequency that is below the range that the human ear can hear, and is used as a wave form for various modula- tion. Phase Generator GA Block that calculates and outputs frequency data based on the sound generation frequency setting of the PCM data. SE Address Pointer Creates the wave form address value based on the phase information, etc., from the phase generator. 14 Memory Controller Block that outputs the address created by the address pointer to the memory and reads data, etc.; it controls the Interpolator sound memory. ntial Block that interpolates the wave form data. Envelope Generator (EG) Functional calculation block that controls the sound output level with time. Level Calculator Block de Block that calculates the wave form output level based on the level coefficient created by EG, TL (Total Level), and ALFO. DSP nfi Audio DSP that receives and holds the SCSP special sound effects. Output Mixer Co Final block that contains functions that calculate various positions and level adjustments needed to compile each sound output in stereo. GA SE Saturn SCSP User's Manual 15 16 SE GA Co nfi de nti al Chapter 3 ntial SCSP Functions de nfi Co GA Chapter 3 Contents Chapter 3 Contents SE 3.1 Interface Sound....................................................... 3.1 Interface Main CPU Interface CPU Interface Sound CPU Interface 3.2 Memory Main CPU .................................... Access Control Interface ...................................... 3.2 Memory Access Control ............................... 18 18 18 18 18 20 18 20 Saturn SCSP User's Manual 17 3.1 Interface The SCSP has two internal CPU (main CPU and sound CPU) interfaces. The main CPU depends on the operation of the main CPU. nti CPU has higher priority than the sound CPU, so the processing speed of the sound Sound CPU Interface al The sound CPU interface is a block with specialized functions to enable it to connect to the sound CPU. By adding this interface, the sound CPU can be directly con- nected to the SCSP without external circuits. Programs for the sound CPU reside in the sound memory. For this reason, all CPU programs are placed in the sound CPU address space available. Main CPU Interface de Access between the main CPU and the interface is shown in Figure 3.1. SCSP SCU MCD MCCSN MCRDYN nfiD A Co Address Data DRAM Figure 3.1 Access Overview GA At the trailing edge of the select signal (MCCSN) from the main CPU, the interface is started; at the leading edge of the select signal, the interface is ended. Also, when "1" is output with respect to the ready signal (MCRDYN) to the main CPU, the select signal (MCCSN) from the main CPU and the main CPU data bus (MCD[7:0]) do not change. SE 18 The following cautions should be observed with interfacing with the main CPU. (1) Because the main CPU cannot access in units of 8 bits, so read and write in 16 (2) bit units. nti When there is a request to read or write, the SCSP buffer gets the address and al data. Because of this, a “1” is output to the ready signal (MCRDYN) going to the main CPU causing a wait. This wait continues until the internal processing of the LSI is finished. For this reason, continuous read and writes that cause many waits to occur should be avoided except when turning on the power. (3) When the power is turned on, the time necessary for initialization of sound memory by continuous writing is approximately 100 msec for 4Mbit DRAM. de nfi Co GA SE Saturn SCSP User's Manual 19 3.2 Memory Access Control tained. nti When accessing sound memory from the SCSP, the following priorities are main- 1. PCM Data Read by PCM sound generator, accessed by DSP. 2. DRAM refresh cycle. 3. DMA transfer. 4. Access by the main CPU. al 5. Access by the sound CPU. When there is an access request with a high priority, there will be a wait state against formed. de an access request with a low priority. Also, a high priority access request will not occur while a low priority access is requested because the decision on which device to be permitted to access memory (PCM sound generator block, DSP block, main CPU, sound CPU, DMA, etc.) is made before any actual memory access is per- Memory Access Priority High CYCLE 0 DSP CYCLE 1 PCM nfi CYCLE 2 DSP CYCLE 3 PCM Co Access Access Access Access Refresh Refresh Refresh Refresh cycle cycle cycle cycle DMA DMA DMA DMA Access Access Access Access MCPU(SCU) MCPU(SCU) MCPU(SCU) MCPU(SCU) Access Access Access Access SCPU SCPU SCPU SCPU Low Access Access Access Access memory cycles. GA Figure 3.2 Memory Access Priorities The performance of the SCSP / sound CPU is determined by the distribution of the There are 128 memory cycles within one sample (1/44.1K= 22.68µ sec). These 128 SE cycles are distributed among the various devices. The number of times the CPU accesses changes with the application, so there is no best way to access memory, but be aware of the items on the following page. 20 • Sound memory uses DRAM, so refresh cycles are required. In the Saturn sound system, two empty cycles are required between each sample, so the number of memory cycles that can be used by other devices is 126. cycles. nti • The sound generator and DSP memory cycles have the highest priority memory al • The sound generator uses two memory cycles to produce sound from one slot. With a maximum of 32 slots, a total of 64 times of memory cycle may be used. When the EG is at the maximum attenuation state (“3FFH”), the sound generator does not access memory. Do KEY_OFF for those slots that are not producing sound. storing data temporarily. de • The DSP accesses memory a maximum of 64 times. This changes with the DSP application. Try to use the internal DSP registers as much as possible when • The sound CPU operating speed will decrease when using the SCSP built-in nfi DMA due to the extent of the wait state imposed on the sound CPU. Co GA SE Saturn SCSP User's Manual 21 22 SE GA Co nfi de nti al Chapter 4 ntial SCSP Register de nfi Co Chapter 4 Contents Chapter 4 Contents 4.1 Register Map .......................................................... 24 4.2 4.1Sound Register SourceMapRegister .......................................... 24 34 GA 4.2LoopSound Source Control Register Register ............................................ 34 35 EG Loop Control Register Register............................................................ 35 40 FM EG RegisterControl Register ............................. 40 Modulation 46 FM Modulation Using the FM Sound Control GeneratorRegisterMethod ................ 46 47 Using Sound the FM Volume Sound ......................................... Register Generator Method 47 72 Sound PITCH Volume Register Register ...................................................... 72 73 LFOPITCH Register Register .......................................................... 73 76 MIXER Register ..................................................... 76 LFO Register 80 SlotMIXER Register ............................................... 80 Status Register 89 SlotMemory Status Register Structure Register ......................... 89 SE Sound 89 MIDISound Memory Register Structure Register ......................................................... 89 89 MIDI Timer Register Register ........................................................ 89 92 Interrupt Control Register ....................................... 92 Timer Register 95 DMA Interrupt TransferControl Register Register 95 ........................................... 101 DMA Transfer Register 4.3 DSP Memory Control Register ............................... 103 101 4.3 DSP Memory Control Register 103 Saturn SCSP User's Manual 23 4.1 Register Map mixing. nti The SCSP carries a wave form calculator unit called SLOT to realize FM sound al Figure 4.1 describes the SCSP memory map and the allocation of the individual registers that make up the memory map. 100000 H 1003F8 H 100400 H ( 5 0 8 W ) de Individual Slot Control Register SCSP Common Control Register 10042FH 100600 H nfi ( 2 4 W ) Sound Data Stack 10067FH 100700 H Co ( 6 4 W ) DSP Control Register (1 0 1 0 W ) GA 100EE3 H Note) W: Word = 16bit SE Figure 4.1 SCSP Memory Map (1906W) 24 The individual slot control register represents the allocation of the registers config- ured in each of the 32 slots (SLOT0~SLOT31). nti The location of bit allocation for each register is described as [3 : 0]. For example, SA [19 : 16] represents the allocation from the 16th bit through the 19th bit of SA. 00 H KX KB SBCTL SSCTL SA[15:0] LSA[15:0] al LPCTL 8B SA[19:16] D2R[4:0] LS KRS[3:0] SI de LEA[15:0] D1R[4:0] DL[4:0] SD HO TL[7:0] AR[4:0] RR[4:0] RE MDL[3:0] OCT[3:0] LFOF[4:0] nfi MDXSL[5:0] PLFOWS FNS[9:0] PLFOS[2:0] ISEL[3:0] MDYSL[5:0] ALFOWS ALFOS[2:0] IMXL[2:0] 18 H DISDL[2:0] KX:KYONEX HO:EGHOLD SD:SDIR Co DIPAN[4:0] KB:KYONB LS:LPSLNK RE:LFORE EFSDL[2:0] 8B:PCM8B SI:STWINH EFPAN[4:0] Figure 4.2 Individual Slot Control Register GA Table 4.1 Individual Slot Control Register (1) Designation KYONEX (KX) KYONB (KB) SBCTL Execute KEY_ON Contents Record KEY_ON, KEY_OFF Source bit control SSCTL Sound source control SE LPCTL PCM8B (8B) SA LSA Loop control Select wave form data format Start address Loop start address Saturn SCSP User's Manual 25 Table 4.2 Individual Slot Control Register (2) LEA Loop end address D2R Decay 2 rate D1R EGHOLD (HO) AR LPSLNK (LS) KRS DL RR Decay 1 rate EG hold mode Attack rate Loop start link Key rate scaling Decay level Release rate ntial STWINH (SI) Stack write inhibit SDIR (SD) Sound direct TL Total level MDL Modulation level MDXSL MDYSL OCT FNS LFORE (RE) LFOF de Select modulation input X Select modulation input Y Octave Frequency number switch LFO reset LFO frequency PLFOWS PLFOS ALFOWS ALFOS ISEL IMXL nfi Select LFO frequency modulation wave form LFO frequency modulation level Select LFO amplitude modulation wave form LFO amplitude modulation level Input select Input mix level DISDL DIPAN EFSDL EFPAN Co Direct data send level Direct data, fixed position Effect data send level Effect data, fixed position GA SE 26 Table 4.3 Individual Slot Control Register Address Map Slot Address Slot Address nti 0 100000 H ~ 100017 H 16 100200 H ~ 100217 H 1 100020 H ~ 100037 H 17 100220 H ~ 100237 H 2 100040 H ~ 100057 H 18 100240 H ~ 100257 H 3 100060 H ~ 100077 H 19 100260 H ~ 100277 H 4 5 6 7 8 9 10 100080 H ~ 100097 H 1000A0 H ~ 1000B7 H 1000C0 H ~ 1000D7 H 1000E0 H ~ 1000F7 H 100100 H ~ 100117 H 100120 H ~ 100137 H 100140 H ~ 100157 H 20 21 22 23 24 25 26 al 100280 H ~ 100297 H 1002A0 H ~ 1002B7 H 1002C0 H ~ 1002D7 H 1002E0 H ~ 1002F7 H 100300 H ~ 100317 H 100320 H ~ 100337 H 100340 H ~ 100357 H 11 12 13 14 15 100160 H ~ 100177 H 100180 H ~ 100197 H 1001A0 H ~ 1001B7 H 1001C0 H ~ 1001D7 H 1001E0 H ~ 1001F7 H de 27 27 29 30 31 100360 H ~ 100377 H 100380 H ~ 100397 H 1003A0 H ~ 1003B7 H 1003C0 H ~ 1003D7 H 1003E0 H ~ 1003F7 H nfi Co GA SE Saturn SCSP User's Manual 27 The SCSP control register allocates the interrupt register and timer register, etc., that are commonly used. 100400 H OF OE IO M4 IF DB IE RBL ntial MVOL[3:0] RBP[19:13] MIBUF[7:0] MOBUF[7:0] MSLC[4:0] CA[3.0] 100409 H 10040A H 10040F H 100410 H DMEA[19:16] DMEA[15:1] de DRGA[11:1] GA DI EX TACTL[2:0] TBCTL[2:0] TCCTL[2:0] nfi DTLG[11:1] TIMA[7:0] TIMB[7:0] TIMC[7:0] Co SCIEB[10:0] SCIPD[10:0] SCIRE[10:0] SCILV0[7:0] SCILV1[7:0] SCILV2[7:0] 10042F H 100430 H GA M4:MEM4MB OE:MOEMP DB:DAC18B IO:MIOVF MCIEB[10:0] MCIPD[10:0] MCIRE[10:0] OF:MOFULL IF:MIFULL IE:MIEMP GA:DGATE DI:DDIR EX:DEXE SE Figure 4.3 SCSP Common Control Register 28 Table 4.4 SCSP Common Control Register Designation Contents MEM4MB (M4) Memory size designation DAC18B (DB) VER MVOL RBL RBP MOFULL (OF) MOEMP (OE) nti Use the 18 bit D/A converter on the digital output Version number Master volume Ring buffer length Ring buffer lead address Output FIFO is full Output FIFO is empty al MIOVF (IO) Input FIFO overflow MIFULL (IF) Input FIFO full MIEMP (IE) Input FIFO empty MIBUF MIDI input data buffer MOBUF MSLC CA DMEA DRGA DGATE (GA) de MIDI output data buffer Monitor Slot Call Address DMA transfer start memory address DMA transfer start register address DMA transfer gate 0 clear DDIR (DI) DEXE (EX) DTLG TACTL TIMA TBCTL nfi DMA transfer direction DMA transfer start DMA transfer data count Timer A pre-scaler control Timer A count data Timer B pre-scaler control Co TIMB TCCTL TIMC SCIEB SCIPD SCIRE SCILV0 Timer B count data Timer C pre-scaler control Timer C count data Allow sound CPU interrupt Request sound CPU interrupt Reset sound CPU interrupt Sound CPU interrupt level bit0 SCILV1 Sound CPU interrupt level bit1 SCILV2 Sound CPU interrupt level bit2 GA MCIEB Allow main CPU interrupt MCIPD Request main CPU interrupt MCIRE Reset main CPU interrupt SE Saturn SCSP User's Manual 29 The sound data stack is where sound data is stored. Sound data is in two generation configuration (GENERATION A and B). Each generation can control up to 32 sound data. 100600H (32W) ntial DIRECT SOUND SLOT DATA STACK (GENERATION A) "SOUS[15:0]" DIRECT SOUND SLOT DATA STACK (GENERATION A) "SOUS[15:0]" 10063FH 100640 H DIRECT SOUND SLOT DATA STACK (GENERATION B) "SOUS[15:0]" (32W) 10067FH de DIRECT SOUND SLOT DATA STACK (GENERATION B) "SOUS[15:0]" Figure 4.4 Sound Data Stack Table 4.5 Sound Data Stack Designation SOUS Sound stack nfiContents Co GA SE 30 On the DSP control register, the interface block area of DSP is defined which is built within SCSP. 100700 H (64W) 10077F H COEF REG "COEF[12:0]" COEF REG "COEF[12:0]" ntial O O O O O 0 100780 H MEMORY ADDRESS REG "MADRS[16:1]" (32W) 1007BFH 100800 H (512W) de MEMORY ADDRESS REG "MADRS[16:1]" DSP MICRO PROGRAM 100BFF H 100C00 H (370W) 100EE3 H nfi DSP INTERNAL BUFFER Co Figure 4.5 DSP Control Register Table 4.6 DSP Control Register Designation Contents COEF DSP coefficient buffer MADRS Memory address register GA SE Saturn SCSP User's Manual 31 100800 H 100807 H 100808 H nti DSP MICRO PROGRAM (STEP_0) "MPRO[63:48]" DSP MICRO PROGRAM (STEP_0) "MPRO[47:32]" al DSP MICRO PROGRAM (STEP_0) "MPRO[31:16]" DSP MICRO PROGRAM (STEP_0) "MPR0[15:0]" DSP MICRO PROGRAM (STEP_1) "MPRO[63:48]" 512W DSP MICRO PROGRAM (STEP_126) "MPRO[15:0]" 100BF8 H de DSP MICRO PROGRAM (STEP_127) "MPRO[63:48]" DSP MICRO PROGRAM (STEP_127) "MPRO[47:32]" DSP MICRO PROGRAM (STEP_127) "MPRO[31:16]" 100BFFH nfi DSP MICRO PROGRAM (STEP_127) "MPRO[15:0]" Figure 4.6 DSP Micro Program Map Designation Co Table 4.7 DSP Micro Program MPRO Contents Micro program register GA SE 32 nti 100C00 H "TEMP[7:0]" WORK BUFFER 00 "TEMP[23:8]" (256W) 100DFFH 100E00 H al WORK BUFFER 127 "TEMP[23:8]" SOUND MEMORY 00 "MEMS[23:8]" "TEMP[7:0]" " MEMS[7:0]" (64W) 100E7FH 100E80 H de SOUND MEMORY 31 "MEMS[23:8]" "MEMS[7:0]" "MIXS[3:0]" (32W) nfi MIX SOUND SLOT DATA STACK 00 "MIXS[19:4]" "MIXS[3:0]" 100EBFH 100EC0 H (16W) 100EDFH 100EE0 H Co MIX SOUND SLOT DATA STACK 15 "MIXS[19:4]" EFFECTED DATA OUTPUT 00 "EFREG[15:0]" EFFECTED DATA OUTPUT 15 "EFREG[15:0]" 100EE3 H GA Figure 4.7 DSP Internal Buffer Map Table 4.8 DSP Internal Buffer Designation Contents SE TEMP MEMS MIXS EFREG DSP temporary (universal) buffer Memory data stack Mix stack Effect register Saturn SCSP User's Manual 33 4.2 Sound Source Register The sound source (block) register is made up of the allocations shown in Table 4.9. Table 4.9 Sound Source (Block) Register Allocation Register Name Loop Control Register EG Register nti Bit Name al KYONEX, KYONB, SBCTL, SSCTL, SA, LSA, LEA, PCM8B, LPCTL EGHOLD, AR, D1R, D2R, RR, DL, KRS, LPSLNK FM Modulation Control Register SOUS, MDL, MDXSL, MDYSL, STWINH Sound Volume Register TL, SDIR PITCH Register LFO Register MIXER Register OCT, FNS de LFORE, LFOF, ALFOWS, ALFOS, PLFOWS,PLFOS IMXL, ISEL, DISDL, DIPAN, EFSDL, EFPAN, MVOL, DAC18B Slot Status Register Sound Memory Config. Register MIDI Register Timer Register nfi MSLC, CA MEM4MB MIBUF, MIOVF, MIFULL, MIEMP, MOFULL, MOEMP, MOBUF TACTL, TIMA,TBCTL, TIMB, TCCTL, TIMC DMA Transfer RegisterCo Interrupt Control Register SCIPD, SCIEB, SCIRE, SCILVO, SCILV1, SCILV2, MCIPD, MCIEB, MCIRE DGATE, DDIR, DEXE, DMEA, DRGA,DTLG GA SE 34 Below is the definition of the bit in terms of the sound generator block register, based on the classifications in Table 4.9. The symbols following the register names have the following meanings: (R) read only, (W) write only, (R/W) both read and write are possible. nti When reading data from the write only register (bit), that value becomes “0B”. al When writing data to the read only register (bit), always write “0B”. Loop Control Register KYONEX (W) ;KeY_ON EXecution A “1B” written here will execute KEY_ON, OFF for all of the slots. KYONB (R/W) ;KeY_ON Bit Table 4.10 KYONB Function de Registers KEY_ON,OFF. (If you wish to KEY_ON simultaneously, the “KYONB” of the slot you want to turn ON must be set to “1B”.) bit 0 Function Registers KEY_OFF 1 nfi Registers KEY_ON “KYONEX” and “KYONB” exist in each slot. The sequence of KEY_ON and KEY_OFF is shown in Figure 4.8. KYONB "0" Co There is no need to write a “0B” in “KYONEX” after writing a “1B”. Also a “1B” in “KYONEX” is used for all slots, so you don’t need to set to “1B” per a specific slot. "1" "1" "1" "0" "0" "0" Time REGISTER "1" WRITE "0" WRITE GA KYONEX REGISTER KEYON TRIGGER "0" "OFF" "0" "1" "0" "1" WRITE ON Execute "ON" Ignore "1" "0" "1" WRITE "ON" "0" "ON" "1" "0" "1"WRITE "OFF" OFF Execute "1" "0" "1"WRITE No Meaning Time Time Figure 4.8 KEY_ON and KEY_OFF Sequence SE SBCTL[1:0] (R/W) ;Source Bit ConTroL Specifies bit reversal operation of the sound input data. The reversal function be- comes valid for bits with “1B” written to them. Saturn SCSP User's Manual 35 Table 4.11 SBCTL Function Bit Function SBCTL0 Reverse selection for bits other than the source wave form data sign bit. SBCTL1 nti Reverse selection for the source wave form data sign bit. SSCTL[1:0] (R/W) ;Sound Source ConTroL al Designates the data to be used as sound input data. When using the wave form data in sound memory to produce a sound, write “0B”. When this register is “1B”, the slot with respect to which setting has been applied (the LFO accompanied with each slot) will output noise. The block diagram of noise generated when “SSCTL”=“1B” and the relation to LFO is shown with ALFO added in Figure 4.9 LEO Waveform Generator Sawtooth ALFOWS ALFOWS de ALFOS * Alfo is Attached Here Wave Square Wave SELECTOR 4 TO nfi Amplitude Modulation Rate Adjustment Triangle Wave LFORE LFOF Co 1 Level Coeffici- Level ent Calculater Block Coefficient Level EG Calculater Block SLOT GA White Noise Wave Form Data Buffer TL Noise Normal Sound SELECTOR 2 TO 1 Sound Data Waveform Data From Wave Form Memory (RAM) SE SSCTL Noise On/Off Figure 4.9 Relation of the Noise Generation Block Diagram and LFO Function 36 Each slot utilizes the LFO noise oscillator output to output noise. Here, the LFO parameters in Figure 4.9 (“LFORE”, “LFOF”, “ALFOWS”, “ALFOS”, “PLFOWS”, “PLFOS”) will not affect noise as voice data. other parameters. nti Also, when using LFO in low-frequency modulation with the LFO wave form selec- tion at noise (ALFOWS=“3H”, or PLFOWS=“3H”) as in Figure 4.9, reset with the al “LFORE” will not function. The frequency also cannot be changed. This means that when selecting noise, the LFO can select wave form but cannot change in terms of Table 4.12 SSCTL Internal Configuration SSCTL Data Used 0 External DRAM data 1 2 3 SA[19:0] (R/W) ;Start Address de Internally generated data (noise) Internally generated data (ALL “0”) Cannot be used Specifies the waveform data start address in byte address when using memory nfi waveform data to generate sound. However, if the waveform data is “16 bit PCM” (“PCM8B”=“0”), always set the register’s lsb (SA0) to “0B”. LSA[15:0] (R/W) ; Loop Start Address Represents the sound data loop start address in sample count from the “SA”. Co LEA[15:0] (R/W) ; Loop End Address Represents the sound data loop end address in sample count from the “SA”. PCM8B (R/W) ; PCM 8Bit Designates the format of the wave form data. Table 4.13 Types of Sound Data GA PCM8B Sound Data 0 16Bit PCM data 2’S complement 1 8Bit PCM data 2’S complement SE Saturn SCSP User's Manual 37 LPCTL[1:0] (R/W) LooP ConTroL Sets the loop format. Table 4.14 Types of Loops LPCTL 0 1 2 3 Loop OFF Normal loop Reverse loop Alternative loop Loop Format Loop processing or sound memory access will end with either of the following two ntial conditions: (1) After release, when the attenuation volume reaches maximum, or (2) de When the loop is OFF, and the read point reaches the loop end point. When using normal or reverse loops, set the data corresponding to “SA+LSA” (loop start address) and the “SA+LEA” (loop end address) to the same value. Using the same method with the alternative loop can make the pitch the same as the normal or reverse loops. Figure 4.10 shows specific examples of loop types. haaaa hiiii Attack Data huuuu heeee Loop Data hoooo nfi SA LSA Co LEA Using the sounds "ha- hi- hu- he- ho" as wave form data, the following sounds are produced when the start address (SA), loop start address (LSA), and loop end address (LEA) are set as shown above. ● Normal Loop haaaa hiiii huuuu heeee hoooo huuuu heeee hoooo huuuu heeee hoooo huu SA LSA LEA(LSA) LEA(LSA) LEA(LSA) GA ● Reversal Loop haaaa hiiii ooooh eeeeh uuuuh ooooh eeeeh uuuuh ooooh eeeeh uuuuh ooo SA LEA LSA(LEA) LSA(LEA) LSA(LEA) ● Alternative Loop haaaa hiiii huuuu heeee hoooo ooooh eeeeh uuuuh huuuu heeee hoooo ooo SE SA LSA LEA Figure 4.10 Loop Types LSA LEA 38 The wave form for each of the normal loop, reversal loop and the alternative loop can be represented as in figure 4.11. Note that the uuuu, eeee, oooo wave forms are reversed from huuh, heeh, hooh wave forms. below. ntial The wave form for each of "huuu, heee, hooo" are defined as shown Normal Loop de Attack Data nfi Co Reversal Loop Attack Data GA Alternative Loop SE Attack Data Figure 4.11 Loop Wave Forms Saturn SCSP User's Manual 39 EG Register EG represents the change occurred by sound attenuation time, and has the following four states. • Attack State (Attack segment) Indicates the start of the sound (start up). • Decay 1 state (Decay 1 segment) Indicates attenuation from the maximum volume. • Decay 2 state (Decay 2 segment) ntial Indicates attenuation even lower than decay 1. However, if DR2 is set to “0”, the sound is maintained rather than attenuated. • Release state (Release segment) drawn. An example is shown below. de Indicates the attenuation until the sound disappears after KEY_OFF. However, in all cases of sound generation state, EG does not necessarily go through all four states. Depending on the timing of KEY_OFF various envelope curves are EG 000H (a) nfi When KEY_OFF is executed during attack state transition (Figure 4.12). Co KEY-OFF LEVEL 3FFH Time KEY-ON KEY-OFF GA Attack State Release State Figure 4.12 KEY_OFF During Attack State Transition When KEY_OFF is executed, from that level (KEY_OFF LEVEL) the sound is attenuated following the release rate (“RR”) setting. SE Therefore, in this case, the envelope curve skips the decay 1 and decay 2 states. In this case, EG value does not reach “000H”, rather, with KEY_OFF as a turning point, it increases to “3FFH”. 40 (b) When KEY_OFF is executed during decay 1 segment transition. (Figure 4.13). EG 000 H KEY-OFF LEVEL ntial 3FFH DL KEY-OFF Time KEY-ON Attack State Decay 1 State de Release State Figure 4.13 KEY_OFF During Decay State Transition nfi When the decay 1 state starts, it attenuates towards the DL (decay level) following the D1R (decay 1 rate) set value. If KEY_OFF is executed during the above operation, the sound starts to attenuate from the level KEY_OFF was executed (KEY_OFF LEVEL) according to the value set in RR (release rate). Co AR[4:0] (R/W) ; Attack Rate Designates the change volume of EG in the attack state. When “AR”=“00H”, the change volume (level attenuation volume) is minimum (0). When “AR”=“1FH”, the change volume (level attenua- tion volume) is maximum (MAX). GA EGHOLD (R/W) EG HOLD mode Designates whether to maintain or change the attack value. As shown in Figure 4.12, when this bit is “1B” the attack value is held at “000H”. Also when this bit is “0B”, it changes according to the value designated by the AR register. In the hold mode, the time that EG retains “000H” (time until it reaches segment 2) is determined by the “AR” value. SE Saturn SCSP User's Manual 41 When EGHOLD=1 EG 000H DL[4:0] D1R[4:0] D2R[4:0] ntial RR[4:0] AR[4:0] 3FFH Time EG 000H Attack State When EGHOLD=0 AR[4:0] Decay 1 State D1R[4:0] Decay 2 State de Release State DL[4:0] nfi D2R[4:0] RR[4:0] 3FFH Attack State Co Decay 1 State Decay 2 State Release State Time Figure 4.14 Change in the Attenuation Volume GA D1R[4:0] (R/W) ; Decay-1 Rate Designates the EG change volume in the decay 1 state. When “D1R”=“00H”, the change volume (level attenuation volume) is minimum (0). When “D1R”=“1FH”, the change volume (level attenuation volume) is maximum (MAX). D2R[4:0] (R/W) ; Decay-2 Rate SE Designates the EG change volume in the decay 2 state.When “D2R”=“00H”, the change volume (level attenuation volume) is minimum (0). When “D2R”=“1FH”, the change volume (level attenuation volume) is maximum (MAX). 42 RR[4:0] (R/W) ; Release Rate Designates the change volume of the EG in the release state. DL{4:0] (R/W) ; Decay Level nti When “RR”=“00H”, the change volume (level attenuation volume) is minimum (0). When “RR”=“1FH”, the change volume (level attenuation volume) is maximum (MAX). al Designates the upper 5 bit of the attenuation level (EG) that moves from decay 1 state to decay 2 state. When the upper decay 1 state attenuation level upper 5 bits match the DL value, the state moves to decay state 2. When “DL”=“00H”, the level is maximum (MAX). When “DL”=“1FH”, the level is minimum (MIN). KRS[3:0] (R/W) Key Rate Scaling de Designates the level of EG key rate scaling condition. 00H indicates minimum scaling; 0EH designates maximum scaling. LPSLNK (R/W) ; LooP Start LiNK nfi When set to 0FH, it designates that scaling OFF. The function of the “LPSLNK” (loop start link) is to synchronize the transition to decay 1 state from the loop start and EG attack states. CoWhen “LPSLNK” =“0” there is no relation between the EG state transition and the loop start point position. When “LPSLNK” =“1”, the following two changes can be seen. 1) When, in terms of time, EG reaches “000H” in the attack state faster than when the wave form read address reaches the loop start point (“SA”+”LSA”) (Figure 4.15). In this case, EG will reach the MAX level first (P.1). However, since moving to the next segment is not possible (decay 1 state) until the wave form GA read address reaches the loop start point, EG is maintained at MAX level. Next, when the wave form read address reaches the loop start point (P.2) EG will move to the decay 1 state. SE Saturn SCSP User's Manual 43 EG EG 000 H 3FFH P.1 P.2 DL ntial Time Attack Attack Decay 1 State State State ADDRESS Wave Form Data SA de LSP (SA+LSA) :LOOP START POINT Figure 4.15 Transition (1) from the Attack State to Decay 1 This pattern has an additional two patterns. nfi 2) In terms of time, EG reaches “000H” in the attack state slower than when the wave form read address reaches the loop start point (“SA”+”LSA”). - When the wave form read address reaches the loop start point, and the “SCL” at this point (EG level) is larger than the “DL” (decay level) (reversed when EG Co compared to the actual EG level). (Figure 4.16) 000 H SCL: SEGMENT CHANGE LEVEL P. EG 1 SCL>DL P.2 Wave Form Data GA 3FFH Attack State Decay 1 State DL Decay 2 State Time ADDRESS SE SA LSP (SA+LSA) :LOOP START POINT Figure 4.16 Transition (2) from the Attack State to Decay 1 44 After the wave form read address reaches the loop start point, the EG will shift to the decay 1 state (P.1). Next, when the EG value reaches the DL (decay level), it will shift to the decay 2 state (P.2). compared to the actual EG level). (Figure 4.17) nti - When the wave form read address reaches the loop start point, and the “SCL” at this point (EG level) is smaller than the “DL” (decay level) (reversed when al EG 000 H SCL: SEGMENT CHANGE LEVEL EG 3FFH Wave Form P.1 Decay 1 Status de DL SCL
“LEA”, operation can not be guaranteed.) Also, by placing data with overlapping loop start point and loop end points the alternative pitch can be made to match the pitch in other loop modes. When all of the wave form loop modes are limited to the alternative loop, data corresponding to “LSA” and “LEA” need not be the same. SE 52 Figure 4.28 shows how the actual FM voice mixing is performed in a block diagram. PLFO MDXSL SOUND STACK DATA X IN nti SOUND STACK DATA al Y IN SOUND STACK0 SOUND STACK1 SOUND STACK2 MDYSL Averaging PG Operation Unit Wave Form Phase Value ALFO Phase Adder Address Pointer Wave Form Address de MDL Wave Form RAM MEMORY ADDRESS SOUND STACK "O H" EG Pointer nfi Wave Form Data Buffer WAVE DATA SELECTOR 2 TO 1 EGDIS Co Level (Volume) Coefficient Waveform Data Level Multiplier SOUND STACK61 SOUND STACK62 SOUND STACK63 SLOT OUTPUT WRITE to GA SOUND STACK SLOT OUTPUT (TO DIGITAL MIXER) STWINH Figure 4.28 FM Sound Generator Configuration SE Saturn SCSP User's Manual 53 Each block in the FM sound generator configuration diagram is explained below. SOUND STACK Averaging Operation Unit SCSP slot. nti Stores the output of each slot. The output values (sound stack internal data) from two slots can be input into the al Each slot has X and Y modulator input slots. These values must be added together to combine them into one. To avoid having the results of the addition go into over- flow, the two input values are multiplied by 1/2 before adding them together. By incorporating this method, the one output data. de SCSP can take two input values and convert them into By showing input data as XD and YD and the output data as ZD, the following equation can be produced. ZD = XD + YD 2 nfi YD XD Averaging Operation Unit Co Figure 4.29 Averaging Operation Equation ZD Because this equation is the same as the equation for obtaining the average value, this block is called the averaging operation unit. GA MDL[Modulation Level (Variation Amount)] Used to adjust the degree of the FM effect through the external slot input. Phase Adder Adds (subtracts) the phase value generated by PG (phase generator), and the phase value generated by the MDL SE calculation after passing through the averaging arith- metic unit. 54 Level Multiplier Multiplies the wave form read from the wave form memory, the ALFO, TL (Total Level), and the level coeffi- Wave Form RAM form output level. nti cient generated by the EG. Also adjusts the actual wave RAM for sound. al Wave Form Address Pointer This block generates the actual wave form memory address by taking the SA (start address) set for each slot and the wave form phase value output from the phase Wave Form Data Buffer tract. de adder and adding or subtracting them. The loop control and the loop status determines whether to add or sub- PG (Phase Generator) nfi Memory used for temporary storage of wave forms read from the wave form memory. Controls the read speed of the sound frequency wave form. (Actually, it performs skip reading.) Co EG (Envelope Generator) Generates the time-based variations of the value (enve- lope curve) based on each rate or level setting. The value created here is multiplied with the wave form data after it is sent to the level multiplier. This causes timing changes in the wave form output. GA SE Saturn SCSP User's Manual 55 The connections between the slots (actually, connections between the sound stack and the slots) are important for FM voice mixing. The slot calculations in Figure 4.28 FM voice mixing diagram can be shown like Figure 4.30 below. O P 1 26 (1/44.1K)/32=708nsec 27 Past Cycle 28 29 30 31 nti Numbers in boxes indicate slot numbers. 0 1 2 Current Cycle 3 4 al 5 6 7 O P 2 25 26 27 28 29 30 31 0 1 2 3 4 5 6 O P 3 24 25 26 27 28 29 30 31 0 1 2 3 4 5 O P 4 O P 5 O P 6 O P 7 23 22 21 20 24 23 22 21 25 24 23 22 26 25 24 23 27 26 25 24 28 27 26 25 29 28 27 26 30 29 28 27 31 30 29 28 de 0 31 30 29 1 0 31 30 2 1 31 0 3 2 1 0 4 3 2 1 S.STK 20 21 22 O P 1 :OPERATION 1 O P 2 :OPERATION 2 O P 3 :OPERATION 3 23 24 : : : 25 26 nfi 27 28 30 PG Calculation Process, PLFO Calculation Process Address pointer ADP (Address 29 Panter) Calculation Process MD (Modulation Data) Read (From the Sound Stack) Executing in timing shown by Read Wave Form Data (FROM DRAM) 31 0 1 in drawing O P 4 :OPERATION 4 O P 5 :OPERATION 5 O P 6 :OPERATION 6 O P 7 :OPERATION 7 : : : : Co Executing in timing shown by Interpolate Calculation Process, EG Calculation Processing ALFO Calculation Process Level Calculation Process Level Calculation Process in drawing Writes the Wave Form Output Value to the Sound Stack. Executes in the timing shown by the -->and ↓ in the drawing. Figure 4.30 Slot Calculation and Sound Stack State GA Slot calculation starts with the PG calculation process and the PLFO calculation process (OP1), with the remainder executed in the following cycle: ADP (address pointer) calculation processing and MD (modulation) data read (OP2), wave form data read (OP3), interpolate function process and EG calculation processing and ALFP calculation processing (OP4), level calculation processing (OP5) (OP6), wave form output value sound stack write (OP7). The calculation process of the level calculation takes a long time, so two cycles are required. If looking at a snapshot of SE the calculation process, for example, slot 3 is doing PG calculation processing and PLFO calculation processing while ADP calculation processing and MD read are done in slot 2. Meanwhile, wave form read in slot 1, interpolate calculation process, EG calculation process and ALFO calculation process in slot 0, level calculation process in slot 31 and slot 30, and sound stack writing in slot 30 are also being executed. 56 Because slot calculation starts at slot 0 and moves towards slot 31, the data written to the sound stacks also start at a low number and move up. However, there is a time difference between the time the slot calculation starts and the time the slot is written to the sound stack. nti to the sound stack, which is equal to the calculation execution time. For example Figure 4.31 shows that it would take six cycles worth of time for slot 0 to be written al As shown in Figure 4.30, when connecting a slot to another slot, the slot being con- nected to must already have written its data to the sound stack when it is in the OP2 state or the connection cannot be done. For example, since up to 27 slots are written to the sound stack, up to “27” color- coded sound data sets are applicable to slots that can be connected to slot 0 when {Current slot number + 32 –de OP2 is slot 0. An equation expressing this would be as follows. number of the slot to be connected (sound stack) + A} ≥ 5 The current slot number represents the register slot number. However, if the sound Past nfi stack of the slot to connect is in the current slot, then A is “32”; for past cycles, enter “0”. Here the past cycle indicates the cycle data from one sample previous. Current Co op1 op2 op3 Cycle 30 29 28 31 30 29 0 31 30 1 0 31 2 1 0 Cycle 3 2 1 4 3 2 5 4 3 6 5 4 7 6 5 op4 27 28 29 30 31 0 1 2 3 4 GA op5 op6 op7 S.STK 26 25 24 24 27 26 25 25 28 27 26 26 29 28 27 30 29 28 31 30 29 27 28 29 30 0 31 30 31 1 0 31 2 1 0 0 2 1 1 3 6 Cycles Worth of SE S.STK: Sound Stack Time Until SLOT0 is Written to the Sound Stack Figure 4.31 Time Lag until the Slot Is Written to the Sound Stack Saturn SCSP User's Manual 57 At least two slots must be connected to enable voice mixing. Explained below is the calculation method used for “MDXSL” and “MDYSL” (each 6 bits). the resulting equation shown below. nti When two slots are connected, the slot applying modulation (Modulator) is M, while the slot being modulated (carrier) is called C. The results of M–C are called J, with M – C = J . . . . equation 4.1 al The resulting J value changes the “MDYSL” and MDSYL” highest bit (6th in MSB) value. The conditions for this are shown below. • Condition 1 J ≥ 28 - Convert the J value into hexadecimal 5 bit value. de - If it is the newest sample then MSB (6th bit) is “0B”; if past samples, it is “1B”. • Condition 2 J < 0 (J is negative) - Calculate 32 + J (calculate 10 decimal) samples, then it is “1B”. nfi - Next convert the value from (1) to a hexadecimal 5 bit value. - If it is the newest sample then MSB (6th bit) is “0B”, if past • Condition 3 When the value J does not fit in neither condition 1 nor 2 above. - Convert the J value into hexadecimal 5 bit value. samples, then it is “0B”. Co - If it is the newest sample then MSB (6th bit) is “1B”, if past Following are items to be aware of when using FM voice mixing. Slot Input Output Modulator Input GA X Y ··· Modulator Input X Y Averaging X+Y SLOT Operation Block = 2 Waveform Data Output To ADDRESS POINTER Figure 4.32 Slot Averaging Calculation SE 58 The source input into a slot is the data in the sound stack (“SOUS”). Therefore, modulating with a slot indicates that the sound stack corresponding to the modula- tion slot is assigned and connected to a non-modulation slot. Actual functions nti include selecting the sound stacks input for modulator input Y and X, using “MDXSL” and “MDYXL”; therefore, the parameters obtained using the calculation method explained at the beginning of this register is required. al Also, there are two modulator inputs to the slot, X and Y. Be aware that these may be cut in half through the averaging calculation. Therefore, if only one slot is being connected to the slot, X and Y are set with the same parameters and the same slot sound stack data should be input. If only one side is set for input, then unexpected data may get in and make the FM modulation rate could seem smaller, or other such effects. de Next, determine each parameter using the “MDXSL” and “MDYSL” calculation method withfour slot configurations using the actual FM voice mixer as an example. First, explain how to get the FM voice mixer algorithm as shown in Figure 4.33. Arrow shows S1 nfi S0 S2 Sn: Shows Slot n Co data flow. S3 Algorithm sample (Y M 2 1 5 1 : FM CONNECTION) Figure 4.33 4SLOT configuration Algorithm GA • Slot0 Slot0 output is used as input for slot 2, but the output of slot0 is used for the input of slot0. This is called self feedback. • Slot1 Slot1 output is used as input for slot2. • Slot2 Slot2 uses the output of slot1 and slot0 as its input. This output is used as input for slot3. SE Saturn SCSP User's Manual 59 • Slot3 Slot3 uses slot2 output as input. Slot3 output is not connected to anything, but is used as voice output. (1) Parameters set in SLOT0. SOUND STACK ntial SLOT0 SLOT0 X Y SLOT0 [FM Algorithm] de SLOT0 [Actual diagram] nfi Figure 4.34 SLOT0 Algorithm For a self feedback type configuration such as slot 0, connect the sound stack that stores the slot 0 output data to the modulation input X and Y. Caution: Co There are three different ways of input methods to input the latest and past sample to both modulation input X and Y, or latest sample to one side and past sample to another since there are latest and past sample currently calculated in sound stack. In the case of self feedback, oscillation may occur as the same sample is input. So please input latest samples to one side and past samples to the other. The values of