Difference between revisions of "YM2612"

From Sega Retro

m (15 revisions: Articles imported from Sonic Retro)
(Added a link to the official manual.)
 
(43 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[[Image:Ym2612.png|frame|right|Yamaha YM-2612 chip]]'''YM2612''' is a 6 channel FM synthesis (Frequency Modulation) sound synthesizer integrated circuit produced by [[Yamaha]]. It belongs to a family of Yamaha FM synthesizer chips, and can be considered an ancestor to the OPL2 (YM3812) and OPL (YMF262) FM ICs that were used in the popular AdLib and Creative Labs SoundBlaster PC soundcards.
+
{{cleanup}}
 +
{{ICBob
 +
| image=Ym2612.jpg
 +
| title=
 +
| designer=[[Yamaha]]
 +
| date=
 +
}}
 +
The '''Yamaha YM2612''' (also incorrectly called YM-2612) is a sound synthesizer integrated circuit by [[Yamaha]] [https://upload.wikimedia.org/wikipedia/commons/0/05/Yamaha_YM2612_top_metal_die_shot.jpg known to have first appeared in 1988]. 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), YM2608 (OPNA) and YM2610 (OPNB) are known to precede it. A CMOS version, the '''YM3438'''/'''OPN2C''', was also manufactured by Yamaha.
  
The Yamaha YM 2612 FM Synthesis Chip is based on the Yamaha 2151 (which was used in earlier Sega Arcade Games). Ironically, it's of a higher quality then the OPL2/3 FM Synthesis chips produced by Yamaha and used in Creative Labs PC sound cards such as the popular "Sound Blaster" line.
+
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 was notably used in the [[Sega Genesis]] game console and has the following features:
+
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.
  
*Six concurrent FM channels (or voices)
+
==Details==
*The sixth channel can be used as an FM or DAC channel (but not both)
+
{{stub}}
*Four operators per channel
+
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).
*Two timers
 
*A low frequency oscillator
 
*Stereo output
 
  
Each channel may be assigned to either left, right or both (centre) of the stereo output.
+
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 special sixth channel can act as a DAC (Digital to Analogue Converter) by means of the 'DAC Enable' register, this allows the chip to play 8-bit PCM sound samples. Enabling the DAC disables the FM for that channel.  Data is written to the DAC via an 8-bit register.  The YM2612 does not provide any timing or buffering of the PCM samples, so all frequency control and buffering must be done in software by the host processor.
+
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.
  
The synth patches used by the YM2612 in Mega Drive games are compatible with certain members of the Yamaha DX/TX synthesizers, such as the DX100.
+
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.
==External Links==
+
 
*[http://www.smspower.org/maxim/docs/ym2612/ YM-2612 Documentation based on the sega2.doc file]
+
==Technical specifications==
[[Category:Mega Drive Hardware]]
+
:''See [[Sega Mega Drive/Technical specifications|Sega Mega Drive: Technical specifications]] for further information''
 +
 
 +
* Clock rate:
 +
:* [[Sega Mega Drive]]: 7.670453 MHz (NTSC), 7.600489 MHz (PAL)
 +
:* [[Sega System 32]]: 8.053975 MHz
 +
* Sound output: Mono, Stereo{{fileref|GenesisTechnicalOverview.pdf}}
 +
:* Output frequency: 53.267 kHz (NTSC), 52.781 kHz (PAL){{ref|[https://github.com/RetroAchievements/RASuite/blob/master/bizhawk/BizHawk.Emulation.Common/Sound/YM2612.cs Yamaha YM2612 Emulation Core]}}
 +
* Sound channels: 6
 +
:* Default configuration: 6 channels (6 FM channels)
 +
:* Alternative configuration: 6 channels (5 FM channels, 1 PCM channel)
 +
* [[wikia:w:c:electronicmusic:Frequency modulation|FM synthesis]]:
 +
:* FM channels: 5-6 channels (5 channels with PCM, 6 channels without PCM)
 +
:* FM sample rate: 53.267 kHz (NTSC), 52.781 kHz (PAL){{ref|[https://github.com/RetroAchievements/RASuite/blob/master/bizhawk/BizHawk.Emulation.Common/Sound/YM2612.cs Yamaha YM2612 Emulation Core]}}
 +
* [[PCM]] [[wikipedia:Sampling (signal processing)|sampling]] in Channel 6 [[wikipedia:Digital-to-analog converter|DAC]] mode:
 +
::* Sample [[wikipedia:Audio bit depth|depth]]: 8‑bit{{ref|[http://www.alyjameslab.com/wa_files/FMDRIVE_USER_MANUAL.pdf FM-Drive User Manual]}}
 +
::* [[wikipedia:Sampling rate|Sample rate]]:
 +
:::* Maximum: over 44.1 kHz{{ref|1=[https://www.youtube.com/watch?v=fYWclV9H2eY YM2612 with Teensy: playing audio at 44.1 kHz]}}
 +
:::* Sega Mega Drive: 26.3 kHz
 +
:::* Sega System 32: ~29 kHz
 +
* [[wikipedia:Low-frequency oscillation|LFO]]: 1 [[wikipedia:sine wave|sine wave]] LFO (low frequency oscillator) channel
 +
* [[wikipedia:Interrupt request|IRQ]] interrupt capabilities: IRQ2 sound interrupt{{ref|[https://github.com/mamedev/mess-cvs/blob/master/src/drivers/genesis.c Genesis (MESS)]}}
 +
 
 +
==Documentation==
 +
<gallery>
 +
YM2612 manual.pdf|Official manual
 +
</gallery>
 +
 
 +
==External links==
 +
*[http://www7.plala.or.jp/kikekike/fm/ YM3438 information, including official manuals (Japanese, link is now dead.)] ([http://web.archive.org/web/20140804044038/http://www7.plala.or.jp/kikekike/fm/ Archived, not complete])
 +
*[http://www.smspower.org/maxim/Documents/YM2612 A transcription of Sega's '''incomplete, sometimes incorrect''' YM2612 documentation from the sega2.doc file]
 +
 
 +
==References==
 +
<references />

Latest revision as of 09:50, 26 February 2024

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 1988. 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), YM2608 (OPNA) and YM2610 (OPNB) are known to precede it. 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[1]
  • Output frequency: 53.267 kHz (NTSC), 52.781 kHz (PAL)[2]
  • Sound channels: 6
  • Default configuration: 6 channels (6 FM channels)
  • Alternative configuration: 6 channels (5 FM channels, 1 PCM 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)[2]
  • Maximum: over 44.1 kHz[4]
  • Sega Mega Drive: 26.3 kHz
  • Sega System 32: ~29 kHz
  • LFO: 1 sine wave LFO (low frequency oscillator) channel
  • IRQ interrupt capabilities: IRQ2 sound interrupt[5]

Documentation

External links

References