This is the first post in a series on emulating the main Sega Genesis sound chip, the Yamaha YM2612 FM synthesis chip, also known as the OPN2. To date, the YM2612 is pretty easily the most difficult-to-emulate sound chip that I have worked on. It’s not extremely complex in concept, but it has an incredible amount of specific details and quirks in how exactly it works, and many of them need to be emulated exactly correctly for game audio to sound correct. Debugging mistakes is also very, very difficult due to all of the modulation and feedback, where for example a minor mistake in envelope emulation can manifest as some instruments sounding completely wrong. These posts are not going to describe how to implement a cycle-accurate YM2612 emulator (mine is not), but I will do my best to describe how the chip works at a low level, from the perspective of someone who emulated it for the first time with modern documentation and resources available. I found a number of minor bugs and oversights in my own implementation while writing these posts, so if nothing else, writing them was useful for that! This first post will mostly cover how the YM2612 is integrated into the Genesis and how the CPUs interface with it. First, I should state that nearly all of my information on the YM2612 comes from this very long thread plus resources linked from it: https://gendev.spritesmind.net/forum/viewtopic.php?t=386 In particular, there’s a lot of great information posted by Nemesis (Exodus author) on how exactly this chip works. I do not believe I would have been able to throw together my own YM2612 implementation without the information in this thread. Do be wary that many earlier posts in this thread contain inaccurate information that is corrected in later posts. As one of the more obvious examples, the first post on how the ADSR envelope generators work has some major errors that are corrected many pages later. Mask of Destiny (BlastEm author) made a post that links to some of the most...
First seen: 2025-03-29 06:28
Last seen: 2025-03-29 17:29