From 14c680e940fa6e713360a44b9d6718449f35aa7b Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 21 Dec 2022 16:57:18 +0100 Subject: nes_apu: remove wrongly placed dpcm irq clear --- src/devices/sound/nes_apu.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/devices/sound/nes_apu.cpp b/src/devices/sound/nes_apu.cpp index 3a8ea92bd7e..a988427d583 100644 --- a/src/devices/sound/nes_apu.cpp +++ b/src/devices/sound/nes_apu.cpp @@ -451,7 +451,6 @@ static inline void apu_dpcmreset(apu_t::dpcm_t *chan) chan->address = 0xc000 + u16(chan->regs[2] << 6); chan->length = u16(chan->regs[3] << 4) + 1; chan->bits_left = chan->length << 3; - chan->irq_occurred = false; chan->enabled = true; /* Fixed * Proper DPCM channel ENABLE/DISABLE flag behaviour*/ } @@ -492,7 +491,6 @@ void nesapu_device::apu_dpcm(apu_t::dpcm_t *chan) } } - chan->bits_left--; bit_pos = 7 - (chan->bits_left & 7); if (7 == bit_pos) @@ -633,7 +631,8 @@ void nesapu_device::write(offs_t offset, u8 value) /* DMC */ case apu_t::WRE0: m_APU.dpcm.regs[0] = value; - if (!(value & 0x80)) { + if (!(value & 0x80)) + { m_APU.dpcm.irq_occurred = false; if (!m_APU.frame_irq_occurred) m_irq_handler(false); -- cgit v1.2.3