From a3e1eb3413389efc5554401f3b0efc8032a5e3c2 Mon Sep 17 00:00:00 2001 From: Nigel Barnes Date: Fri, 3 Dec 2021 22:16:15 +0000 Subject: bus/archimedes/podule: Podules for Acorn Archimedes. [Centre for Computing History] - ACE Joy Connect - Beebug Spectra Colour Scanner - Computer Concepts GreyHawk Video Digitiser - Computer Concepts ScanLight Junior MkIII - Morley Electronics Analogue and User Interface - Morley Electronics User/MIDI/Analogue Interface - Watford Electronics 256 Grey-Scale Scanner - Wild Vision MidiMax II --- scripts/src/bus.lua | 8 + src/devices/bus/archimedes/podule/acejoy.cpp | 120 +++++++++++++ src/devices/bus/archimedes/podule/acejoy.h | 19 +++ src/devices/bus/archimedes/podule/greyhawk.cpp | 131 ++++++++++++++ src/devices/bus/archimedes/podule/greyhawk.h | 19 +++ src/devices/bus/archimedes/podule/io_morley.cpp | 217 ++++++++++++++++++++---- src/devices/bus/archimedes/podule/io_morley.h | 4 +- src/devices/bus/archimedes/podule/midimax.cpp | 49 +++++- src/devices/bus/archimedes/podule/midimax.h | 1 + src/devices/bus/archimedes/podule/scan256.cpp | 126 ++++++++++++++ src/devices/bus/archimedes/podule/scan256.h | 19 +++ src/devices/bus/archimedes/podule/scanlight.cpp | 52 +++++- src/devices/bus/archimedes/podule/scanlight.h | 1 + src/devices/bus/archimedes/podule/slot.cpp | 25 ++- src/devices/bus/archimedes/podule/spectra.cpp | 126 ++++++++++++++ src/devices/bus/archimedes/podule/spectra.h | 19 +++ 16 files changed, 892 insertions(+), 44 deletions(-) create mode 100644 src/devices/bus/archimedes/podule/acejoy.cpp create mode 100644 src/devices/bus/archimedes/podule/acejoy.h create mode 100644 src/devices/bus/archimedes/podule/greyhawk.cpp create mode 100644 src/devices/bus/archimedes/podule/greyhawk.h create mode 100644 src/devices/bus/archimedes/podule/scan256.cpp create mode 100644 src/devices/bus/archimedes/podule/scan256.h create mode 100644 src/devices/bus/archimedes/podule/spectra.cpp create mode 100644 src/devices/bus/archimedes/podule/spectra.h diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index f0adaf172fc..17c97974fa9 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -342,6 +342,8 @@ if (BUSES["ARCHIMEDES_PODULE"]~=null) then MAME_DIR .. "src/devices/bus/archimedes/podule/slot.h", MAME_DIR .. "src/devices/bus/archimedes/podule/a448.cpp", MAME_DIR .. "src/devices/bus/archimedes/podule/a448.h", + MAME_DIR .. "src/devices/bus/archimedes/podule/acejoy.cpp", + MAME_DIR .. "src/devices/bus/archimedes/podule/acejoy.h", MAME_DIR .. "src/devices/bus/archimedes/podule/armadeus.cpp", MAME_DIR .. "src/devices/bus/archimedes/podule/armadeus.h", MAME_DIR .. "src/devices/bus/archimedes/podule/eaglem2.cpp", @@ -354,6 +356,8 @@ if (BUSES["ARCHIMEDES_PODULE"]~=null) then MAME_DIR .. "src/devices/bus/archimedes/podule/etherr.h", MAME_DIR .. "src/devices/bus/archimedes/podule/faxpack.cpp", MAME_DIR .. "src/devices/bus/archimedes/podule/faxpack.h", + MAME_DIR .. "src/devices/bus/archimedes/podule/greyhawk.cpp", + MAME_DIR .. "src/devices/bus/archimedes/podule/greyhawk.h", MAME_DIR .. "src/devices/bus/archimedes/podule/ide_be.cpp", MAME_DIR .. "src/devices/bus/archimedes/podule/ide_be.h", MAME_DIR .. "src/devices/bus/archimedes/podule/ide_rdev.cpp", @@ -378,12 +382,16 @@ if (BUSES["ARCHIMEDES_PODULE"]~=null) then MAME_DIR .. "src/devices/bus/archimedes/podule/rom.h", MAME_DIR .. "src/devices/bus/archimedes/podule/rs423.cpp", MAME_DIR .. "src/devices/bus/archimedes/podule/rs423.h", + MAME_DIR .. "src/devices/bus/archimedes/podule/scan256.cpp", + 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_vti.cpp", MAME_DIR .. "src/devices/bus/archimedes/podule/scsi_vti.h", MAME_DIR .. "src/devices/bus/archimedes/podule/serial.cpp", MAME_DIR .. "src/devices/bus/archimedes/podule/serial.h", + MAME_DIR .. "src/devices/bus/archimedes/podule/spectra.cpp", + MAME_DIR .. "src/devices/bus/archimedes/podule/spectra.h", MAME_DIR .. "src/devices/bus/archimedes/podule/tube.cpp", MAME_DIR .. "src/devices/bus/archimedes/podule/tube.h", } diff --git a/src/devices/bus/archimedes/podule/acejoy.cpp b/src/devices/bus/archimedes/podule/acejoy.cpp new file mode 100644 index 00000000000..6cf6f2ef0e1 --- /dev/null +++ b/src/devices/bus/archimedes/podule/acejoy.cpp @@ -0,0 +1,120 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Acorn Computer Enterprises Joy Connect + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/ACE_JoyConnect.html + +**********************************************************************/ + +#include "emu.h" +#include "acejoy.h" + + +namespace { + +class arc_acejoy_device : + public device_t, + public device_archimedes_podule_interface +{ +public: + // construction/destruction + arc_acejoy_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // device-level overrides + virtual void device_start() override { } + + // optional information overrides + virtual const tiny_rom_entry *device_rom_region() const override; + virtual ioport_constructor device_input_ports() const override; + + // device_archimedes_podule_interface overrides + virtual void ioc_map(address_map &map) override + { + map(0x0000, 0x1fff).lr8(NAME([this](offs_t offset) { return m_podule_rom->base()[offset]; })).umask32(0x000000ff); + map(0x2008, 0x200b).portr("JOY0"); + map(0x200c, 0x200f).portr("JOY1"); + } + +private: + required_memory_region m_podule_rom; +}; + + +//------------------------------------------------- +// ROM( acejoy ) +//------------------------------------------------- + +ROM_START( acejoy ) + ROM_REGION(0x1000, "podule_rom", 0) + ROM_LOAD("acejoy.bin", 0x0000, 0x1000, CRC(300c4aa8) SHA1(1addf507844c6590d111765051a43fe571491224)) +ROM_END + +const tiny_rom_entry *arc_acejoy_device::device_rom_region() const +{ + return ROM_NAME( acejoy ); +} + + +//------------------------------------------------- +// INPUT_PORTS( acejoy ) +//------------------------------------------------- + +static INPUT_PORTS_START( acejoy ) + PORT_START("JOY0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_8WAY PORT_PLAYER(1) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_8WAY PORT_PLAYER(1) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_8WAY PORT_PLAYER(1) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_8WAY PORT_PLAYER(1) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(1) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_PLAYER(1) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("JOY1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_8WAY PORT_PLAYER(2) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_8WAY PORT_PLAYER(2) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_8WAY PORT_PLAYER(2) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_8WAY PORT_PLAYER(2) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(2) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_PLAYER(2) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + + +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +ioport_constructor arc_acejoy_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( acejoy ); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// arc_acejoy_device - constructor +//------------------------------------------------- + +arc_acejoy_device::arc_acejoy_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, ARC_ACEJOY, tag, owner, clock) + , device_archimedes_podule_interface(mconfig, *this) + , m_podule_rom(*this, "podule_rom") +{ +} + +} // anonymous namespace + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(ARC_ACEJOY, device_archimedes_podule_interface, arc_acejoy_device, "arc_acejoy", "ACE Joy Connect") diff --git a/src/devices/bus/archimedes/podule/acejoy.h b/src/devices/bus/archimedes/podule/acejoy.h new file mode 100644 index 00000000000..1f822ed8803 --- /dev/null +++ b/src/devices/bus/archimedes/podule/acejoy.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Acorn Computer Enterprises Joy Connect + +**********************************************************************/ + +#ifndef MAME_BUS_ARCHIMEDES_PODULE_ACEJOY_H +#define MAME_BUS_ARCHIMEDES_PODULE_ACEJOY_H + +#pragma once + +#include "slot.h" + +// device type definition +DECLARE_DEVICE_TYPE(ARC_ACEJOY, device_archimedes_podule_interface) + +#endif // MAME_BUS_ARCHIMEDES_PODULE_ACEJOY_H diff --git a/src/devices/bus/archimedes/podule/greyhawk.cpp b/src/devices/bus/archimedes/podule/greyhawk.cpp new file mode 100644 index 00000000000..a2ffe51459b --- /dev/null +++ b/src/devices/bus/archimedes/podule/greyhawk.cpp @@ -0,0 +1,131 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Computer Concepts GreyHawk Video Digitiser + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/CC_GreyHawk.html + + TODO: + - implement frame grabber from video source. + +**********************************************************************/ + +#include "emu.h" +#include "greyhawk.h" +#include "imagedev/avivideo.h" + + +namespace { + +class arc_greyhawk_device : + public device_t, + public device_archimedes_podule_interface +{ +public: + // construction/destruction + arc_greyhawk_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + static constexpr feature_type unemulated_features() { return feature::CAPTURE; } + +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_memory_region m_podule_rom; + required_device m_avivideo; + + u8 m_rom_page; +}; + + +void arc_greyhawk_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(0x2000, 0x2000).lw8(NAME([this](u8 data) { m_rom_page = data; })); +} + +void arc_greyhawk_device::memc_map(address_map &map) +{ +} + + +//------------------------------------------------- +// ROM( greyhawk ) +//------------------------------------------------- + +ROM_START( greyhawk ) + ROM_REGION(0x10000, "podule_rom", 0) + ROM_LOAD("greyhawk.bin", 0x0000, 0x10000, CRC(1ecead90) SHA1(e8d5d271e2c10430ae858d2f4337fc73a0c63d82)) +ROM_END + +const tiny_rom_entry *arc_greyhawk_device::device_rom_region() const +{ + return ROM_NAME( greyhawk ); +} + + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void arc_greyhawk_device::device_add_mconfig(machine_config &config) +{ + IMAGE_AVIVIDEO(config, m_avivideo); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// arc_greyhawk_device - constructor +//------------------------------------------------- + +arc_greyhawk_device::arc_greyhawk_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, ARC_GREYHAWK, tag, owner, clock) + , device_archimedes_podule_interface(mconfig, *this) + , m_podule_rom(*this, "podule_rom") + , m_avivideo(*this, "srcavi") + , m_rom_page(0) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void arc_greyhawk_device::device_start() +{ + save_item(NAME(m_rom_page)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void arc_greyhawk_device::device_reset() +{ + m_rom_page = 0x00; +} + +} // anonymous namespace + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(ARC_GREYHAWK, device_archimedes_podule_interface, arc_greyhawk_device, "arc_greyhawk", "Computer Concepts GreyHawk Video Digitiser") diff --git a/src/devices/bus/archimedes/podule/greyhawk.h b/src/devices/bus/archimedes/podule/greyhawk.h new file mode 100644 index 00000000000..ebff90e440c --- /dev/null +++ b/src/devices/bus/archimedes/podule/greyhawk.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Computer Concepts GreyHawk Video Digitiser + +**********************************************************************/ + +#ifndef MAME_BUS_ARCHIMEDES_PODULE_GREYHAWK_H +#define MAME_BUS_ARCHIMEDES_PODULE_GREYHAWK_H + +#pragma once + +#include "slot.h" + +// device type definition +DECLARE_DEVICE_TYPE(ARC_GREYHAWK, device_archimedes_podule_interface) + +#endif // MAME_BUS_ARCHIMEDES_PODULE_GREYHAWK_H diff --git a/src/devices/bus/archimedes/podule/io_morley.cpp b/src/devices/bus/archimedes/podule/io_morley.cpp index bb5da44d7ad..ad3fae53591 100644 --- a/src/devices/bus/archimedes/podule/io_morley.cpp +++ b/src/devices/bus/archimedes/podule/io_morley.cpp @@ -2,42 +2,89 @@ // copyright-holders:Nigel Barnes /********************************************************************** - Morley Electronics User I2C Analogue mini-podule - - http://chrisacorns.computinghistory.org.uk/32bit_UpgradesH2Z/Morley_UserICAnalogue.html - Acorn AGA30 BBC I/O Podule http://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/Acorn_AGA30_AnalogueUserP.html + Morley Electronics Analogue and User Interface + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesH2Z/Morley_AnalogUIF.html + + Morley Electronics User/MIDI/Analogue Interface + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesH2Z/Morley_UserMIDIAnalogue.html + **********************************************************************/ #include "emu.h" #include "io_morley.h" #include "machine/6522via.h" #include "machine/input_merger.h" +#include "machine/mc68681.h" #include "machine/upd7002.h" #include "bus/bbc/analogue/analogue.h" #include "bus/bbc/userport/userport.h" +#include "bus/midi/midi.h" namespace { -// ======================> arc_bbcio_aga30_device +// ======================> arc_io_morley_device -class arc_bbcio_aga30_device : +class arc_io_morley_device : public device_t, public device_archimedes_podule_interface { - public: - // construction/destruction - arc_bbcio_aga30_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - protected: + arc_io_morley_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; + void add_userport(machine_config &config); + void add_analogue(machine_config &config); + void add_midi(machine_config &config); + + required_memory_region m_podule_rom; + required_device m_irqs; + optional_device m_analog; + + u8 m_rom_page; + + int get_analogue_input(int channel_number); + void upd7002_eoc(int state); +}; + + +// ======================> arc_bbcio_aga30_device + +class arc_bbcio_aga30_device : public arc_io_morley_device +{ +public: + // construction/destruction + arc_bbcio_aga30_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // 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; +}; + + +// ======================> arc_ua_morley_device + +class arc_ua_morley_device : public arc_io_morley_device +{ +public: + // construction/destruction + arc_ua_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: // optional information overrides virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; @@ -45,16 +92,25 @@ protected: // device_archimedes_podule_interface overrides virtual void ioc_map(address_map &map) override; virtual void memc_map(address_map &map) override; +}; -private: - required_memory_region m_podule_rom; - required_device m_irqs; - optional_device m_analog; - u8 m_rom_page; +// ======================> arc_uma_morley_device - int get_analogue_input(int channel_number); - void upd7002_eoc(int state); +class arc_uma_morley_device : public arc_io_morley_device +{ +public: + // construction/destruction + arc_uma_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // 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; }; @@ -70,6 +126,31 @@ void arc_bbcio_aga30_device::memc_map(address_map &map) } +void arc_ua_morley_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) & 0x7800)]; })).umask32(0x000000ff); + map(0x2000, 0x203f).rw("via", FUNC(via6522_device::read), FUNC(via6522_device::write)).umask32(0x000000ff); +} + +void arc_ua_morley_device::memc_map(address_map &map) +{ + map(0x1000, 0x100f).rw("upd7002", FUNC(upd7002_device::read), FUNC(upd7002_device::write)).umask32(0x000000ff); +} + + +void arc_uma_morley_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) & 0x7800)]; })).umask32(0x000000ff); + map(0x2000, 0x203f).rw("via", FUNC(via6522_device::read), FUNC(via6522_device::write)).umask32(0x000000ff); + map(0x3000, 0x301f).rw("uart", FUNC(scn2681_device::read), FUNC(scn2681_device::write)).umask32(0x000000ff); +} + +void arc_uma_morley_device::memc_map(address_map &map) +{ + map(0x1000, 0x100f).rw("upd7002", FUNC(upd7002_device::read), FUNC(upd7002_device::write)).umask32(0x000000ff); +} + + //------------------------------------------------- // ROM( aga30 ) //------------------------------------------------- @@ -80,20 +161,40 @@ ROM_START( aga30 ) ROMX_LOAD("morleyio_v2.01.bin", 0x0000, 0x4000, CRC(b149f631) SHA1(ed8d0caa478f030e11348b23e915897f27dcf153), ROM_BIOS(0)) ROM_END +ROM_START( ua ) + ROM_REGION(0x8000, "podule_rom", 0) + ROM_SYSTEM_BIOS(0, "1", "First release 08-Mar-90") + ROMX_LOAD("morley_ua_16bit_v2.01.bin", 0x0000, 0x8000, CRC(736f8a07) SHA1(423208fb3132400d3582b29481b8f7b7e6cd0c70), ROM_BIOS(0)) +ROM_END + +ROM_START( uma ) + ROM_REGION(0x8000, "podule_rom", 0) + ROM_SYSTEM_BIOS(0, "2", "Second release 03-Jun-93") + ROMX_LOAD("morley_uma_eprom_v1.00.bin", 0x0000, 0x8000, CRC(7474ec1a) SHA1(0db73540fc329b71a977a2be20c66ae2ae39df78), ROM_BIOS(0)) +ROM_END + const tiny_rom_entry *arc_bbcio_aga30_device::device_rom_region() const { return ROM_NAME( aga30 ); } +const tiny_rom_entry *arc_ua_morley_device::device_rom_region() const +{ + return ROM_NAME( ua ); +} + +const tiny_rom_entry *arc_uma_morley_device::device_rom_region() const +{ + return ROM_NAME( uma ); +} + //------------------------------------------------- // device_add_mconfig - add device configuration //------------------------------------------------- -void arc_bbcio_aga30_device::device_add_mconfig(machine_config &config) +void arc_io_morley_device::add_userport(machine_config &config) { - INPUT_MERGER_ANY_HIGH(config, "irqs").output_handler().set([this](int state) { set_pirq(state); }); - via6522_device &via(MOS6522(config, "via", DERIVED_CLOCK(1, 4))); via.irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); via.readpa_handler().set(m_analog, FUNC(bbc_analogue_slot_device::pb_r)).lshift(2); @@ -106,26 +207,67 @@ void arc_bbcio_aga30_device::device_add_mconfig(machine_config &config) bbc_userport_slot_device &userport(BBC_USERPORT_SLOT(config, "userport", bbc_userport_devices, nullptr)); userport.cb1_handler().set("via", FUNC(via6522_device::write_cb1)); userport.cb2_handler().set("via", FUNC(via6522_device::write_cb2)); +} +void arc_io_morley_device::add_analogue(machine_config &config) +{ upd7002_device &upd7002(UPD7002(config, "upd7002", DERIVED_CLOCK(1, 4))); - upd7002.set_get_analogue_callback(FUNC(arc_bbcio_aga30_device::get_analogue_input)); - upd7002.set_eoc_callback(FUNC(arc_bbcio_aga30_device::upd7002_eoc)); + upd7002.set_get_analogue_callback(FUNC(arc_io_morley_device::get_analogue_input)); + upd7002.set_eoc_callback(FUNC(arc_io_morley_device::upd7002_eoc)); BBC_ANALOGUE_SLOT(config, m_analog, bbc_analogue_devices, nullptr); m_analog->lpstb_handler().set("via", FUNC(via6522_device::write_ca1)); } +void arc_io_morley_device::add_midi(machine_config &config) +{ + scn2681_device &uart(SCN2681(config, "uart", DERIVED_CLOCK(1, 4))); + uart.irq_cb().set(m_irqs, FUNC(input_merger_device::in_w<2>)); + uart.a_tx_cb().set("mdout", FUNC(midi_port_device::write_txd)); + uart.a_tx_cb().append("mdthru", FUNC(midi_port_device::write_txd)); + + auto &mdin(MIDI_PORT(config, "mdin")); + midiin_slot(mdin); + mdin.rxd_handler().set("uart", FUNC(scn2681_device::rx_a_w)); + mdin.rxd_handler().append("mdthru", FUNC(midi_port_device::write_txd)); + + midiout_slot(MIDI_PORT(config, "mdthru")); + midiout_slot(MIDI_PORT(config, "mdout")); +} + + +void arc_bbcio_aga30_device::device_add_mconfig(machine_config &config) +{ + INPUT_MERGER_ANY_HIGH(config, "irqs").output_handler().set([this](int state) { set_pirq(state); }); + add_userport(config); + add_analogue(config); +} + +void arc_ua_morley_device::device_add_mconfig(machine_config &config) +{ + INPUT_MERGER_ANY_HIGH(config, "irqs").output_handler().set([this](int state) { set_pirq(state); }); + add_userport(config); + add_analogue(config); +} + +void arc_uma_morley_device::device_add_mconfig(machine_config &config) +{ + INPUT_MERGER_ANY_HIGH(config, "irqs").output_handler().set([this](int state) { set_pirq(state); }); + add_userport(config); + add_analogue(config); + add_midi(config); +} //************************************************************************** // LIVE DEVICE //************************************************************************** //------------------------------------------------- -// arc_bbcio_aga30_device - constructor +// arc_io_morley_device - constructor //------------------------------------------------- -arc_bbcio_aga30_device::arc_bbcio_aga30_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : device_t(mconfig, ARC_BBCIO_AGA30, tag, owner, clock) +arc_io_morley_device::arc_io_morley_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_podule_rom(*this, "podule_rom") , m_irqs(*this, "irqs") @@ -134,12 +276,27 @@ arc_bbcio_aga30_device::arc_bbcio_aga30_device(const machine_config &mconfig, co { } +arc_bbcio_aga30_device::arc_bbcio_aga30_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : arc_io_morley_device(mconfig, ARC_BBCIO_AGA30, tag, owner, clock) +{ +} + +arc_ua_morley_device::arc_ua_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : arc_io_morley_device(mconfig, ARC_UA_MORLEY, tag, owner, clock) +{ +} + +arc_uma_morley_device::arc_uma_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : arc_io_morley_device(mconfig, ARC_UMA_MORLEY, tag, owner, clock) +{ +} + //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -void arc_bbcio_aga30_device::device_start() +void arc_io_morley_device::device_start() { save_item(NAME(m_rom_page)); } @@ -149,7 +306,7 @@ void arc_bbcio_aga30_device::device_start() // device_reset - device-specific reset //------------------------------------------------- -void arc_bbcio_aga30_device::device_reset() +void arc_io_morley_device::device_reset() { m_rom_page = 0x00; } @@ -159,12 +316,12 @@ void arc_bbcio_aga30_device::device_reset() // IMPLEMENTATION //************************************************************************** -int arc_bbcio_aga30_device::get_analogue_input(int channel_number) +int arc_io_morley_device::get_analogue_input(int channel_number) { return (0xff - m_analog->ch_r(channel_number)) << 8; } -void arc_bbcio_aga30_device::upd7002_eoc(int state) +void arc_io_morley_device::upd7002_eoc(int state) { m_irqs->in_w<1>(!state); } @@ -177,3 +334,5 @@ void arc_bbcio_aga30_device::upd7002_eoc(int state) //************************************************************************** DEFINE_DEVICE_TYPE_PRIVATE(ARC_BBCIO_AGA30, device_archimedes_podule_interface, arc_bbcio_aga30_device, "arc_bbcio_aga30", "Acorn AGA30 BBC I/O Podule") +DEFINE_DEVICE_TYPE_PRIVATE(ARC_UA_MORLEY, device_archimedes_podule_interface, arc_ua_morley_device, "arc_ua_morley", "Morley Electronics Analogue and User Interface") +DEFINE_DEVICE_TYPE_PRIVATE(ARC_UMA_MORLEY, device_archimedes_podule_interface, arc_uma_morley_device, "arc_uma_morley", "Morley Electronics User/MIDI/Analogue Interface") diff --git a/src/devices/bus/archimedes/podule/io_morley.h b/src/devices/bus/archimedes/podule/io_morley.h index 4d5f8655dfa..da04a36ac8f 100644 --- a/src/devices/bus/archimedes/podule/io_morley.h +++ b/src/devices/bus/archimedes/podule/io_morley.h @@ -2,7 +2,7 @@ // copyright-holders:Nigel Barnes /********************************************************************** - Morley Electronics User I2C Analogue mini-podule + Morley Electronics Analogue and User Interface **********************************************************************/ @@ -15,5 +15,7 @@ // device type definition DECLARE_DEVICE_TYPE(ARC_BBCIO_AGA30, device_archimedes_podule_interface) +DECLARE_DEVICE_TYPE(ARC_UA_MORLEY, device_archimedes_podule_interface) +DECLARE_DEVICE_TYPE(ARC_UMA_MORLEY, device_archimedes_podule_interface) #endif // MAME_BUS_ARCHIMEDES_PODULE_IO_MORLEY_H diff --git a/src/devices/bus/archimedes/podule/midimax.cpp b/src/devices/bus/archimedes/podule/midimax.cpp index c9215fee4d9..b8a43a2bfae 100644 --- a/src/devices/bus/archimedes/podule/midimax.cpp +++ b/src/devices/bus/archimedes/podule/midimax.cpp @@ -16,6 +16,8 @@ namespace { +// ======================> arc_midimax_device + class arc_midimax_device : public device_t, public device_archimedes_podule_interface @@ -25,6 +27,8 @@ public: arc_midimax_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); protected: + arc_midimax_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; @@ -43,6 +47,20 @@ private: }; +// ======================> arc_midimax2_device + +class arc_midimax2_device : public arc_midimax_device +{ +public: + // construction/destruction + arc_midimax2_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_midimax_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); @@ -57,7 +75,16 @@ void arc_midimax_device::ioc_map(address_map &map) ROM_START( midimax ) ROM_REGION(0x10000, "podule_rom", 0) - ROM_LOAD("midimax.rom", 0x0000, 0x10000, CRC(62d8a431) SHA1(8c291082d9e8a8533a4f3b59da857813aa357ecb)) + ROM_SYSTEM_BIOS(0, "106", "1.06 (26 Mar 1995)") + ROMX_LOAD("midimax-1.06.rom", 0x0000, 0x10000, CRC(62d8a431) SHA1(8c291082d9e8a8533a4f3b59da857813aa357ecb), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "105", "1.05 (26 Apr 1994)") + ROMX_LOAD("midimax-1.05.rom", 0x0000, 0x10000, CRC(2340a077) SHA1(8cba82ed214246b9fb55e24e87e4629231490465), ROM_BIOS(1)) +ROM_END + +ROM_START( midimax2 ) + ROM_REGION(0x10000, "podule_rom", 0) + ROM_SYSTEM_BIOS(0, "201", "2.01 (10-Dec-97)") + ROMX_LOAD("midimax-2.01.rom", 0x0000, 0x10000, CRC(b112bdb2) SHA1(d713bf8661542009defadb08cc6096af94efce3e), ROM_BIOS(0)) ROM_END const tiny_rom_entry *arc_midimax_device::device_rom_region() const @@ -65,6 +92,11 @@ const tiny_rom_entry *arc_midimax_device::device_rom_region() const return ROM_NAME( midimax ); } +const tiny_rom_entry *arc_midimax2_device::device_rom_region() const +{ + return ROM_NAME( midimax2 ); +} + //------------------------------------------------- // device_add_mconfig - add device configuration @@ -95,14 +127,24 @@ void arc_midimax_device::device_add_mconfig(machine_config &config) // arc_midimax_device - constructor //------------------------------------------------- -arc_midimax_device::arc_midimax_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : device_t(mconfig, ARC_MIDIMAX, tag, owner, clock) +arc_midimax_device::arc_midimax_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_podule_rom(*this, "podule_rom") , m_rom_page(0) { } +arc_midimax_device::arc_midimax_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : arc_midimax_device(mconfig, ARC_MIDIMAX, tag, owner, clock) +{ +} + +arc_midimax2_device::arc_midimax2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : arc_midimax_device(mconfig, ARC_MIDIMAX2, tag, owner, clock) +{ +} + //------------------------------------------------- // device_start - device-specific startup @@ -130,3 +172,4 @@ void arc_midimax_device::device_reset() //************************************************************************** DEFINE_DEVICE_TYPE_PRIVATE(ARC_MIDIMAX, device_archimedes_podule_interface, arc_midimax_device, "arc_midimax", "Wild Vision MidiMax") +DEFINE_DEVICE_TYPE_PRIVATE(ARC_MIDIMAX2, device_archimedes_podule_interface, arc_midimax2_device, "arc_midimax2", "Wild Vision MidiMax II") diff --git a/src/devices/bus/archimedes/podule/midimax.h b/src/devices/bus/archimedes/podule/midimax.h index ce76e5cccb3..214fd46ee7c 100644 --- a/src/devices/bus/archimedes/podule/midimax.h +++ b/src/devices/bus/archimedes/podule/midimax.h @@ -15,5 +15,6 @@ // device type definition DECLARE_DEVICE_TYPE(ARC_MIDIMAX, device_archimedes_podule_interface) +DECLARE_DEVICE_TYPE(ARC_MIDIMAX2, device_archimedes_podule_interface) #endif // MAME_BUS_ARCHIMEDES_PODULE_MIDIMAX_H diff --git a/src/devices/bus/archimedes/podule/scan256.cpp b/src/devices/bus/archimedes/podule/scan256.cpp new file mode 100644 index 00000000000..66041b03e3e --- /dev/null +++ b/src/devices/bus/archimedes/podule/scan256.cpp @@ -0,0 +1,126 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Watford Electronics 256 Grey-Scale Scanner + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesH2Z/WE_Scanner.html + + TODO: + - implement scanner. + +**********************************************************************/ + +#include "emu.h" +#include "scan256.h" +#include "imagedev/picture.h" + + +namespace { + +class arc_scan256_device : + public device_t, + public device_archimedes_podule_interface +{ +public: + // construction/destruction + arc_scan256_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + static constexpr feature_type unemulated_features() { return feature::CAPTURE; } + +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; + +private: + required_memory_region m_podule_rom; + required_device m_picture; + + u8 m_rom_page; +}; + + +void arc_scan256_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(0x2000, 0x2000).lw8(NAME([this](u8 data) { m_rom_page = data; })); +} + + +//------------------------------------------------- +// ROM( scan256 ) +//------------------------------------------------- + +ROM_START( scan256 ) + ROM_REGION(0x10000, "podule_rom", 0) + ROM_LOAD("scan256_1.00.bin", 0x0000, 0x10000, CRC(3e5d5877) SHA1(9ea4bba1a752090b19a8ab9bf06414053fb8f7ff)) +ROM_END + +const tiny_rom_entry *arc_scan256_device::device_rom_region() const +{ + return ROM_NAME( scan256 ); +} + + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void arc_scan256_device::device_add_mconfig(machine_config &config) +{ + IMAGE_PICTURE(config, m_picture); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// arc_scan256_device - constructor +//------------------------------------------------- + +arc_scan256_device::arc_scan256_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, ARC_SCAN256, tag, owner, clock) + , device_archimedes_podule_interface(mconfig, *this) + , m_podule_rom(*this, "podule_rom") + , m_picture(*this, "srcimg") + , m_rom_page(0) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void arc_scan256_device::device_start() +{ + save_item(NAME(m_rom_page)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void arc_scan256_device::device_reset() +{ + m_rom_page = 0x00; +} + +} // anonymous namespace + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(ARC_SCAN256, device_archimedes_podule_interface, arc_scan256_device, "arc_scan256", "Watford Electronics 256 Grey-Scale Scanner") diff --git a/src/devices/bus/archimedes/podule/scan256.h b/src/devices/bus/archimedes/podule/scan256.h new file mode 100644 index 00000000000..1ee134c8962 --- /dev/null +++ b/src/devices/bus/archimedes/podule/scan256.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Watford Electronics 256 Grey-Scale Scanner + +**********************************************************************/ + +#ifndef MAME_BUS_ARCHIMEDES_PODULE_SCAN256_H +#define MAME_BUS_ARCHIMEDES_PODULE_SCAN256_H + +#pragma once + +#include "slot.h" + +// device type definition +DECLARE_DEVICE_TYPE(ARC_SCAN256, device_archimedes_podule_interface) + +#endif // MAME_BUS_ARCHIMEDES_PODULE_SCAN256_H diff --git a/src/devices/bus/archimedes/podule/scanlight.cpp b/src/devices/bus/archimedes/podule/scanlight.cpp index 8453e04f3b4..7e22683032f 100644 --- a/src/devices/bus/archimedes/podule/scanlight.cpp +++ b/src/devices/bus/archimedes/podule/scanlight.cpp @@ -6,6 +6,10 @@ http://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/CC_Scannerif.html + Computer Concepts A3000 Scanner interface + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/CC_scanner_minipodule.html + Computer Concepts ScanLight Video 256 http://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/CC_ScanlightVideo256.html @@ -72,6 +76,20 @@ protected: }; +// ======================> arc_scanjunior3_device + +class arc_scanjunior3_device : public arc_scanlight_device +{ +public: + // construction/destruction + arc_scanjunior3_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; +}; + + // ======================> arc_scanvideo_device class arc_scanvideo_device : public arc_scanlight_device @@ -90,8 +108,6 @@ protected: private: required_device m_avivideo; - - u8 m_rom_bank; }; @@ -103,8 +119,8 @@ void arc_scanlight_device::ioc_map(address_map &map) void arc_scanvideo_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(0x2000, 0x2000).lw8(NAME([this](u8 data) { m_rom_page = data | (m_rom_bank << 4); })); + map(0x0000, 0x1fff).lr8(NAME([this](offs_t offset) { return m_podule_rom->base()[offset | (((m_rom_page ^ 0x10) << 11) & 0xf800)]; })).umask32(0x000000ff); + map(0x2000, 0x2000).lw8(NAME([this](u8 data) { m_rom_page = data; })); } @@ -114,21 +130,29 @@ void arc_scanvideo_device::ioc_map(address_map &map) ROM_START( scanlight ) ROM_REGION(0x8000, "podule_rom", 0) - ROM_LOAD("scan-light.rom", 0x0000, 0x8000, CRC(6ba1764b) SHA1(fa69fb69e01553b27409b65a37d3d30a376e7380)) + ROM_SYSTEM_BIOS(0, "100", "1.00 (05 Sep 1990)") // also on A3000 Scanner mini-podule + ROMX_LOAD("scan-light_1.00.rom", 0x0000, 0x8000, CRC(6ba1764b) SHA1(fa69fb69e01553b27409b65a37d3d30a376e7380), ROM_BIOS(0)) ROM_END ROM_START( scanjunior ) ROM_REGION(0x8000, "podule_rom", 0) - ROM_LOAD("scan-light_jr.rom", 0x0000, 0x8000, CRC(bf1b8268) SHA1(3c63f8379d8fc222fc57838a9384ecec7c5d2484)) + ROM_SYSTEM_BIOS(0, "100", "1.00 (05 Sep 1990)") + ROMX_LOAD("scan-light_jr_1.00.rom", 0x0000, 0x8000, CRC(bf1b8268) SHA1(3c63f8379d8fc222fc57838a9384ecec7c5d2484), ROM_BIOS(0)) +ROM_END + +ROM_START( scanjunior3 ) + ROM_REGION(0x8000, "podule_rom", 0) + ROM_SYSTEM_BIOS(0, "200", "2.00 (02 Oct 1992)") + ROMX_LOAD("scan-light_jr_2.00.rom", 0x0000, 0x8000, CRC(bdc729bb) SHA1(382193f2b6cf8ba5ed04481d99050fe2f691ad0a), ROM_BIOS(0)) ROM_END ROM_START( scanvideo ) ROM_REGION(0x10000, "podule_rom", 0) - ROM_LOAD("video256_1.20.rom", 0x0000, 0x10000, CRC(3e9a44b8) SHA1(9fe739b42c5bf5dab69e3c1ffb1c3c5a5d8d7a50)) + ROM_SYSTEM_BIOS(0, "120", "1.20 (04 May 1994)") + ROMX_LOAD("video256_1.20.rom", 0x0000, 0x10000, CRC(3e9a44b8) SHA1(9fe739b42c5bf5dab69e3c1ffb1c3c5a5d8d7a50), ROM_BIOS(0)) ROM_END - const tiny_rom_entry *arc_scanlight_device::device_rom_region() const { return ROM_NAME( scanlight ); @@ -139,6 +163,11 @@ const tiny_rom_entry *arc_scanjunior_device::device_rom_region() const return ROM_NAME( scanjunior ); } +const tiny_rom_entry *arc_scanjunior3_device::device_rom_region() const +{ + return ROM_NAME( scanjunior3 ); +} + const tiny_rom_entry *arc_scanvideo_device::device_rom_region() const { return ROM_NAME( scanvideo ); @@ -189,10 +218,14 @@ arc_scanjunior_device::arc_scanjunior_device(const machine_config &mconfig, cons { } +arc_scanjunior3_device::arc_scanjunior3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : arc_scanlight_device(mconfig, ARC_SCANJUNIOR3, tag, owner, clock) +{ +} + arc_scanvideo_device::arc_scanvideo_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : arc_scanlight_device(mconfig, ARC_SCANVIDEO, tag, owner, clock) , m_avivideo(*this, "srcavi") - , m_rom_bank(1) { } @@ -224,4 +257,5 @@ void arc_scanlight_device::device_reset() DEFINE_DEVICE_TYPE_PRIVATE(ARC_SCANLIGHT, device_archimedes_podule_interface, arc_scanlight_device, "arc_scanlight", "Computer Concepts ScanLight") DEFINE_DEVICE_TYPE_PRIVATE(ARC_SCANJUNIOR, device_archimedes_podule_interface, arc_scanjunior_device, "arc_scanjunior", "Computer Concepts ScanLight Junior") +DEFINE_DEVICE_TYPE_PRIVATE(ARC_SCANJUNIOR3, device_archimedes_podule_interface, arc_scanjunior3_device, "arc_scanjunior3", "Computer Concepts ScanLight Junior MkIII") DEFINE_DEVICE_TYPE_PRIVATE(ARC_SCANVIDEO, device_archimedes_podule_interface, arc_scanvideo_device, "arc_scanvideo", "Computer Concepts ScanLight Video 256") diff --git a/src/devices/bus/archimedes/podule/scanlight.h b/src/devices/bus/archimedes/podule/scanlight.h index 579c100c333..d5b31006b98 100644 --- a/src/devices/bus/archimedes/podule/scanlight.h +++ b/src/devices/bus/archimedes/podule/scanlight.h @@ -16,6 +16,7 @@ // device type definition DECLARE_DEVICE_TYPE(ARC_SCANLIGHT, device_archimedes_podule_interface) DECLARE_DEVICE_TYPE(ARC_SCANJUNIOR, device_archimedes_podule_interface) +DECLARE_DEVICE_TYPE(ARC_SCANJUNIOR3, device_archimedes_podule_interface) DECLARE_DEVICE_TYPE(ARC_SCANVIDEO, device_archimedes_podule_interface) #endif // MAME_BUS_ARCHIMEDES_PODULE_SCANLIGHT_H diff --git a/src/devices/bus/archimedes/podule/slot.cpp b/src/devices/bus/archimedes/podule/slot.cpp index ea6264a49c8..f0219e9fb9b 100644 --- a/src/devices/bus/archimedes/podule/slot.cpp +++ b/src/devices/bus/archimedes/podule/slot.cpp @@ -240,10 +240,12 @@ void device_archimedes_podule_interface::interface_post_start() // slot devices #include "a448.h" +#include "acejoy.h" +//#include "archdigi.h" +//#include "archscan.h" #include "armadeus.h" //#include "discbuffer.h" //#include "colourcard.h" -//#include "digitiser_we.h" #include "eaglem2.h" #include "ether1.h" //#include "ether2.h" @@ -254,12 +256,15 @@ void device_archimedes_podule_interface::interface_post_start() #include "etherr.h" #include "faxpack.h" //#include "g8.h" +#include "greyhawk.h" //#include "hdfc_rdev.h" //#include "hdisc.h" //#include "hdisc_cw.h" +//#include "hdisc_morley.h" //#include "hdisc_we.h" #include "ide_be.h" //#include "ide_castle.h" +//#include "ide_dt.h" //#include "ide_hccs.h" //#include "ide_ics.h" #include "ide_rdev.h" @@ -276,6 +281,7 @@ void device_archimedes_podule_interface::interface_post_start() #include "rom.h" //#include "rom_cc.h" #include "rs423.h" +#include "scan256.h" #include "scanlight.h" //#include "scsi_a500.h" //#include "scsi_acorn.h" @@ -284,6 +290,7 @@ void device_archimedes_podule_interface::interface_post_start() //#include "scsi_oak.h" #include "scsi_vti.h" #include "serial.h" +#include "spectra.h" #include "tube.h" //#include "ultimate.h" //#include "ultimatecd.h" @@ -296,12 +303,14 @@ void archimedes_exp_devices(device_slot_interface &device) { device.option_add("a448", ARC_A448); // Armadillo Systems A448 Sound Sampler device.option_add("a448b", ARC_A448B); // Armadillo Systems A448b Stereo MIDI Sound Sampler + device.option_add("acejoy", ARC_ACEJOY); // ACE Joy Connect + //device.option_add("archdigi", ARC_ARCHDIGI); // Watford Electronics Archimedes Video Digitiser + //device.option_add("archscan", ARC_ARCHSCAN); // Watford Electronics Archimedes Scanner device.option_add("armadeus", ARC_ARMADEUS); // Clares Armadeus Sampler Board device.option_add("bbcio_aka10", ARC_BBCIO_AKA10); // Acorn AKA10 BBC I/O Podule device.option_add("bbcio_we", ARC_BBCIO_WE); // Watford BBC User I/O Card //device.option_add("cc", ARC_CC); // Wild Vision/Computer Concepts Colour Card //device.option_add("ccgold", ARC_CCGOLD); // Wild Vision/Computer Concepts Colour Card Gold - //device.option_add("digitiser_we", ARC_DIGITISER_WE); // Watford Electronics Archimedes Video Digitiser device.option_add("eaglem2", ARC_EAGLEM2); // Wild Vision/Computer Concepts Eagle M2 device.option_add("ether1", ARC_ETHER1_AKA25); // Acorn AKA25 Ethernet //device.option_add("ether2", ARC_ETHER2_AEH50); // Acorn AEH50 Ethernet II @@ -309,12 +318,16 @@ void archimedes_exp_devices(device_slot_interface &device) //device.option_add("ether5", ARC_ETHER5); // Atomwide Ethernet V Podule device.option_add("etherr", ARC_ETHERR); // RISC Developments Ethernet Card device.option_add("faxpack", ARC_FAXPACK); // Computer Concepts Fax-Pack + //device.option_add("g8", ARC_G8); // State Machine G8 Graphic Accelerator //device.option_add("g16", ARC_G16); // State Machine G16 Graphic Accelerator + device.option_add("greyhawk", ARC_GREYHAWK); // Computer Concepts GreyHawk Video Digitiser //device.option_add("hdfc_rdev", ARC_HDFC_RDEV); // RISC Developments High Density Floppy Controller //device.option_add("hdisc_akd52", ARC_HDISC_AKD52); // Acorn AKD52 Hard Disc Podule //device.option_add("hdisc_cw", ARC_HDISC_CW); // Computerware Hard Disk Podule + //device.option_add("hdisc_morley", ARC_HDISC_MORLEY); // Morley Electronics Hard Disc Podule //device.option_add("hdisc_we", ARC_HDISC_WE); // Watford Electronics Archimedes Hard Disk Podule device.option_add("ide_be", ARC_IDE_BE); // Baildon Electronics IDE HD Interface + //device.option_add("ide_dt", ARC_IDE_DT); // D.T. Software IDE Interface //device.option_add("ide_hccs", ARC_IDE_HCCS); // HCCS IDE Interface device.option_add("ide_rdev", ARC_IDE_RDEV); // RISC Developments IDE Hard Disc System //device.option_add("ide1v4_ics", ARC_IDE1V4_ICS); // ICS ideA Hard Disc System @@ -323,14 +336,17 @@ void archimedes_exp_devices(device_slot_interface &device) device.option_add("lbp4", ARC_LBP4); // Computer Concepts LaserDirect LBP-4 device.option_add("midi_aka16", ARC_MIDI_AKA16); // Acorn AKA16 MIDI Podule device.option_add("midimax", ARC_MIDIMAX); // Wild Vision MidiMax + device.option_add("midimax2", ARC_MIDIMAX2); // Wild Vision MidiMax 2 device.option_add("nexus_a500", ARC_NEXUS_A500); // SJ Research Nexus Interface (A500) //device.option_add("prisma3", ARC_PRISMA3); // Millipede PRISMA-3 Podule //device.option_add("prisma3p", ARC_PRISMA3P); // Millipede PRISMA-3 Plus Podule device.option_add("rom_aka05", ARC_ROM_AKA05); // Acorn AKA05 ROM Podule //device.option_add("rom_cc", ARC_ROM_CC); // Computer Concepts ROM/RAM Podule device.option_add("rs423", ARC_RS423); // Intelligent Interfaces Dual RS423 Serial Interface + device.option_add("scan256", ARC_SCAN256); // Watford Electronics 256 Grey-Scale Scanner device.option_add("scanlight", ARC_SCANLIGHT); // Computer Concepts ScanLight 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 @@ -340,7 +356,9 @@ void archimedes_exp_devices(device_slot_interface &device) //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 device.option_add("tube", ARC_TUBE); // Acorn Tube Podule + device.option_add("ua_morley", ARC_UA_MORLEY); // Morley Electronics Analogue and User Interface //device.option_add("ultcd", ARC_ULTCD); // HCCS Ultimate CD-ROM } @@ -355,11 +373,14 @@ void archimedes_mini_exp_devices(device_slot_interface &device) //device.option_add("disc_a3k6", ARC_DISC_A3K6); // PRES A3K6 Disc Buffer //device.option_add("ethera", ARC_ETHERA); // ANT Ethernet 10base2 mini-podule device.option_add("etherd", ARC_ETHERD); // Digital Services Ethernet Podule + //device.option_add("ide_a3k_hccs", ARC_IDE_A3K_HCCS); // HCCS IDE A3000 Interface //device.option_add("ide_castle", ARC_IDE_CASTLE); // Castle Technology A3000 IDE Expansion Card //device.option_add("ide1v5_ics", ARC_IDE1V5_ICS); // ICS ideA Hard Disc System //device.option_add("ide3v5_ics", ARC_IDE3V5_ICS); // ICS ideA Hard Disc System //device.option_add("ide_we", ARC_IDE_WE); // Watford Electronics A3000 IDE Interface + device.option_add("scanlight", ARC_SCANLIGHT); // Computer Concepts A3000 ScanLight //device.option_add("ult3010", ARC_ULT3010); // HCCS A3010 Ultimate Expansion System + device.option_add("uma_morley", ARC_UMA_MORLEY); // Morley Electronics User/MIDI/Analogue Interface device.option_add("upa_hccs", ARC_UPA_HCCS); // HCCS User/Analogue Podule device.option_add("upmidi_aka12", ARC_UPMIDI_AKA12); // Acorn AKA12 User Port/MIDI Upgrade } diff --git a/src/devices/bus/archimedes/podule/spectra.cpp b/src/devices/bus/archimedes/podule/spectra.cpp new file mode 100644 index 00000000000..6c144dbebf7 --- /dev/null +++ b/src/devices/bus/archimedes/podule/spectra.cpp @@ -0,0 +1,126 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Beebug Spectra Colour Scanner + + http://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/Beebug_ColourScanner.html + + TODO: + - unknown scanner. + +**********************************************************************/ + +#include "emu.h" +#include "spectra.h" +#include "imagedev/picture.h" + + +namespace { + +class arc_spectra_device : + public device_t, + public device_archimedes_podule_interface +{ +public: + // construction/destruction + arc_spectra_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + static constexpr feature_type unemulated_features() { return feature::CAPTURE; } + +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; + +private: + required_memory_region m_podule_rom; + required_device m_picture; + + u8 m_rom_page; +}; + + +void arc_spectra_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) & 0x7800)]; })).umask32(0x000000ff); + map(0x2000, 0x2000).lw8(NAME([this](u8 data) { m_rom_page = data; })); +} + + +//------------------------------------------------- +// ROM( spectra ) +//------------------------------------------------- + +ROM_START( spectra ) + ROM_REGION(0x8000, "podule_rom", 0) + ROM_LOAD("spectra_1.05.bin", 0x0000, 0x8000, CRC(51b858ae) SHA1(bac53e4cd1047606e6314992e2581acf09e1b658)) +ROM_END + +const tiny_rom_entry *arc_spectra_device::device_rom_region() const +{ + return ROM_NAME( spectra ); +} + + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void arc_spectra_device::device_add_mconfig(machine_config &config) +{ + IMAGE_PICTURE(config, m_picture); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// arc_spectra_device - constructor +//------------------------------------------------- + +arc_spectra_device::arc_spectra_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, ARC_SPECTRA, tag, owner, clock) + , device_archimedes_podule_interface(mconfig, *this) + , m_podule_rom(*this, "podule_rom") + , m_picture(*this, "srcimg") + , m_rom_page(0) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void arc_spectra_device::device_start() +{ + save_item(NAME(m_rom_page)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void arc_spectra_device::device_reset() +{ + m_rom_page = 0x00; +} + +} // anonymous namespace + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(ARC_SPECTRA, device_archimedes_podule_interface, arc_spectra_device, "arc_spectra", "Beebug Spectra Colour Scanner") diff --git a/src/devices/bus/archimedes/podule/spectra.h b/src/devices/bus/archimedes/podule/spectra.h new file mode 100644 index 00000000000..af4dea15d8a --- /dev/null +++ b/src/devices/bus/archimedes/podule/spectra.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Beebug Spectra Colour Scanner + +**********************************************************************/ + +#ifndef MAME_BUS_ARCHIMEDES_PODULE_SPECTRA_H +#define MAME_BUS_ARCHIMEDES_PODULE_SPECTRA_H + +#pragma once + +#include "slot.h" + +// device type definition +DECLARE_DEVICE_TYPE(ARC_SPECTRA, device_archimedes_podule_interface) + +#endif // MAME_BUS_ARCHIMEDES_PODULE_SPECTRA_H -- cgit v1.2.3