From 66f4e8d40be816d2073c69514e16009932df397d Mon Sep 17 00:00:00 2001 From: Nigel Barnes Date: Sun, 11 Dec 2022 22:35:32 +0000 Subject: bus/archimedes/podule: Added SCSI Interface podules (not working). - Acorn A500 SCSI Interface - Acorn AKA31 SCSI Expansion Card - Acorn AKA32 CDFS & SCSI Expansion Card - Cumana 16bit SCSI Interface - Lingenuity SCSI Podule - Morley Electronics 16bit Cached SCSI card - Oak Solutions 16 bit SCSI Interface --- scripts/src/bus.lua | 12 + src/devices/bus/archimedes/podule/scsi_a500.cpp | 130 +++++++++++ src/devices/bus/archimedes/podule/scsi_a500.h | 19 ++ src/devices/bus/archimedes/podule/scsi_acorn.cpp | 253 +++++++++++++++++++++ src/devices/bus/archimedes/podule/scsi_acorn.h | 21 ++ src/devices/bus/archimedes/podule/scsi_cumana.cpp | 153 +++++++++++++ src/devices/bus/archimedes/podule/scsi_cumana.h | 19 ++ src/devices/bus/archimedes/podule/scsi_ling.cpp | 149 ++++++++++++ src/devices/bus/archimedes/podule/scsi_ling.h | 19 ++ src/devices/bus/archimedes/podule/scsi_morley.cpp | 169 ++++++++++++++ src/devices/bus/archimedes/podule/scsi_morley.h | 19 ++ src/devices/bus/archimedes/podule/scsi_oak.cpp | 263 ++++++++++++++++++++++ src/devices/bus/archimedes/podule/scsi_oak.h | 19 ++ src/devices/bus/archimedes/podule/slot.cpp | 26 ++- 14 files changed, 1260 insertions(+), 11 deletions(-) create mode 100644 src/devices/bus/archimedes/podule/scsi_a500.cpp create mode 100644 src/devices/bus/archimedes/podule/scsi_a500.h create mode 100644 src/devices/bus/archimedes/podule/scsi_acorn.cpp create mode 100644 src/devices/bus/archimedes/podule/scsi_acorn.h create mode 100644 src/devices/bus/archimedes/podule/scsi_cumana.cpp create mode 100644 src/devices/bus/archimedes/podule/scsi_cumana.h create mode 100644 src/devices/bus/archimedes/podule/scsi_ling.cpp create mode 100644 src/devices/bus/archimedes/podule/scsi_ling.h create mode 100644 src/devices/bus/archimedes/podule/scsi_morley.cpp create mode 100644 src/devices/bus/archimedes/podule/scsi_morley.h create mode 100644 src/devices/bus/archimedes/podule/scsi_oak.cpp create mode 100644 src/devices/bus/archimedes/podule/scsi_oak.h diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index 222e88400ee..6691b466f88 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -400,6 +400,18 @@ if (BUSES["ARCHIMEDES_PODULE"]~=null) then MAME_DIR .. "src/devices/bus/archimedes/podule/scan256.h", MAME_DIR .. "src/devices/bus/archimedes/podule/scanlight.cpp", MAME_DIR .. "src/devices/bus/archimedes/podule/scanlight.h", + MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_a500.cpp", + MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_a500.h", + MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_acorn.cpp", + MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_acorn.h", + MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_cumana.cpp", + MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_cumana.h", + MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_ling.cpp", + MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_ling.h", + MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_morley.cpp", + MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_morley.h", + MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_oak.cpp", + MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_oak.h", MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_vti.cpp", MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_vti.h", MAME_DIR .. "src/devices/bus/archimedes/podule/serial.cpp", diff --git a/src/devices/bus/archimedes/podule/scsi_a500.cpp b/src/devices/bus/archimedes/podule/scsi_a500.cpp new file mode 100644 index 00000000000..0efcd568c8a --- /dev/null +++ b/src/devices/bus/archimedes/podule/scsi_a500.cpp @@ -0,0 +1,130 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Acorn A500 SCSI Interface + + https://www.domesday86.com/?page_id=936#Prototype_SCSI_card + + As this podule contains no identification in ROM then the SCSI modules + loaded from hard drive would expect to find the SCSI controller in + podule slot 1. + + TODO: + - map SCSI controller + +**********************************************************************/ + +#include "emu.h" +#include "scsi_a500.h" +#include "machine/wd33c9x.h" +#include "bus/nscsi/devices.h" + + +namespace { + +class arc_scsi_a500_device : + public device_t, + public device_archimedes_podule_interface +{ +public: + // construction/destruction + arc_scsi_a500_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + static constexpr feature_type unemulated_features() { return feature::DISK; } + +protected: + // device-level overrides + virtual void device_start() override; + + // optional information overrides + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + + // device_archimedes_podule_interface overrides + virtual void ioc_map(address_map &map) override; + +private: + required_device m_wd33c93; + required_memory_region m_podule_rom; +}; + + +void arc_scsi_a500_device::ioc_map(address_map &map) +{ + map(0x0000, 0x1fff).lr8(NAME([this](offs_t offset) { return m_podule_rom->base()[offset]; })).umask32(0x000000ff); + //map(0x2000, 0x2007).rw(m_wd33c93, FUNC(wd33c93_device::indir_r), FUNC(wd33c93_device::indir_w)).umask32(0x000000ff); +} + + +//------------------------------------------------- +// ROM( scsi_a500 ) +//------------------------------------------------- + +ROM_START( scsi_a500 ) + ROM_REGION(0x2000, "podule_rom", ROMREGION_ERASEFF) + ROM_LOAD("blank.rom", 0x0000, 0x2000, NO_DUMP) // ROM is labelled 'blank' and contains FF's +ROM_END + +const tiny_rom_entry *arc_scsi_a500_device::device_rom_region() const +{ + return ROM_NAME( scsi_a500 ); +} + + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void arc_scsi_a500_device::device_add_mconfig(machine_config &config) +{ + NSCSI_BUS(config, "scsi"); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr, false); // Philips VP415 + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:7").option_set("wd33c93", WD33C93).clock(DERIVED_CLOCK(1, 1)) + .machine_config([this](device_t *device) + { + wd33c93_device &wd33c93(downcast(*device)); + wd33c93.irq_cb().set([this](int state) { set_pirq(state); }); + }); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// arc_scsi_a500_device - constructor +//------------------------------------------------- + +arc_scsi_a500_device::arc_scsi_a500_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, ARC_SCSI_A500, tag, owner, clock) + , device_archimedes_podule_interface(mconfig, *this) + , m_wd33c93(*this, "scsi:7:wd33c93") + , m_podule_rom(*this, "podule_rom") +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void arc_scsi_a500_device::device_start() +{ +} + +} // anonymous namespace + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(ARC_SCSI_A500, device_archimedes_podule_interface, arc_scsi_a500_device, "arc_scsi_a500", "Acorn A500 SCSI Interface") diff --git a/src/devices/bus/archimedes/podule/scsi_a500.h b/src/devices/bus/archimedes/podule/scsi_a500.h new file mode 100644 index 00000000000..650f71c43a6 --- /dev/null +++ b/src/devices/bus/archimedes/podule/scsi_a500.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Acorn A500 SCSI Interface + +**********************************************************************/ + +#ifndef MAME_BUS_ARCHIMEDES_PODULE_SCSI_A500_H +#define MAME_BUS_ARCHIMEDES_PODULE_SCSI_A500_H + +#pragma once + +#include "slot.h" + +// device type definition +DECLARE_DEVICE_TYPE(ARC_SCSI_A500, device_archimedes_podule_interface) + +#endif // MAME_BUS_ARCHIMEDES_PODULE_SCSI_A500_H diff --git a/src/devices/bus/archimedes/podule/scsi_acorn.cpp b/src/devices/bus/archimedes/podule/scsi_acorn.cpp new file mode 100644 index 00000000000..fc6b45581c1 --- /dev/null +++ b/src/devices/bus/archimedes/podule/scsi_acorn.cpp @@ -0,0 +1,253 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Acorn AKA31 SCSI Expansion Card + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/Acorn_AKA31_SCSI.html + + Acorn AKA32 CDFS & SCSI Expansion Card + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/Acorn_AKA32_SCSI.html + + TODO: + - everything, this is skeleton with ROM. + +**********************************************************************/ + +#include "emu.h" +#include "scsi_acorn.h" +#include "machine/upd71071.h" +#include "machine/wd33c9x.h" +#include "bus/nscsi/devices.h" + + +namespace { + +// ======================> arc_scsi_aka31_device + +class arc_scsi_aka31_device : + public device_t, + public device_archimedes_podule_interface +{ +public: + // construction/destruction + arc_scsi_aka31_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + static constexpr feature_type unemulated_features() { return feature::DISK; } + +protected: + arc_scsi_aka31_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + // optional information overrides + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + + // device_archimedes_podule_interface overrides + virtual void ioc_map(address_map &map) override; + virtual void memc_map(address_map &map) override; + +private: + required_device m_wd33c93; + required_device m_dmac; + required_memory_region m_podule_rom; + + void update_interrupts(); + + u8 m_memory_page; + u8 m_interrupt_status; + int m_sbic_int; + int m_dmac_int; + std::unique_ptr m_podule_ram; +}; + + +// ======================> arc_scsi_aka32_device + +class arc_scsi_aka32_device : public arc_scsi_aka31_device +{ +public: + // construction/destruction + arc_scsi_aka32_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // optional information overrides + virtual const tiny_rom_entry *device_rom_region() const override; +}; + + +void arc_scsi_aka31_device::ioc_map(address_map &map) +{ + map(0x0000, 0x1fff).lr8(NAME([this](offs_t offset) { return m_podule_rom->base()[offset | (((m_memory_page & 0x3f) << 11) & 0xf800)]; })).umask32(0x000000ff); + map(0x2000, 0x2fff).lrw8([this]() { return m_interrupt_status; }, "isr_r", [this](u8 data) { m_dmac_int = 0; update_interrupts(); }, "clrint_w").umask32(0x000000ff); + map(0x3000, 0x3000).mirror(0x0fff).lw8(NAME([this](u8 data) { m_memory_page = data; m_wd33c93->reset_w(BIT(data, 7)); update_interrupts(); })); +} + +void arc_scsi_aka31_device::memc_map(address_map &map) +{ + map(0x0000, 0x1fff).lr16(NAME([this](offs_t offset) { return m_podule_ram[offset | (((m_memory_page & 0x3f) << 11) & 0xf800)]; })).umask32(0x0000ffff); + map(0x2000, 0x2007).mirror(0x0ff8).rw(m_wd33c93, FUNC(wd33c93a_device::indir_r), FUNC(wd33c93a_device::indir_w)).umask32(0x000000ff); + map(0x3000, 0x33ff).mirror(0x0c00).lr8(NAME([this](offs_t offset) { return m_dmac->read(bitswap<8>(offset, 0, 6, 5, 4, 3, 2, 1, 7)); })).umask32(0x000000ff); + map(0x3000, 0x33ff).mirror(0x0c00).lw8(NAME([this](offs_t offset, u8 data) { m_dmac->write(bitswap<8>(offset, 0, 6, 5, 4, 3, 2, 1, 7), data); })).umask32(0x000000ff); +} + + +//------------------------------------------------- +// ROM( aka31 ) +//------------------------------------------------- + +ROM_START( aka31 ) + ROM_REGION(0x10000, "podule_rom", 0) + ROM_LOAD("aka31_0273,210-03_scsi_id_prom.rom", 0x0000, 0x10000, CRC(d8a51876) SHA1(fedbd8d8dafb225b931c76704ccb93d4ebdaea10)) +ROM_END + +ROM_START( aka32 ) + ROM_REGION(0x10000, "podule_rom", 0) + ROM_SYSTEM_BIOS(0, "aka35", "AKA35") + ROMX_LOAD("aka35.rom", 0x0000, 0x10000, CRC(2d00a646) SHA1(80e7a88d17bdf5d2111e4e2d1b406a1d8692d41b), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "aka33", "AKA33") + ROMX_LOAD("aka33.rom", 0x0000, 0x10000, CRC(f5b4b6b8) SHA1(ab47366e569add39aea0c6e90e92a4dfd16cb898), ROM_BIOS(1)) + ROM_SYSTEM_BIOS(2, "aka32", "AKA32") + ROMX_LOAD("aka32_acorn_cdfs_version_2.20.rom", 0x0000, 0x10000, CRC(65d74620) SHA1(42bddbe2841de7085371c5fe11d7c9b152070886), ROM_BIOS(2)) +ROM_END + +const tiny_rom_entry *arc_scsi_aka31_device::device_rom_region() const +{ + return ROM_NAME( aka31 ); +} + +const tiny_rom_entry *arc_scsi_aka32_device::device_rom_region() const +{ + return ROM_NAME( aka32 ); +} + + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void arc_scsi_aka31_device::device_add_mconfig(machine_config &config) +{ + NSCSI_BUS(config, "scsi"); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, "harddisk", false); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:7").option_set("wd33c93a", WD33C93A).clock(DERIVED_CLOCK(1, 1)) + .machine_config([this](device_t *device) + { + wd33c93a_device &wd33c93(downcast(*device)); + wd33c93.irq_cb().set([this](int state) { m_sbic_int = state; update_interrupts(); }); + wd33c93.drq_cb().set([this](int state) { m_dmac->dmarq(state, 0); }); + }); + + UPD71071(config, m_dmac, 0); + m_dmac->set_cpu_tag(":maincpu"); + m_dmac->set_clock(DERIVED_CLOCK(1, 1)); + m_dmac->out_eop_callback().set([this](int state) { m_dmac_int = state; update_interrupts(); }); + m_dmac->dma_read_callback<0>().set(m_wd33c93, FUNC(wd33c93a_device::dma_r)); + m_dmac->dma_write_callback<0>().set(m_wd33c93, FUNC(wd33c93a_device::dma_w)); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// arc_scsi_aka31_device - constructor +//------------------------------------------------- + +arc_scsi_aka31_device::arc_scsi_aka31_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, type, tag, owner, clock) + , device_archimedes_podule_interface(mconfig, *this) + , m_wd33c93(*this, "scsi:7:wd33c93a") + , m_dmac(*this, "dma") + , m_podule_rom(*this, "podule_rom") + , m_memory_page(0) + , m_interrupt_status(0) + , m_sbic_int(0) + , m_dmac_int(0) +{ +} + +arc_scsi_aka31_device::arc_scsi_aka31_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : arc_scsi_aka31_device(mconfig, ARC_SCSI_AKA31, tag, owner, clock) +{ +} + +arc_scsi_aka32_device::arc_scsi_aka32_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : arc_scsi_aka31_device(mconfig, ARC_SCSI_AKA32, tag, owner, clock) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void arc_scsi_aka31_device::device_start() +{ + m_podule_ram = std::make_unique(0x8000); + + save_item(NAME(m_memory_page)); + save_item(NAME(m_interrupt_status)); + save_pointer(NAME(m_podule_ram), 0x8000); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void arc_scsi_aka31_device::device_reset() +{ + m_memory_page = 0x00; +} + + +//************************************************************************** +// IMPLEMENTATION +//************************************************************************** + +void arc_scsi_aka31_device::update_interrupts() +{ + // SBIC interrupt + if (m_sbic_int) + m_interrupt_status |= m_sbic_int << 3; + else + m_interrupt_status &= ~(m_sbic_int << 3); + + // DMAC terminal count interrupt + if (m_dmac_int) + m_interrupt_status |= m_dmac_int << 1; + else + m_interrupt_status &= ~(m_dmac_int << 1); + + // SEC requesting IRQ + if (m_dmac_int || m_sbic_int) + m_interrupt_status |= 0x01; + else + m_interrupt_status &= ~(0x01); + + if (BIT(m_memory_page, 6)) // interrupts enabled + set_pirq(BIT(m_interrupt_status, 0)); + else + set_pirq(0); +} + +} // anonymous namespace + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(ARC_SCSI_AKA31, device_archimedes_podule_interface, arc_scsi_aka31_device, "arc_scsi_aka31", "Acorn AKA31 SCSI Expansion Card") +DEFINE_DEVICE_TYPE_PRIVATE(ARC_SCSI_AKA32, device_archimedes_podule_interface, arc_scsi_aka32_device, "arc_scsi_aka32", "Acorn AKA32 CDFS & SCSI Expansion Card") diff --git a/src/devices/bus/archimedes/podule/scsi_acorn.h b/src/devices/bus/archimedes/podule/scsi_acorn.h new file mode 100644 index 00000000000..670ee296c3d --- /dev/null +++ b/src/devices/bus/archimedes/podule/scsi_acorn.h @@ -0,0 +1,21 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Acorn CDFS & SCSI Expansion Card + +**********************************************************************/ + +#ifndef MAME_BUS_ARCHIMEDES_PODULE_SCSI_ACORN_H +#define MAME_BUS_ARCHIMEDES_PODULE_SCSI_ACORN_H + +#pragma once + +#include "slot.h" + +// device type definition +DECLARE_DEVICE_TYPE(ARC_SCSI_AKA31, device_archimedes_podule_interface) +DECLARE_DEVICE_TYPE(ARC_SCSI_AKA32, device_archimedes_podule_interface) +DECLARE_DEVICE_TYPE(ARC_SCSI_AKA35, device_archimedes_podule_interface) + +#endif // MAME_BUS_ARCHIMEDES_PODULE_SCSI_ACORN_H diff --git a/src/devices/bus/archimedes/podule/scsi_cumana.cpp b/src/devices/bus/archimedes/podule/scsi_cumana.cpp new file mode 100644 index 00000000000..0fcbe8bb225 --- /dev/null +++ b/src/devices/bus/archimedes/podule/scsi_cumana.cpp @@ -0,0 +1,153 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Cumana 16bit SCSI interface + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/Cumana_16bitSCSI.html + + TODO: + - everything, this is skeleton with ROM. + +**********************************************************************/ + +#include "emu.h" +#include "scsi_cumana.h" +#include "machine/eepromser.h" +#include "machine/ncr5380.h" +#include "bus/nscsi/devices.h" + + +namespace { + +class arc_scsi_cumana_device : + public device_t, + public device_archimedes_podule_interface +{ +public: + // construction/destruction + arc_scsi_cumana_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + static constexpr feature_type unemulated_features() { return feature::DISK; } + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + // optional information overrides + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + + // device_archimedes_podule_interface overrides + virtual void ioc_map(address_map &map) override; + virtual void memc_map(address_map &map) override; + +private: + required_device m_ncr5380; + required_device m_eeprom; + required_memory_region m_podule_rom; + + u8 m_rom_page; +}; + + +void arc_scsi_cumana_device::ioc_map(address_map &map) +{ + map(0x0000, 0x1fff).lr8(NAME([this](offs_t offset) { return m_podule_rom->base()[offset | ((m_rom_page << 11) & 0xf800)]; })).umask32(0x000000ff); + map(0x0000, 0x1fff).lw8(NAME([this](u8 data) { m_rom_page = data; })); + //map(0x2000, 0x201f).mirror(0x0100).rw(m_ncr5380, FUNC(ncr5380_device::read), FUNC(ncr5380_device::write)).umask32(0x000000ff); + map(0x2100, 0x211f).m(m_ncr5380, FUNC(ncr5380_device::map)).umask32(0x000000ff); + //map(0x2100, 0x2100).r(m_ncr5380, FUNC(ncr5380_device::dma_r)); + //map(0x2100, 0x2100).w(m_ncr5380, FUNC(ncr5380_device::dma_w)); +} + +void arc_scsi_cumana_device::memc_map(address_map &map) +{ +} + + +//------------------------------------------------- +// ROM( scsi_cumana ) +//------------------------------------------------- + +ROM_START( scsi_cumana ) + ROM_REGION(0x10000, "podule_rom", 0) + ROM_LOAD("cumana_930c.rom", 0x0000, 0x10000, CRC(d121025d) SHA1(293b1dabd02cfa34251116d95dd19e8b58d0f0a5)) +ROM_END + +const tiny_rom_entry *arc_scsi_cumana_device::device_rom_region() const +{ + return ROM_NAME( scsi_cumana ); +} + + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void arc_scsi_cumana_device::device_add_mconfig(machine_config &config) +{ + NSCSI_BUS(config, "scsi"); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, "harddisk", false); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr5380", NCR5380) // DP8490 + .machine_config([this](device_t *device) + { + downcast(*device).irq_handler().set([this](int state) { set_pirq(state); }); + }); + + EEPROM_93C06_16BIT(config, m_eeprom); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// arc_scsi_cumana_device - constructor +//------------------------------------------------- + +arc_scsi_cumana_device::arc_scsi_cumana_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, ARC_SCSI_CUMANA, tag, owner, clock) + , device_archimedes_podule_interface(mconfig, *this) + , m_ncr5380(*this, "scsi:7:ncr5380") + , m_eeprom(*this, "eeprom") + , m_podule_rom(*this, "podule_rom") + , m_rom_page(0) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void arc_scsi_cumana_device::device_start() +{ + save_item(NAME(m_rom_page)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void arc_scsi_cumana_device::device_reset() +{ + m_rom_page = 0x00; +} + +} // anonymous namespace + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(ARC_SCSI_CUMANA, device_archimedes_podule_interface, arc_scsi_cumana_device, "arc_scsi_cumana", "Cumana 16bit SCSI Interface") diff --git a/src/devices/bus/archimedes/podule/scsi_cumana.h b/src/devices/bus/archimedes/podule/scsi_cumana.h new file mode 100644 index 00000000000..ab0d6ac00da --- /dev/null +++ b/src/devices/bus/archimedes/podule/scsi_cumana.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Cumana 16bit SCSI interface + +**********************************************************************/ + +#ifndef MAME_BUS_ARCHIMEDES_PODULE_SCSI_CUMANA_H +#define MAME_BUS_ARCHIMEDES_PODULE_SCSI_CUMANA_H + +#pragma once + +#include "slot.h" + +// device type definition +DECLARE_DEVICE_TYPE(ARC_SCSI_CUMANA, device_archimedes_podule_interface) + +#endif // MAME_BUS_ARCHIMEDES_PODULE_SCSI_CUMANA_H diff --git a/src/devices/bus/archimedes/podule/scsi_ling.cpp b/src/devices/bus/archimedes/podule/scsi_ling.cpp new file mode 100644 index 00000000000..ab2cd3fea51 --- /dev/null +++ b/src/devices/bus/archimedes/podule/scsi_ling.cpp @@ -0,0 +1,149 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Lingenuity SCSI Podule + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesH2Z/Lingenuity_SCSI.html + + TODO: + - everything, this is skeleton with ROM. + +**********************************************************************/ + +#include "emu.h" +#include "scsi_ling.h" +#include "machine/ncr5380.h" +#include "bus/nscsi/devices.h" + + +namespace { + +class arc_scsi_ling_device : + public device_t, + public device_archimedes_podule_interface +{ +public: + // construction/destruction + arc_scsi_ling_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + static constexpr feature_type unemulated_features() { return feature::DISK; } + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + // optional information overrides + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + + // device_archimedes_podule_interface overrides + virtual void ioc_map(address_map &map) override; + virtual void memc_map(address_map &map) override; + +private: + required_device m_ncr5380; + required_memory_region m_podule_rom; + + u8 m_rom_page; +}; + + +void arc_scsi_ling_device::ioc_map(address_map &map) +{ + map(0x0000, 0x1fff).lr8(NAME([this](offs_t offset) { return m_podule_rom->base()[offset | ((m_rom_page << 11) & 0xf800)]; })).umask32(0x000000ff); + map(0x3800, 0x3800).lw8(NAME([this](u8 data) { m_rom_page = data; })); +} + +void arc_scsi_ling_device::memc_map(address_map &map) +{ + //map(0x2000, 0x20ff).m(m_ncr5380, FUNC(ncr5380_device::map)).umask32(0x000000ff); + map(0x2000, 0x20ff).lr8(NAME([this](offs_t offset) { logerror("r: offset %02x\n", offset >> 3); return m_ncr5380->read(offset >> 3); })).umask32(0x000000ff); + map(0x2000, 0x20ff).lw8(NAME([this](offs_t offset, u8 data) { logerror("w: offset %02x data %02x\n", offset >> 3, data); m_ncr5380->write(offset >> 3, data); })).umask32(0x000000ff); + map(0x2100, 0x2100).r(m_ncr5380, FUNC(ncr5380_device::dma_r)); + map(0x2100, 0x2100).w(m_ncr5380, FUNC(ncr5380_device::dma_w)); +} + + +//------------------------------------------------- +// ROM( scsi_ling ) +//------------------------------------------------- + +ROM_START( scsi_ling ) + ROM_REGION(0x10000, "podule_rom", 0) + ROM_LOAD("scsi_2.54.rom", 0x0000, 0x10000, CRC(32926220) SHA1(c05ea28f33afa98bd9d18bfe7dafee0a5fe7f2f4)) +ROM_END + +const tiny_rom_entry *arc_scsi_ling_device::device_rom_region() const +{ + return ROM_NAME( scsi_ling ); +} + + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void arc_scsi_ling_device::device_add_mconfig(machine_config &config) +{ + NSCSI_BUS(config, "scsi"); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, "harddisk", false); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr5380", NCR5380) + .machine_config([this](device_t *device) + { + downcast(*device).irq_handler().set([this](int state) { set_pirq(state); }); + }); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// arc_scsi_ling_device - constructor +//------------------------------------------------- + +arc_scsi_ling_device::arc_scsi_ling_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, ARC_SCSI_LING, tag, owner, clock) + , device_archimedes_podule_interface(mconfig, *this) + , m_ncr5380(*this, "scsi:7:ncr5380") + , m_podule_rom(*this, "podule_rom") + , m_rom_page(0) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void arc_scsi_ling_device::device_start() +{ + save_item(NAME(m_rom_page)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void arc_scsi_ling_device::device_reset() +{ + m_rom_page = 0x00; +} + +} // anonymous namespace + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(ARC_SCSI_LING, device_archimedes_podule_interface, arc_scsi_ling_device, "arc_scsi_ling", "Lingenuity SCSI Podule") diff --git a/src/devices/bus/archimedes/podule/scsi_ling.h b/src/devices/bus/archimedes/podule/scsi_ling.h new file mode 100644 index 00000000000..7cf6e2562cc --- /dev/null +++ b/src/devices/bus/archimedes/podule/scsi_ling.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Lingenuity SCSI Podule + +**********************************************************************/ + +#ifndef MAME_BUS_ARCHIMEDES_PODULE_SCSI_LING_H +#define MAME_BUS_ARCHIMEDES_PODULE_SCSI_LING_H + +#pragma once + +#include "slot.h" + +// device type definition +DECLARE_DEVICE_TYPE(ARC_SCSI_LING, device_archimedes_podule_interface) + +#endif // MAME_BUS_ARCHIMEDES_PODULE_SCSI_LING_H diff --git a/src/devices/bus/archimedes/podule/scsi_morley.cpp b/src/devices/bus/archimedes/podule/scsi_morley.cpp new file mode 100644 index 00000000000..8e52766a6f4 --- /dev/null +++ b/src/devices/bus/archimedes/podule/scsi_morley.cpp @@ -0,0 +1,169 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Morley Electronics 16bit Cached SCSI card + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesH2Z/Morley_16bitCachedSCSI.html + + TODO: + - ESP216 SCSI controller + - everything, this is skeleton with ROM. + +**********************************************************************/ + +#include "emu.h" +#include "scsi_morley.h" +#include "machine/7200fifo.h" +#include "machine/ncr5390.h" +#include "bus/nscsi/devices.h" + + +namespace { + +class arc_scsi_morley_device : + public device_t, + public device_archimedes_podule_interface +{ +public: + // construction/destruction + arc_scsi_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + static constexpr feature_type unemulated_features() { return feature::DISK; } + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + // optional information overrides + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + + // device_archimedes_podule_interface overrides + virtual void ioc_map(address_map &map) override; + virtual void memc_map(address_map &map) override; + +private: + required_device m_esp216; + required_device m_fifo_in; + required_device m_fifo_out; + required_memory_region m_podule_rom; + + u8 m_rom_page; +}; + + +void arc_scsi_morley_device::ioc_map(address_map &map) +{ + map(0x0000, 0x0fff).lr8(NAME([this](offs_t offset) { return m_podule_rom->base()[offset | ((m_rom_page << 10) & 0xfc00)]; })).umask32(0x000000ff); + //map(0x3000, 0x3000).lrw8(NAME([this]() { return m_rom_page; }), NAME([this](u8 data) { m_rom_page = data; })); + //map(0x3000, 0x303f).rw(m_esp216, FUNC(ncr53c94_device::read), FUNC(ncr53c94_device::write)).umask32(0x000000ff); +} + +void arc_scsi_morley_device::memc_map(address_map &map) +{ + map(0x0000, 0x0000).lrw8(NAME([this]() { return m_rom_page; }), NAME([this](u8 data) { m_rom_page = data; })); +} + + +//------------------------------------------------- +// ROM( scsi_morley ) +//------------------------------------------------- + +ROM_START( scsi_morley ) + ROM_REGION(0x10000, "podule_rom", ROMREGION_ERASE00) + ROM_SYSTEM_BIOS(0, "119", "V1.19") + ROMX_LOAD("morley_scsi_rom_v1.19.rom", 0x0000, 0x10000, CRC(78e2e0da) SHA1(08d8f6233d5cae8a3a04f29c16c8cf85788dad46), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "117", "V1.17") + ROMX_LOAD("morley_scsi_rom_v1.17.rom", 0x0000, 0x10000, CRC(1397a7b3) SHA1(5b0b7d2bb123db85922b493213c6d60ad4d89020), ROM_BIOS(1)) + ROM_SYSTEM_BIOS(2, "114", "V1.14") + ROMX_LOAD("morley_scsi_rom_v1.14.rom", 0x0000, 0x10000, CRC(c6e15260) SHA1(e2b591484d47d4b4e0edb823f992257f03d32bd6), ROM_BIOS(2)) + ROM_SYSTEM_BIOS(3, "110", "V1.10") + ROMX_LOAD("morley_scsi_rom_v1.10.rom", 0x0000, 0x10000, CRC(a0941679) SHA1(e92902e67d955e8742a7ac92dd86a8f212801dc5), ROM_BIOS(3)) + ROM_SYSTEM_BIOS(4, "108", "V1.08") + ROMX_LOAD("morley_scsi_rom_v1.08.rom", 0x0000, 0x08000, CRC(e8357473) SHA1(9164ef9edc9d2ed6a7a7c9ba6258e02db9b1d2cb), ROM_BIOS(4)) +ROM_END + +const tiny_rom_entry *arc_scsi_morley_device::device_rom_region() const +{ + return ROM_NAME( scsi_morley ); +} + + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void arc_scsi_morley_device::device_add_mconfig(machine_config &config) +{ + NSCSI_BUS(config, "scsi"); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, "harddisk", false); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:7").option_set("esp216", NCR53CF94).clock(24_MHz_XTAL) // ESP216 + .machine_config([this](device_t *device) + { + ncr53c94_device &esp216(downcast(*device)); + esp216.set_busmd(ncr53c94_device::busmd_t::BUSMD_1); + esp216.irq_handler_cb().set([this](int state) { set_pirq(state); }); + //esp216.drq_handler_cb().set([this](int state) { m_drq_status = state; }); + }); + + IDT7201(config, m_fifo_out); + //m_fifo_out->hf_handler().set([this](int state) { set_irq(IRQ_FIFO_OUT, state); }); + IDT7201(config, m_fifo_in); + //m_fifo_in->hf_handler().set([this](int state) { set_irq(IRQ_FIFO_IN, !state); }); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// arc_scsi_morley_device - constructor +//------------------------------------------------- + +arc_scsi_morley_device::arc_scsi_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, ARC_SCSI_MORLEY, tag, owner, clock) + , device_archimedes_podule_interface(mconfig, *this) + , m_esp216(*this, "scsi:7:esp216") + , m_fifo_in(*this, "fifo_in") + , m_fifo_out(*this, "fifo_out") + , m_podule_rom(*this, "podule_rom") + , m_rom_page(0) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void arc_scsi_morley_device::device_start() +{ + save_item(NAME(m_rom_page)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void arc_scsi_morley_device::device_reset() +{ + m_rom_page = 0x00; +} + +} // anonymous namespace + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(ARC_SCSI_MORLEY, device_archimedes_podule_interface, arc_scsi_morley_device, "arc_scsi_morley", "Morley Electronics 16bit Cached SCSI card") diff --git a/src/devices/bus/archimedes/podule/scsi_morley.h b/src/devices/bus/archimedes/podule/scsi_morley.h new file mode 100644 index 00000000000..88375536c4a --- /dev/null +++ b/src/devices/bus/archimedes/podule/scsi_morley.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Morley Electronics 16bit Cached SCSI card + +**********************************************************************/ + +#ifndef MAME_BUS_ARCHIMEDES_PODULE_SCSI_MORLEY_H +#define MAME_BUS_ARCHIMEDES_PODULE_SCSI_MORLEY_H + +#pragma once + +#include "slot.h" + +// device type definition +DECLARE_DEVICE_TYPE(ARC_SCSI_MORLEY, device_archimedes_podule_interface) + +#endif // MAME_BUS_ARCHIMEDES_PODULE_SCSI_MORLEY_H diff --git a/src/devices/bus/archimedes/podule/scsi_oak.cpp b/src/devices/bus/archimedes/podule/scsi_oak.cpp new file mode 100644 index 00000000000..ffce5815993 --- /dev/null +++ b/src/devices/bus/archimedes/podule/scsi_oak.cpp @@ -0,0 +1,263 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Oak Solutions SCSI Interface + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesH2Z/Oak_SCSI.html + + Podule space : + ROM: ROM a0..11 from podule A2..13, + ROM a12..15 come from latch. + A14,15 are inverted to allow any size from 2764 to 512 to be used without + link changes. Data is via D0..7 + + + MEMC space : + All reads/writes set the latch from b8..11 of the address used, + unless b5,6 = 11 (eeprom read) + + Address Address bit + + 2,3,4 : 5380 register select : + + &000 000 SCSI Data read/write + &004 001 Initiator command register + &008 010 Mode register + &00C 011 Target command register + &010 100 SCSI status/select enable + &014 101 Bus & status register /start dma send + &018 110 input data/start dma target receive + &01C 111 reset IRQ/start DMA init receive + + 5,6 : Main address decode : + &000 00 Read/write 5380 + &020 01 Read/write 5380 DMA data (uses DACK instead of CS) + (DMA mode bit determines 8 or 16 bit DMA mode) + &040 10 d8 = byte flag, d9 = irq state, d10 = DRQ state + &060 11 d0 = EEprom data + + &100 8 : EEProm CS + &200 9 : ROM A12, 16 bit DMA enable + &400 10 : ROM A13, DMA mode select (1=write), EEProm data in + &800 11 : ROM !A14, EEProm Clock + &1000 12 : ROM !A15 + + When 16 bit DMA is enabled, and b5,6 = 01, the i/o cycle is stretched until + 2 bytes of data have been transferred from SCSI. There is a hardware timeout + of 125 microseconds. This period can be changed via a link. All other + accesses are fast MEMC cycles (250ns). + + The latch and 5380 are reset after a hardware reset. + +**********************************************************************/ + +#include "emu.h" +#include "scsi_oak.h" +#include "machine/eepromser.h" +#include "machine/ncr5380.h" +#include "bus/nscsi/devices.h" + + +namespace { + +class arc_scsi_oak_device : + public device_t, + public device_archimedes_podule_interface +{ +public: + // construction/destruction + arc_scsi_oak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + static constexpr feature_type unemulated_features() { return feature::DISK; } + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + // optional information overrides + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + + // device_archimedes_podule_interface overrides + virtual void ioc_map(address_map &map) override; + virtual void memc_map(address_map &map) override; + +private: + required_device m_ncr5380; + required_device m_eeprom; + required_memory_region m_podule_rom; + + u8 m_rom_page; + int m_irq_state; + int m_drq_state; +}; + + +void arc_scsi_oak_device::ioc_map(address_map &map) +{ + map(0x0000, 0x3fff).lr8(NAME([this](offs_t offset) { return m_podule_rom->base()[offset | (((m_rom_page ^ 0x0c) << 12) & 0xf000)]; })).umask32(0x000000ff); +} + +void arc_scsi_oak_device::memc_map(address_map &map) +{ + map(0x0000, 0x3fff).lrw16( + NAME([this](offs_t offset) + { + u16 data = 0xffff; + + offset <<= 2; + + if ((offset & 0xe0) != 0x60) + m_rom_page = (offset >> 9) & 0x0f; + + m_eeprom->di_write(BIT(offset, 11)); + m_eeprom->clk_write(BIT(offset, 10)); + m_eeprom->cs_write(BIT(offset, 8)); + + switch (offset & 0xe0) + { + case 0x00: + data = m_ncr5380->read(offset >> 2); + break; + + case 0x20: + data = m_ncr5380->dma_r(); + + if (offset & 0x200) + data |= m_ncr5380->dma_r() << 8; + break; + + case 0x40: + data = 0x0000; + data |= m_irq_state << 9; + data |= m_drq_state << 8; + break; + + case 0x60: + data = m_eeprom->do_read(); + break; + } + + return data; + }), + NAME([this](offs_t offset, u32 data) + { + offset <<= 2; + + if ((offset & 0xe0) != 0x60) + m_rom_page = (offset >> 9) & 0x0f; + + switch (offset & 0xe0) + { + case 0x00: + m_ncr5380->write(offset >> 2, data & 0xff); + break; + + case 0x20: + m_ncr5380->dma_w(data & 0xff); + + if (offset & 0x200) + m_ncr5380->dma_w(data >> 8); + break; + } + })).umask32(0x0000ffff); +} + + +//------------------------------------------------- +// ROM( scsi_oak ) +//------------------------------------------------- + +ROM_START( scsi_oak ) + ROM_REGION(0x10000, "podule_rom", ROMREGION_ERASE00) + ROM_SYSTEM_BIOS(0, "136", "Oak SCSI driver 1.36 (29 Nov 1993)") + ROMX_LOAD("scsi_rom_1.36.rom", 0x0000, 0x10000, CRC(9571ac99) SHA1(bf41e422135ceb8048b04efae10cea32eb4bb864), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "116", "Oak SCSI driver 1.16 (04 Oct 1990)") + ROMX_LOAD("scsi_rom_1.16.rom", 0xc000, 0x04000, CRC(f05c414c) SHA1(de7f6cc27ff09b34b132d7ced5123926005be18d), ROM_BIOS(1)) + ROM_SYSTEM_BIOS(2, "137", "Oak SCSI driver 1.37 (27 Jul 1994)") + ROMX_LOAD("scsi_rom_1.37.rom", 0x0000, 0x10000, CRC(c1e12d48) SHA1(cba365e35aa84d6a9ca98d678fa61fe3a7a7ac3c), ROM_BIOS(2)) + + ROM_REGION16_LE(0x20, "eeprom", ROMREGION_ERASEFF) + ROM_LOAD("93c06n", 0x00, 0x20, CRC(45badabc) SHA1(c102d90e4f5c16fedde1ba4637170a39ed7ab371)) +ROM_END + +const tiny_rom_entry *arc_scsi_oak_device::device_rom_region() const +{ + return ROM_NAME( scsi_oak ); +} + + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void arc_scsi_oak_device::device_add_mconfig(machine_config &config) +{ + NSCSI_BUS(config, "scsi"); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, "harddisk", false); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr5380", NCR5380) + .machine_config([this](device_t *device) + { + downcast(*device).irq_handler().set([this](int state) { m_irq_state = state; }); + downcast(*device).drq_handler().set([this](int state) { m_drq_state = state; }); + }); + + EEPROM_93C06_16BIT(config, m_eeprom); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// arc_scsi_oak_device - constructor +//------------------------------------------------- + +arc_scsi_oak_device::arc_scsi_oak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, ARC_SCSI_OAK, tag, owner, clock) + , device_archimedes_podule_interface(mconfig, *this) + , m_ncr5380(*this, "scsi:7:ncr5380") + , m_eeprom(*this, "eeprom") + , m_podule_rom(*this, "podule_rom") + , m_rom_page(0) + , m_irq_state(0) + , m_drq_state(0) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void arc_scsi_oak_device::device_start() +{ + save_item(NAME(m_rom_page)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void arc_scsi_oak_device::device_reset() +{ + m_rom_page = 0x00; +} + +} // anonymous namespace + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(ARC_SCSI_OAK, device_archimedes_podule_interface, arc_scsi_oak_device, "arc_scsi_oak", "Oak Solutions 16 bit SCSI Interface") diff --git a/src/devices/bus/archimedes/podule/scsi_oak.h b/src/devices/bus/archimedes/podule/scsi_oak.h new file mode 100644 index 00000000000..6d08e1f0a6f --- /dev/null +++ b/src/devices/bus/archimedes/podule/scsi_oak.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Oak Solutions SCSI Interface + +**********************************************************************/ + +#ifndef MAME_BUS_ARCHIMEDES_PODULE_SCSI_OAK_H +#define MAME_BUS_ARCHIMEDES_PODULE_SCSI_OAK_H + +#pragma once + +#include "slot.h" + +// device type definition +DECLARE_DEVICE_TYPE(ARC_SCSI_OAK, device_archimedes_podule_interface) + +#endif // MAME_BUS_ARCHIMEDES_PODULE_SCSI_OAK_H diff --git a/src/devices/bus/archimedes/podule/slot.cpp b/src/devices/bus/archimedes/podule/slot.cpp index 75498df27a9..c40a5e8c3b6 100644 --- a/src/devices/bus/archimedes/podule/slot.cpp +++ b/src/devices/bus/archimedes/podule/slot.cpp @@ -272,6 +272,7 @@ void device_archimedes_podule_interface::interface_post_start() #include "io.h" #include "io_hccs.h" #include "io_morley.h" +//#include "io_oak.h" #include "io_we.h" #include "lark.h" #include "laserd.h" @@ -284,11 +285,12 @@ void device_archimedes_podule_interface::interface_post_start() #include "rs423.h" #include "scan256.h" #include "scanlight.h" -//#include "scsi_a500.h" -//#include "scsi_acorn.h" -//#include "scsi_ling.h" -//#include "scsi_morley.h" -//#include "scsi_oak.h" +#include "scsi_a500.h" +#include "scsi_acorn.h" +#include "scsi_cumana.h" +#include "scsi_ling.h" +#include "scsi_morley.h" +#include "scsi_oak.h" #include "scsi_vti.h" #include "serial.h" #include "spectra.h" @@ -351,12 +353,13 @@ void archimedes_exp_devices(device_slot_interface &device) device.option_add("scanjunior", ARC_SCANJUNIOR); // Computer Concepts ScanLight Junior device.option_add("scanjunior3", ARC_SCANJUNIOR3); // Computer Concepts ScanLight Junior Mk3 device.option_add("scanvideo", ARC_SCANVIDEO); // Computer Concepts ScanLight Video 256 - //device.option_add("scsi_a500", ARC_SCSI_A500); // Acorn A500 SCSI Interface - //device.option_add("scsi_aka31", ARC_SCSI_AKA31); // Acorn AKA31 SCSI Expansion Card - //device.option_add("scsi_aka32", ARC_SCSI_AKA32); // Acorn AKA32 CDFS & SCSI Expansion Card - //device.option_add("scsi_ling", ARC_SCSI_LING); // Lingenuity SCSI Podule - //device.option_add("scsi_morley", ARC_SCSI_MORLEY); // Morley Electronics 16bit Cached SCSI card - //device.option_add("scsi_oak", ARC_SCSI_OAK); // Oak Solutions SCSI Interface + device.option_add("scsi_a500", ARC_SCSI_A500); // Acorn A500 SCSI Interface + device.option_add("scsi_aka31", ARC_SCSI_AKA31); // Acorn AKA31 SCSI Expansion Card + device.option_add("scsi_aka32", ARC_SCSI_AKA32); // Acorn AKA32 CDFS & SCSI Expansion Card + device.option_add("scsi_cumana", ARC_SCSI_CUMANA); // Cumana 16bit SCSI interface + device.option_add("scsi_ling", ARC_SCSI_LING); // Lingenuity SCSI Podule + device.option_add("scsi_morley", ARC_SCSI_MORLEY); // Morley Electronics 16bit Cached SCSI card + device.option_add("scsi_oak", ARC_SCSI_OAK); // Oak Solutions SCSI Interface device.option_add("scsi_vti", ARC_SCSI_VTI); // VTI User Port and SCSI Podule device.option_add("serial", ARC_SERIAL); // Atomwide Serial Expansion Card device.option_add("spectra", ARC_SPECTRA); // Beebug Spectra Colour Scanner @@ -371,6 +374,7 @@ void archimedes_exp_devices(device_slot_interface &device) void archimedes_mini_exp_devices(device_slot_interface &device) { + //device.option_add("a3user_oak", ARC_A3USER_OAK); // Oak Solutions A3000 User/Analogue Port device.option_add("bbcio_aga30", ARC_BBCIO_AGA30); // Acorn AGA30 BBC I/O Podule device.option_add("bbcio_we", ARC_BBCIO_WE); // Watford BBC User I/O Card //device.option_add("disc_a3k6", ARC_DISC_A3K6); // PRES A3K6 Disc Buffer -- cgit v1.2.3