From dd4ce564da6bc7df2d79ce3db92ef16d9cab07d7 Mon Sep 17 00:00:00 2001 From: ekeeke Date: Sat, 4 Apr 2020 15:29:19 +0200 Subject: [PATCH] [SDL] added support for nuked cycle-accurate YM2413 core (optional) --- sdl/Makefile.sdl1 | 5 +++-- sdl/Makefile.sdl2 | 5 +++-- sdl/config.c | 1 + sdl/config.h | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sdl/Makefile.sdl1 b/sdl/Makefile.sdl1 index 142878a..eaf46b4 100644 --- a/sdl/Makefile.sdl1 +++ b/sdl/Makefile.sdl1 @@ -23,7 +23,8 @@ # -DUSE_LIBVORBIS : enable OGG file support for CD emulation using external VORBIS library # -DISABLE_MANY_OGG_OPEN_FILES : only have one OGG file opened at once to save RAM # -DMAXROMSIZE : defines maximal size of ROM/SRAM buffer (also shared with CD hardware) -# -DHAVE_YM3438_CORE : enable (configurable) support for Nuked cycle-accurate YM3438 core +# -DHAVE_YM3438_CORE : enable (configurable) support for Nuked cycle-accurate YM2612/YM3438 core +# -DHAVE_OPLL_CORE : enable (configurable) support for Nuked cycle-accurate YM2413 core # -DHOOK_CPU : enable CPU hooks NAME = gen_sdl @@ -33,7 +34,7 @@ CFLAGS = `sdl-config --cflags` -march=native -O6 -fomit-frame-pointer -Wall - #-g -ggdb -pg #-fomit-frame-pointer #LDFLAGS = -pg -DEFINES = -DLSB_FIRST -DUSE_16BPP_RENDERING -DUSE_LIBTREMOR -DUSE_LIBCHDR -DMAXROMSIZE=33554432 -DHAVE_YM3438_CORE +DEFINES = -DLSB_FIRST -DUSE_16BPP_RENDERING -DUSE_LIBTREMOR -DUSE_LIBCHDR -DMAXROMSIZE=33554432 -DHAVE_YM3438_CORE -DHAVE_OPLL_CORE ifneq ($(OS),Windows_NT) DEFINES += -DHAVE_ALLOCA_H diff --git a/sdl/Makefile.sdl2 b/sdl/Makefile.sdl2 index 2df1ac0..7a8b2d1 100644 --- a/sdl/Makefile.sdl2 +++ b/sdl/Makefile.sdl2 @@ -23,7 +23,8 @@ # -DUSE_LIBVORBIS : enable OGG file support for CD emulation using external VORBIS library # -DISABLE_MANY_OGG_OPEN_FILES : only have one OGG file opened at once to save RAM # -DMAXROMSIZE : defines maximal size of ROM/SRAM buffer (also shared with CD hardware) -# -DHAVE_YM3438_CORE : enable (configurable) support for Nuked cycle-accurate YM3438 core +# -DHAVE_YM3438_CORE : enable (configurable) support for Nuked cycle-accurate YM2612/YM3438 core +# -DHAVE_OPLL_CORE : enable (configurable) support for Nuked cycle-accurate YM2413 core # -DHOOK_CPU : enable CPU hooks NAME = gen_sdl2 @@ -33,7 +34,7 @@ CFLAGS = `sdl2-config --cflags` -march=native -O6 -fomit-frame-pointer -Wall #-g -ggdb -pg #-fomit-frame-pointer #LDFLAGS = -pg -DEFINES = -DLSB_FIRST -DUSE_16BPP_RENDERING -DUSE_LIBTREMOR -DUSE_LIBCHDR -DMAXROMSIZE=33554432 -DHAVE_YM3438_CORE +DEFINES = -DLSB_FIRST -DUSE_16BPP_RENDERING -DUSE_LIBTREMOR -DUSE_LIBCHDR -DMAXROMSIZE=33554432 -DHAVE_YM3438_CORE -DHAVE_OPLL_CORE ifneq ($(OS),Windows_NT) DEFINES += -DHAVE_ALLOCA_H diff --git a/sdl/config.c b/sdl/config.c index 53a8fc1..482ce46 100644 --- a/sdl/config.c +++ b/sdl/config.c @@ -23,6 +23,7 @@ void set_config_defaults(void) config.ym2612 = YM2612_DISCRETE; config.ym2413 = 2; /* = AUTO (0 = always OFF, 1 = always ON) */ config.ym3438 = 0; + config.opll = 0; config.mono = 0; /* system options */ diff --git a/sdl/config.h b/sdl/config.h index 15f63ac..f39642d 100644 --- a/sdl/config.h +++ b/sdl/config.h @@ -21,6 +21,7 @@ typedef struct uint8 ym2612; uint8 ym2413; uint8 ym3438; + uint8 opll; int16 psg_preamp; int16 fm_preamp; uint32 lp_range;