summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/ql/exp.cpp
blob: 89c73d4a08abaf51a954e8fb8242244525c01e48 (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
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************

    Sinclair QL expansion port emulation

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

#include "emu.h"
#include "exp.h"



//**************************************************************************
//  DEVICE DEFINITIONS
//**************************************************************************

DEFINE_DEVICE_TYPE(QL_EXPANSION_SLOT, ql_expansion_slot_device, "ql_expansion_slot", "QL expansion port")



//**************************************************************************
//  DEVICE QL_EXPANSION CARD INTERFACE
//**************************************************************************

//-------------------------------------------------
//  device_ql_expansion_card_interface - constructor
//-------------------------------------------------

device_ql_expansion_card_interface::device_ql_expansion_card_interface(const machine_config &mconfig, device_t &device) :
	device_slot_card_interface(mconfig, device),
	m_romoeh(0)
{
	m_slot = dynamic_cast<ql_expansion_slot_device *>(device.owner());
}



//**************************************************************************
//  LIVE DEVICE
//**************************************************************************

//-------------------------------------------------
//  ql_expansion_slot_device - constructor
//-------------------------------------------------

ql_expansion_slot_device::ql_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
	device_t(mconfig, QL_EXPANSION_SLOT, tag, owner, clock),
	device_slot_interface(mconfig, *this),
	m_write_ipl0l(*this),
	m_write_ipl1l(*this),
	m_write_berrl(*this),
	m_write_extintl(*this), m_card(nullptr)
{
}


//-------------------------------------------------
//  device_start - device-specific startup
//-------------------------------------------------

void ql_expansion_slot_device::device_start()
{
	m_card = dynamic_cast<device_ql_expansion_card_interface *>(get_card_device());

	// resolve callbacks
	m_write_ipl0l.resolve_safe();
	m_write_ipl1l.resolve_safe();
	m_write_berrl.resolve_safe();
	m_write_extintl.resolve_safe();
}


//-------------------------------------------------
//  SLOT_INTERFACE( ql_expansion_cards )
//-------------------------------------------------

// slot devices
#include "cst_qdisc.h"
#include "cst_q_plus4.h"
#include "cumana_fdi.h"
#include "kempston_di.h"
#include "miracle_gold_card.h"
#include "mp_fdi.h"
#include "opd_basic_master.h"
#include "pcml_qdisk.h"
#include "qubide.h"
#include "sandy_superdisk.h"
#include "sandy_superqboard.h"
#include "trumpcard.h"

SLOT_INTERFACE_START( ql_expansion_cards )
	SLOT_INTERFACE("qdisc", CST_QL_DISC_INTERFACE)
	SLOT_INTERFACE("qplus4", CST_Q_PLUS4)
	SLOT_INTERFACE("cumanafdi", CUMANA_FLOPPY_DISK_INTERFACE)
	SLOT_INTERFACE("kdi", KEMPSTON_DISK_INTERFACE)
	SLOT_INTERFACE("mpfdi", MICRO_PERIPHERALS_FLOPPY_DISK_INTERFACE)
	SLOT_INTERFACE("gold", MIRACLE_GOLD_CARD)
	SLOT_INTERFACE("pcmlqdi", PCML_Q_DISK_INTERFACE)
	SLOT_INTERFACE("qubide", QUBIDE)
	SLOT_INTERFACE("sdisk", SANDY_SUPER_DISK)
	SLOT_INTERFACE("sqboard", SANDY_SUPERQBOARD)
	SLOT_INTERFACE("sqboard512k", SANDY_SUPERQBOARD_512K)
	SLOT_INTERFACE("sqmouse", SANDY_SUPERQMOUSE)
	SLOT_INTERFACE("sqmouse512k", SANDY_SUPERQMOUSE_512K)
	SLOT_INTERFACE("opdbasic", OPD_BASIC_MASTER)
	SLOT_INTERFACE("trump", QL_TRUMP_CARD)
	SLOT_INTERFACE("trump256k", QL_TRUMP_CARD_256K)
	SLOT_INTERFACE("trump512k", QL_TRUMP_CARD_512K)
	SLOT_INTERFACE("trump768k", QL_TRUMP_CARD_768K)
SLOT_INTERFACE_END