From cfa4fa4ae4fdb54d8264fc16ee6793b1a6fca702 Mon Sep 17 00:00:00 2001 From: cam900 Date: Thu, 24 Sep 2020 18:50:09 +0900 Subject: ay8910.cpp: Fix noise rate regression (#7283) --- src/devices/sound/ay8910.cpp | 5 ++--- src/devices/sound/ay8910.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/devices/sound/ay8910.cpp b/src/devices/sound/ay8910.cpp index 6ba9691fc37..8ba53fb8b3f 100644 --- a/src/devices/sound/ay8910.cpp +++ b/src/devices/sound/ay8910.cpp @@ -1125,8 +1125,9 @@ void ay8910_device::sound_stream_update(sound_stream &stream, std::vector> 3) & 1)) << 17); m_rng >>= 1; - m_prescale_noise = 1; } - m_prescale_noise--; } for (int chan = 0; chan < NUM_CHANNELS; chan++) diff --git a/src/devices/sound/ay8910.h b/src/devices/sound/ay8910.h index 373a850b662..407de93f8a3 100644 --- a/src/devices/sound/ay8910.h +++ b/src/devices/sound/ay8910.h @@ -268,7 +268,7 @@ private: inline u8 get_envelope_chan(int chan) { return is_expanded_mode() ? chan : 0; } inline bool noise_enable(int chan) { return BIT(m_regs[AY_ENABLE], 3 + chan); } - inline u8 noise_period() { return is_expanded_mode() ? m_regs[AY_NOISEPER] & 0xff : (m_regs[AY_NOISEPER] & 0x1f) << 1; } + inline u8 noise_period() { return is_expanded_mode() ? m_regs[AY_NOISEPER] & 0xff : m_regs[AY_NOISEPER] & 0x1f; } inline u8 noise_output() { return m_rng & 1; } inline bool is_expanded_mode() { return ((m_feature & PSG_HAS_EXPANDED_MODE) && ((m_mode & 0xe) == 0xa)); } -- cgit v1.2.3