Merge pull request #298 from nukeykt/ym2413

[Core/Sound] add nuked ym2413 core
This commit is contained in:
ekeeke 2019-12-22 17:40:06 +01:00 committed by GitHub
commit 66eb0520d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 1450 additions and 23 deletions

View File

@ -584,7 +584,8 @@ LIBRETRO_CFLAGS += $(BPP_DEFINES) \
-D__LIBRETRO__ \
-DM68K_OVERCLOCK_SHIFT=20 \
-DZ80_OVERCLOCK_SHIFT=20 \
-DHAVE_YM3438_CORE
-DHAVE_YM3438_CORE \
-DHAVE_OPLL_CORE
ifneq (,$(findstring msvc,$(platform)))
LIBRETRO_CFLAGS += -DINLINE="static _inline"

View File

@ -300,7 +300,7 @@ unsigned char z80_md_port_r(unsigned int port)
/* read FM chip if enabled */
if ((port >= 0xF0) && (config.ym2413 & 1))
{
return YM2413Read();
return fm_read(Z80.cycles, port);
}
return z80_unused_port_r(port);
@ -578,7 +578,7 @@ unsigned char z80_ms_port_r(unsigned int port)
/* read FM board if enabled */
if (!(port & 4) && (config.ym2413 & 1))
{
data = YM2413Read();
data = fm_read(Z80.cycles, port);
}
/* read I/O ports if enabled */
@ -678,7 +678,7 @@ unsigned char z80_m3_port_r(unsigned int port)
if (!(port & 4) && (config.ym2413 & 1))
{
/* I/O ports are automatically disabled by hardware */
return YM2413Read();
return fm_read(Z80.cycles, port);
}
/* read I/O ports */

View File

@ -28,6 +28,9 @@
#ifdef HAVE_YM3438_CORE
#include "ym3438.h"
#endif
#ifdef HAVE_OPLL_CORE
#include "opll.h"
#endif
#include "sram.h"
#include "ggenie.h"
#include "areplay.h"

1054
core/sound/opll.c Normal file

File diff suppressed because it is too large Load Diff

215
core/sound/opll.h Normal file
View File

