Difference between revisions of "YM2612"

From Sega Retro

Line 45: Line 45:
 
::* PCM bitrate:
 
::* PCM bitrate:
 
:::* Maximum: 1411 [[Byte|Kbps]]
 
:::* Maximum: 1411 [[Byte|Kbps]]
:::* Sega Mega Drive: 1024 Kbps (16 kHz), 720 Kbps (22.5 kHz), 512 Kbps (32 kHz){{ref|[https://github.com/Stephane-D/SGDK/blob/master/bin/rescomp.txt ResComp 1.5 (April 2016)]}}{{ref|[http://sonicresearch.org/community/index.php?threads/dual-pcm.4791/ Dual PCM]}}
+
:::* Sega Mega Drive: 512 Kbps
 
:::* Sega System 32: 1292 Kbps
 
:::* Sega System 32: 1292 Kbps
 
* [[wikipedia:Low-frequency oscillation|LFO]]: 1 [[wikipedia:sine wave|sine wave]] LFO (low frequency oscillator) channel
 
* [[wikipedia:Low-frequency oscillation|LFO]]: 1 [[wikipedia:sine wave|sine wave]] LFO (low frequency oscillator) channel
Line 56: Line 56:
 
::* Sample depth: 8‑bit (PCM), 4-bit (DPCM/ADPCM){{ref|[http://sonicresearch.org/community/index.php?threads/dual-pcm.4791/ Dual PCM]}}{{ref|[https://github.com/Stephane-D/SGDK/blob/master/bin/rescomp.txt ResComp 1.5 (April 2016)]}}
 
::* Sample depth: 8‑bit (PCM), 4-bit (DPCM/ADPCM){{ref|[http://sonicresearch.org/community/index.php?threads/dual-pcm.4791/ Dual PCM]}}{{ref|[https://github.com/Stephane-D/SGDK/blob/master/bin/rescomp.txt ResComp 1.5 (April 2016)]}}
 
::* Sample rate: 32 kHz (1 channel), 22.5 kHz (2 channels), 16 kHz (4 channels){{ref|[https://github.com/Stephane-D/SGDK/blob/master/bin/rescomp.txt ResComp 1.5 (April 2016)]}}{{ref|[http://sonicresearch.org/community/index.php?threads/dual-pcm.4791/ Dual PCM]}}
 
::* Sample rate: 32 kHz (1 channel), 22.5 kHz (2 channels), 16 kHz (4 channels){{ref|[https://github.com/Stephane-D/SGDK/blob/master/bin/rescomp.txt ResComp 1.5 (April 2016)]}}{{ref|[http://sonicresearch.org/community/index.php?threads/dual-pcm.4791/ Dual PCM]}}
 +
::* PCM bitrate: 1024 Kbps (16 kHz), 720 Kbps (22.5 kHz), 512 Kbps (32 kHz){{ref|[https://github.com/Stephane-D/SGDK/blob/master/bin/rescomp.txt ResComp 1.5 (April 2016)]}}{{ref|[http://sonicresearch.org/community/index.php?threads/dual-pcm.4791/ Dual PCM]}}
  
 
==External links==
 
==External links==

Revision as of 15:36, 1 October 2020

Cleanup.svg
This article needs cleanup.
This article needs to be edited to conform to a higher standard of article quality. After the article has been cleaned up, you may remove this message. For help, see the How to Edit a Page article.
Ym2612.jpg
YM2612
Designer: Yamaha

The Yamaha YM2612 (also incorrectly called YM-2612) is a sound synthesizer integrated circuit by Yamaha known to have first appeared in the late 1980s. The chip implements Yamaha Operator Type-N (OPN) frequency modulation synthesis, and is given the designation OPN2, however it is not the second OPN chip — the YM2203 (OPN) and YM2608 (OPNA) are known to precede it, with possible others as well. A CMOS version, the YM3438/OPN2C, was also manufactured by Yamaha.

By default, the chip can generate six simultaneous tones, each with their own configuration of FM operators. As with all OPN chips, the third channel can be modified to have each operator run at a different frequency — this is often called "special" or "multifrequency" mode. The sixth channel can be swapped out for a software-controlled 8-bit PCM channel mixed directly into the output waveform. Finally, there is a single LFO which acts on all FM channels, but each channel can be set to be affected by it differently.

The YM2612/YM3438 was only notably used on the Sega Mega Drive game console, Sega System 32 arcade board, and the Fujitsu FM Towns computer. However, its use on the Mega Drive meant it was also used on hardware derived from it — including arcade boards, where the YM3438 was used. Several Mega Drive 2s also used the YM3438 core.

Details


This short article is in need of work. You can help Sega Retro by adding to it.


OPN FM synthesis is similar to other forms of Yamaha FM synthesis, in that it consists of a number of operators connected in a variety of ways, each operator consisting of a modified ADSR envelope, rate scaling, frequency multiplication, detuning, and a SSG envelope generator (the YM2612 does not include the YM2149 [AY-3-8910 clone] core found in other OPN chips, but the envelope generator remains).

The YM2612 does not have a separate address and data bus. As a result, communication with the YM2612 is multiplexed on the 8-bit parallel bus. Each parameter the chip provides is accessed by first sending a register number to the chip, then the register's value. Because Yamaha's register layout only allows four channels on a single register map, the YM2612 uses two ports to access each group of three channels.

The YM2612 also contains two timers — the high frequency Timer A and lower frequency Timer B. While the YM2612 can be set to interrupt a CPU when a timer reaches zero, sadly Sega did not make this connection on the Mega Drive, requiring timers to be checked in software.

When Channel 6 is in DAC mode, the controlling CPU must stream 8-bit unsigned PCM data to the YM2612 fast enough to be played back at the optimal playback speed. The maximum sample rate depends on the sample rate of the chip, but keep in mind that register writes must be synchronized to when the chip is ready — this is checked by polling the YM2612's status register and seeing if its Busy bit is set or not.

Technical specifications

See Sega Mega Drive: Technical specifications for further information
  • Clock rate:
  • Sound output: Mono, Stereo[2]
  • Output frequency: 53.267 kHz (NTSC), 52.781 kHz (PAL)[3]
  • Sound channels: 7
  • Default hardware configuration: 7 channels (6 FM channels, 1 LFO channel)
  • Alternative hardware configuration: 7 channels (5 FM channels, 1 PCM channel, 1 LFO channel)
  • FM channels: 5-6 channels (5 channels with PCM, 6 channels without PCM)
  • FM sample rate: 53.267 kHz (NTSC), 52.781 kHz (PAL)[3]
  • Maximum: 44.1 kHz[1]
  • Sega Mega Drive: 32 kHz[5]
  • Sega System 32: 40.4 kHz
  • PCM bitrate:
  • Maximum: 1411 Kbps
  • Sega Mega Drive: 512 Kbps
  • Sega System 32: 1292 Kbps
  • Sound channels: 7-11 channels (5 FM channels, 1-4 PCM channels, 1 LFO channel)
  • Extended PCM capabilities:
  • PCM channels: 1-4[5]
  • Audio compression formats: DPCM,[7] ADPCM, VGM, XGM, TFM[5] MOD[8]
  • Sample depth: 8‑bit (PCM), 4-bit (DPCM/ADPCM)[7][5]
  • Sample rate: 32 kHz (1 channel), 22.5 kHz (2 channels), 16 kHz (4 channels)[5][7]
  • PCM bitrate: 1024 Kbps (16 kHz), 720 Kbps (22.5 kHz), 512 Kbps (32 kHz)[5][7]

External links

References