mirror of
https://github.com/holub/mame
synced 2025-05-24 23:05:32 +03:00
upd7810: ECNT clear control happens after capture control
This commit is contained in:
parent
ef53b9356f
commit
613ad8165d
@ -1313,22 +1313,6 @@ void upd7810_device::handle_timers(int cycles)
|
||||
IRR |= INTFE0;
|
||||
if (ETM1 == ECNT)
|
||||
IRR |= INTFE1;
|
||||
/* How and When ECNT is Cleared */
|
||||
switch (ETMM & 0x0c)
|
||||
{
|
||||
case 0x00: /* clear ECNT */
|
||||
break;
|
||||
case 0x04: /* free running */
|
||||
if (0 == ECNT)
|
||||
ITF |= INTOV; /* set overflow flag if counter wrapped */
|
||||
break;
|
||||
case 0x08: /* reset at falling edge of CI or TO */
|
||||
break;
|
||||
case 0x0c: /* reset if ECNT == ETM1 */
|
||||
if (ETM1 == ECNT)
|
||||
ECNT = 0;
|
||||
break;
|
||||
}
|
||||
/* Conditions When ECNT Causes a CO0 Output Change */
|
||||
if (((0x00 == (ETMM & 0x30)) && (ETM0 == ECNT)) || /* set CO0 if ECNT == ETM0 */
|
||||
/* ((0x10 == (ETMM & 0x30)) prohibited */
|
||||
@ -1367,6 +1351,22 @@ void upd7810_device::handle_timers(int cycles)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* How and When ECNT is Cleared */
|
||||
switch (ETMM & 0x0c)
|
||||
{
|
||||
case 0x00: /* clear ECNT */
|
||||
break;
|
||||
case 0x04: /* free running */
|
||||
if (0 == ECNT)
|
||||
ITF |= INTOV; /* set overflow flag if counter wrapped */
|
||||
break;
|
||||
case 0x08: /* reset at falling edge of CI or TO */
|
||||
break;
|
||||
case 0x0c: /* reset if ECNT == ETM1 */
|
||||
if (ETM1 == ECNT)
|
||||
ECNT = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user