# Yamaha YM2413

The YM2413, a.k.a. OPLL, is an FM synthesis sound chip manufactured by Yamaha Corporation. It is related to Yamaha's OPL family of FM synthesis chips, and is a cost-reduced version of the YM3812 (OPL2).

## Technical details

Based on the YM3812, it features nine concurrent FM channels with two operators per channel. Common to the OPL family, it features a percussion mode (or rhythm mode) that turns the last three channels into percussion/rhythm channels to produce 5 percussion/rhythm sounds.
To make the chip cheaper to manufacture, many of the internal registers were removed. The result of this is that the YM2413 can only play one user-defined instrument at a time; the other 15 instrument settings are hard-coded and cannot be altered by the user. There were also some other cost-cutting modifications: the number of waveforms was reduced to two, additive mode was removed along with the 6-bit carrier volume control (channels instead have 15 levels of volume), and the channels are not mixed using an adder; instead, the chip's built-in DAC uses time-division multiplexing to play short segments of each channel in sequence, which was also done in the YM2612 much later.

## Applications

The YM2413 was used in many devices, including:
* the FM Sound Unit add-on for the Sega Mark III sold exclusively in Japan, that improved the sound quality of all compatible games. The Japanese model of the Sega Master System came with this add-on built-in;
* an arcade board design produced by SNK and Alpha Denshi in the late 1980s for a number of their games, including Time Soldiers, Sky Soldiers, and Gang Wars;
* the Atari Games Rampart arcade game;
* the Yamaha PSS-170 and PSS-270 keyboards in 1986;
* the Yamaha SHS-10 shoulder keyboard in 1987, and the Yamaha PSS-140 and Yamaha SHS-200 in 1988;
* the Yamaha PSR-6 keyboard in 1988;
* several sound enhancement cartridges for MSX computers. It is also built into select MSX2 and MSX2+ systems, and all MSX Turbo R machines, as part of the MSX-Music standard; and
* JTES Japanese teletext receivers.

## Variants and clones

* Konami VRC7 (Also known as "VRC VII 053982") contains a YM2413 derivative, used on the Family Computer game Lagrange Point, as well as on a few redemption arcade machines. It has 6 FM channels instead of 9, lacks the rhythm channels, and has a different set of built in FM patches from the YM2413. While the chip was also known as the Yamaha DS1001, there are no official sources that have referenced this name, however it is labeled as such by Yamaha as an internal code.
** There is an undocumented debug mode that changes several inputs, including the ability to dump the chip's FM patches as well as access to three additional channels, however this requires modification to the pinouts, which allowed access to the debug mode at the cost of disabling the internal mapper. Due to changes made to the YM2413-based core of the VRC7, the percussion/rhythm mode is not available at all, even when it has been reenabled. As a result, YM2413 streams using the rhythm channels will become completely inaudible on the VRC7 audio chips.
* Yamaha YM2420 (OPLL2) is a variant with slightly changed registers (intentionally undocumented to avoid hardware piracy), used in Yamaha's own home keyboards. It has the same pinout and built-in FM patches as the YM2413, but several registers have parts of the bit order reversed.
* Yamaha YM2423 (OPLL-X) is another YM2413 derivative. It has the same pinout and register set as the YM2413, but a different set of built in FM patches.
* Yamaha YMF281 (OPLLP) is a later YM2413 derivative, possibly intended for pachinko or pachislot machines. It has the same pinout and register set as the YM2413, but a different set of built in FM patches.
* Yamaha YM2413B and YMF281B are low power variants of YM2413 and YMF281 respectively. These variants also reduced the crossover distortion of the built-in DAC. A lower power consumption indicates that these variants may be made using a CMOS process.
* Yamaha FHB013 is a later YM2413 derivative, using a 2-metal CMOS process instead of NMOS. It has the same pinout and register set as the YM2413, but a different set of built in FM patches. It may be the same chip as the YMF281B above, as it supposedly has the same patches. It may also be directly derived from the YM2413B, as the YMF281B was based on the YM2413B with different patches but also using the same CMOS process.
* UMC U3567 is a 100% software compatible chip with a slightly different pinout, requiring a pin-to-pin adapter in order to be used on a YM2413 socket.
* UMC UM3567 is a 100% software compatible chip, with the same pinout as the U3567 but has a slightly enhanced DAC output. It requires the same pin-to-pin adapter, but the different DAC output will also require the two pull-down resistors of the audio output pins to be removed from the mainboard.
* K-663A (sometimes known as the K-663 or K-633A) is a 100% software compatible chip, used on the Korean Family Computer karaoke game Family Noraebang, as well as on a few arcade machines. It is based on the UM3567, using the same pinouts and an enhanced DAC output. As with the U3567 and UM3567 chips, a pin-to-pin adapter is required to use the YM2413 sockets. Like the UM3567, the different DAC output will also require the two pull-down resistors of the audio output pins to be removed from the mainboard.