summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/waveblaster/waveblaster.cpp
blob: d947a265e635c4e407e6995eae585e5d97de10db (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
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert

#include "emu.h"
#include "waveblaster.h"

#include "omniwave.h"
#include "db50xg.h"
#include "db60xg.h"
#include "wg130.h"


DEFINE_DEVICE_TYPE(WAVEBLASTER_CONNECTOR, waveblaster_connector, "waveblaster_connector", "Waveblaster extension connector")

waveblaster_connector::waveblaster_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
	device_t(mconfig, WAVEBLASTER_CONNECTOR, tag, owner, clock),
	device_single_card_slot_interface<device_waveblaster_interface>(mconfig, *this),
	device_mixer_interface(mconfig, *this),
	m_midi_tx(*this)
{
}

void waveblaster_connector::device_start()
{
}

void waveblaster_connector::midi_rx(int state)
{
	auto card = get_card_device();
	if(card)
		card->midi_rx(state);
}

void waveblaster_intf(device_slot_interface &device)
{
	device.option_add("omniwave", OMNIWAVE);
	device.option_add("db50xg", DB50XG);
	device.option_add("db60xg", DB60XG);
	device.option_add("wg130", WG130);
}

device_waveblaster_interface::device_waveblaster_interface(const machine_config &mconfig, device_t &device) :
	device_interface(device, "waveblaster"),
	m_connector(nullptr)
{
}

device_waveblaster_interface::~device_waveblaster_interface()
{
}

void device_waveblaster_interface::interface_pre_start()
{
	m_connector = downcast<waveblaster_connector *>(device().owner());
}