2
tms9901.h: header file for tms9901.c
9
/***************************************************************************
11
***************************************************************************/
13
DECLARE_LEGACY_DEVICE(TMS9901, tms9901);
15
/* Masks for the interrupts levels available on TMS9901 */
16
#define TMS9901_INT1 0x0002
17
#define TMS9901_INT2 0x0004
18
#define TMS9901_INT3 0x0008 /* overriden by the timer interrupt */
19
#define TMS9901_INT4 0x0010
20
#define TMS9901_INT5 0x0020
21
#define TMS9901_INT6 0x0040
22
#define TMS9901_INT7 0x0080
23
#define TMS9901_INT8 0x0100
24
#define TMS9901_INT9 0x0200
25
#define TMS9901_INTA 0x0400
26
#define TMS9901_INTB 0x0800
27
#define TMS9901_INTC 0x1000
28
#define TMS9901_INTD 0x2000
29
#define TMS9901_INTE 0x4000
30
#define TMS9901_INTF 0x8000
32
/***************************************************************************
34
***************************************************************************/
36
typedef void (*tms9901_int_callback_func)(device_t *device, int intreq, int ic);
37
#define TMS9901_INT_CALLBACK(name) void name(device_t *device, int intreq, int ic )
39
typedef struct _tms9901_interface tms9901_interface;
40
struct _tms9901_interface
42
int supported_int_mask; /* a bit for each input pin whose state is always notified to the TMS9901 core */
43
read8_device_func read_handlers[4]; /* 4*8 bits */
44
write8_device_func write_handlers[16]; /* 16 Pn outputs */
45
tms9901_int_callback_func interrupt_callback; /* called when interrupt bus state changes */
50
/***************************************************************************
52
***************************************************************************/
54
void tms9901_set_single_int(device_t *device, int pin_number, int state);
56
READ8_DEVICE_HANDLER ( tms9901_cru_r );
57
WRITE8_DEVICE_HANDLER( tms9901_cru_w );
59
/***************************************************************************
60
DEVICE CONFIGURATION MACROS
61
***************************************************************************/
63
#define MCFG_TMS9901_ADD(_tag, _intrf) \
64
MCFG_DEVICE_ADD(_tag, TMS9901, 0) \
65
MCFG_DEVICE_CONFIG(_intrf)
67
#endif /* __TMS9901_H__ */