Add YM2414 (OPZ) support via ymfm#145
Merged
ValleyBell merged 3 commits intoValleyBell:masterfrom Feb 15, 2026
Merged
Conversation
- Add DEVID_YM2414 (0x30) device ID - Vendor ymfm source files (commit 17decfa) in emu/cores/ymfm/ - ymfm.h - Core infrastructure - ymfm_opz.h - YM2414 (OPZ) implementation - ymfm_fm.h/ipp - FM engine - Create C++ wrapper (ymfmintf.cpp/h) with extern C interface - Integrate into build system (CMakeLists.txt, Makefile) - Register device in SoundEmu.c - YM2414 specs: 8 FM channels, 4 operators per channel - Used in Yamaha TX81Z, DX11, YS200 synthesizers The implementation follows existing patterns (similar to ICS2115) and is designed to support future ymfm chip additions (OPN, OPM, OPLL, etc.).
- Add ymfm_opz.cpp to build (vendored from ymfm library) - Include ymfm_fm.h and ymfm_fm.ipp for template instantiation - Add opz_test.cpp to generate test WAV file with FM synthesis - Fix key on/off control (bit 6 of register 0x20) - Adjust audio output scaling for proper volume 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Owner
|
Seems to look fine so far. I may merge it later. (not right now, as I have a few things that I want to do a few other things before adding new chips) Also, can you please remove the |
Contributor
Author
|
Thanks. I just needed OPZ to be available in the emu lib so I can use it with fmtoy. Let me know if you want me to add te other ymfm cores to the existing chips (as alternate cores), in a separate PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds YM2414 (OPZ) emulation support using the ymfm library from https://github.com/aaronsgiles/ymfm.
Changes
DEVID_YM2414(0x30) for YM2414 (OPZ) chipemu/cores/ymfm/ymfm.h- Core infrastructureymfm_opz.h- YM2414 implementationymfm_fm.h/ipp- FM engine baseymfmintf.cpp/hwith C interface following libvgm patternsYM2414 (OPZ) Specifications
Design
The implementation follows existing libvgm patterns (similar to ICS2115 integration) and is designed to support future ymfm chip additions (YM2612/OPN2, YM2151/OPM, OPLL, etc.) with shared infrastructure.
Building
Enable YM2414 support:
cmake -DSNDEMU_YM2414_YMFM=ON # or cmake -DSNDEMU__ALL=ON