summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/a2bus/a2eramworks3.h
blob: 693b12ea2266c058ec5f586120b8c07e90ec0ccb (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// license:BSD-3-Clause
// copyright-holders:R. Belmont
/*********************************************************************

    a2eramworks3.h

    Applied Engineering RamWorks III

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

#ifndef MAME_BUS_A2BUS_A2ERAMWORKS3_H
#define MAME_BUS_A2BUS_A2ERAMWORKS3_H

#include "a2eauxslot.h"

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

class a2eaux_ramworks3_device:
	public device_t,
	public device_a2eauxslot_card_interface
{
public:
	// construction/destruction
	a2eaux_ramworks3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);

protected:
	a2eaux_ramworks3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);

	virtual void device_start() override;
	virtual void device_reset() override;

	virtual u8 read_auxram(uint16_t offset) override;
	virtual void write_auxram(uint16_t offset, u8 data) override;
	virtual u8 *get_vram_ptr() override;
	virtual u8 *get_auxbank_ptr() override;
	virtual u16 get_auxbank_mask() override;
	virtual bool allow_dhr() override { return true; }
	virtual void write_c07x(u8 offset, u8 data) override;

	int m_bank;

private:
	u8 m_ram[8*1024*1024];
};

class a2eaux_franklin384_device: public a2eaux_ramworks3_device
{
public:
	a2eaux_franklin384_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);

protected:
	virtual void write_c07x(u8 offset, u8 data) override;
};

class a2eaux_franklin512_device: public a2eaux_ramworks3_device
{
public:
	a2eaux_franklin512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);

protected:
	virtual void write_c07x(u8 offset, u8 data) override;
};

// device type definition
DECLARE_DEVICE_TYPE(A2EAUX_RAMWORKS3, a2eaux_ramworks3_device)
DECLARE_DEVICE_TYPE(A2EAUX_FRANKLIN384, a2eaux_franklin384_device)
DECLARE_DEVICE_TYPE(A2EAUX_FRANKLIN512, a2eaux_franklin512_device)

#endif // MAME_BUS_A2BUS_A2ERAMWORKS3_H