summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/a2bus/uthernet.cpp
blob: 734edadcf1a2a67eff04eff8921f221f730d197d (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
// license:BSD-3-Clause
// copyright-holders:R. Belmont
/*********************************************************************

    uthernet.cpp

    Apple II Uthernet Card

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

#include "emu.h"
#include "uthernet.h"

/***************************************************************************
    PARAMETERS
***************************************************************************/

//**************************************************************************
//  GLOBAL VARIABLES
//**************************************************************************

DEFINE_DEVICE_TYPE(A2BUS_UTHERNET, a2bus_uthernet_device, "a2uthernet", "Uthernet")

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

a2bus_uthernet_device::a2bus_uthernet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
		a2bus_uthernet_device(mconfig, A2BUS_UTHERNET, tag, owner, clock)
{
}

a2bus_uthernet_device::a2bus_uthernet_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
		device_t(mconfig, type, tag, owner, clock),
		device_a2bus_card_interface(mconfig, *this),
		m_netinf(*this, "cs8900a")
{
}

void a2bus_uthernet_device::device_add_mconfig(machine_config &config)
{
	CS8900A(config, m_netinf, 20_MHz_XTAL); // see CS8900A data sheet sec 3.13
}

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

void a2bus_uthernet_device::device_start()
{
}

void a2bus_uthernet_device::device_reset()
{
}

/*-------------------------------------------------
    read_c0nx - called for reads from this card's c0nx space
-------------------------------------------------*/

uint8_t a2bus_uthernet_device::read_c0nx(uint8_t offset)
{
	return m_netinf->read(offset);
}

/*-------------------------------------------------
    write_c0nx - called for writes to this card's c0nx space
-------------------------------------------------*/

void a2bus_uthernet_device::write_c0nx(uint8_t offset, uint8_t data)
{
	m_netinf->write(offset,data);
}