summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/a2bus/q68.h
blob: 34664a284f00b22b8411254d57805f848ca8cb3c (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
// license:BSD-3-Clause
// copyright-holders:Rob Justice, R. Belmont
/*********************************************************************

    q68.h

    Implementation of the Stellation Q-68 68008 card

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

#ifndef MAME_BUS_A2BUS_Q68_H
#define MAME_BUS_A2BUS_Q68_H

#pragma once

#include "a2bus.h"


//**************************************************************************
//  DEVICE TYPE DECLARATION
//**************************************************************************

DECLARE_DEVICE_TYPE(A2BUS_Q68, a2bus_q68_device)
DECLARE_DEVICE_TYPE(A2BUS_Q68PLUS, a2bus_q68plus_device)


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

class a2bus_68k_device:
	public device_t,
	public device_a2bus_card_interface
{
protected:
	a2bus_68k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);

	virtual void device_start() override;
	virtual void device_reset() override;
	virtual const tiny_rom_entry *device_rom_region() const override;

	// overrides of standard a2bus slot functions
	virtual uint8_t read_c0nx(uint8_t offset) override;
	virtual void write_c0nx(uint8_t offset, uint8_t data) override;
	virtual bool take_c800() override { return false; }

	uint8_t dma_r(offs_t offset);
	void dma_w(offs_t offset, uint8_t data);

	required_device<cpu_device> m_m68008;

private:
	bool m_bEnabled;
};

class a2bus_q68_device : public a2bus_68k_device
{
public:
	a2bus_q68_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);

protected:
	virtual void device_add_mconfig(machine_config &config) override;

private:
	void m68008_mem(address_map &map);
};

class a2bus_q68plus_device : public a2bus_68k_device
{
public:
	a2bus_q68plus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);

	static auto parent_rom_device_type() { return &A2BUS_Q68; }

protected:
	virtual void device_add_mconfig(machine_config &config) override;

private:
	void m68008_mem(address_map &map);
};

#endif // MAME_BUS_A2BUS_Q68_H