YM2612 Basics

This page is a browser-readable version of the early YM2612 notes in this repository. The focus is the minimum path from chip pins to a simple beep.

Pin Layout

    +--()--+
GND | 1  24| 0M(CLK)
 D0 | 2  23| Vcc
 D1 | 3  22| A.Vcc
 D2 | 4  21| MOL
 D3 | 5  20| MOR
 D4 | 6  19| A.GND
 D5 | 7  18| A1
 D6 | 8  17| A0
 D7 | 9  16| /RD
  ? |10  15| /WR
/IC |11  14| /CS
GND |12  13| /IRQ
    +------+

Pin Summary

A0 and A1

A0 and A1 select address/data access and port 0 / port 1.

How chip.write() Maps to Pins

void ym2612::write(uint32_t offset, uint8_t data) is a simplified software interface.

chip.write(0, 0x30);
chip.write(1, 0x01);

This means: select register 0x30, then write 0x01 into it.

What We Do to Make a Beep

  1. Create a ym2612 object.
  2. Reset the chip.
  3. Set operator parameters for channel 1.
  4. Set algorithm and stereo output.
  5. Set frequency.
  6. Send key on.
  7. Generate samples.

Key Register Groups

Why Algorithm 7?

Algorithm 7 is a simple starting point because all 4 operators act as carriers. Every operator directly contributes to the output.

Good Next Reads

Back