summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/bus/a1bus/a1cffa.h
blob: bfd0b48d3f1896bc93673ddd0bb42137505d94ba (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
41
42
43
44
45
46
47
48
49
50
51
/*********************************************************************

    a1cffa.h

    Rich Dreher's Compact Flash for Apple I

*********************************************************************/

#ifndef __A1BUS_CFFA__
#define __A1BUS_CFFA__

#include "emu.h"
#include "a1bus.h"
#include "machine/ataintf.h"

//**************************************************************************
//  TYPE DEFINITIONS
//**************************************************************************

class a1bus_cffa_device:
	public device_t,
	public device_a1bus_card_interface
{
public:
	// construction/destruction
	a1bus_cffa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
	a1bus_cffa_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);

	// optional information overrides
	virtual machine_config_constructor device_mconfig_additions() const;
	virtual const rom_entry *device_rom_region() const;

	required_device<ata_interface_device> m_ata;

	DECLARE_READ8_MEMBER(cffa_r);
	DECLARE_WRITE8_MEMBER(cffa_w);

protected:
	virtual void device_start();
	virtual void device_reset();

private:
	UINT8 *m_rom;
	UINT16 m_lastdata;
	bool m_writeprotect;
};

// device type definition
extern const device_type A1BUS_CFFA;

#endif  /* __A1BUS_CFFA__ */