Changes
PSG
,The Programmable Sound Generator (PSG) is a sound chip designed by General Instrument (GI) in 1978. The specific model used in the CPC is the AY-3-8912 chip.
The PSG is quite primitive. It is able to output a square wave and/or white noise in three separate sound channels (named Channel A, B and C). Each channel can be Some other 8-bit systems used to output tones more sophisticated soundchips such as the [https://youtu.be/7pONRbIHT_w C64 SID], the [https://youtu.be/BANwL2sQ0DM NES APU] andthe [https:/or white noise/youtu.be/-mdjiWBYIqU Gameboy soundchip].
== PSG Part numbers used in the CPC during its lifetime ==
|}
==== Bit 2 (Attack) ====
This bit is only responsible for the starting point of the envelope and the direction. In other words, we We have:
volume = 0 if attack else 15 # Start at 0 for attack, 15 for decay
direction = 1 if attack else -1 # Upward for attack, downward for decay
When bit3 ==== Bit 1 (Alternate) , bit1 and Bit 0 (Hold) ====bit0 determine what happens to volume and direction at the end of a period.
def envelope_step(volume = ~, direction, shape): volume & 0x0F += direction if !(alternate ^ hold)volume > 15 or volume < 0: match shape: case 8 | 12: volume &= 0x0f # direction is unchanged case 10 | 14: direction *= -1 volume += direction case 11 | 13: direction = 0 if hold else ~ volume = 15 case _: direction = 0 volume = 0 return volume, direction & 1 if alternate
=== 0Eh - External Dataregister Port A ===
* The noise tone can be changed by applying an AND and OR mask to the output
== Links ==
*[http://en.wikipedia.org/wiki/General_Instrument_AY-3-8910 Wikipedia on the PSG]
*[[Media:Ay3-891x.pdf|AY-3-891x datasheet]] [[Media:Ym2149 datasheet.pdf|YM2149 datasheet]]
*[http://quasar.cpcscene.net/doku.php?id=assem:psg Quasar PSG documentation (in french)]
*[https://youtu.be/C4ezcX1W2_Y Mix I] [https://youtu.be/gH57xU9c7dE Mix II] [https://youtu.be/e7V3EMXF97g Mix III] AMSTRAD CPC MUSIC 1 hour
*[https://youtu.be/AhgUwqv2yAE Space Debris - Amstrad CPC Soundtrakker cover] [https://youtu.be/E_plcHyOC_8 RUN! - SID emulation on Amstrad CPC] by [[BSC]]
*[https://nguillaumin.github.io/ym-jukebox/ YM Jukebox] [https://ym.mmcm.ru/ AY Music Collection]
[[Category:Hardware]]
[[Category:Music and sound| ]][[Category:Video contents]][[Category:CPC Internal Components]]