1 // license:BSD-3-Clause
2 // copyright-holders:Curt Coder
3 #ifndef MAME_INCLUDES_EXP85_H
4 #define MAME_INCLUDES_EXP85_H
5 
6 #include "bus/rs232/rs232.h"
7 #include "cpu/i8085/i8085.h"
8 #include "imagedev/cassette.h"
9 #include "sound/spkrdev.h"
10 
11 #define SCREEN_TAG      "screen"
12 #define I8085A_TAG      "u100"
13 #define I8155_TAG       "u106"
14 #define I8355_TAG       "u105"
15 
16 class exp85_state : public driver_device
17 {
18 public:
exp85_state(const machine_config & mconfig,device_type type,const char * tag)19 	exp85_state(const machine_config &mconfig, device_type type, const char *tag)
20 		: driver_device(mconfig, type, tag),
21 			m_maincpu(*this, I8085A_TAG),
22 			m_rs232(*this, "rs232"),
23 			m_cassette(*this, "cassette"),
24 			m_speaker(*this, "speaker"),
25 			m_rom(*this, I8085A_TAG),
26 			m_tape_control(0)
27 	{ }
28 
29 	void exp85(machine_config &config);
30 
31 	DECLARE_INPUT_CHANGED_MEMBER( trigger_reset );
32 	DECLARE_INPUT_CHANGED_MEMBER( trigger_rst75 );
33 
34 private:
35 	required_device<i8085a_cpu_device> m_maincpu;
36 	required_device<rs232_port_device> m_rs232;
37 	required_device<cassette_image_device> m_cassette;
38 	required_device<speaker_sound_device> m_speaker;
39 	required_memory_region m_rom;
40 
41 	virtual void machine_start() override;
42 
43 	uint8_t i8355_a_r();
44 	void i8355_a_w(uint8_t data);
45 	DECLARE_READ_LINE_MEMBER( sid_r );
46 	DECLARE_WRITE_LINE_MEMBER( sod_w );
47 
48 	/* cassette state */
49 	int m_tape_control;
50 	void exp85_io(address_map &map);
51 	void exp85_mem(address_map &map);
52 };
53 
54 #endif // MAME_INCLUDES_EXP85_H
55