Path: blob/master/BizHawk.Emulation.Cores/Consoles/Coleco/docs/CV-Sound.txt
2 views
1ColecoVision Sound Generation Hardware23The ColecoVision uses the Texas Instruments SN76489A sound4generator chip. It contains three programmable tone generators,5each with its own programmable attenuator, and a noise source6with its own attenuator.781. Tone Generators910Each tone generator consists of a frequency synthesis section11requiring ten bits of information to define half the period of12the desired frequency (n). F0 is the most significant bit and13F9 is the least significant bit. The information is loaded into14a ten stage tone counter, which is decremented at a N/16 rate15where N (3.579MHz) is the input clock frequency. When the tone16counter decrements to zero, a borrow signal is produced. This17borrow signal toggles the frequency flip-flop and also reloads18the tone counter. Thus, the period of the desired frequency is19twice the value of the period register.2021The frequency can be calculated by the following:2223f = 3.579MHz/(32n)2425The output of the frequency flip-flop feeds into a four stage26attenuator. The attenuator values, along with their bit position27in the data word, are shown below. Multiple attenuation control28bits may be true simultaneously. THus, the maximum attenuation29is 28 db.3031A0 A1 A2 A3 Weight32330 0 0 1 2 db340 0 1 0 4 db350 1 0 0 8 db361 0 0 0 16 db371 1 1 1 Off38392. Noise Generator4041The noise generator consists of a noise source that is a42shift register with an exclusive OR feedback network. The43feedback network has provisions to protect the shift register44from being locked in the zero state.4546Noise Feedback Control4748FB Configuration49500 "Periodic" Noise511 "White" Noise525354Noise Generator Frequency Control5556NF0 NF1 Shift Rate57580 0 N/512590 1 N/1024601 0 N/2048611 1 Tone gen #3 output62633. Control Registers6465The SN76489A has eight internal registers which are used66to control the three tone generators and the noise source.67During all data transfers to the SN76489A, the first byte68contains a three bit field which determines the destination69control register. The register address codes are shown here.70717273Register Address Field7475R0 R1 R2 Destination Control Register76770 0 0 Tone 1 Frequency780 0 1 Tone 1 Attenuation790 1 0 Tone 2 Frequency800 1 1 Tone 2 Attenuation811 0 0 Tone 3 Frequency821 0 1 Tone 3 Attenuation831 1 0 Noise Control841 1 1 Noise Attenuation85864. Data Formats8788The formats required to transfer data are shown below.8990Frequency91LSB MSB LSB MSB92+---+--------+-----------+ +---+---+-----------------+93| |Reg Addr| Data | | | | Data |94+ 1 +--+--+--+--+--+--+--+ | 0 | X +--+--+--+--+--+--+95| |R0|R1|R2|F6|F7|F8|F9| | | |F0|F1|F2|F3|F4|F5|96+---+--+--+--+--+--+--+--+ +---+---+--+--+--+--+--+--+9798Noise Control99LSB MSB100+---+---+---+---+---+----+-------+101| | Reg Addr | | | Shift |102+ 1 +---+---+---+ X | FB +---+---+103| | 1 | 1 | 0 | | |NF0|NF1|104+---+---+---+---+---+----+---+---+105106Attenuator107LSB MSB108+---+--------+-----------+109| |Reg Addr| Data |110+ 1 +--+--+--+--+--+--+--+111| |R0|R1|R2|A0|A1|A2|A3|112+---+--+--+--+--+--+--+--+113114115116