ZX Forum #04
19 ноября 1997

world of sound Spectrum - Chapter 6.1: Description of the coprocessor registers of the musical AY- 3-8910 (AY-3-8912).

<b>world of sound Spectrum</b> - Chapter 6.1: Description of the coprocessor registers of the musical AY-
3-8910 (AY-3-8912).
              6.1. Registers


    R0 - low byte of the frequency channel A

    R1 - byte frequency channel A

    R2 - Low byte frequency channel B

    R3 - Senior byte frequency channel B

    R4 - low byte of the frequency channel C

    R5 - high byte of the frequency channel C


   The required frequency of each channel is obtained by 
dividing the clock frequency of co-processor at 16 and then 
dividing the result by a 12-bit value is obtained by merging 
the register low byte frequency and bits D0 ... D3 register 
older byte frequency. Thus, there can be

4095 set of different frequencies (from 27 Hz to
110 kHz). Naturally, the highest you do not
hear. Please note that the difference
between the two neighboring values ​​in the low frequencies is 
a fraction of a hertz, and at high frequencies up to several 
kilohertz. 

   Junior and Senior bytes, and the frequency can be calculated 
as follows: 


       Hi = INT (INT (110830/Fq + .5) / 256)

       Lo = INT (110830/Fq + .5)-Hi * 256

       Fq = 110830 / (Lo +256 * Hi)

where Hi - byte, Lo - low byte
and Fq - frequency in Hz. Note
that in most cases, given the frequency can not accurately 
convey the musical coprocessor. Table 9 shows the values ​​of 
registers tone for all possible notes. 


    R6 - sets the frequency noise


   The required frequency noise is obtained by dividing the 
clock by 256 and dividing the result by 5-bit value located in 
the five LSBs (D0. .. D4) register R6. Total You can ask 31 
different frequencies (from 223 Hz to 7 kHz). Value of the 
register R6 and the frequency noise can be calculated by the 
following formulas:



       R = INT (6927.3437/Fq + .5)

       Fq = 6927.3437 / R

where R - value of R6, and Fq - frequency in Hz.

   Everything said about the tone generator is also
true for the noise generator.


    R7 - control the mixer and the input /

         O


   The individual bits of this register are used for different 
purposes: 


     D0 - the tone of the channel A

     D1 - the tone of the channel B

     D2 - the tone of the channel C

     D3 - A noise channel

     D4 - noise channel B

     D5 - noise channel C

     D6 - Port A: 0 - I / 1 - output

     D7 - Port B: 0 - I / 1 - output

          (Only AY-3-8910)


   Zero in bits D0 ... D5 indicates
that the function is enabled. Thus, each channel can be 
adjusted to three different conditions: the tone, noise and 
tone + noise. Ports I / O, contained in the music

coprocessor, a ZX-Spectrum are not used, but these can add 
extra joysticks, printer, MIDI-interface or something like 
that. Port B exists only in the AY-3-8910. 


    R8 - control of the amplitude of channel A

    R9 - control of the amplitude channel B

    R10 - control the amplitude of the channel C


   Bits D0 ... D3 these registers set the volume for each 
channel (from 0 to 15). If one (or several) of

these bits set D4, then the value in the lower bits are 
ignored, and the amplitude of the channel controls the envelope 
generator (See below).



    R11 - low byte of the period of the envelope

    R12 - byte period of the envelope


   Required period of the envelope is obtained
by dividing the clock frequency of co-processor 256 and then 
dividing the results the one on 16-bit value obtained merge 
registers R11 and R12. Total You can set the 65,535 different 
periods. Values ​​of registers R11 and R12, as well as 
frequency and period of the envelope can be calculated as 
follows: 


     Hi = INT (INT (6927.3437/Fq + .5) / 256)

     Lo = INT (6927.3437/Fq + .5)-Hi * 256

     Fq = 6927.3437 / (Lo +256 * Hi) = 1/Pd

     Pd = (Lo +256 * Hi) / 6927.3437 = 1/Fq

