summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2020-02-25 21:10:15 -0500
committerGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2020-02-25 21:10:15 -0500
commit3c1420a1dfd793b897fdb9f8ea30edd79e688de0 (patch) (github)
tree11e94e635179912dbb54030c511ebd4dc8b3fbbc
parent9ba04478badc47e01f9d363a77e5b16ee129a782 (diff)
downloadmame-3c1420a1dfd793b897fdb9f8ea30edd79e688de0.tar.bz2
mame-3c1420a1dfd793b897fdb9f8ea30edd79e688de0.zip
New machines marked as NOT_WORKING
---------------------------------- Roland R-8M Total Percussion Sound Module (v1.04) [DBWBP]
-rw-r--r--scripts/target/mame/mess.lua1
-rw-r--r--src/devices/cpu/upd78k/upd78k2.cpp46
-rw-r--r--src/devices/cpu/upd78k/upd78k2.h23
-rw-r--r--src/mame/drivers/roland_r8.cpp53
-rw-r--r--src/mame/mame.lst3
-rw-r--r--src/mame/mess.flt1
6 files changed, 119 insertions, 8 deletions
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index ef3a4f9c5c6..ebfe8d51562 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -3222,6 +3222,7 @@ files {
MAME_DIR .. "src/mame/drivers/roland_d50.cpp",
MAME_DIR .. "src/mame/drivers/roland_d110.cpp",
MAME_DIR .. "src/mame/drivers/roland_mt32.cpp",
+ MAME_DIR .. "src/mame/drivers/roland_r8.cpp",
MAME_DIR .. "src/mame/drivers/roland_sc55.cpp",
MAME_DIR .. "src/mame/drivers/tb303.cpp",
MAME_DIR .. "src/mame/drivers/tr606.cpp",
diff --git a/src/devices/cpu/upd78k/upd78k2.cpp b/src/devices/cpu/upd78k/upd78k2.cpp
index 75de4feb465..823bc438883 100644
--- a/src/devices/cpu/upd78k/upd78k2.cpp
+++ b/src/devices/cpu/upd78k/upd78k2.cpp
@@ -12,7 +12,8 @@
#include "upd78k2.h"
#include "upd78k2d.h"
-// device type definition
+// device type definitions
+DEFINE_DEVICE_TYPE(UPD78210, upd78210_device, "upd78210", "NEC uPD78210")
DEFINE_DEVICE_TYPE(UPD78213, upd78213_device, "upd78213", "NEC uPD78213")
//**************************************************************************
@@ -23,11 +24,12 @@ DEFINE_DEVICE_TYPE(UPD78213, upd78213_device, "upd78213", "NEC uPD78213")
// upd78k2_device - constructor
//-------------------------------------------------
-upd78k2_device::upd78k2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor mem_map, address_map_constructor sfr_map)
+upd78k2_device::upd78k2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int iram_bits, address_map_constructor mem_map, address_map_constructor sfr_map)
: cpu_device(mconfig, type, tag, owner, clock)
, m_program_config("program", ENDIANNESS_LITTLE, 8, 20, 0, mem_map)
- , m_iram_config("IRAM", ENDIANNESS_LITTLE, 16, 8, 0, address_map_constructor(FUNC(upd78k2_device::iram_map), this))
+ , m_iram_config("IRAM", ENDIANNESS_LITTLE, 16, iram_bits, 0, address_map_constructor(FUNC(upd78k2_device::iram_map), this))
, m_sfr_config("SFR", ENDIANNESS_LITTLE, 16, 8, 0, sfr_map)
+ , m_iram_addrmask((offs_t(1) << iram_bits) - 1)
, m_program_space(nullptr)
, m_program_cache(nullptr)
, m_iram_cache(nullptr)
@@ -47,7 +49,7 @@ upd78k2_device::upd78k2_device(const machine_config &mconfig, device_type type,
void upd78k2_device::iram_map(address_map &map)
{
- map(0x00, 0xff).ram().share("iram");
+ map(0, m_iram_addrmask).ram().share("iram");
}
@@ -73,7 +75,7 @@ device_memory_interface::space_config_vector upd78k2_device::memory_space_config
inline u8 upd78k2_device::register_base() const noexcept
{
- return (BIT(m_psw, 5) ? 0xe0 : 0xf0) | (~m_psw & 0x08);
+ return ((BIT(m_psw, 5) ? 0xe0 : 0xf0) & m_iram_addrmask) | (~m_psw & 0x08);
}
@@ -174,11 +176,43 @@ void upd78k2_device::state_string_export(const device_state_entry &entry, std::s
//**************************************************************************
//-------------------------------------------------
+// upd78210_device - constructor
+//-------------------------------------------------
+
+upd78210_device::upd78210_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : upd78k2_device(mconfig, UPD78210, tag, owner, clock, 7,
+ address_map_constructor(),
+ address_map_constructor(FUNC(upd78210_device::sfr_map), this))
+{
+}
+
+
+//-------------------------------------------------
+// create_disassembler -
+//-------------------------------------------------
+
+std::unique_ptr<util::disasm_interface> upd78210_device::create_disassembler()
+{
+ return std::make_unique<upd78214_disassembler>();
+}
+
+
+//-------------------------------------------------
+// sfr_map - type-specific SFR map
+//-------------------------------------------------
+
+void upd78210_device::sfr_map(address_map &map)
+{
+ // TODO
+}
+
+
+//-------------------------------------------------
// upd78213_device - constructor
//-------------------------------------------------
upd78213_device::upd78213_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : upd78k2_device(mconfig, UPD78213, tag, owner, clock,
+ : upd78k2_device(mconfig, UPD78213, tag, owner, clock, 8,
address_map_constructor(FUNC(upd78213_device::mem_map), this),
address_map_constructor(FUNC(upd78213_device::sfr_map), this))
{
diff --git a/src/devices/cpu/upd78k/upd78k2.h b/src/devices/cpu/upd78k/upd78k2.h
index db094d03146..a18ceefb396 100644
--- a/src/devices/cpu/upd78k/upd78k2.h
+++ b/src/devices/cpu/upd78k/upd78k2.h
@@ -32,7 +32,7 @@ public:
// TODO: callbacks and configuration thereof
protected:
- upd78k2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor mem_map, address_map_constructor sfr_map);
+ upd78k2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int iram_bits, address_map_constructor mem_map, address_map_constructor sfr_map);
// device-level overrides
virtual void device_start() override;
@@ -60,6 +60,7 @@ private:
address_space_config m_program_config;
address_space_config m_iram_config;
address_space_config m_sfr_config;
+ const offs_t m_iram_addrmask;
address_space *m_program_space;
memory_access_cache<0, 0, ENDIANNESS_LITTLE> *m_program_cache;
memory_access_cache<1, 0, ENDIANNESS_LITTLE> *m_iram_cache;
@@ -73,6 +74,23 @@ private:
s32 m_icount;
};
+// ======================> upd78210_device
+
+class upd78210_device : public upd78k2_device
+{
+public:
+ // device type constructor
+ upd78210_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+protected:
+ // device_disasm_interface overrides
+ virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
+
+private:
+ // type-specific internal memory maps
+ void sfr_map(address_map &map);
+};
+
// ======================> upd78213_device
class upd78213_device : public upd78k2_device
@@ -91,7 +109,8 @@ private:
void sfr_map(address_map &map);
};
-// device type declaration
+// device type declarations
+DECLARE_DEVICE_TYPE(UPD78210, upd78210_device)
DECLARE_DEVICE_TYPE(UPD78213, upd78213_device)
#endif // MAME_CPU_UPD78K_UPD78K2_H
diff --git a/src/mame/drivers/roland_r8.cpp b/src/mame/drivers/roland_r8.cpp
new file mode 100644
index 00000000000..fba1acdf563
--- /dev/null
+++ b/src/mame/drivers/roland_r8.cpp
@@ -0,0 +1,53 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/****************************************************************************
+
+ Skeleton driver for Roland R-8 drum machine.
+
+****************************************************************************/
+
+#include "emu.h"
+#include "cpu/upd78k/upd78k2.h"
+
+class roland_r8_state : public driver_device
+{
+public:
+ roland_r8_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ {
+ }
+
+ void r8(machine_config &config);
+
+private:
+ void mem_map(address_map &map);
+
+ required_device<upd78210_device> m_maincpu;
+};
+
+
+void roland_r8_state::mem_map(address_map &map)
+{
+ map(0x00000, 0x1ffff).rom().region("maincpu", 0);
+}
+
+
+static INPUT_PORTS_START(r8)
+INPUT_PORTS_END
+
+
+void roland_r8_state::r8(machine_config &config)
+{
+ UPD78210(config, m_maincpu, 12_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &roland_r8_state::mem_map);
+}
+
+
+ROM_START(r8m)
+ ROM_REGION(0x20000, "maincpu", 0)
+ ROM_LOAD("rolandr8mv104.bin", 0x00000, 0x20000, CRC(5e95e2f6) SHA1(b4e1a8f15f72a9db9aa8fd41ee3c3ebd10460587))
+ROM_END
+
+
+SYST(1990, r8m, 0, 0, r8, r8, roland_r8_state, empty_init, "Roland", "R-8M Total Percussion Sound Module (v1.04)", MACHINE_IS_SKELETON)
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index a1cda5c943b..f34eedcc0b9 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -34514,6 +34514,9 @@ d110 //
cm32l //
mt32 //
+@source:roland_r8.cpp
+r8m //
+
@source:roland_sc55.cpp
sc55 // 1991 Sound Canvas SC-55
diff --git a/src/mame/mess.flt b/src/mame/mess.flt
index e1731d31128..bfcaf83c253 100644
--- a/src/mame/mess.flt
+++ b/src/mame/mess.flt
@@ -744,6 +744,7 @@ roland_cm32p.cpp
roland_d110.cpp
roland_d50.cpp
roland_mt32.cpp
+roland_r8.cpp
roland_sc55.cpp
rt1715.cpp
rvoice.cpp