Changes

Jump to: navigation, search

PSG

733 bytes added, 14 May
/* Other Variants */
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).
Some other 8-bit systems used more sophisticated soundchips such as the SAA1099, the [https://youtu.be/7pONRbIHT_w C64 [[SID]], the [https://youtu.be/9bUMOSM-9Kg BANwL2sQ0DM NES APU] and the [https://youtu.be/-mdjiWBYIqU Gameboy soundchip]. == PSG Part numbers used in the CPC during its lifetime == * GI AY-3-8912 [https://www.cpcwiki.eu/imgs/c/cc/CPC464_PCB_Top_%28Z70378_MC0046A%29.jpg Source]* GI AY-3-8912A [https://www.cpcwiki.eu/imgs/f/f1/CPC6128_PCB_Top_%28Z70290_MC0020B%29.jpg Source]* Microchip AY-3-8912 [https://www.cpcwiki.eu/imgs/c/cf/AmstradCPC464_Z70375_MC0044D_GA40010_PCB_Top.jpg Source]* Microchip AY38912/P [https://www.cpcwiki.eu/imgs/5/5e/CPC464Plus_MC0122B_2700-016P-3_PCB_Top.jpg Source] <br>
== I/O Access ==
# set BC1/BDIR to Write Data
# and back to Inactive.
 
You must use 3 OUTs to send a value to an AY register, even if you don't change registers in the meantime. [https://www.cpcwiki.eu/forum/programming/interesting-walkthrough-video-coding-a-pet-to-play-samples-at-60khz/msg250874/#msg250874 Source]
 
So you have to enter the data on F4. Then on F6, select the type of data (bdir/bc1>>#10) and validate everything (bdir/bc1>>00). Otherwise, the data in other AY registers becomes corrupted quite quickly.
Consult this article for more information: [[How to access the PSG via PPI]]
According to [https://github.com/mamedev/mame/blob/master/src/devices/sound/ay8910.h MAME]: The input to the shift register is bit0 XOR bit3. Bit0 is the output. This was verified on AY-3-8910 and YM2149 chips.
However, the algorithm is described in detail in the [[Media:Microchip ay8930.pdf|AY-8930 datasheet]]. And it disagrees with MAME, the input to the shift register is bit0 XOR bit2. And it seems bit1 is the output.
[[File:AY38910A noise block diagram.png]]
== Chip Variants ==
=== IC models used in CPC === These are the ones known to be used in the CPC by looking at pictures of CPC mainboards. All should operate almost identically. * GI AY-3-8912 [https://www.cpcwiki.eu/imgs/c/cc/CPC464_PCB_Top_%28Z70378_MC0046A%29.jpg Source]* GI AY-3-8912A [https://www.cpcwiki.eu/imgs/f/f1/CPC6128_PCB_Top_%28Z70290_MC0020B%29.jpg Source]* Microchip AY-3-8912 [https://www.cpcwiki.eu/imgs/c/cf/AmstradCPC464_Z70375_MC0044D_GA40010_PCB_Top.jpg Source]* Microchip AY38912/P [https://www.cpcwiki.eu/imgs/5/5e/CPC464Plus_MC0122B_2700-016P-3_PCB_Top.jpg Source] === Other Variants === The PSG chip family is composed of 3 variants: * the AY-3-8910 , with two 8-bit I/O ports, and a 40-pin package* the AY-3-8912 , with one 8-bit I/O port and a 28-pin package* the AY-3-8913 , with no I/O port. and a 24-pin packageIn addition to the CPC, these chips were also used in the [[KC Compact]], [[ZX Spectrum]], [[MSX]], [[Oric-1/Atmos|Oric]], [[EACA EG2000 Colour Genie]], [[Vectrex]], [[Intellivision]] and in the Mockingboard expansion for the [[Apple II]].  There are also PSG clones: Toshiba T7766A, Winbond WF19054, JFC 95101 and File KC89C72. [https://wiki.agiri.ninja/sound_chip_clones:index Source]
Yamaha produced the SSG (Software-controlled Sound Generator) chip family (YM2149F, YM3439, YMZ294, YMZ284, YMZ285) which is a quasi-clone of the PSG. The main difference is that the envelope counter on the PSG has 16 steps. On the SSG it has twice the steps, happening twice as fast. This chip equips the [[Atari ST]], [[Aleste 520EX]] and [https://www.msx.org/wiki/Yamaha_YM2149 some MSX computers]. It is also used in the [[PlayCity]] expansion.
The chip is clocked differently depending on the computer: ZX Spectrum: 1773400 Hz ; Pentagon: 1750000 Hz ; MSX: 1789772 Hz ; CPC: 1000000 Hz ; Oric: 1000000 Hz ; Atari ST: 2000000 Hz.
 
The PSG chip competed with the DCSG (Digital Complex Sound Generator) chip family (SN76489, SN94624, TMS9919) by Texas Instruments. The DCSG has similar sounding features except that it does not have any envelope control and that its noise generator has its own dedicated channel.
The EPSG (AY-3-8930), used in the Covox Sound Master soundcard on PCs, is a register-compatible evolution of the AY-3-8910:
* The noise period setting is more accurate (8-bit instead of 5-bit)
* The noise tone can be changed by applying an AND and OR mask to the output
 
=== Competitors ===
 
The PSG chip competed with the DCSG (Digital Complex Sound Generator) chip family (SN76489, SN94624, TMS9919) by Texas Instruments.
 
The DCSG has similar sounding features except that it does not have any envelope control and that its noise generator has its own dedicated channel.
=== Replacing the AY-3-8912 in the CPC with an AY-3-8910(A) ===
For tips regarding the desoldering of ICs see this Wiki page: [[IC Repair]]
 
<br>
== Links ==
*[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]
 
<br>
[[Category:Hardware]]
[[Category:Music and sound]]
[[Category:CPC Internal Components]]
13,173
edits