summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/iq151_rom.h
blob: 1801d7e4156f863a8ed13868883d43efd4df1c5d (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#pragma once

#ifndef __IQ151_ROM_H__
#define __IQ151_ROM_H__

#include "emu.h"
#include "machine/iq151cart.h"
#include "machine/i8255.h"

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

// ======================> iq151_rom_device

class iq151_rom_device :
		public device_t,
		public device_iq151cart_interface
{
public:
	// construction/destruction
	iq151_rom_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 const rom_entry *device_rom_region() const;

protected:
	// device-level overrides
	virtual void device_start();

	// iq151cart_interface overrides
	virtual UINT8* get_cart_base();

	UINT8 * m_rom;
};


// ======================> iq151_basic6_device

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

protected:
	// iq151cart_interface overrides
	virtual void read(offs_t offset, UINT8 &data);
};

// ======================> iq151_basicg_device

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

protected:
	// iq151cart_interface overrides
	virtual void read(offs_t offset, UINT8 &data);
};


// ======================> iq151_amos1_device

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

protected:
	// iq151cart_interface overrides
	virtual void read(offs_t offset, UINT8 &data);
	virtual void io_write(offs_t offset, UINT8 data);

	bool m_active;
};


// ======================> iq151_amos2_device

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

protected:
	// iq151cart_interface overrides
	virtual void read(offs_t offset, UINT8 &data);
	virtual void io_write(offs_t offset, UINT8 data);

	bool m_active;
};


// ======================> iq151_amos3_device

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

protected:
	// iq151cart_interface overrides
	virtual void read(offs_t offset, UINT8 &data);
	virtual void io_write(offs_t offset, UINT8 data);

	bool m_active;
};


// device type definition
extern const device_type IQ151_BASIC6;
extern const device_type IQ151_BASICG;
extern const device_type IQ151_AMOS1;
extern const device_type IQ151_AMOS2;
extern const device_type IQ151_AMOS3;

#endif  /* __IQ151_ROM_H__ */