Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ LIBEMUOBJS = \
$(LIBEMUOBJ)/cores/x1_010.o \
$(LIBEMUOBJ)/cores/c352.o \
$(LIBEMUOBJ)/cores/iremga20.o \
$(LIBEMUOBJ)/cores/ymfmintf.o \
$(LIBEMUOBJ)/Resampler.o \
$(LIBEMUOBJ)/panning.o \
$(LIBEMUOBJ)/dac_control.o
Expand Down
12 changes: 12 additions & 0 deletions emu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ option(SNDEMU_MSM5205_ALL "Sound Device MSM5205: all cores" OFF)
option(SNDEMU_MSM5232_ALL "Sound Device MSM5232: all cores" OFF)
option(SNDEMU_BSMT2000_ALL "Sound Device BSMT2000: all cores" OFF)
option(SNDEMU_ICS2115_ALL "Sound Device ICS2115: all cores" OFF)
option(SNDEMU_YM2414_YMFM "Sound Device YM2414 (OPZ): ymfm core" OFF)

# console/computer presets
option(SNDEMU__PRESET_SMS "Sound Dev. Preset: Sega Master System/Game Gear" OFF)
Expand Down Expand Up @@ -151,6 +152,7 @@ if(SNDEMU__ALL)
set(SNDEMU_MSM5232_ALL ON)
set(SNDEMU_BSMT2000_ALL ON)
set(SNDEMU_ICS2115_ALL ON)
set(SNDEMU_YM2414_YMFM ON)
endif()


Expand Down Expand Up @@ -648,6 +650,16 @@ if(SNDEMU_ICS2115_ALL)
set(EMU_FILES ${EMU_FILES} cores/ics2115.c)
set(EMU_CORE_HEADERS ${EMU_CORE_HEADERS} cores/ics2115.h)
endif()
if(SNDEMU_YM2414_YMFM)
set(EMU_DEFS ${EMU_DEFS} " SNDDEV_YM2414" " EC_YM2414_YMFM")
set(EMU_FILES ${EMU_FILES} cores/ymfmintf.cpp cores/ymfm/ymfm_opz.cpp)
set(EMU_CORE_HEADERS ${EMU_CORE_HEADERS} cores/ymfmintf.h)
set(EMU_CORE_HEADERS ${EMU_CORE_HEADERS}
cores/ymfm/ymfm.h
cores/ymfm/ymfm_opz.h
cores/ymfm/ymfm_fm.h
)
endif()

add_library(${PROJECT_NAME} ${LIBRARY_TYPE} ${EMU_FILES})
set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
Expand Down
1 change: 1 addition & 0 deletions emu/SoundDevs.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@
#define DEVID_MSM5232 0x2D
#define DEVID_BSMT2000 0x2E
#define DEVID_ICS2115 0x2F
#define DEVID_YM2414 0x30 // YM2414 (OPZ), used in TX81Z
#endif // __SOUNDDEVS_H__
7 changes: 7 additions & 0 deletions emu/SoundEmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#define SNDDEV_MSM5232
#define SNDDEV_BSMT2000
#define SNDDEV_ICS2115
#define SNDDEV_YM2414
#endif

#ifdef SNDDEV_SN76496
Expand Down Expand Up @@ -190,6 +191,9 @@
#ifdef SNDDEV_ICS2115
#include "cores/ics2115.h"
#endif
#ifdef SNDDEV_YM2414
#include "cores/ymfmintf.h"
#endif

const DEV_DECL* sndEmu_Devices[] = {
#ifdef SNDDEV_SN76496
Expand Down Expand Up @@ -335,6 +339,9 @@ const DEV_DECL* sndEmu_Devices[] = {
#endif
#ifdef SNDDEV_ICS2115
&sndDev_ICS2115,
#endif
#ifdef SNDDEV_YM2414
&sndDev_YM2414,
#endif
NULL // list end
};
Expand Down
26 changes: 26 additions & 0 deletions emu/cores/ymfm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# ymfm - Yamaha FM sound cores

This directory contains vendored source files from the ymfm project.

## Source
- **Project**: ymfm (Yamaha FM sound cores)
- **Author**: Aaron Giles
- **Repository**: https://github.com/aaronsgiles/ymfm
- **Commit**: 17decfae857b92ab55fbb30ade2287ace095a381
- **Date**: 2025-12-31

## License
BSD-3-Clause

Copyright (c) 2020-2021 Aaron Giles

See the header comments in each file for full license text.

## Files
- `ymfm.h` - Base classes and core infrastructure
- `ymfm_opz.h` - YM2414 (OPZ) implementation
- `ymfm_fm.h` - FM engine base classes
- `ymfm_fm.ipp` - FM engine template implementations

## Integration
These files are used by `ymfmintf.cpp` to provide YM2414 (OPZ) emulation support in libvgm.
Loading
Loading