diff options
Diffstat (limited to 'src/devices/cpu/h8/h8_dma.cpp')
-rw-r--r-- | src/devices/cpu/h8/h8_dma.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/devices/cpu/h8/h8_dma.cpp b/src/devices/cpu/h8/h8_dma.cpp index 33b277c38e4..9ba510fff06 100644 --- a/src/devices/cpu/h8/h8_dma.cpp +++ b/src/devices/cpu/h8/h8_dma.cpp @@ -1,3 +1,6 @@ +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert + #include "emu.h" #include "h8_dma.h" @@ -76,7 +79,7 @@ void h8gen_dma_device::start_stop_test() } else { if(m_dmach[i >> 1] && (m_dmach[i >> 1]->m_state[i & 1].m_flags & h8_dma_state::ACTIVE)) { logerror("forced abort %d\n", i); - exit(0); + m_dmach[i >> 1]->abort(i & 1); } } } @@ -84,10 +87,8 @@ void h8gen_dma_device::start_stop_test() - // DMA channel, common code - h8gen_dma_channel_device::h8gen_dma_channel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, type, tag, owner, clock), m_cpu(*this, finder_base::DUMMY_TAG), @@ -102,9 +103,11 @@ void h8gen_dma_channel_device::device_start() save_item(STRUCT_MEMBER(m_state, m_incs)); save_item(STRUCT_MEMBER(m_state, m_incd)); save_item(STRUCT_MEMBER(m_state, m_count)); + save_item(STRUCT_MEMBER(m_state, m_bcount)); save_item(STRUCT_MEMBER(m_state, m_flags)); save_item(STRUCT_MEMBER(m_state, m_id)); save_item(STRUCT_MEMBER(m_state, m_trigger_vector)); + save_item(NAME(m_mar)); save_item(NAME(m_ioar)); save_item(NAME(m_etcr)); @@ -140,7 +143,6 @@ void h8gen_dma_channel_device::set_dreq(int state) m_dreq = state; // Only subchannel B/1 can react to dreq. - if(m_dreq) { if(((m_state[1].m_flags & (h8_dma_state::ACTIVE|h8_dma_state::SUSPENDED)) == (h8_dma_state::ACTIVE|h8_dma_state::SUSPENDED)) && (m_state[1].m_trigger_vector == DREQ_LEVEL || m_state[1].m_trigger_vector == DREQ_EDGE)) { m_state[1].m_flags &= ~h8_dma_state::SUSPENDED; @@ -356,7 +358,7 @@ void h8gen_dma_channel_device::count_done(int submodule) m_state[submodule].m_source = m_mar[0]; m_state[submodule].m_count = m_etcr[0] & 0xff00 ? m_etcr[0] >> 8 : 0x100; - m_state[submodule].m_bcount --; + m_state[submodule].m_bcount--; if(m_state[submodule].m_bcount == 1) m_state[submodule].m_flags &= ~h8_dma_state::BLOCK; |