upd765: clear seek irq before new seek (nw)

upd71071: fix off by one (nw)
This commit is contained in:
cracyc 2013-06-04 14:51:19 +00:00
parent 6621051bb7
commit 0bc1c99392
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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;