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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
#ifndef __CONCEPT_EXP__
#define __CONCEPT_EXP__
#include "emu.h"
class concept_exp_card_device;
class concept_exp_port_device : public device_t,
public device_slot_interface
{
public:
// construction/destruction
concept_exp_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER( reg_r );
DECLARE_READ8_MEMBER( rom_r );
DECLARE_WRITE8_MEMBER( reg_w );
DECLARE_WRITE8_MEMBER( rom_w );
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
concept_exp_card_device *m_card;
};
// device type definition
extern const device_type CONCEPT_EXP_PORT;
// supported devices
//SLOT_INTERFACE_EXTERN( abc_keyboard_devices );
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_CONCEPT_EXP_PORT_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, CONCEPT_EXP_PORT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
//**************************************************************************
// CARD INTERFACE
//**************************************************************************
class concept_exp_card_device : public device_slot_card_interface
{
public:
// construction/destruction
concept_exp_card_device(const machine_config &mconfig, device_t &device);
DECLARE_READ8_MEMBER( reg_r ) { return 0xff; }
DECLARE_READ8_MEMBER( rom_r ) { return 0xff; }
DECLARE_WRITE8_MEMBER( reg_w ) {}
DECLARE_WRITE8_MEMBER( rom_w ) {}
protected:
};
class concept_fdc_device : public device_t,
public concept_exp_card_device
{
public:
// construction/destruction
concept_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER(reg_r);
DECLARE_READ8_MEMBER(rom_r);
DECLARE_WRITE8_MEMBER(reg_w);
DECLARE_WRITE_LINE_MEMBER(intrq_w);
DECLARE_WRITE_LINE_MEMBER(drq_w);
// device-level overrides
virtual void device_start();
virtual void device_reset();
virtual machine_config_constructor device_mconfig_additions() const;
protected:
device_t *m_wd179x;
UINT8 m_fdc_local_status;
UINT8 m_fdc_local_command;
};
class concept_hdc_device : public device_t,
public concept_exp_card_device
{
public:
// construction/destruction
concept_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER( reg_r );
DECLARE_READ8_MEMBER( rom_r );
DECLARE_WRITE8_MEMBER( reg_w );
// device-level overrides
virtual void device_start();
virtual void device_reset();
virtual machine_config_constructor device_mconfig_additions() const;
protected:
};
extern const device_type CONCEPT_FDC;
extern const device_type CONCEPT_HDC;
#endif
|