1
/**********************************************************************
3
Intel 8212 8-Bit Input/Output Port emulation
6
Visit http://mamedev.org for licensing and usage restrictions.
8
**********************************************************************
10
_DS1 1 |* \_/ | 24 Vcc
21
GND 12 |_____________| 13 DS2
23
**********************************************************************/
34
///*************************************************************************
36
///*************************************************************************
46
///*************************************************************************
47
// INTERFACE CONFIGURATION MACROS
48
///*************************************************************************
50
#define MCFG_I8212_ADD(_tag, _config) \
51
MCFG_DEVICE_ADD((_tag), I8212, 0) \
52
MCFG_DEVICE_CONFIG(_config)
54
#define I8212_INTERFACE(name) \
55
const i8212_interface (name) =
59
///*************************************************************************
61
///*************************************************************************
63
// ======================> i8212_interface
65
struct i8212_interface
67
devcb_write_line m_out_int_cb;
69
devcb_read8 m_in_di_cb;
70
devcb_write8 m_out_do_cb;
75
// ======================> i8212_device
77
class i8212_device : public device_t, public i8212_interface
80
// construction/destruction
81
i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
83
DECLARE_READ8_MEMBER( data_r );
84
DECLARE_WRITE8_MEMBER( data_w );
86
DECLARE_WRITE_LINE_MEMBER( md_w );
87
DECLARE_WRITE_LINE_MEMBER( stb_w );
90
// device-level overrides
91
virtual void device_config_complete();
92
virtual void device_start();
93
virtual void device_reset();
96
devcb_resolved_write_line m_out_int_func;
97
devcb_resolved_read8 m_in_di_func;
98
devcb_resolved_write8 m_out_do_func;
102
UINT8 m_data; // data latch
106
// device type definition
107
extern const device_type I8212;