@ -0,0 +1,215 @@
/*
* Copyright (C) 2019 Nuke.YKT
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
*
* - Redistributions may not be sold, nor may they be used in a commercial
* product or activity.
*
* - Redistributions that are modified from the original source must include the
* complete source code, including the source code for all components used by a
* binary built from the modified sources. However, as a special exception, the
* source code distributed need not include anything that is normally distributed
* (in either source or binary form) with the major components (compiler, kernel,
* and so on) of the operating system on which the executable runs, unless that
* component itself accompanies the executable.
*
* - Redistributions must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* Yamaha YM2413 emulator
* Thanks:
* siliconpr0n.org(digshadow, John McMaster):
* VRC VII decap and die shot.
*
* version: 0.9
*/
#ifndef OPLL_H
#define OPLL_H
#include <stdint.h>
enum {
opll_type_ym2413 = 0x00, /* Yamaha YM2413 */
opll_type_ds1001, /* Konami VRC VII */
opll_type_ym2413b /* Yamaha YM2413B */
};
enum {
opll_patch_1 = 0x00,
opll_patch_2,
opll_patch_3,
opll_patch_4,
opll_patch_5,
opll_patch_6,
opll_patch_7,
opll_patch_8,
opll_patch_9,
opll_patch_10,
opll_patch_11,
opll_patch_12,
opll_patch_13,
opll_patch_14,
opll_patch_15,
opll_patch_drum_0,
opll_patch_drum_1,
opll_patch_drum_2,
opll_patch_drum_3,
opll_patch_drum_4,
opll_patch_drum_5,
opll_patch_max
};
typedef struct {
uint8_t tl;
uint8_t dc;
uint8_t dm;
uint8_t fb;
uint8_t am[2];
uint8_t vib[2];
uint8_t et[2];
uint8_t ksr[2];
uint8_t multi[2];
uint8_t ksl[2];
uint8_t ar[2];
uint8_t dr[2];
uint8_t sl[2];
uint8_t rr[2];
} opll_patch_t;
typedef struct {
uint32_t chip_type;
uint32_t cycles;
uint32_t slot;
const opll_patch_t *patchrom;
/* IO */
uint8_t write_data;
uint8_t write_a;
uint8_t write_d;
uint8_t write_a_en;
uint8_t write_d_en;
uint8_t write_fm_address;
uint8_t write_fm_data;
uint8_t write_mode_address;
uint8_t address;
uint8_t data;
/* Envelope generator */
uint8_t eg_counter_state;
uint8_t eg_counter_state_prev;
uint32_t eg_timer;
uint8_t eg_timer_low_lock;
uint8_t eg_timer_carry;
uint8_t eg_timer_shift;
uint8_t eg_timer_shift_lock;
uint8_t eg_timer_shift_stop;
uint8_t eg_state[18];
uint8_t eg_level[18];
uint8_t eg_kon;
uint32_t eg_dokon;
uint8_t eg_off;
uint8_t eg_rate;
uint8_t eg_maxrate;
uint8_t eg_zerorate;
uint8_t eg_inc_lo;
uint8_t eg_inc_hi;
uint8_t eg_rate_hi;
uint16_t eg_sl;
uint16_t eg_ksltl;
uint8_t eg_out;
uint8_t eg_silent;
/* Phase generator */
uint16_t pg_fnum;
uint8_t pg_block;
uint16_t pg_out;
uint32_t pg_inc;
uint32_t pg_phase[18];
uint32_t pg_phase_next;
/* Operator */
int16_t op_fb1[9];
int16_t op_fb2[9];
int16_t op_fbsum;
int16_t op_mod;
uint8_t op_neg;
uint16_t op_logsin;
uint16_t op_exp_m;
uint16_t op_exp_s;
/* Channel */
int16_t ch_out;
int16_t ch_out_hh;
int16_t ch_out_tm;
int16_t ch_out_bd;
int16_t ch_out_sd;
int16_t ch_out_tc;
/* LFO */
uint16_t lfo_counter;
uint8_t lfo_vib_counter;
uint16_t lfo_am_counter;
uint8_t lfo_am_step;
uint8_t lfo_am_dir;
uint8_t lfo_am_car;
uint8_t lfo_am_out;
/* Register set */
uint16_t fnum[9];
uint8_t block[9];
uint8_t kon[9];
uint8_t son[9];
uint8_t vol[9];
uint8_t inst[9];
uint8_t rhythm;
uint8_t testmode;
opll_patch_t patch;
uint8_t c_instr;
uint8_t c_op;
uint8_t c_tl;
uint8_t c_dc;
uint8_t c_dm;
uint8_t c_fb;
uint8_t c_am;
uint8_t c_vib;
uint8_t c_et;
uint8_t c_ksr;
uint8_t c_ksr_freq;
uint8_t c_ksl_freq;
uint8_t c_ksl_block;
uint8_t c_multi;
uint8_t c_ksl;
uint8_t c_adrr[3];
uint8_t c_sl;
uint16_t c_fnum;
uint16_t c_block;
/* Rhythm mode */
int8_t rm_enable;
uint32_t rm_noise;
uint32_t rm_select;
uint8_t rm_hh_bit2;
uint8_t rm_hh_bit3;
uint8_t rm_hh_bit7;
uint8_t rm_hh_bit8;
uint8_t rm_tc_bit3;
uint8_t rm_tc_bit5;
int16_t output_m;
int16_t output_r;
} opll_t;
void OPLL_Reset(opll_t *chip, uint32_t chip_type);
void OPLL_Clock(opll_t *chip, int32_t *buffer);
void OPLL_Write(opll_t *chip, uint32_t port, uint8_t data);
#endif

View File

