From 18f8373ce5a7f0daa877630d514bc48ee44caa9f Mon Sep 17 00:00:00 2001 From: angelosa Date: Mon, 5 Aug 2019 16:58:18 +0200 Subject: pce_cd.cpp: register 0x0b is unrelated with 0x0c (nw) --- src/mame/machine/pce_cd.cpp | 9 +++++---- src/mame/machine/pce_cd.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mame/machine/pce_cd.cpp b/src/mame/machine/pce_cd.cpp index 5c647e99d0c..644c8864071 100644 --- a/src/mame/machine/pce_cd.cpp +++ b/src/mame/machine/pce_cd.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Wilbert Pol +// copyright-holders:Wilbert Pol, Angelo Salese /************************************************************ PC Engine CD HW notes: @@ -228,6 +228,7 @@ void pce_cd_device::device_start() save_item(NAME(m_adpcm_latch_address)); save_item(NAME(m_adpcm_control)); save_item(NAME(m_fade_reg)); + save_item(NAME(m_adpcm_dma_reg)); } void pce_cd_device::device_reset() @@ -1261,7 +1262,7 @@ WRITE8_MEMBER(pce_cd_device::adpcm_data_w) // CD interface Register 0x0b - ADPCM DMA control READ8_MEMBER(pce_cd_device::adpcm_dma_control_r) { - return m_adpcm_status; + return m_adpcm_dma_reg; } WRITE8_MEMBER(pce_cd_device::adpcm_dma_control_w) @@ -1271,7 +1272,7 @@ WRITE8_MEMBER(pce_cd_device::adpcm_dma_control_w) m_adpcm_dma_timer->adjust(attotime::from_hz(PCE_CD_DATA_FRAMES_PER_SECOND * 2048), 0, attotime::from_hz(PCE_CD_DATA_FRAMES_PER_SECOND * 2048)); m_adpcm_status |= 4; } - m_adpcm_status = data; + m_adpcm_dma_reg = data; } // CD Interface Register 0x0c - ADPCM status @@ -1439,7 +1440,7 @@ TIMER_CALLBACK_MEMBER(pce_cd_device::clear_ack) update(); if (m_scsi_CD) { - m_adpcm_status &= 0xFC; + m_adpcm_dma_reg &= 0xFC; } } diff --git a/src/mame/machine/pce_cd.h b/src/mame/machine/pce_cd.h index 588537e7f89..36027488361 100644 --- a/src/mame/machine/pce_cd.h +++ b/src/mame/machine/pce_cd.h @@ -102,6 +102,7 @@ private: uint8_t m_adpcm_status; uint16_t m_adpcm_latch_address; uint8_t m_adpcm_control; + uint8_t m_adpcm_dma_reg; uint8_t m_fade_reg; void regs_map(address_map &map); -- cgit v1.2.3