From 0bc1c9939220c3f45a89d8dac9b0f9ba1e03fbc2 Mon Sep 17 00:00:00 2001 From: cracyc Date: Tue, 4 Jun 2013 14:51:19 +0000 Subject: [PATCH] upd765: clear seek irq before new seek (nw) upd71071: fix off by one (nw) --- src/emu/machine/upd765.c | 2 ++ src/mess/machine/upd71071.c | 10 ++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/emu/machine/upd765.c b/src/emu/machine/upd765.c index 8a44b7add2a..2407f68fa17 100644 --- a/src/emu/machine/upd765.c +++ b/src/emu/machine/upd765.c @@ -1219,6 +1219,8 @@ void upd765_family_device::start_command(int cmd) break; case C_SEEK: + other_irq = false; + check_irq(); seek_start(flopi[command[1] & 3]); main_phase = PHASE_CMD; break; diff --git a/src/mess/machine/upd71071.c b/src/mess/machine/upd71071.c index 8e0c15788bc..29f0edb68aa 100644 --- a/src/mess/machine/upd71071.c +++ b/src/mess/machine/upd71071.c @@ -148,7 +148,8 @@ TIMER_CALLBACK_MEMBER(upd71071_device::dma_transfer_timer) m_reg.address_current[channel]--; else m_reg.address_current[channel]++; - if (m_reg.count_current[channel] == 0) + m_reg.count_current[channel]--; + if(m_reg.count_current[channel] == 0xffff) { if (m_reg.mode_control[channel] & 0x10) // auto-initialise { @@ -158,8 +159,6 @@ TIMER_CALLBACK_MEMBER(upd71071_device::dma_transfer_timer) // TODO: send terminal count set_eop(ASSERT_LINE); } - else - m_reg.count_current[channel]--; break; case 0x08: // memory -> I/O data = space.read_byte(m_reg.address_current[channel]); @@ -169,7 +168,8 @@ TIMER_CALLBACK_MEMBER(upd71071_device::dma_transfer_timer) m_reg.address_current[channel]--; else m_reg.address_current[channel]++; - if (m_reg.count_current[channel] == 0) + m_reg.count_current[channel]--; + if(m_reg.count_current[channel] == 0xffff) { if (m_reg.mode_control[channel] & 0x10) // auto-initialise { @@ -179,8 +179,6 @@ TIMER_CALLBACK_MEMBER(upd71071_device::dma_transfer_timer) // TODO: send terminal count set_eop(ASSERT_LINE); } - else - m_reg.count_current[channel]--; break; case 0x0c: // Invalid break;