@ -44,7 +44,7 @@
#define YM2612_CLOCK_RATIO (7*6)
/* FM output buffer (large enough to hold a whole frame at original chips rate) */
#ifdef HAVE_YM3438_CORE
#ifdef HAVE_YM3438_CORE || HAVE_OPLL_CORE
static int fm_buffer[1080 * 2 * 24];
#else
static int fm_buffer[1080 * 2];
@ -72,6 +72,14 @@ static int ym3438_sample[2];
static int ym3438_cycles;
#endif
#ifdef HAVE_OPLL_CORE
static opll_t opll;
static int opll_accm[18][2];
static int opll_sample;
static int opll_cycles;
static int opll_status;
#endif
/* Run FM chip until required M-cycles */
INLINE void fm_update(int cycles)
{
@ -167,6 +175,11 @@ static void YM2413_Write(unsigned int cycles, unsigned int a, unsigned int v)
YM2413Write(a, v);
}
static unsigned int YM2413_Read(unsigned int cycles, unsigned int a)
{
return YM2413Read();
}
#ifdef HAVE_YM3438_CORE
static void YM3438_Update(int *buffer, int length)
{
@ -218,6 +231,59 @@ static unsigned int YM3438_Read(unsigned int cycles, unsigned int a)
}
#endif
#ifdef HAVE_OPLL_CORE
static void OPLL2413_Update(int* buffer, int length)
{
int i, j;
for (i = 0; i < length; i++)
{
OPLL_Clock(&opll, opll_accm[opll_cycles]);
opll_cycles = (opll_cycles + 1) % 18;
if (opll_cycles == 0)
{
opll_sample = 0;
for (j = 0; j < 18; j++)
{
opll_sample += opll_accm[j][0] + opll_accm[j][1];
}
}
*buffer++ = opll_sample * 16 * opll_status;
*buffer++ = opll_sample * 16 * opll_status;
}
}
static void OPLL2413_Reset(unsigned int cycles)
{
/* synchronize FM chip with CPU */
fm_update(cycles);
/* reset FM chip */
OPLL_Reset(&opll, opll_type_ym2413);
}
static void OPLL2413_Write(unsigned int cycles, unsigned int a, unsigned int v)
{
if (!(a&2))
{
/* synchronize FM chip with CPU */
fm_update(cycles);
/* write FM register */
OPLL_Write(&opll, a, v);
}
else
{
opll_status = v&1;
}
}
static unsigned int OPLL2413_Read(unsigned int cycles, unsigned int a)
{
return 0xf8 | opll_status;
}
#endif
void sound_init( void )
{
/* Initialize FM chip */
@ -257,14 +323,34 @@ void sound_init( void )
else
{
/* YM2413 */
YM2413Init();
YM_Update = (config.ym2413 & 1) ? YM2413Update : NULL;
fm_reset = YM2413_Reset;
fm_write = YM2413_Write;
fm_read = NULL;
#ifdef HAVE_OPLL_CORE
if (config.opll)
{
/* Nuked OPLL */
memset(&opll, 0, sizeof(opll));
memset(&opll_accm, 0, sizeof(opll_accm));
opll_sample = 0;
opll_status = 0;
YM_Update = (config.ym2413 & 1) ? OPLL2413_Update : NULL;
fm_reset = OPLL2413_Reset;
fm_write = OPLL2413_Write;
fm_read = OPLL2413_Read;
/* chip is running at ZCLK / 72 = MCLK / 15 / 72 */
fm_cycles_ratio = 72 * 15;
/* chip is running at internal clock */
fm_cycles_ratio = 4 * 15;
}
else
#endif
{
YM2413Init();
YM_Update = (config.ym2413 & 1) ? YM2413Update : NULL;
fm_reset = YM2413_Reset;
fm_write = YM2413_Write;
fm_read = YM2413_Read;
/* chip is running at ZCLK / 72 = MCLK / 15 / 72 */
fm_cycles_ratio = 72 * 15;
}
}
/* Initialize PSG chip */
@ -401,7 +487,21 @@ int sound_context_save(uint8 *state)
}
else
{
save_param(YM2413GetContextPtr(),YM2413GetContextSize());
#ifdef HAVE_YM3438_CORE
save_param(&config.opll, sizeof(config.opll));
if (config.opll)
{
save_param(&opll, sizeof(opll));
save_param(&opll_accm, sizeof(opll_accm));
save_param(&opll_sample, sizeof(opll_sample));
save_param(&opll_cycles, sizeof(opll_cycles));
save_param(&opll_status, sizeof(opll_status));
}
else
#endif
{
save_param(YM2413GetContextPtr(),YM2413GetContextSize());
}
}
bufferptr += psg_context_save(&state[bufferptr]);
@ -437,7 +537,22 @@ int sound_context_load(uint8 *state)
}
else
{
load_param(YM2413GetContextPtr(),YM2413GetContextSize());
#ifdef HAVE_OPLL_CORE
uint8 config_opll;
load_param(&config_opll, sizeof(config_opll));
if (config_opll)
{
load_param(&opll, sizeof(opll));
load_param(&opll_accm, sizeof(opll_accm));
load_param(&opll_sample, sizeof(opll_sample));
load_param(&opll_cycles, sizeof(opll_cycles));
load_param(&opll_status, sizeof(opll_status));
}
else
#endif
{
load_param(YM2413GetContextPtr(),YM2413GetContextSize());
}
}
bufferptr += psg_context_load(&state[bufferptr]);

