40
Some versions (specified as the SN76489N in the datasheets) instead have a divider of 2
and a maximum clock of 500kHz, giving an equivalent post-divide clock rate.
For each channel (all 4) there is a 10 bit counter, and an output bit. Each clock cycle, the
counter is decremented (if it is non-zero). If, after being decremented, it is zero, the
following happens:
Tone channels
The counter is reset to the value currently in the corresponding register (eg. Tone0 for
channel 0). The output bit is flipped - if it is currently outputting 1, it changes to 0, and
vice versa. This output is passed to the mixer (see below). The initial output value may
be arbitrarily set.
So, it produces a square wave output with wavelength twice the value in the
corresponding register (measured in clock ticks). The frequency of this can be calculated
by
Example values for an NTSC-clocked chip are given and are generally assumed
throughout. Thus, for example, 0x0fe gives 440.4Hz.
If the register value is zero or one then the output is a constant value of +1. This is often
used for sample playback on the SN76489.
Tone range
The lowest possible tone, using register value $3ff, is 109Hz (assuming an input clock of
3579545Hz), which corresponds to MIDI note A2 -10 cents.
The highest possible tone, using register value $001, is 111861Hz, which corresponds to
MIDI note D10 -14 cents. However, in practice, smoothing capacitors and other, perhaps
less deliberate, imperfections in the output mean that such a high note is not audible; in
tests on an SMS2, the highest note that gave any audible output was register value
$006, giving frequency 18643Hz (MIDI note A12 -12 cents). Thus, there is effectively a
range of 10 octaves.
Noise channel
The counter is reset according to the low 2 bits of the noise register as follows:
Input clock (Hz) (3579545)
Frequency (Hz) = ----------------------------------
2 x register value x divider (16)
Summary of Contents for Franky
Page 1: ...Instruction Manual ...