The MSX PSG (Programmable Sound Generator) is the built-in audio protocol for the various incarnations of the MSX computer. Using the MSX PSG protocol in the BIOS, programs running on the MSX can send data directly to the computer's audio chip, the joystick, and certain aspects of the keyboard. In the original MSX computer, the audio chip was an AY-3-8910, but this was replaced with a YM2149 for the MSX2 and subsequent models. The YM2149 is backward compatible with the AY-3-8910, so all MSX music would sound identical when played on an MSX2.
To utilize the MSX PSG, data must be read and written to ports 0xA0-0xA2 on the MSX BIOS. The necessary ports are described below.
|0xA0 (write)||Register write port|
|0xA1 (write)||Value write port|
|0xA2 (read)||Value read port|
Each port represents 16 bits, or registers, of data to expose the underlying audio chip. The registers are explained below.
|0-5||Tone generator control|
|6||Noise generator control (must be 0)|
|7||Mixer control-I/O enable (must be 1)|
|11-13||Envelope generator control|
|14-15||I/O ports A & B|
Note: Setting different values in registers 6 or 7 may cause damage on some systems. Safest approach is to just not touch them and read them first before writing a new value.
Most MSX emulators have accurate MSX PSG emulation.
- map.grauw.nl/resources/msx_io_ports.php#psg - Information on the PSG.