where Lo and Hi - the values ​​of registers R11 and
R12, respectively, Fq - frequency in Hz envelope, and Pd - the 
period of the envelope in seconds. 


    R13 - control of the shape of the envelope


   Desired shape of the envelope is given by bits D0 ... D3 
register R13 as follows: 


     D0 - damping

     D1 - striping

     D2 - growth

     D3 - continued


   Table 10 shows all possible
combinations of these bits.


    R14 - I / O port A

    R15 - I / O port B


   As mentioned above, the ports of entry /
O do not have much importance on the generated sound is not 
affected. 






Other articles:

Help - Description of the shell of an electronic book "ZX-FORUM 4.

Secrets of Successful Design - Head for the book "Design your Programs

screen effects - Running a string of R-Type.

screen effects - clearing the screen of Zynaps.

screen effects - "minimize" the screen from Comando Tracer.

screen effects - smooth "decay" of the screen Sommando Tracer.

screen effects - changed the character set for the original stylized font from the game Rockstar.

screen effects - "running out the string" out of the game Rockstar.

screen effects - "pouring" the screen of the game Rockstar.

screen effects - a complex multi-effects from the game Bubbler.

New top 40 procedures - scrolling display, a fusion of two images, inverting screen, rotate characters, replacement of attributes, fill a closed loop, the calculation of addresses in the screen, copy of the screen, etc.

Technology sprites - Part 1: Introduction.

Technology sprites - Part 2: The hunt for sprites (search and pulling).

Technology sprites - Part 3: Format of sprites.

Technology sprites - Part 4: Format of sprites with a mask.

Technology sprites - Part 5: Structure sprite blocks (both co-exist in memory sprite and mask, what data to help us quickly find the address of the sprite in memory, and much more.)

Technology sprites - Part 6: preparation of data for publication.

Technology sprites - Part 8: Printing sprites (coordinates are given in familiarity).

Technology sprites - Part 9: Printing sprites (coordinates given in pixels).

Technology sprites - Part 10: a review of programs to work with sprites and graphics.

world of sound Spectrum - Chapter 1: The Physics of Sound.

world of sound Spectrum - Chapter 2: Operator BEEP, Creating effects on BEEPe, Making Music on BEEPe.

world of sound Spectrum - Chapter 3: How is the sound device (BEEP'ra and methods of sound production).

world of sound Spectrum - Chapter 4: Programming sound in assembler.

world of sound Spectrum - Chapter 4.1: Programming sound effects - Tone, Noise, Complexes effects.

world of sound Spectrum - Chapter 4.2: Programming Sound Effects - Volume Control.

world of sound Spectrum - chapter 4.3: Sound Effects - Management timbre.

world of sound Spectrum - Chapter 4.4: Programming sound effects - music programming.

world of sound Spectrum - Chapter 4.5: Programming sound effects - Polyphonic ringtones (polyphonic).

world of sound Spectrum - chapter 4.6: Treatment of external signals - digitization.

world of sound Spectrum - Chapter 4.7: Handling of external signals - Reverberation.

world of sound Spectrum - chapter 4.8: Synthesis of speech.

world of sound Spectrum - Chapter 4.9: audio playback interrupt.

world of sound Spectrum - Chapter 5: The operator PLAY for music coprocessor AY- 3-8910 (AY-3-8912).

world of sound Spectrum - Chapter 5.1: Creating effects operator PLAY.

world of sound Spectrum - Chapter 5.2: Making Music on PLAYe.

world of sound Spectrum - Chapter 6.1: Description of the coprocessor registers of the musical AY- 3-8910 (AY-3-8912).

world of sound Spectrum - Chapter 6.2: Programming effects and music under the musical coprocessor AY- 3-8910 (AY-3-8912).

world of sound Spectrum - Chapter 7: Software Review ZX-Spectrum to create sounds and music.

world of sound Spectrum - chapter 7.1: Editor, Sound Effects SUPER SOUND.

world of sound Spectrum - Chapter 7.2: Music Editor Wham the Music Box.

world of sound Spectrum - Annex 1, 2: Listings sound effects SUPER SOUND'a, tips assembler.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
IS-DOS - setting up and operating IS-DOS 2000.
Perspective - Preface to the game STALKER.

В этот день...   6 May