From 20adc731c24b8be2f7b963c8ed6a41829f7f5617 Mon Sep 17 00:00:00 2001 From: arbee Date: Thu, 6 Jan 2022 20:27:01 -0500 Subject: [PATCH] es5503: fix interpretation of oscillator enable register. (GitHub bug #9045) [R. Belmont] --- src/devices/sound/es5503.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/devices/sound/es5503.cpp b/src/devices/sound/es5503.cpp index 4efe61a0d7d..d4fc9a422ef 100644 --- a/src/devices/sound/es5503.cpp +++ b/src/devices/sound/es5503.cpp @@ -2,7 +2,7 @@ // copyright-holders:R. Belmont /* - ES5503 - Ensoniq ES5503 "DOC" emulator v2.1.2 + ES5503 - Ensoniq ES5503 "DOC" emulator v2.1.3 By R. Belmont. Copyright R. Belmont. @@ -33,6 +33,7 @@ 2.1.2 (RB) - Fixed SoundSmith POLY.SYNTH inst where one-shot on the even oscillator and swap on the odd should loop. Conversely, the intro voice in FTA Delta Demo has swap on the even and one-shot on the odd and doesn't want to loop. + 2.1.3 (RB) - Fixed oscillator enable register off-by-1 which caused everything to be half a step sharp. */ #include "emu.h" @@ -144,7 +145,7 @@ void es5503_device::sound_stream_update(sound_stream &stream, std::vectorset_sample_rate(output_rate); m_mix_buffer.resize((output_rate/50)*8); @@ -427,7 +428,9 @@ void es5503_device::write(offs_t offset, u8 data) break; case 0xe1: // oscillator enable - oscsenabled = (data>>1) & 0x1f; + // The number here is the number of oscillators to enable -1 times 2. You can never + // have zero oscilllators enabled. So a value of 62 enables all 32 oscillators. + oscsenabled = ((data>>1) & 0x3f) + 1; notify_clock_changed(); break;