YM2612

From MegaDrive Wiki
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
The YM2612 in a Model 1 Mega Drive. The VDP is visible near the top right, as well as the Z80 RAM on the bottom right.

The YM2612 (the smaller cousin of the YM2608) is the Sega Mega Drive's main sound chip. It is capable of outputting 6 channels of FM synthesis, meaning it can re-create almost any instrument you could think of by using some algorithms, which are specified by 'voices.' The chip can output stereo sound, which means a channel can be left, right, or both. To create accurate drums, snares, and more, many games trade the YM2612's 6th FM channel in for a DAC channel to play back these pre-recorded samples.

To access the YM2612, you write into a specific area of IO memory, which is often done by the Z80 when it runs the sound driver, or the M68k when it is running the sound driver.

If distortion of a channel is required, one can utilize the chip's LFO, or Low Frequency Oscillator. As mentioned earlier, the YM2612's 6th FM channel can be used as a DAC channel by the means of the 'DAC Enable' register on the chip. DAC data is written to an 8-bit register. The YM2612 does not provide any facilities to handle buffering, mixing, or timing of this data, so any timing and mixing will need to be done in software on either the Z80 or the M68k.