Module moa_peripherals_yamaha::ym2612
source · Expand description
Emulate the YM2612 FM Sound Synthesizer (used by the Sega Genesis)
This implementation is mostly based on online references to the YM2612’s registers and their function, forum posts that describe the details of operation of the chip, and looking at source code that emulates the chip. It is still very much a work in progress
Resources:
- Registers: https://www.smspower.org/maxim/Documents/YM2612
- Internal Implementation: https://gendev.spritesmind.net/forum/viewtopic.php?t=386 (Nemesis)
- Envelope Generator and Corrections: http://gendev.spritesmind.net/forum/viewtopic.php?p=5716#5716 http://gendev.spritesmind.net/forum/viewtopic.php?t=386&postdays=0&postorder=asc&start=417
- Phase Generator and Output: http://gendev.spritesmind.net/forum/viewtopic.php?f=24&t=386&start=150 http://gendev.spritesmind.net/forum/viewtopic.php?p=6224#6224
Structs§
Enums§
Constants§
- CHANNELS 🔒
- Table of shift values for each possible rate angle
- DEV_NAME 🔒
- Map the upper 5 bits of the fnumber to the lower 2 bits of the keycode
- Table of attenuation increments for each possible rate angle
Functions§
- get_ch 🔒
- Get the channel and operator to target with a given register number and bank number. Bank 0 refers to operators for channels 1-3, and bank 1 refers to operators for channels 4-6.
- Generate the keycode required for detune calculations using the block and fnumber
Type Aliases§
- FmClock 🔒