summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--scripts/src/bus.lua2
-rw-r--r--src/devices/bus/amiga/cpuslot/a570.cpp135
-rw-r--r--src/devices/bus/amiga/cpuslot/a570.h52
-rw-r--r--src/devices/bus/amiga/cpuslot/a590.cpp2
-rw-r--r--src/devices/bus/amiga/cpuslot/cards.cpp2
5 files changed, 193 insertions, 0 deletions
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index a86b77c27cb..7f18c0431b3 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -5835,6 +5835,8 @@ if (BUSES["AMIGA_CPUSLOT"]~=null) then
MAME_DIR .. "src/devices/bus/amiga/cpuslot/cpuslot.h",
MAME_DIR .. "src/devices/bus/amiga/cpuslot/cards.cpp",
MAME_DIR .. "src/devices/bus/amiga/cpuslot/cards.h",
+ MAME_DIR .. "src/devices/bus/amiga/cpuslot/a570.cpp",
+ MAME_DIR .. "src/devices/bus/amiga/cpuslot/a570.h",
MAME_DIR .. "src/devices/bus/amiga/cpuslot/a590.cpp",
MAME_DIR .. "src/devices/bus/amiga/cpuslot/a590.h",
MAME_DIR .. "src/devices/bus/amiga/cpuslot/action_replay.cpp",
diff --git a/src/devices/bus/amiga/cpuslot/a570.cpp b/src/devices/bus/amiga/cpuslot/a570.cpp
new file mode 100644
index 00000000000..46f8d4626a5
--- /dev/null
+++ b/src/devices/bus/amiga/cpuslot/a570.cpp
@@ -0,0 +1,135 @@
+// license: GPL-2.0+
+// copyright-holders: Dirk Best
+/***************************************************************************
+
+ Commodore A590
+
+ DMAC based CD-ROM controller for the A500
+
+ Notes:
+ - Essentially turns the A500 into a CDTV
+ - A prototype version is called A690
+ - ROM label for the A690: "391298-01 V1.0 Copyright ©1991 CBM C480"
+ - The ROM P/N 391298-01 seems to have been used for multiple versions
+ - There are expansion slots for a 2 MB RAM expansion and a SCSI module
+
+ TODO:
+ - DMAC/CD-ROM drive hookup (needs DMAC rev 2)
+
+***************************************************************************/
+
+#include "emu.h"
+#include "a570.h"
+
+#define VERBOSE (LOG_GENERAL)
+
+#include "logmacro.h"
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+DEFINE_DEVICE_TYPE(AMIGA_CPUSLOT_A570, bus::amiga::cpuslot::a570_device, "amiga_a570", "Commodore A570")
+
+namespace bus::amiga::cpuslot {
+
+a570_device::a570_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, AMIGA_CPUSLOT_A570, tag, owner, clock),
+ device_amiga_cpuslot_interface(mconfig, *this),
+ m_dmac(*this, "dmac"),
+ m_config(*this, "config")
+{
+}
+
+
+//**************************************************************************
+// ADDRESS MAPS
+//**************************************************************************
+
+void a570_device::map(address_map &map)
+{
+ map(0xdc8000, 0xdc87ff).mirror(0x07800).rw("nvram0", FUNC(at28c16_device::read), FUNC(at28c16_device::write)).umask16(0x00ff);
+ map(0xdc8000, 0xdc87ff).mirror(0x07800).rw("nvram1", FUNC(at28c16_device::read), FUNC(at28c16_device::write)).umask16(0xff00);
+ map(0xf00000, 0xf3ffff).mirror(0x40000).rom().region("bootrom", 0);
+}
+
+
+//**************************************************************************
+// INPUT DEFINITIONS
+//**************************************************************************
+
+static INPUT_PORTS_START( a570 )
+ PORT_START("config")
+ PORT_CONFNAME(0x01, 0x00, "2 MB RAM Expansion")
+ PORT_CONFSETTING(0x00, "Disabled")
+ PORT_CONFSETTING(0x01, "Enabled")
+INPUT_PORTS_END
+
+ioport_constructor a570_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( a570 );
+}
+
+
+//**************************************************************************
+// ROM DEFINITIONS
+//**************************************************************************
+
+ROM_START( firmware )
+ ROM_REGION16_BE(0x40000, "bootrom", 0)
+ // COMMODORE-AMIGA 391298-01 ©1992 V2.30
+ ROM_LOAD("391298-01_v230.u20", 0x00000, 0x40000, CRC(30b54232) SHA1(ed7e461d1fff3cda321631ae42b80e3cd4fa5ebb))
+ROM_END
+
+const tiny_rom_entry *a570_device::device_rom_region() const
+{
+ return ROM_NAME( firmware );
+}
+
+
+//**************************************************************************
+// MACHINE DEFINITIONS
+//**************************************************************************
+
+void a570_device::device_add_mconfig(machine_config &config)
+{
+ AMIGA_DMAC(config, m_dmac, 28.37516_MHz_XTAL / 4); // 7M
+ m_dmac->cfgout_cb().set([this] (int state) { m_host->cfgout_w(state); });
+ m_dmac->int_cb().set([this] (int state) { m_host->int2_w(state); });
+
+ AT28C16(config, "nvram0", 0);
+ AT28C16(config, "nvram1", 0);
+}
+
+
+//**************************************************************************
+// MACHINE EMULATION
+//**************************************************************************
+
+void a570_device::device_start()
+{
+ m_ram = make_unique_clear<uint16_t[]>(0x200000/2);
+
+ m_dmac->set_address_space(&m_host->space());
+ m_dmac->set_ram(m_ram.get());
+
+ m_host->space().install_device(0x000000, 0xffffff, *this, &a570_device::map);
+
+ // register for save states
+ save_pointer(NAME(m_ram), 0x200000/2);
+}
+
+// the dmac handles this
+void a570_device::cfgin_w(int state) { m_dmac->configin_w(state); }
+
+void a570_device::rst_w(int state)
+{
+ // call rst first as it will unmap memory
+ m_dmac->rst_w(state);
+
+ if (state == 0)
+ m_dmac->ramsz_w(m_config->read() ? 3 : 0);
+}
+
+} // namespace bus::amiga::cpuslot
diff --git a/src/devices/bus/amiga/cpuslot/a570.h b/src/devices/bus/amiga/cpuslot/a570.h
new file mode 100644
index 00000000000..ed1bb9e4928
--- /dev/null
+++ b/src/devices/bus/amiga/cpuslot/a570.h
@@ -0,0 +1,52 @@
+// license: GPL-2.0+
+// copyright-holders: Dirk Best
+/***************************************************************************
+
+ Commodore A570
+
+ DMAC based CD-ROM controller for the A500
+
+***************************************************************************/
+
+#ifndef MAME_BUS_AMIGA_CPUSLOT_A570_H
+#define MAME_BUS_AMIGA_CPUSLOT_A570_H
+
+#pragma once
+
+#include "cpuslot.h"
+#include "machine/at28c16.h"
+#include "machine/dmac.h"
+
+namespace bus::amiga::cpuslot {
+
+class a570_device : public device_t, public device_amiga_cpuslot_interface
+{
+public:
+ a570_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ virtual ioport_constructor device_input_ports() const override ATTR_COLD;
+ virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
+ virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
+
+ virtual void device_start() override ATTR_COLD;
+
+ // device_cpuslot_interface overrides
+ virtual void cfgin_w(int state) override;
+ virtual void rst_w(int state) override;
+
+private:
+ void map(address_map &map) ATTR_COLD;
+
+ required_device<amiga_dmac_device> m_dmac;
+ required_ioport m_config;
+
+ std::unique_ptr<uint16_t[]> m_ram;
+};
+
+} // namespace bus::amiga::cpuslot
+
+// device type declaration
+DECLARE_DEVICE_TYPE_NS(AMIGA_CPUSLOT_A570, bus::amiga::cpuslot, a570_device)
+
+#endif // MAME_BUS_AMIGA_CPUSLOT_A570_H
diff --git a/src/devices/bus/amiga/cpuslot/a590.cpp b/src/devices/bus/amiga/cpuslot/a590.cpp
index 39147b96cbc..c85ca20e429 100644
--- a/src/devices/bus/amiga/cpuslot/a590.cpp
+++ b/src/devices/bus/amiga/cpuslot/a590.cpp
@@ -116,7 +116,9 @@ ROM_START( firmware )
ROMX_LOAD("390388-02.u12", 0x4001, 0x2000, CRC(6c9cb089) SHA1(bd8c6bb79ae91a4d1b9ee76fdd11aaf97ca4358b), ROM_SKIP(1) | ROM_BIOS(1))
ROM_SYSTEM_BIOS(2, "v60", "Version 6.0")
+ // COPYRIGHT ©1989 CBM ALL RIGHTS RESERVED 390389-03 V6.0 CBE8
ROMX_LOAD("390389-03.u13", 0x0000, 0x2000, CRC(2e77bbff) SHA1(8a098845068f32cfa4d34a278cd290f61d35a52c), ROM_SKIP(1) | ROM_BIOS(2))
+ // COPYRIGHT ©1989 CBM ALL RIGHTS RESERVED 390388-03 V6.0 DFA0
ROMX_LOAD("390388-03.u12", 0x0001, 0x2000, CRC(b0b8cf24) SHA1(fcf4017505f4d441814b45d559c19eab43816b30), ROM_SKIP(1) | ROM_BIOS(2))
ROMX_LOAD("390389-03.u13", 0x4000, 0x2000, CRC(2e77bbff) SHA1(8a098845068f32cfa4d34a278cd290f61d35a52c), ROM_SKIP(1) | ROM_BIOS(2))
ROMX_LOAD("390388-03.u12", 0x4001, 0x2000, CRC(b0b8cf24) SHA1(fcf4017505f4d441814b45d559c19eab43816b30), ROM_SKIP(1) | ROM_BIOS(2))
diff --git a/src/devices/bus/amiga/cpuslot/cards.cpp b/src/devices/bus/amiga/cpuslot/cards.cpp
index ec520bbec8d..a2f48edd030 100644
--- a/src/devices/bus/amiga/cpuslot/cards.cpp
+++ b/src/devices/bus/amiga/cpuslot/cards.cpp
@@ -12,6 +12,7 @@
#include "emu.h"
#include "cards.h"
+#include "a570.h"
#include "a590.h"
#include "action_replay.h"
#include "megamix500.h"
@@ -23,6 +24,7 @@ void a1000_cpuslot_cards(device_slot_interface &device)
void a500_cpuslot_cards(device_slot_interface &device)
{
+ device.option_add("a570", AMIGA_CPUSLOT_A570);
device.option_add("a590", AMIGA_CPUSLOT_A590);
device.option_add("ar", AMIGA_CPUSLOT_ACTION_REPLAY_MK1);
device.option_add("ar2", AMIGA_CPUSLOT_ACTION_REPLAY_MK2);