summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/ti99/internal/evpcconn.h
blob: 9f1af61ccf99aa4ab65d2f9e7b867bd786b9a667 (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
// license:LGPL-2.1+
// copyright-holders:Michael Zapf
/****************************************************************************

    Connector from EVPC
    For details see evpcconn.cpp

****************************************************************************/
#ifndef MAME_BUS_TI99_INTERNAL_EVPCCONN_H
#define MAME_BUS_TI99_INTERNAL_EVPCCONN_H

#pragma once

#include "emu.h"
#include "bus/ti99/ti99defs.h"

namespace bus { namespace ti99 { namespace internal {

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

	template<class Object> devcb_base &set_vdpint_callback(Object &&cb) { return m_vdpint.set_callback(std::forward<Object>(cb)); }

	DECLARE_WRITE_LINE_MEMBER( vclock_line );
	void device_start() override;

private:
	// VDPINT line to the CPU
	devcb_write_line m_vdpint;
};

} } } // end namespace bus::ti99::internal

DECLARE_DEVICE_TYPE_NS(TI99_EVPCCONN, bus::ti99::internal, evpc_clock_connector)

#define MCFG_ADD_EVPC_CONNECTOR( _tag, _vdpint ) \
	MCFG_DEVICE_ADD(_tag, TI99_EVPCCONN, 0) \
	devcb = &downcast<bus::ti99::internal::evpc_clock_connector &>(*device).set_vdpint_callback(DEVCB_##_vdpint);

#endif // MAME_BUS_TI99_INTERNAL_EVPCCONN_H