(nw) upd7801: reworked following unfavourable comments

- reverted all of last commit
- fixing the bug a different way
This commit is contained in:
Robbbert 2019-10-20 12:16:00 +11:00
parent 24e839d947
commit 57802cdd7f

View File

@ -1889,6 +1889,7 @@ void upd7801_device::device_reset()
upd7810_device::device_reset();
MA = 0; /* Port A is output port on the uPD7801 */
m_ovc0 = 0;
m_int2 = 0;
}
void upd78c05_device::device_reset()
@ -2005,19 +2006,19 @@ void upd7801_device::execute_set_input(int irqline, int state)
/* Check if the ES bit is set then check for rising edge, otherwise falling edge */
if ( MKL & 0x20 )
{
if ( m_int2 != CLEAR_LINE && state == ASSERT_LINE )
if ( m_int2 == CLEAR_LINE && state == ASSERT_LINE )
{
IRR |= INTF2;
}
}
else
{
if ( m_int2 != ASSERT_LINE && state == CLEAR_LINE )
if ( m_int2 == ASSERT_LINE && state == CLEAR_LINE )
{
IRR |= INTF2;
}
}
m_int2 = !state;
m_int2 = state;
break;
}
}