summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpuint.h
blob: ca45d3006c46f7fea4bfde3e85f03439d96c9d35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/***************************************************************************

    cpuint.h

    Core multi-CPU interrupt engine.

    Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team.
    Visit http://mamedev.org for licensing and usage restrictions.

***************************************************************************/

#pragma once

#ifndef __CPUINT_H__
#define __CPUINT_H__

#include "memory.h"

#define INTERRUPT_GEN(func)		void func(void)



/*************************************
 *
 *  Startup/shutdown
 *
 *************************************/

void cpuint_init(running_machine *machine);

void cpuint_reset(void);

extern int (*cpu_irq_callbacks[])(int);



/*************************************
 *
 *  CPU lines
 *
 *************************************/

/* Set the logical state (ASSERT_LINE/CLEAR_LINE) of the an input line on a CPU */
void cpunum_set_input_line(int cpunum, int line, int state);

/* Set the vector to be returned during a CPU's interrupt acknowledge cycle */
void cpunum_set_input_line_vector(int cpunum, int irqline, int vector);

/* Set the logical state (ASSERT_LINE/CLEAR_LINE) of the an input line on a CPU and its associated vector */
void cpunum_set_input_line_and_vector(int cpunum, int line, int state, int vector);

/* Install a driver callback for IRQ acknowledge */
void cpunum_set_irq_callback(int cpunum, int (*callback)(int irqline));


#endif	/* __CPUINT_H__ */