View File

@ -576,6 +576,9 @@ static void config_default(void)
#ifdef HAVE_YM3438_CORE
config.ym3438 = 0;
#endif
#ifdef HAVE_OPLL_CORE
config.opll = 0;
#endif
/* system options */
config.system = 0; /* AUTO */
@ -1122,6 +1125,28 @@ static void check_variables(void)
}
}
}
#ifdef HAVE_OPLL_CORE
var.key = "genesis_plus_gx_ym2413_core";
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
{
orig_value = config.opll;
if (var.value && !strcmp(var.value, "nuked"))
{
config.opll = 1;
}
else
{
config.opll = 0;
}
if (((orig_value == 0) && (config.opll > 0)) || ((orig_value > 0) && (config.opll == 0)))
{
sound_init();
sound_reset();
}
}
#endif
var.key = "genesis_plus_gx_sound_output";
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
@ -1792,6 +1817,9 @@ void retro_set_environment(retro_environment_t cb)
{ "genesis_plus_gx_addr_error", "68k address error; enabled|disabled" },
{ "genesis_plus_gx_lock_on", "Cartridge lock-on; disabled|game genie|action replay (pro)|sonic & knuckles" },
{ "genesis_plus_gx_ym2413", "Master System FM (YM2413); auto|disabled|enabled" },
#ifdef HAVE_OPLL_CORE
{ "genesis_plus_gx_ym2413_core", "Master System FM (YM2413) core; mame|nuked" },
#endif
#ifdef HAVE_YM3438_CORE
{ "genesis_plus_gx_ym2612", "Mega Drive / Genesis FM; mame (ym2612)|mame (asic ym3438)|mame (enhanced ym3438)|nuked (ym2612)|nuked (ym3438)" },
#else

View File

