From ba369d37c90d0467c01eb5ef97a82919f6a383bd Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 9 Oct 2023 03:47:54 +0200 Subject: [PATCH] The Endeavor's on-board Vibra 16S now correctly has the YMF289B and also fixed the frequencies of YMF289B and YMF278B. --- src/sound/snd_opl_ymfm.cpp | 4 ++-- src/sound/snd_sb.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sound/snd_opl_ymfm.cpp b/src/sound/snd_opl_ymfm.cpp index 3f08b743f..1f542cf0b 100644 --- a/src/sound/snd_opl_ymfm.cpp +++ b/src/sound/snd_opl_ymfm.cpp @@ -312,11 +312,11 @@ ymfm_drv_init(const device_t *info) break; case FM_YMF289B: - fm = (YMFMChipBase *) new YMFMChip(33868800, FM_YMF289B, OPL_FREQ); + fm = (YMFMChipBase *) new YMFMChip(16934400, FM_YMF289B, 44100); break; case FM_YMF278B: - fm = (YMFMChipBase *) new YMFMChip(33868800, FM_YMF278B, 48000); + fm = (YMFMChipBase *) new YMFMChip(16934400, FM_YMF278B, 44100); break; } diff --git a/src/sound/snd_sb.c b/src/sound/snd_sb.c index 478f82546..107507d77 100644 --- a/src/sound/snd_sb.c +++ b/src/sound/snd_sb.c @@ -1982,7 +1982,7 @@ sb_16_init(UNUSED(const device_t *info)) sb->opl_enabled = device_get_config_int("opl"); if (sb->opl_enabled) - fm_driver_get(FM_YMF262, &sb->opl); + fm_driver_get(info->local, &sb->opl); sb_dsp_init(&sb->dsp, SB16, SB_SUBTYPE_DEFAULT, sb); sb_dsp_setaddr(&sb->dsp, addr); @@ -3669,7 +3669,7 @@ const device_t sb_16_device = { .name = "Sound Blaster 16", .internal_name = "sb16", .flags = DEVICE_ISA | DEVICE_AT, - .local = 0, + .local = FM_YMF262, .init = sb_16_init, .close = sb_close, .reset = NULL, @@ -3683,7 +3683,7 @@ const device_t sb_vibra16s_onboard_device = { .name = "Sound Blaster Vibra 16S (On-Board)", .internal_name = "sb_vibra16s_onboard", .flags = DEVICE_ISA | DEVICE_AT, - .local = 0, + .local = FM_YMF289B, .init = sb_16_init, .close = sb_close, .reset = NULL, @@ -3697,7 +3697,7 @@ const device_t sb_vibra16c_onboard_device = { .name = "Sound Blaster Vibra 16C (On-Board)", .internal_name = "sb_vibra16c_onboard", .flags = DEVICE_ISA | DEVICE_AT, - .local = 0, + .local = FM_YMF262, /* Should have the CQM but we do not emulate that yet. */ .init = sb_16_init, .close = sb_close, .reset = NULL,