From 42ffa5b9d24bd13b921d02d7facfdcd6c8686b9c Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 3 Jun 2017 14:34:32 +0200 Subject: [PATCH] Added a header so that snd_sb.c compiles correctly again; Fixed a bug in snd_dopl.cc. --- src/SOUND/snd_dbopl.cc | 2 +- src/SOUND/snd_sb.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SOUND/snd_dbopl.cc b/src/SOUND/snd_dbopl.cc index cecc1c35e..cf4bc1ebe 100644 --- a/src/SOUND/snd_dbopl.cc +++ b/src/SOUND/snd_dbopl.cc @@ -88,7 +88,7 @@ void opl_write(int nr, uint16_t addr, uint8_t val) if (!(addr & 1)) { if (!opl[nr].is_opl3 || !opl3_type) - opl[nr].addr = (int)opl[nr].chip.WriteAddr(addr, val) & 0xff; + opl[nr].addr = (int)opl[nr].chip.WriteAddr(addr, val) & (opl[nr].is_opl3 ? 0x1ff : 0xff); else opl[nr].addr = (int)OPL3_WriteAddr(&opl[nr].opl3chip, addr, val) & 0x1ff; } diff --git a/src/SOUND/snd_sb.c b/src/SOUND/snd_sb.c index f6e773fe8..5e38a1437 100644 --- a/src/SOUND/snd_sb.c +++ b/src/SOUND/snd_sb.c @@ -26,6 +26,7 @@ #include "../rom.h" #include "../device.h" #include "sound.h" +#include "snd_dbopl.h" #include "snd_emu8k.h" #include "snd_mpu401.h" #include "snd_opl.h"