i8257: fix it so tc can work with multiple devices

This commit is contained in:
cracyc 2021-09-04 20:19:56 -05:00
parent 9b4d52c6e7
commit ea3185af90

View File

@ -428,7 +428,7 @@ void i8257_device::execute_run()
if (m_ready)
{
m_state = STATE_S4;
if (m_channel[m_current_channel].m_count == 0)
if ((m_channel[m_current_channel].m_count == 0) && (MODE_TRANSFER_MASK != MODE_TRANSFER_READ))
set_tc(1);
}
else
@ -439,7 +439,7 @@ void i8257_device::execute_run()
if (m_ready)
{
m_state = STATE_S4;
if (m_channel[m_current_channel].m_count == 0)
if ((m_channel[m_current_channel].m_count == 0) && (MODE_TRANSFER_MASK != MODE_TRANSFER_READ))
set_tc(1);
}
break;
@ -449,6 +449,8 @@ void i8257_device::execute_run()
{
dma_write();
}
if ((m_channel[m_current_channel].m_count == 0) && (MODE_TRANSFER_MASK == MODE_TRANSFER_READ))
set_tc(1);
advance();
if(m_hack && next_channel())