summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/megadrive/ggenie.h
blob: 75b943abb4e1fa82f449ef07a9491f5d3af3b3a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// license:BSD-3-Clause
// copyright-holders:Fabio Priuli
#ifndef __MD_GGENIE_H
#define __MD_GGENIE_H

#include "md_slot.h"


// ======================> md_rom_ggenie_device

class md_rom_ggenie_device : public device_t,
						public device_md_cart_interface
{
public:
	// construction/destruction
	md_rom_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);

	// device-level overrides
	virtual void device_start() override;
	virtual void device_reset() override;
	virtual machine_config_constructor device_mconfig_additions() const override;

	// reading and writing
	virtual DECLARE_READ16_MEMBER(read) override;
	virtual DECLARE_WRITE16_MEMBER(write) override;

private:
	required_device<md_cart_slot_device> m_exp;
	UINT16 m_gg_regs[0x20];
	int m_gg_bypass;
	int m_reg_enable;
	UINT16 m_gg_addr[6];
	UINT16 m_gg_data[6];
};


// device type definition
extern const device_type MD_ROM_GAMEGENIE;

#endif