summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2020-12-24 10:02:48 -0500
committer AJR <ajrhacker@users.noreply.github.com>2020-12-24 10:02:48 -0500
commitf7585b3cdbf89fb464153fe42f750f5973ffee4d (patch)
tree156ee46cb33e8f14a7b48abc381d82de0371c1d7
parent5bf175cb0599ca0f76621bb6ba5ac6195977e376 (diff)
a2bus: Add (corrected) ROM dumps and emulation of CCS Model 7710 Asynchronous Serial Interface [AJR, Apple II Documentation Project]
-rw-r--r--scripts/src/bus.lua2
-rw-r--r--src/devices/bus/a2bus/ccs7710.cpp155
-rw-r--r--src/devices/bus/a2bus/ccs7710.h55
-rw-r--r--src/mame/drivers/apple2.cpp2
-rw-r--r--src/mame/drivers/apple2e.cpp2
-rw-r--r--src/mame/drivers/apple2gs.cpp2
6 files changed, 218 insertions, 0 deletions
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index eee10688f64..47313f4f5ca 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -2395,6 +2395,8 @@ if (BUSES["A2BUS"]~=null) then
MAME_DIR .. "src/devices/bus/a2bus/agat840k_hle.h",
MAME_DIR .. "src/devices/bus/a2bus/byte8251.cpp",
MAME_DIR .. "src/devices/bus/a2bus/byte8251.h",
+ MAME_DIR .. "src/devices/bus/a2bus/ccs7710.cpp",
+ MAME_DIR .. "src/devices/bus/a2bus/ccs7710.h",
MAME_DIR .. "src/devices/bus/a2bus/cmsscsi.cpp",
MAME_DIR .. "src/devices/bus/a2bus/cmsscsi.h",
MAME_DIR .. "src/devices/bus/a2bus/computereyes2.cpp",
diff --git a/src/devices/bus/a2bus/ccs7710.cpp b/src/devices/bus/a2bus/ccs7710.cpp
new file mode 100644
index 00000000000..17f8cdfe80e
--- /dev/null
+++ b/src/devices/bus/a2bus/ccs7710.cpp
@@ -0,0 +1,155 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/*********************************************************************
+
+ California Computer Systems, Inc. Model 7710
+ Asynchronous Serial Interface (ASI-1)
+
+ One unusual feature of this small RS-232-C communications card
+ which is not relevant for emulation is that the DP8304B bus
+ buffer and program ROMs are powered down when they are not being
+ accessed. Another unemulated feature is a suggested modification
+ to replace the two 256×4 program ROMs with like-sized 2112 RAMs
+ (the R/W bus signal is enabled to these with a jumper connection)
+ so that custom firmware can be uploaded instead.
+
+ The 7710-02 terminal firmware is incompatible with the Apple IIe
+ due to the use of a II+-specific monitor location. One recommended
+ way to work around this problem was to load the II+ monitor into
+ the IIe's language card. The incompatibility was corrected in
+ 7710-03, and the 7710-03 ROMs were the only ones delivered after
+ July 1983.
+
+**********************************************************************/
+
+#include "emu.h"
+#include "ccs7710.h"
+
+#include "bus/rs232/rs232.h"
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+// device type definition
+DEFINE_DEVICE_TYPE(A2BUS_CCS7710, ccs7710_device, "ccs7710", "CCS Model 7710 Asynchronous Serial Interface")
+
+//**************************************************************************
+// DEVICE IMPLEMENTATION
+//**************************************************************************
+
+ccs7710_device::ccs7710_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, A2BUS_CCS7710, tag, owner, clock)
+ , device_a2bus_card_interface(mconfig, *this)
+ , m_acia(*this, "acia")
+ , m_brg(*this, "brg")
+ , m_firmware(*this, "firmware")
+ , m_baud_select(*this, "BAUD")
+ , m_external_clock(false)
+{
+}
+
+void ccs7710_device::device_start()
+{
+ save_item(NAME(m_external_clock));
+}
+
+u8 ccs7710_device::read_c0nx(u8 offset)
+{
+ return m_acia->read(offset & 1);
+}
+
+void ccs7710_device::write_c0nx(u8 offset, u8 data)
+{
+ m_acia->write(offset & 1, data);
+}
+
+u8 ccs7710_device::read_cnxx(u8 offset)
+{
+ return m_firmware[offset];
+}
+
+WRITE_LINE_MEMBER(ccs7710_device::acia_irq_w)
+{
+ if (state == ASSERT_LINE)
+ raise_slot_irq();
+ else
+ lower_slot_irq();
+}
+
+WRITE_LINE_MEMBER(ccs7710_device::external_clock_w)
+{
+ m_external_clock = state;
+ if (!BIT(m_baud_select->read(), 0))
+ m_brg->im_w(state);
+}
+
+u8 ccs7710_device::baud_select_r(offs_t offset)
+{
+ u8 baud = m_baud_select->read();
+ m_brg->im_w(BIT(baud, 0) ? !BIT(offset, 2) : m_external_clock);
+ return baud;
+}
+
+static INPUT_PORTS_START(ccs7710)
+ PORT_START("BAUD")
+ PORT_DIPNAME(0xf, 0x8, "Baud Rate") PORT_DIPLOCATION("S1:1,2,3,4")
+ PORT_DIPSETTING(0x0, "External")
+ PORT_DIPSETTING(0x2, "50")
+ PORT_DIPSETTING(0x3, "75")
+ PORT_DIPSETTING(0xf, "110")
+ PORT_DIPSETTING(0x4, "134.5")
+ PORT_DIPSETTING(0xe, "150")
+ PORT_DIPSETTING(0x5, "200")
+ PORT_DIPSETTING(0xd, "300")
+ PORT_DIPSETTING(0x6, "600")
+ PORT_DIPSETTING(0xb, "1200")
+ PORT_DIPSETTING(0xa, "1800")
+ PORT_DIPSETTING(0x7, "2400")
+ PORT_DIPSETTING(0x9, "4800")
+ PORT_DIPSETTING(0x8, "9600")
+ PORT_DIPSETTING(0x1, "19200")
+INPUT_PORTS_END
+
+ioport_constructor ccs7710_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME(ccs7710);
+}
+
+void ccs7710_device::device_add_mconfig(machine_config &config)
+{
+ ACIA6850(config, m_acia);
+ m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts));
+ m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd));
+ m_acia->irq_handler().set(FUNC(ccs7710_device::acia_irq_w));
+
+ F4702(config, m_brg, 2.4576_MHz_XTAL);
+ m_brg->s_callback().set(FUNC(ccs7710_device::baud_select_r));
+ m_brg->z_callback().set(m_acia, FUNC(acia6850_device::write_rxc));
+ m_brg->z_callback().append(m_acia, FUNC(acia6850_device::write_txc));
+
+ rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr));
+ rs232.rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd));
+ rs232.cts_handler().set(m_acia, FUNC(acia6850_device::write_cts));
+ rs232.dcd_handler().set(m_acia, FUNC(acia6850_device::write_dcd));
+ rs232.txc_handler().set(FUNC(ccs7710_device::external_clock_w));
+}
+
+ROM_START(ccs7710)
+ ROM_REGION(0x100, "firmware", 0)
+ ROM_DEFAULT_BIOS("7710-03")
+ ROM_SYSTEM_BIOS(0, "7710-01", "CCS 7710-01")
+ ROMX_LOAD("7710-01h.u5", 0x000, 0x100, CRC(4f4b1023) SHA1(4f96f9cbbad383c259d4a3f8762263d01532c735), ROM_BIOS(0) | ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI)
+ ROMX_LOAD("7710-01l.u6", 0x000, 0x100, CRC(1dab7113) SHA1(c9c7b8b73db90fa008c8779b1d75ac265ec6ca2f), ROM_BIOS(0) | ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO)
+ ROM_SYSTEM_BIOS(1, "7710-02", "CCS 7710-02")
+ ROMX_LOAD("7710-02h.u5", 0x000, 0x100, CRC(46ded0cc) SHA1(62a087e3a1790a9910561d84001acaa9ec804194), ROM_BIOS(1) | ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI)
+ ROMX_LOAD("7710-02l.u6", 0x000, 0x100, CRC(d4922d69) SHA1(a651dbd3faba9476aff382952266188f3cb05f16), ROM_BIOS(1) | ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO)
+ ROM_SYSTEM_BIOS(2, "7710-03", "CCS 7710-03")
+ ROMX_LOAD("7710-03h.u5", 0x000, 0x100, CRC(a2cdb6bd) SHA1(6ecfb6b145256d4787a943da8ef267303df562d6), ROM_BIOS(2) | ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI)
+ ROMX_LOAD("7710-03l.u6", 0x000, 0x100, CRC(18e3983f) SHA1(d0df2aaf0134f8c1b929a4de0036fedc7e7164e2), ROM_BIOS(2) | ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO)
+ROM_END
+
+const tiny_rom_entry *ccs7710_device::device_rom_region() const
+{
+ return ROM_NAME(ccs7710);
+}
diff --git a/src/devices/bus/a2bus/ccs7710.h b/src/devices/bus/a2bus/ccs7710.h
new file mode 100644
index 00000000000..3c65b9b783f
--- /dev/null
+++ b/src/devices/bus/a2bus/ccs7710.h
@@ -0,0 +1,55 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/*********************************************************************
+
+ CCS Model 7710 Asynchronous Serial Interface
+
+*********************************************************************/
+
+#ifndef MAME_BUS_A2BUS_CCS7710_H
+#define MAME_BUS_A2BUS_CCS7710_H
+
+#pragma once
+
+#include "a2bus.h"
+#include "machine/6850acia.h"
+#include "machine/f4702.h"
+
+class ccs7710_device : public device_t, public device_a2bus_card_interface
+{
+public:
+ // device type constructor
+ ccs7710_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual ioport_constructor device_input_ports() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+
+ // device_a2bus_card_interface overrides
+ virtual u8 read_c0nx(u8 offset) override;
+ virtual void write_c0nx(u8 offset, u8 data) override;
+ virtual u8 read_cnxx(u8 offset) override;
+
+private:
+ // miscellaneous handlers
+ DECLARE_WRITE_LINE_MEMBER(acia_irq_w);
+ DECLARE_WRITE_LINE_MEMBER(external_clock_w);
+ u8 baud_select_r(offs_t offset);
+
+ // object finders
+ required_device<acia6850_device> m_acia;
+ required_device<f4702_device> m_brg;
+ required_region_ptr<u8> m_firmware;
+ required_ioport m_baud_select;
+
+ // internal state
+ bool m_external_clock;
+};
+
+// device type declaration
+DECLARE_DEVICE_TYPE(A2BUS_CCS7710, ccs7710_device)
+
+#endif // MAME_BUS_A2BUS_CCS7710_H
diff --git a/src/mame/drivers/apple2.cpp b/src/mame/drivers/apple2.cpp
index 5f9fae409a6..6de9310a98f 100644
--- a/src/mame/drivers/apple2.cpp
+++ b/src/mame/drivers/apple2.cpp
@@ -83,6 +83,7 @@ II Plus: RAM options reduced to 16/32/48 KB.
#include "bus/a2bus/a2zipdrive.h"
#include "bus/a2bus/byte8251.h"
#include "bus/a2bus/computereyes2.h"
+#include "bus/a2bus/ccs7710.h"
#include "bus/a2bus/ezcgi.h"
#include "bus/a2bus/grapplerplus.h"
#include "bus/a2bus/laser128.h"
@@ -1330,6 +1331,7 @@ static void apple2_cards(device_slot_interface &device)
device.option_add("byte8251", A2BUS_BYTE8251); /* BYTE Magazine 8251 serial card */
device.option_add("suprterm", A2BUS_SUPRTERMINAL); /* M&R Enterprises SUP'R'TERMINAL 80-column card */
device.option_add("uniprint", A2BUS_UNIPRINT); /* Videx Uniprint parallel printer card */
+ device.option_add("ccs7710", A2BUS_CCS7710); /* California Computer Systems Model 7710 Asynchronous Serial Interface */
}
void apple2_state::apple2_common(machine_config &config)
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index 425a2380ba7..49cb03a14af 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -168,6 +168,7 @@ MIG RAM page 2 $CE02 is the speaker/slot bitfield and $CE03 is the paddle/accele
#include "bus/a2bus/byte8251.h"
#include "bus/a2bus/cmsscsi.h"
#include "bus/a2bus/computereyes2.h"
+#include "bus/a2bus/ccs7710.h"
#include "bus/a2bus/ezcgi.h"
#include "bus/a2bus/grapplerplus.h"
#include "bus/a2bus/laser128.h"
@@ -4562,6 +4563,7 @@ static void apple2_cards(device_slot_interface &device)
device.option_add("sider2", A2BUS_SIDER2); /* Advanced Tech Systems / First Class Peripherals Sider 2 SASI card */
device.option_add("sider1", A2BUS_SIDER1); /* Advanced Tech Systems / First Class Peripherals Sider 1 SASI card */
device.option_add("uniprint", A2BUS_UNIPRINT); /* Videx Uniprint parallel printer card */
+ device.option_add("ccs7710", A2BUS_CCS7710); /* California Computer Systems Model 7710 Asynchronous Serial Interface */
}
static void apple2eaux_cards(device_slot_interface &device)
diff --git a/src/mame/drivers/apple2gs.cpp b/src/mame/drivers/apple2gs.cpp
index 234d930b5a2..8315e931335 100644
--- a/src/mame/drivers/apple2gs.cpp
+++ b/src/mame/drivers/apple2gs.cpp
@@ -112,6 +112,7 @@
#include "bus/a2bus/a2vulcan.h"
#include "bus/a2bus/a2zipdrive.h"
#include "bus/a2bus/byte8251.h"
+#include "bus/a2bus/ccs7710.h"
#include "bus/a2bus/cmsscsi.h"
#include "bus/a2bus/ezcgi.h"
#include "bus/a2bus/grapplerplus.h"
@@ -4765,6 +4766,7 @@ static void apple2_cards(device_slot_interface &device)
device.option_add("sider2", A2BUS_SIDER2); /* Advanced Tech Systems / First Class Peripherals Sider 2 SASI card */
device.option_add("sider1", A2BUS_SIDER1); /* Advanced Tech Systems / First Class Peripherals Sider 1 SASI card */
device.option_add("uniprint", A2BUS_UNIPRINT); /* Videx Uniprint parallel printer card */
+ device.option_add("ccs7710", A2BUS_CCS7710); /* California Computer Systems Model 7710 Asynchronous Serial Interface */
}
void apple2gs_state::apple2gs(machine_config &config)