Install a driver callback for IRQ acknowledge. This callback is used to get a vector for an IRQ line.
Declared in src/emu/cpuint.h as
void cpunum_set_irq_callback(int cpunum, int (*callback)(int irqline));
cpunum – Index to the CPU*callback – Pointer to a function that will be called when this IRQ is fired.Nothing.
static int irq_callback(int irq)
{
return vectors[current_vector];
}
cpunum_set_irq_callback(0, irq_callback);
Function irq_callback will be called when the first CPU acknowledges an interrupt. As vector the CPU will receive a value from the array vectors.