blob: 7d4ba4b8ccc7b37ccea1b4197f70c0dd7d156b43 (
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
|
/**********************************************************************
EPSON SIO port emulation
Copyright MESS Team.
Visit http://mamedev.org for licensing and usage restrictions.
**********************************************************************/
#pragma once
#ifndef __EPSON_SIO_H__
#define __EPSON_SIO_H__
#include "emu.h"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_EPSON_SIO_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, EPSON_SIO, 0) \
MCFG_DEVICE_SLOT_INTERFACE(epson_sio_devices, NULL, NULL, false)
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
class device_epson_sio_interface;
class epson_sio_device : public device_t,
public device_slot_interface
{
public:
// construction/destruction
epson_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
virtual ~epson_sio_device();
DECLARE_READ_LINE_MEMBER(rx_r);
DECLARE_READ_LINE_MEMBER(pin_r);
DECLARE_WRITE_LINE_MEMBER(tx_w);
DECLARE_WRITE_LINE_MEMBER(pout_w);
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
device_epson_sio_interface *m_cart;
};
// class representing interface-specific live sio device
class device_epson_sio_interface : public device_slot_card_interface
{
public:
// construction/destruction
device_epson_sio_interface(const machine_config &mconfig, device_t &device);
virtual ~device_epson_sio_interface();
virtual int rx_r() { return 1; };
virtual int pin_r() { return 1; };
virtual void tx_w(int state) { };
virtual void pout_w(int state) { };
protected:
epson_sio_device *m_slot;
};
// device type definition
extern const device_type EPSON_SIO;
// supported devices
SLOT_INTERFACE_EXTERN( epson_sio_devices );
#endif // __EPSON_SIO_H__
|