blob: 95ccec24478a552919380929e13aec1d13bd7736 (
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
|
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************
National Semiconductor DS75160A IEEE-488 GPIB Transceiver emulation
Copyright MESS Team.
Visit http://mamedev.org for licensing and usage restrictions.
**********************************************************************
_____ _____
TE 1 |* \_/ | 20 Vcc
D1 2 | | 19 D1
D2 3 | | 18 D2
D3 4 | | 17 D3
D4 5 | DS75160A | 16 D4
D5 6 | | 15 D5
D6 7 | | 14 D6
D7 8 | | 13 D7
D8 8 | | 12 D8
GND 10 |_____________| 11 PE
**********************************************************************/
#pragma once
#ifndef __DS75160A__
#define __DS75160A__
#include "emu.h"
///*************************************************************************
// INTERFACE CONFIGURATION MACROS
///*************************************************************************
#define MCFG_DS75160A_ADD(_tag, _read, _write) \
MCFG_DEVICE_ADD(_tag, DS75160A, 0) \
downcast<ds75160a_device *>(device)->set_callbacks(DEVCB2_##_read, DEVCB2_##_write);
///*************************************************************************
// TYPE DEFINITIONS
///*************************************************************************
// ======================> ds75160a_device
class ds75160a_device : public device_t
{
public:
// construction/destruction
ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
template<class _read, class _write> void set_callbacks(_read rd, _write wr) {
m_read.set_callback(rd);
m_write.set_callback(wr);
}
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
DECLARE_WRITE_LINE_MEMBER( te_w );
DECLARE_WRITE_LINE_MEMBER( pe_w );
protected:
// device-level overrides
virtual void device_start();
private:
devcb2_read8 m_read;
devcb2_write8 m_write;
UINT8 m_data;
int m_te;
int m_pe;
};
// device type definition
extern const device_type DS75160A;
#endif
|