1 // license:BSD-3-Clause
2 // copyright-holders:Miodrag Milanovic
3 /***************************************************************************
4 
5     Chips & Technologies CS8221 chipset
6 
7     a.k.a. NEW ENHANCED AT (NEAT)
8 
9     Consists of four individual chips:
10 
11     * 82C211 - CPU/Bus controller
12     * 82C212 - Page/Interleave and EMS Memory controller
13     * 82C215 - Data/Address buffer
14     * 82C206 - Integrated Peripherals Controller(IPC)
15 
16 ***************************************************************************/
17 
18 #ifndef MAME_MACHINE_CS8221_H
19 #define MAME_MACHINE_CS8221_H
20 
21 #pragma once
22 
23 class cs8221_device : public device_t
24 {
25 public:
26 	// construction/destruction
cs8221_device(const machine_config & mconfig,const char * tag,device_t * owner,uint32_t clock,const char * cputag,const char * isatag,const char * biostag)27 	cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const char *cputag, const char *isatag, const char *biostag)
28 		: cs8221_device(mconfig, tag, owner, clock)
29 	{
30 		set_cputag(cputag);
31 		set_isatag(isatag);
32 		set_biostag(biostag);
33 	}
34 
35 	cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
36 
37 	// inline configuration
set_cputag(const char * tag)38 	void set_cputag(const char *tag) { m_cputag = tag; }
set_isatag(const char * tag)39 	void set_isatag(const char *tag) { m_isatag = tag; }
set_biostag(const char * tag)40 	void set_biostag(const char *tag) { m_biostag = tag; }
41 
42 	void map(address_map &map);
43 
44 protected:
45 	// device-level overrides
46 	virtual void device_start() override;
47 	virtual void device_reset() override;
48 
49 private:
50 
51 	// internal state
52 	//address_space *m_space;
53 	//uint8_t *m_isa;
54 	//uint8_t *m_bios;
55 	//uint8_t *m_ram;
56 
57 	// address selection
58 	uint8_t m_address;
59 	bool m_address_valid;
60 
61 	const char *m_cputag;
62 	const char *m_isatag;
63 	const char *m_biostag;
64 
65 	uint8_t m_registers[0x10];
66 
67 	void address_w(uint8_t data);
68 	uint8_t data_r();
69 	void data_w(uint8_t data);
70 };
71 
72 DECLARE_DEVICE_TYPE(CS8221, cs8221_device)
73 
74 #endif // MAME_MACHINE_CS8221_H
75