summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/a2bus/uthernet.cpp
diff options
context:
space:
mode:
author Rhett Aultman <roadriverrail@gmail.com>2020-08-30 21:22:32 -0400
committer GitHub <noreply@github.com>2020-08-31 11:22:32 +1000
commit49466dc4ad10d6895a8111c136f8be482e243e95 (patch)
tree4e1410dfc706cc505d6b29d796aabaf32e888b58 /src/devices/bus/a2bus/uthernet.cpp
parent7a93c921fd7fa2ec837f8f70f6afebe0df74284d (diff)
bus/a2bus: Added Uthernet card emulation for Apple IIgs (#7090)
* Ported Cirrus Logic CS8900A Crystal LAN MAC emulation from VICE and hooked it up to Apple II card device. * Adds Ethernet networking support for Apple IIgs.
Diffstat (limited to 'src/devices/bus/a2bus/uthernet.cpp')
-rw-r--r--src/devices/bus/a2bus/uthernet.cpp74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/devices/bus/a2bus/uthernet.cpp b/src/devices/bus/a2bus/uthernet.cpp
new file mode 100644
index 00000000000..734edadcf1a
--- /dev/null
+++ b/src/devices/bus/a2bus/uthernet.cpp
@@ -0,0 +1,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);
+}
+