1 // license:BSD-3-Clause
2 // copyright-holders:Curt Coder
3 /**********************************************************************
4 
5     Access Software MACH 5 cartridge emulation
6 
7 **********************************************************************/
8 
9 #ifndef MAME_BUS_C64_MACH5_H
10 #define MAME_BUS_C64_MACH5_H
11 
12 #pragma once
13 
14 #include "exp.h"
15 
16 
17 
18 //**************************************************************************
19 //  TYPE DEFINITIONS
20 //**************************************************************************
21 
22 // ======================> c64_mach5_cartridge_device
23 
24 class c64_mach5_cartridge_device : public device_t,
25 									public device_c64_expansion_card_interface
26 {
27 public:
28 	// construction/destruction
29 	c64_mach5_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
30 
31 	// optional information overrides
32 	virtual ioport_constructor device_input_ports() const override;
33 
34 protected:
35 	// device-level overrides
36 	virtual void device_start() override;
37 	virtual void device_reset() override;
38 
39 	// device_c64_expansion_card_interface overrides
40 	virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
41 	virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
42 
43 private:
44 	required_ioport m_s1;
45 
46 	bool m_c128;
47 };
48 
49 
50 // device type definition
51 DECLARE_DEVICE_TYPE(C64_MACH5, c64_mach5_cartridge_device)
52 
53 
54 #endif // MAME_BUS_C64_MACH5_H
55