mirror of
https://github.com/holub/mame
synced 2025-05-25 23:35:26 +03:00
generic_pulse_line() now takes into account clock scaling and minimum cycles.
This commit is contained in:
parent
b319755f9e
commit
e62a46a8ee
@ -610,9 +610,11 @@ static TIMER_CALLBACK( irq_pulse_clear )
|
|||||||
|
|
||||||
void generic_pulse_irq_line(const device_config *device, int irqline)
|
void generic_pulse_irq_line(const device_config *device, int irqline)
|
||||||
{
|
{
|
||||||
|
int multiplier = cpu_get_clock_multiplier(device);
|
||||||
|
int clocks = (cpu_get_min_cycles(device) * cpu_get_clock_divider(device) + multiplier - 1) / multiplier;
|
||||||
assert(irqline != INPUT_LINE_NMI && irqline != INPUT_LINE_RESET);
|
assert(irqline != INPUT_LINE_NMI && irqline != INPUT_LINE_RESET);
|
||||||
cpu_set_input_line(device, irqline, ASSERT_LINE);
|
cpu_set_input_line(device, irqline, ASSERT_LINE);
|
||||||
timer_set(device->machine, cpu_clocks_to_attotime(device, 1), (void *)device, irqline, irq_pulse_clear);
|
timer_set(device->machine, cpu_clocks_to_attotime(device, MAX(clocks, 1)), (void *)device, irqline, irq_pulse_clear);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user