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
|
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Henson CFA 3000 Analogue
**********************************************************************/
#include "emu.h"
#include "cfa3000a.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
DEFINE_DEVICE_TYPE(CFA3000_ANLG, cfa3000_anlg_device, "cfa3000a", "Henson CFA 3000 Analogue")
//-------------------------------------------------
// INPUT_PORTS( cfa3000a )
//-------------------------------------------------
static INPUT_PORTS_START( cfa3000a )
PORT_START("CHANNEL0")
PORT_BIT(0xff, 0x80, IPT_PADDLE) PORT_NAME("Background Intensity") PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_CENTERDELTA(0)
PORT_START("CHANNEL1")
PORT_BIT(0xff, 0xff, IPT_UNKNOWN)
PORT_START("CHANNEL2")
PORT_BIT(0xff, 0x80, IPT_PADDLE) PORT_NAME("Age") PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_CENTERDELTA(0)
PORT_START("CHANNEL3")
PORT_BIT(0xff, 0xff, IPT_UNKNOWN)
PORT_START("BUTTONS")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN)
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN)
INPUT_PORTS_END
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
ioport_constructor cfa3000_anlg_device::device_input_ports() const
{
return INPUT_PORTS_NAME( cfa3000a );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// cfa3000_anlg_device - constructor
//-------------------------------------------------
cfa3000_anlg_device::cfa3000_anlg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, CFA3000_ANLG, tag, owner, clock),
device_bbc_analogue_interface(mconfig, *this),
m_channel(*this, "CHANNEL%u", 0),
m_buttons(*this, "BUTTONS")
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void cfa3000_anlg_device::device_start()
{
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void cfa3000_anlg_device::device_reset()
{
}
//**************************************************************************
// IMPLEMENTATION
//**************************************************************************
uint8_t cfa3000_anlg_device::ch_r(int channel)
{
return m_channel[channel]->read();
}
uint8_t cfa3000_anlg_device::pb_r()
{
return m_buttons->read() & 0x30;
}
|