blob: 4b4b7ea227026d21c17586722fa02acd058ced71 (
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/***************************************************************************
Z80 CTC (Z8430) implementation
Copyright Nicola Salmoria and the MAME Team.
Visit http://mamedev.org for licensing and usage restrictions.
***************************************************************************/
#ifndef __Z80CTC_H__
#define __Z80CTC_H__
/***************************************************************************
CONSTANTS
***************************************************************************/
#define NOTIMER_0 (1<<0)
#define NOTIMER_1 (1<<1)
#define NOTIMER_2 (1<<2)
#define NOTIMER_3 (1<<3)
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
typedef struct _z80ctc_interface z80ctc_interface;
struct _z80ctc_interface
{
int notimer; /* timer disablers */
devcb_write_line intr; /* callback when change interrupt status */
devcb_write_line zc0; /* ZC/TO0 callback */
devcb_write_line zc1; /* ZC/TO1 callback */
devcb_write_line zc2; /* ZC/TO2 callback */
};
#define Z80CTC_INTERFACE(name) \
const z80ctc_interface (name)=
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
#define MDRV_Z80CTC_ADD(_tag, _clock, _intrf) \
MDRV_DEVICE_ADD(_tag, Z80CTC, _clock) \
MDRV_DEVICE_CONFIG(_intrf)
/***************************************************************************
INITIALIZATION/CONFIGURATION
***************************************************************************/
attotime z80ctc_getperiod(running_device *device, int ch);
/***************************************************************************
READ/WRITE HANDLERS
***************************************************************************/
WRITE8_DEVICE_HANDLER( z80ctc_w );
READ8_DEVICE_HANDLER( z80ctc_r );
/***************************************************************************
EXTERNAL TRIGGERS
***************************************************************************/
WRITE_LINE_DEVICE_HANDLER( z80ctc_trg0_w );
WRITE_LINE_DEVICE_HANDLER( z80ctc_trg1_w );
WRITE_LINE_DEVICE_HANDLER( z80ctc_trg2_w );
WRITE_LINE_DEVICE_HANDLER( z80ctc_trg3_w );
/* ----- device interface ----- */
#define Z80CTC DEVICE_GET_INFO_NAME(z80ctc)
DEVICE_GET_INFO( z80ctc );
#endif
|