@ -23,32 +23,32 @@
<ProjectGuid>{6E5A2D82-D5E3-4AE2-9253-733BAC8A924C}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>genesisplusgxlibretro</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
@ -86,7 +86,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;GENESISPLUSGXLIBRETRO_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);USE_LIBTREMOR;USE_LIBCHDR;PACKAGE_VERSION="1.3.2";FLAC_API_EXPORTS;FLAC__HAS_OGG=0;HAVE_LROUND;HAVE_STDINT_H;_7ZIP_ST;HAVE_FSEEKO;DEBUG;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;HAVE_ZLIB;__LIBRETRO__;M68K_OVERCLOCK_SHIFT=20;Z80_OVERCLOCK_SHIFT=20;HAVE_YM3438_CORE;INLINE=static __inline;</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;GENESISPLUSGXLIBRETRO_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);USE_LIBTREMOR;USE_LIBCHDR;PACKAGE_VERSION="1.3.2";FLAC_API_EXPORTS;FLAC__HAS_OGG=0;HAVE_LROUND;HAVE_STDINT_H;_7ZIP_ST;HAVE_FSEEKO;DEBUG;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;HAVE_ZLIB;__LIBRETRO__;M68K_OVERCLOCK_SHIFT=20;Z80_OVERCLOCK_SHIFT=20;HAVE_YM3438_CORE;HAVE_OPLL_CORE;INLINE=static __inline</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>../../core/cd_hw/libchdr/src;../../core/cd_hw/libchdr/deps/libFLAC/include;../../core/cd_hw/libchdr/deps/lzma;../../core/cd_hw/libchdr/deps/zlib;../../core;../../core/z80;../../core/m68k;../../core/ntsc;../../core/sound;../../core/input_hw;../../core/cd_hw;../../core/cart_hw;../../core/cart_hw/svp;../../core/debug;../../libretro;../../libretro/libretro-common/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -100,7 +100,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;GENESISPLUSGXLIBRETRO_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);USE_LIBTREMOR;USE_LIBCHDR;PACKAGE_VERSION="1.3.2";FLAC_API_EXPORTS;FLAC__HAS_OGG=0;HAVE_LROUND;HAVE_STDINT_H;_7ZIP_ST;HAVE_FSEEKO;DEBUG;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;HAVE_ZLIB;__LIBRETRO__;M68K_OVERCLOCK_SHIFT=20;Z80_OVERCLOCK_SHIFT=20;HAVE_YM3438_CORE;INLINE=static __inline;</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;GENESISPLUSGXLIBRETRO_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);USE_LIBTREMOR;USE_LIBCHDR;PACKAGE_VERSION="1.3.2";FLAC_API_EXPORTS;FLAC__HAS_OGG=0;HAVE_LROUND;HAVE_STDINT_H;_7ZIP_ST;HAVE_FSEEKO;DEBUG;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;HAVE_ZLIB;__LIBRETRO__;M68K_OVERCLOCK_SHIFT=20;Z80_OVERCLOCK_SHIFT=20;HAVE_YM3438_CORE;HAVE_OPLL_CORE;INLINE=static __inline</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>../../core/cd_hw/libchdr/src;../../core/cd_hw/libchdr/deps/libFLAC/include;../../core/cd_hw/libchdr/deps/lzma;../../core/cd_hw/libchdr/deps/zlib;../../core;../../core/z80;../../core/m68k;../../core/ntsc;../../core/sound;../../core/input_hw;../../core/cd_hw;../../core/cart_hw;../../core/cart_hw/svp;../../core/debug;../../libretro;../../libretro/libretro-common/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -116,7 +116,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;GENESISPLUSGXLIBRETRO_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);USE_LIBTREMOR;USE_LIBCHDR;PACKAGE_VERSION="1.3.2";FLAC_API_EXPORTS;FLAC__HAS_OGG=0;HAVE_LROUND;HAVE_STDINT_H;_7ZIP_ST;HAVE_FSEEKO;NDEBUG;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;HAVE_ZLIB;__LIBRETRO__;M68K_OVERCLOCK_SHIFT=20;Z80_OVERCLOCK_SHIFT=20;HAVE_YM3438_CORE;INLINE=static __inline;</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;GENESISPLUSGXLIBRETRO_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);USE_LIBTREMOR;USE_LIBCHDR;PACKAGE_VERSION="1.3.2";FLAC_API_EXPORTS;FLAC__HAS_OGG=0;HAVE_LROUND;HAVE_STDINT_H;_7ZIP_ST;HAVE_FSEEKO;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;HAVE_ZLIB;__LIBRETRO__;M68K_OVERCLOCK_SHIFT=20;Z80_OVERCLOCK_SHIFT=20;HAVE_YM3438_CORE;HAVE_OPLL_CORE;INLINE=static __inline</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>../../core/cd_hw/libchdr/src;../../core/cd_hw/libchdr/deps/libFLAC/include;../../core/cd_hw/libchdr/deps/lzma;../../core/cd_hw/libchdr/deps/zlib;../../core;../../core/z80;../../core/m68k;../../core/ntsc;../../core/sound;../../core/input_hw;../../core/cd_hw;../../core/cart_hw;../../core/cart_hw/svp;../../core/debug;../../libretro;../../libretro/libretro-common/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -134,7 +134,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;GENESISPLUSGXLIBRETRO_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);USE_LIBTREMOR;USE_LIBCHDR;PACKAGE_VERSION="1.3.2";FLAC_API_EXPORTS;FLAC__HAS_OGG=0;HAVE_LROUND;HAVE_STDINT_H;_7ZIP_ST;HAVE_FSEEKO;NDEBUG;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;HAVE_ZLIB;__LIBRETRO__;M68K_OVERCLOCK_SHIFT=20;Z80_OVERCLOCK_SHIFT=20;HAVE_YM3438_CORE;INLINE=static __inline;</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;GENESISPLUSGXLIBRETRO_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);USE_LIBTREMOR;USE_LIBCHDR;PACKAGE_VERSION="1.3.2";FLAC_API_EXPORTS;FLAC__HAS_OGG=0;HAVE_LROUND;HAVE_STDINT_H;_7ZIP_ST;HAVE_FSEEKO;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;HAVE_ZLIB;__LIBRETRO__;M68K_OVERCLOCK_SHIFT=20;Z80_OVERCLOCK_SHIFT=20;HAVE_YM3438_CORE;HAVE_OPLL_CORE;INLINE=static __inline</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>../../core/cd_hw/libchdr/src;../../core/cd_hw/libchdr/deps/libFLAC/include;../../core/cd_hw/libchdr/deps/lzma;../../core/cd_hw/libchdr/deps/zlib;../../core;../../core/z80;../../core/m68k;../../core/ntsc;../../core/sound;../../core/input_hw;../../core/cd_hw;../../core/cart_hw;../../core/cart_hw/svp;../../core/debug;../../libretro;../../libretro/libretro-common/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -215,6 +215,7 @@
<ClCompile Include="..\..\core\ntsc\sms_ntsc.c" />
<ClCompile Include="..\..\core\sound\blip_buf.c" />
<ClCompile Include="..\..\core\sound\eq.c" />
<ClCompile Include="..\..\core\sound\opll.c" />
<ClCompile Include="..\..\core\sound\psg.c" />
<ClCompile Include="..\..\core\sound\sound.c" />
<ClCompile Include="..\..\core\sound\ym2413.c" />
@ -344,6 +345,7 @@
<ClInclude Include="..\..\core\shared.h" />
<ClInclude Include="..\..\core\sound\blip_buf.h" />
<ClInclude Include="..\..\core\sound\eq.h" />
<ClInclude Include="..\..\core\sound\opll.h" />
<ClInclude Include="..\..\core\sound\psg.h" />
<ClInclude Include="..\..\core\sound\sound.h" />
<ClInclude Include="..\..\core\sound\ym2413.h" />

View File

@ -390,6 +390,9 @@
<ClCompile Include="..\..\core\debug\cpuhook.c">
<Filter>core\debug</Filter>
</ClCompile>
<ClCompile Include="..\..\core\sound\opll.c">
<Filter>core\sound</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\core\cd_hw\libchdr\src\bitstream.h">
@ -758,5 +761,8 @@
<ClInclude Include="..\..\core\debug\cpuhook.h">
<Filter>core\debug</Filter>
</ClInclude>
<ClInclude Include="..\..\core\sound\opll.h">
<Filter>core\sound</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -97,6 +97,9 @@ struct
uint8 ym2413;
#ifdef HAVE_YM3438_CORE
uint8 ym3438;
#endif
#ifdef HAVE_OPLL_CORE
uint8 opll;
#endif
uint8 mono;
int16 psg_preamp;