1 // license:GPL-2.0+
2 // copyright-holders:Kevin Thacker
3 /*****************************************************************************
4  *
5  * includes/specpls3.h
6  *
7  ****************************************************************************/
8 
9 #ifndef MAME_INCLUDES_SPECPLS3_H
10 #define MAME_INCLUDES_SPECPLS3_H
11 
12 #include "spectrum.h"
13 #include "spec128.h"
14 
15 #include "imagedev/floppy.h"
16 #include "machine/upd765.h"
17 
18 INPUT_PORTS_EXTERN( spec_plus );
19 
20 class specpls3_state : public spectrum_state
21 {
22 public:
specpls3_state(const machine_config & mconfig,device_type type,const char * tag)23 	specpls3_state(const machine_config &mconfig, device_type type, const char *tag) :
24 		spectrum_state(mconfig, type, tag),
25 		m_upd765(*this, "upd765"),
26 		m_flop(*this, "upd765:%u", 0U)
27 	{ }
28 
29 	void spectrum_plus2(machine_config &config);
30 	void spectrum_plus3(machine_config &config);
31 
32 private:
33 	void bank1_w(offs_t offset, uint8_t data);
34 	uint8_t bank1_r(offs_t offset);
35 	void port_3ffd_w(uint8_t data);
36 	uint8_t port_3ffd_r();
37 	uint8_t port_2ffd_r();
38 	void port_7ffd_w(uint8_t data);
39 	void port_1ffd_w(uint8_t data);
40 	void plus3_us_w(uint8_t data);
41 
42 	DECLARE_MACHINE_RESET(spectrum_plus3);
43 
44 	virtual void plus3_update_memory() override;
45 
46 	void plus3_io(address_map &map);
47 	void plus3_mem(address_map &map);
48 
49 	optional_device<upd765a_device> m_upd765;
50 	optional_device_array<floppy_connector, 2> m_flop;
51 };
52 
53 #endif // MAME_INCLUDES_SPECPLS3_H
54