Develop and Download Open Source Software

Browse CVS Repository

Contents of /mame32jp/mame32jp/src/cpuint.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download) (as text)
Wed Apr 24 03:53:20 2002 UTC (21 years, 11 months ago) by zero
Branch: MAIN
CVS Tags: ver_0_60_1, ver0_59_13, ver0_59_14, ver0_60_2, ver0_60_3, ver0_60_4, ver0_60_5, HEAD
Changes since 1.4: +0 -0 lines
File MIME type: text/x-chdr
*** empty log message ***

1 /***************************************************************************
2
3 cpuint.h
4
5 Core multi-CPU interrupt engine.
6
7 ***************************************************************************/
8
9 #ifndef CPUINT_H
10 #define CPUINT_H
11
12 #include "osd_cpu.h"
13 #include "memory.h"
14 #include "timer.h"
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20
21 /*************************************
22 *
23 * Interrupt constants
24 *
25 *************************************/
26
27 enum
28 {
29 /* generic "none" vector */
30 INTERRUPT_NONE = 126
31 };
32
33
34
35 /*************************************
36 *
37 * Startup/shutdown
38 *
39 *************************************/
40
41 int cpuint_init(void);
42
43 void cpuint_reset_cpu(int cpunum);
44
45 extern int (*cpu_irq_callbacks[])(int);
46
47
48
49 /*************************************
50 *
51 * Interrupt handling
52 *
53 *************************************/
54
55 /* Install a driver callback for IRQ acknowledge */
56 void cpu_set_irq_callback(int cpunum, int (*callback)(int irqline));
57
58 /* Set the vector to be returned during a CPU's interrupt acknowledge cycle */
59 void cpu_irq_line_vector_w(int cpunum, int irqline, int vector);
60
61 /* set the IRQ line state for a specific irq line of a CPU */
62 /* normally use state HOLD_LINE, irqline 0 for first IRQ type of a cpu */
63 void cpu_set_irq_line(int cpunum, int irqline, int state);
64
65 /* set the IRQ line state and a vector for the IRQ */
66 void cpu_set_irq_line_and_vector(int cpunum, int irqline, int state, int vector);
67
68 /* macro for handling NMI lines */
69 #define cpu_set_nmi_line(cpunum, state) cpu_set_irq_line(cpunum, IRQ_LINE_NMI, state)
70
71
72
73 /*************************************
74 *
75 * Preferred interrupt callbacks
76 *
77 *************************************/
78
79 INTERRUPT_GEN( nmi_line_pulse );
80 INTERRUPT_GEN( nmi_line_assert );
81
82 INTERRUPT_GEN( irq0_line_hold );
83 INTERRUPT_GEN( irq0_line_pulse );
84 INTERRUPT_GEN( irq0_line_assert );
85
86 INTERRUPT_GEN( irq1_line_hold );
87 INTERRUPT_GEN( irq1_line_pulse );
88 INTERRUPT_GEN( irq1_line_assert );
89
90 INTERRUPT_GEN( irq2_line_hold );
91 INTERRUPT_GEN( irq2_line_pulse );
92 INTERRUPT_GEN( irq2_line_assert );
93
94 INTERRUPT_GEN( irq3_line_hold );
95 INTERRUPT_GEN( irq3_line_pulse );
96 INTERRUPT_GEN( irq3_line_assert );
97
98 INTERRUPT_GEN( irq4_line_hold );
99 INTERRUPT_GEN( irq4_line_pulse );
100 INTERRUPT_GEN( irq4_line_assert );
101
102 INTERRUPT_GEN( irq5_line_hold );
103 INTERRUPT_GEN( irq5_line_pulse );
104 INTERRUPT_GEN( irq5_line_assert );
105
106 INTERRUPT_GEN( irq6_line_hold );
107 INTERRUPT_GEN( irq6_line_pulse );
108 INTERRUPT_GEN( irq6_line_assert );
109
110 INTERRUPT_GEN( irq7_line_hold );
111 INTERRUPT_GEN( irq7_line_pulse );
112 INTERRUPT_GEN( irq7_line_assert );
113
114
115
116 /*************************************
117 *
118 * Obsolete interrupt handling
119 *
120 *************************************/
121
122 /* OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE */
123 /* OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE */
124 /* OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE */
125
126 /* Obsolete functions: avoid using them in new drivers, as many of them will
127 go away in the future! */
128
129 void cpu_interrupt_enable(int cpu,int enabled);
130 WRITE_HANDLER( interrupt_enable_w );
131 WRITE_HANDLER( interrupt_vector_w );
132 READ_HANDLER( interrupt_enable_r );
133
134 /* OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE */
135 /* OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE */
136 /* OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE */
137
138
139
140 #ifdef __cplusplus
141 }
142 #endif
143
144 #endif /* CPUEXEC_H */

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26