From 7a93c921fd7fa2ec837f8f70f6afebe0df74284d Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 30 Aug 2020 20:31:55 -0400 Subject: tr707, tr727, mks7: Add skeleton MB63H114 device --- scripts/target/mame/mess.lua | 2 ++ src/mame/audio/mb63h114.cpp | 75 +++++++++++++++++++++++++++++++++++++++ src/mame/audio/mb63h114.h | 42 ++++++++++++++++++++++ src/mame/drivers/juno106.cpp | 6 +++- src/mame/drivers/roland_tr707.cpp | 6 +++- 5 files changed, 129 insertions(+), 2 deletions(-) create mode 100644 src/mame/audio/mb63h114.cpp create mode 100644 src/mame/audio/mb63h114.h diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 33ced0d6c69..14087cee686 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -3345,6 +3345,8 @@ files { MAME_DIR .. "src/mame/audio/bu3905.h", MAME_DIR .. "src/mame/audio/jx8p_synth.cpp", MAME_DIR .. "src/mame/audio/jx8p_synth.h", + MAME_DIR .. "src/mame/audio/mb63h114.cpp", + MAME_DIR .. "src/mame/audio/mb63h114.h", MAME_DIR .. "src/mame/machine/mb62h195.cpp", MAME_DIR .. "src/mame/machine/mb62h195.h", MAME_DIR .. "src/mame/machine/mb63h149.cpp", diff --git a/src/mame/audio/mb63h114.cpp b/src/mame/audio/mb63h114.cpp new file mode 100644 index 00000000000..6a22b28c2ea --- /dev/null +++ b/src/mame/audio/mb63h114.cpp @@ -0,0 +1,75 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/*************************************************************************** + + Roland MB63H114 Multiple Address Counter + + The multiplexed outputs of eight 13-bit counters internal to this + 64-pin QFP CMOS gate array are used to play percussion samples. + + The on-chip clock generator must be externally strapped by connecting + SCO1 (36) to CLK0 (37) to obtain the standard 1.6 MHz master clock. + This is divided to produce 100, 50, 25 and 12.5 kHz outputs on A (3), + B (5), C (7) and D (4). These outputs are normally connected to the + XCK0–XCK7 inputs (56–57, 59–64), upper address lines and chip selects + of sample mask ROMs, and 40H151 multiplexers and demultiplexers, but + may also be used to drive other circuits. + + The XST0–XST7 (38–41, 44–47) counter start inputs, strobed with XSTA + (50), are normally connected to CPU address outputs rather than the + data bus, perhaps due to long setup/hold requirements. All these are + specified as active low. + +***************************************************************************/ + +#include "emu.h" +#include "mb63h114.h" + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definition +DEFINE_DEVICE_TYPE(MB63H114, mb63h114_device, "mb63h114", "Roland MB63H114 Multiple Address Counter") + + +//************************************************************************** +// DEVICE IMPLEMENTATION +//************************************************************************** + +//------------------------------------------------- +// mb63h114_device - constructor +//------------------------------------------------- + +mb63h114_device::mb63h114_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, MB63H114, tag, owner, clock) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void mb63h114_device::device_start() +{ +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void mb63h114_device::device_reset() +{ +} + + +//------------------------------------------------- +// xst_w - write counter start inputs +//------------------------------------------------- + +void mb63h114_device::xst_w(u8 data) +{ + logerror("%s: XST = %02X\n", machine().describe_context(), data); +} diff --git a/src/mame/audio/mb63h114.h b/src/mame/audio/mb63h114.h new file mode 100644 index 00000000000..10e96585b85 --- /dev/null +++ b/src/mame/audio/mb63h114.h @@ -0,0 +1,42 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/*************************************************************************** + + Roland MB63H114 Multiple Address Counter + +***************************************************************************/ + +#ifndef MAME_MACHINE_MB63H114_H +#define MAME_MACHINE_MB63H114_H + +#pragma once + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> mb63h114_device + +class mb63h114_device : public device_t +{ +public: + // device type constructor + mb63h114_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + // CPU write handler + void xst_w(u8 data); + +protected: + // device-specific overrides + virtual void device_start() override; + virtual void device_reset() override; + +private: + // TODO +}; + + +// device type declaration +DECLARE_DEVICE_TYPE(MB63H114, mb63h114_device) + +#endif // MAME_MACHINE_MB63H114_H diff --git a/src/mame/drivers/juno106.cpp b/src/mame/drivers/juno106.cpp index 382a1fd89c0..0634d3c9735 100644 --- a/src/mame/drivers/juno106.cpp +++ b/src/mame/drivers/juno106.cpp @@ -7,6 +7,7 @@ ****************************************************************************/ #include "emu.h" +#include "audio/mb63h114.h" //#include "bus/midi/midi.h" #include "cpu/upd7810/upd7810.h" #include "machine/nvram.h" @@ -19,6 +20,7 @@ public: : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_modulecpu(*this, "modulecpu") + , m_mac(*this, "mac") , m_pit(*this, "pit%u", 1U) { } @@ -44,6 +46,7 @@ private: required_device m_maincpu; required_device m_modulecpu; + optional_device m_mac; required_device_array m_pit; }; @@ -66,6 +69,7 @@ void juno106_state::dcom_w(u8 data) void juno106_state::rhythm_w(offs_t offset, u8 data) { + m_mac->xst_w(offset & 0xff); } void juno106_state::module_pit_w(offs_t offset, u8 data) @@ -130,7 +134,7 @@ void juno106_state::mks7(machine_config &config) config.device_remove("nvram"); // no battery or external RAM - //MB63H114(config, "mac", 1.6_MHz_XTAL); + MB63H114(config, "mac", 1.6_MHz_XTAL); } ROM_START(juno106) diff --git a/src/mame/drivers/roland_tr707.cpp b/src/mame/drivers/roland_tr707.cpp index bc9f5b0d3d2..172c59965c9 100644 --- a/src/mame/drivers/roland_tr707.cpp +++ b/src/mame/drivers/roland_tr707.cpp @@ -12,6 +12,7 @@ ****************************************************************************/ #include "emu.h" +#include "audio/mb63h114.h" #include "bus/generic/carts.h" #include "bus/generic/slot.h" //#include "bus/midi/midi.h" @@ -25,6 +26,7 @@ public: roland_tr707_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_mac(*this, "mac") , m_key_switches(*this, "KEY%u", 0U) , m_misc_select(0xff) { @@ -46,6 +48,7 @@ private: void mem_map(address_map &map); required_device m_maincpu; + required_device m_mac; required_ioport_array<4> m_key_switches; u8 m_misc_select; @@ -83,6 +86,7 @@ void roland_tr707_state::accent_level_w(u8 data) void roland_tr707_state::ga_trigger_w(offs_t offset, u8 data) { + m_mac->xst_w(offset & 0xff); } void roland_tr707_state::voice_select_w(u8 data) @@ -161,7 +165,7 @@ void roland_tr707_state::tr707(machine_config &config) GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, nullptr, "tr707_cart"); - //RD63H114(config, "muxsound", 1.6_MHz_XTAL); + MB63H114(config, m_mac, 1.6_MHz_XTAL); } ROM_START(tr707) -- cgit v1.2.3