blob: 51c7a39b9ea5b4add121b24fc8d4b26cc016dcbd (
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
|
/*****************************************************************************
*
* machine/i8271.h
*
****************************************************************************/
#ifndef I8271_H_
#define I8271_H_
/***************************************************************************
MACROS
***************************************************************************/
class i8271_device : public device_t
{
public:
i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~i8271_device() { global_free(m_token); }
// access to legacy token
void *token() const { assert(m_token != NULL); return m_token; }
protected:
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
private:
// internal state
void *m_token;
};
extern const device_type I8271;
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
struct i8271_interface
{
void (*interrupt)(device_t *device, int state);
void (*dma_request)(device_t *device, int state, int read_);
const char *floppy_drive_tags[2];
};
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
DECLARE_READ8_DEVICE_HANDLER (i8271_r);
DECLARE_WRITE8_DEVICE_HANDLER(i8271_w);
DECLARE_READ8_DEVICE_HANDLER (i8271_dack_r);
DECLARE_WRITE8_DEVICE_HANDLER(i8271_dack_w);
DECLARE_READ8_DEVICE_HANDLER (i8271_data_r);
DECLARE_WRITE8_DEVICE_HANDLER(i8271_data_w);
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
#define MCFG_I8271_ADD(_tag, _intrf) \
MCFG_DEVICE_ADD(_tag, I8271, 0) \
MCFG_DEVICE_CONFIG(_intrf)
#endif /* I8271_H_ */
|