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
|
/***************************************************************************
Chips & Technologies CS4031 chipset
Chipset for 486 based PC/AT compatible systems. Consists of two
individual chips:
* F84031
- DRAM controller
- ISA-bus controller
- VESA VL-BUS controller
* F84035
- 2x 8257 DMA controller
- 2x 8259 interrupt controller
- 8254 timer
- MC14818 RTC
***************************************************************************/
#pragma once
#ifndef __CS4031_H__
#define __CS4031_H__
#include "emu.h"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_CS4031_ADD(_tag, _cputag, _isatag, _biostag) \
MCFG_DEVICE_ADD(_tag, CS4031, 0) \
cs4031_device::static_set_cputag(*device, _cputag); \
cs4031_device::static_set_isatag(*device, _isatag); \
cs4031_device::static_set_biostag(*device, _biostag);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> cs4031_device
class cs4031_device : public device_t
{
public:
// construction/destruction
cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_WRITE8_MEMBER( address_w );
DECLARE_READ8_MEMBER( data_r );
DECLARE_WRITE8_MEMBER( data_w );
// inline configuration
static void static_set_cputag(device_t &device, const char *tag);
static void static_set_isatag(device_t &device, const char *tag);
static void static_set_biostag(device_t &device, const char *tag);
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
private:
void update_read_region(int index, const char *region, offs_t start, offs_t end);
void update_write_region(int index, const char *region, offs_t start, offs_t end);
void update_read_regions();
void update_write_regions();
// internal state
address_space *m_space;
UINT8 *m_isa;
UINT8 *m_bios;
UINT8 *m_ram;
// address selection
UINT8 m_address;
bool m_address_valid;
const char *m_cputag;
const char *m_isatag;
const char *m_biostag;
UINT8 m_registers[0x20];
};
// device type definition
extern const device_type CS4031;
#endif /* __CS4031_H__ */
|