Музыка и звукTurbo Sound Next

Turbo Sound Next

Turbo Sound Next - это аудиосистема, интегрированная в Spectrum Next. Она включает в себя 3 звуковых чипа AY-3-8912, как и в Spectrum.

MOS 6581 (SID), как на Commodore 64, был экспериментально добавлен в FPGA во время разработки, но позже был удален из-за большого объема занимаемого места (он в 4 раза больше, чем AY).

Chip Selection

Turbo Sound Next Control ($FFFD / 65533) управляет выбранным чипом, а также включает и отключает стереоканалы для каждого чипа. Peripheral 3 Register ($08) управляет сопоставлением каналов чипа со стереоканалами, а Peripheral 4 Register ($09) может использоваться для включения “моно” выхода для каждого чипа.

После выбора звукового чипа, Turbo Sound Next Control ($FFFD / 65533) также выбирает активный регистр на этом чипе. Sound Chip Register Write ($BFFD / 49149) позволяет затем читать или записывать его.

Peripheral 2 Register ($06) управляет режимом аудиочипа.

AY-3-8912 layout

3 чипа AY-3-8912 имеют следующую структуру регистров:

RegisterFunction
0Channel A Fine Tune
1Channel A Coarse Tune (4 bits)
2Channel B Fine Tune
3Channel B Coarse Tune (4 bits)
4Channel C Fine Tune
5Channel C Coarse Tune (4 bits)
6Noise Period (5 bits)
7Tone 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.
8Channel 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.
9Channel B amplitude, same as above.
10Channel C amplitude, same as above.
11Envelope period fine.
12Envelope period coarse.
13Envelope 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.

Регистры AY I/O 14 и 15 не реализованы на Next, поэтому программное обеспечение bit-banged, написанное для использования портов RS-232 и AUX на моделях Amstrad Spectrum, не поддерживается. Next имеет отдельный высокоскоростной аппаратный UART, который может быть подключен к ESP8266-01 wifi module или к проводному кабелю RS-232. Интерфейс UART осуществляется через порты UART TX ($133B / 4923) и UART RX ($143B / 5179).