1 // license:BSD-3-Clause
2 // copyright-holders:Nigel Barnes
3 /***************************************************************************
4 
5     MR8000 Master RAM Cartridge emulation
6 
7 ***************************************************************************/
8 
9 #ifndef MAME_BUS_BBC_CART_MR8000_H
10 #define MAME_BUS_BBC_CART_MR8000_H
11 
12 #pragma once
13 
14 #include "slot.h"
15 
16 
17 //**************************************************************************
18 //  TYPE DEFINITIONS
19 //**************************************************************************
20 
21 // ======================> bbc_mr8000_device
22 
23 class bbc_mr8000_device : public device_t, public device_bbc_cart_interface
24 {
25 public:
26 	// construction/destruction
27 	bbc_mr8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
28 
29 protected:
30 	// device-level overrides
31 	virtual ioport_constructor device_input_ports() const override;
32 
33 	virtual void device_start() override;
34 
35 	// bbc_cart_interface overrides
36 	virtual uint8_t read(offs_t offset, int infc, int infd, int romqa, int oe, int oe2) override;
37 	virtual void write(offs_t offset, uint8_t data, int infc, int infd, int romqa, int oe, int oe2) override;
38 
39 private:
40 	required_ioport m_switch;
41 };
42 
43 // device type definition
44 DECLARE_DEVICE_TYPE(BBC_MR8000, bbc_mr8000_device)
45 
46 #endif // MAME_BUS_BBC_CART_MR8000_H
47