summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/bbc/1mhzbus/cfa3000opt.cpp
blob: e5ac755e006e26d140b70eb8f689add97307a015 (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
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************

    Henson CFA 3000 Option Board

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


#include "emu.h"
#include "cfa3000opt.h"


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

DEFINE_DEVICE_TYPE(CFA3000_OPT, cfa3000_opt_device, "cfa3000opt", "Henson CFA 3000 Option Board")


//-------------------------------------------------
//  INPUT_PORTS( cfa3000opt )
//-------------------------------------------------

static INPUT_PORTS_START( cfa3000opt )
	PORT_START("OPT")
	PORT_DIPNAME(0x80, 0x00, "Switch 1") PORT_DIPLOCATION("Option:1")
	PORT_DIPSETTING(0x80, "not used")
	PORT_DIPSETTING(0x00, "not used")

	PORT_DIPNAME(0x40, 0x00, "Switch 2") PORT_DIPLOCATION("Option:2")
	PORT_DIPSETTING(0x40, "not used")
	PORT_DIPSETTING(0x00, "not used")

	PORT_DIPNAME(0x20, 0x00, "Switch 3") PORT_DIPLOCATION("Option:3")
	PORT_DIPSETTING(0x20, "Auto Send")
	PORT_DIPSETTING(0x00, "Request Send")

	PORT_DIPNAME(0x10, 0x00, "Switch 4") PORT_DIPLOCATION("Option:4")
	PORT_DIPSETTING(0x10, "repeat >4db")
	PORT_DIPSETTING(0x00, "do not repeat >4db")

	PORT_DIPNAME(0x08, 0x00, "Switch 5") PORT_DIPLOCATION("Option:5")
	PORT_DIPSETTING(0x08, "est. fluct.")
	PORT_DIPSETTING(0x00, "do not est. fluct.")

	PORT_DIPNAME(0x04, 0x00, "Switch 6") PORT_DIPLOCATION("Option:6")
	PORT_DIPSETTING(0x04, "Full Threshold")
	PORT_DIPSETTING(0x00, "Supra Threshold")

	PORT_DIPNAME(0x02, 0x00, "Switch 7") PORT_DIPLOCATION("Option:7")
	PORT_DIPSETTING(0x02, "db")
	PORT_DIPSETTING(0x00, "log units")

	PORT_DIPNAME(0x01, 0x00, "Switch 8") PORT_DIPLOCATION("Option:8")
	PORT_DIPSETTING(0x01, "2nd level")
	PORT_DIPSETTING(0x00, "1st level")
INPUT_PORTS_END


//-------------------------------------------------
//  input_ports - device-specific input ports
//-------------------------------------------------

ioport_constructor cfa3000_opt_device::device_input_ports() const
{
	return INPUT_PORTS_NAME( cfa3000opt );
}



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

//-------------------------------------------------
//  cfa3000_opt_device - constructor
//-------------------------------------------------

cfa3000_opt_device::cfa3000_opt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
	device_t(mconfig, CFA3000_OPT, tag, owner, clock),
	device_bbc_1mhzbus_interface(mconfig, *this),
	m_opt(*this, "OPT")
{
}


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

void cfa3000_opt_device::device_start()
{
}


//**************************************************************************
//  IMPLEMENTATION
//**************************************************************************

uint8_t cfa3000_opt_device::fred_r(offs_t offset)
{
	uint8_t data = 0xff;

	if (offset == 0xc2)
	{
		data = m_opt->read();
	}
	return data;
}