Turbo Sound Next

From SpecNext official Wiki
Revision as of 14:14, 16 August 2017 by wiki>Hyphz
Jump to: navigation, search

Turbo Sound Next is the audio system integrated on the Spectrum Next. It features 3 AY-3-8912 sound chips as used in the Spectrum, plus a MOS 6581 (SID) as used on the Commodore 64.

Turbo Sound Next Control ($FFFD / 65533) controls the selected chip and enables and disables stereo channels per chip. Peripheral 3 Register ($08) controls the mapping of chip channels to stereo channels.

Once a sound chip is selected, Turbo Sound Next Control ($FFFD / 65533) also selects the active register on that chip. ||PortNo|$BFFD}} then allows it to be read or written.

The 3 AY-3-8912 chips have the following register layout:

Register Function
0 Channel A Fine Tune
1 Channel A Coarse Tune (4 bits)
2 Channel B Fine Tune
3 Channel B Coarse Tune (4 bits)
4 Channel C Fine Tune
5 Channel C Coarse Tune (4 bits)
6 Noise Period (5 bits)
7 Tone enable flags. Bits 0-2 enable tone on channels A, B, C respectively, but are inverted - 0 is enabled. Bits 3-5 enable noise on A, B, C are are likewise inverted.
8 Channel A amplitude. Bits 0-3 set the fixed amplitude which is used if bit 4 is 0. If bit 4 is 1, the envelope generator is used instead, and bits 0-3 are ignored.
9 Channel B amplitude, same as above.
10 Channel C amplitude, same as above.
11 Envelope period fine.
12 Envelope period coarse.
13 Envelope shape. Bits 0-3 alter the behavior of the envelope generator:

Bit 0: "Hold"; If 1 the envelope generator performs one cycle then holds at the end value. If 0, it cycles continuously.

Bit 1: "Alternate"; If 1 the envelope generator alters direction after each cycle. If 0, it resets after each cycle. If Hold is set, this instead chooses if the value held is the final value (0) or the initial value (1).

Bit 2: "Attack"; if 1 the generator counts up. If 0 the generator counts down.

Bit 3: "Continue"; if 0, the envelope generator performs one cycle then drops amplitude to 0 and stays there, overriding Hold. If 1, Hold is followed.