diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index d8624ff7077..1e42c538c42 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -3264,6 +3264,8 @@ files { MAME_DIR .. "src/mame/drivers/roland_tr707.cpp", MAME_DIR .. "src/mame/audio/jx8p_synth.cpp", MAME_DIR .. "src/mame/audio/jx8p_synth.h", + MAME_DIR .. "src/mame/machine/mb63h149.cpp", + MAME_DIR .. "src/mame/machine/mb63h149.h", MAME_DIR .. "src/mame/machine/pg200.cpp", MAME_DIR .. "src/mame/machine/pg200.h", } diff --git a/src/mame/drivers/roland_d10.cpp b/src/mame/drivers/roland_d10.cpp index 4f8be5ec993..d1c0024781c 100644 --- a/src/mame/drivers/roland_d10.cpp +++ b/src/mame/drivers/roland_d10.cpp @@ -20,6 +20,7 @@ #include "emu.h" #include "cpu/mcs96/i8x9x.h" #include "machine/bankdev.h" +#include "machine/mb63h149.h" #include "machine/nvram.h" #include "machine/timer.h" #include "video/msm6222b.h" @@ -289,6 +290,9 @@ void roland_d10_state::d10(machine_config &config) // Shall become a proper memcard device someday NVRAM( config, m_memcs, nvram_device::DEFAULT_ALL_0 ); + MB63H149(config, "key", 16.384_MHz_XTAL); + //key.int_callback().set_inputline(m_maincpu, i8x9x_device::HSI0_LINE); + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); screen.set_refresh_hz(50); screen.set_screen_update(FUNC(roland_d10_state::screen_update)); @@ -309,9 +313,12 @@ void roland_d10_state::d10(machine_config &config) void roland_d10_state::d110(machine_config &config) { d10(config); + m_maincpu->set_addrmap(AS_PROGRAM, &roland_d10_state::d110_map); //m_bank->set_data_width(8); m_bank->set_addrmap(0, &roland_d10_state::d110_bank_map); + + config.device_remove("key"); } ROM_START( d10 ) diff --git a/src/mame/drivers/roland_d50.cpp b/src/mame/drivers/roland_d50.cpp index 4dd27b9a024..d1e8b694cdc 100644 --- a/src/mame/drivers/roland_d50.cpp +++ b/src/mame/drivers/roland_d50.cpp @@ -8,6 +8,7 @@ #include "emu.h" #include "cpu/upd78k/upd78k3.h" +#include "machine/mb63h149.h" class roland_d50_state : public driver_device { @@ -19,6 +20,7 @@ public: } void d50(machine_config &config); + void d550(machine_config &config); private: void mem_map(address_map &map); @@ -45,9 +47,19 @@ void roland_d50_state::d50(machine_config &config) // LCD unit is LM402802 (D-50) or LM402551 (D-550) + MB63H149(config, "key", 32.768_MHz_XTAL / 2); // on Dyna Scan Board + //key.int_callback().set_inputline(m_maincpu, upd78312_device::INT2_LINE); + //MB87136(config, "synthe", 32.768_MHz_XTAL); } +void roland_d50_state::d550(machine_config &config) +{ + d50(config); + + config.device_remove("key"); +} + // the internal date format for the external program roms is as such: // DDMY where DD is the day within the month, M is a month where // January == A,February == B, etc, and Y is the last digit of the year @@ -118,6 +130,6 @@ ROM_START(d550) // Newer PCB with silkscreen "Roland || D-50, D-550 || MAIN BOAR // ic29 is empty on boards with tc534000-sized Mask ROMs ROM_END -SYST(1987, d50, 0, 0, d50, d50, roland_d50_state, empty_init, "Roland", "D-50 Linear Synthesizer (Ver. 2.xx)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) -SYST(1987, d50o, d50, 0, d50, d50, roland_d50_state, empty_init, "Roland", "D-50 Linear Synthesizer (Ver. 1.xx)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) -SYST(1987, d550, d50, 0, d50, d50, roland_d50_state, empty_init, "Roland", "D-550 Linear Synthesizer", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) +SYST(1987, d50, 0, 0, d50, d50, roland_d50_state, empty_init, "Roland", "D-50 Linear Synthesizer (Ver. 2.xx)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) +SYST(1987, d50o, d50, 0, d50, d50, roland_d50_state, empty_init, "Roland", "D-50 Linear Synthesizer (Ver. 1.xx)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) +SYST(1987, d550, d50, 0, d550, d50, roland_d50_state, empty_init, "Roland", "D-550 Linear Synthesizer", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) diff --git a/src/mame/drivers/roland_jx8p.cpp b/src/mame/drivers/roland_jx8p.cpp index cf3d5533b17..00b7e49f0e7 100644 --- a/src/mame/drivers/roland_jx8p.cpp +++ b/src/mame/drivers/roland_jx8p.cpp @@ -13,6 +13,7 @@ //#include "bus/midi/midi.h" #include "cpu/m6800/m6801.h" //#include "cpu/upd7500/upd7500.h" +#include "machine/mb63h149.h" #include "machine/nvram.h" //#include "machine/pg800.h" //#include "machine/rescap.h" @@ -29,13 +30,12 @@ public: } void jx8p(machine_config &config); + void jx8po(machine_config &config); void jx10(machine_config &config); private: u8 switches_r(offs_t offset); void leds_w(u8 data); - u8 gate_array_r(offs_t offset); - void gate_array_w(offs_t offset, u8 data); void jx8p_assigner_map(address_map &map); void superjx_assigner_map(address_map &map); @@ -54,15 +54,6 @@ void roland_jx8p_state::leds_w(u8 data) { } -u8 roland_jx8p_state::gate_array_r(offs_t offset) -{ - return 0; -} - -void roland_jx8p_state::gate_array_w(offs_t offset, u8 data) -{ -} - void roland_jx8p_state::jx8p_assigner_map(address_map &map) { map(0x0000, 0x001f).m(m_assignercpu, FUNC(hd6303r_cpu_device::m6801_io)); @@ -70,7 +61,7 @@ void roland_jx8p_state::jx8p_assigner_map(address_map &map) map(0x2000, 0x3fff).rw("cartslot", FUNC(generic_slot_device::read_ram), FUNC(generic_slot_device::write_ram)); map(0x4000, 0x4007).mirror(0x1ff8).r(FUNC(roland_jx8p_state::switches_r)); map(0x6000, 0x6000).mirror(0x1fff).w(FUNC(roland_jx8p_state::leds_w)); - map(0x8000, 0x87ff).mirror(0x1800).rw(FUNC(roland_jx8p_state::gate_array_r), FUNC(roland_jx8p_state::gate_array_w)); + map(0x8000, 0x87ff).mirror(0x1800).rw("key", FUNC(mb63h149_device::read), FUNC(mb63h149_device::write)); map(0xa000, 0xa7ff).mirror(0x1800).ram().share("nvram"); map(0xc000, 0xffff).rom().region("assigner", 0); } @@ -79,7 +70,7 @@ void roland_jx8p_state::superjx_assigner_map(address_map &map) { map(0x0000, 0x001f).m(m_assignercpu, FUNC(hd6303r_cpu_device::m6801_io)); map(0x0080, 0x00ff).ram(); // internal RAM - map(0x1000, 0x17ff).mirror(0x800).rw(FUNC(roland_jx8p_state::gate_array_r), FUNC(roland_jx8p_state::gate_array_w)); + map(0x1000, 0x17ff).mirror(0x800).rw("key", FUNC(mb63h149_device::read), FUNC(mb63h149_device::write)); map(0x2000, 0x3fff).rw("cartslot", FUNC(generic_slot_device::read_ram), FUNC(generic_slot_device::write_ram)); map(0x4000, 0x4007).mirror(0xff8).r(FUNC(roland_jx8p_state::switches_r)); map(0x5000, 0x5000).mirror(0xfff).w(FUNC(roland_jx8p_state::leds_w)); @@ -324,6 +315,9 @@ void roland_jx8p_state::jx8p(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // TC5517APL + battery + mb63h149_device &key(MB63H149(config, "key", 16_MHz_XTAL)); + key.int_callback().set_inputline(m_assignercpu, HD6301_IRQ_LINE); + GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, nullptr, "jx8p_cart"); //UPD7001(config, "adc", RES_K(27), CAP_P(47)); @@ -333,6 +327,13 @@ void roland_jx8p_state::jx8p(machine_config &config) JX8P_SYNTH(config, "synth", 16_MHz_XTAL / 2); } +void roland_jx8p_state::jx8po(machine_config &config) +{ + jx8p(config); + + MB63H130(config.replace(), "key", 16_MHz_XTAL); // no INT +} + void roland_jx8p_state::jx10(machine_config &config) { HD6303R(config, m_assignercpu, 16_MHz_XTAL / 2); // HD63B03RP @@ -340,6 +341,9 @@ void roland_jx8p_state::jx10(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // TC5564PL-20 + battery + mb63h149_device &key(MB63H149(config, "key", 16_MHz_XTAL)); + key.int_callback().set_inputline(m_assignercpu, HD6301_IRQ_LINE); + GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, nullptr, "jx8p_cart"); //UPD7001(config, "adc", RES_K(27), CAP_P(47)); @@ -414,7 +418,7 @@ ROM_START(mks70) ROM_LOAD("c-v103.ic1", 0x0000, 0x4000, CRC(4808729c) SHA1(0adcfa405d6f5be7c4c32ffa5b2e224c66e72f74)) ROM_END -SYST(1985, jx8p, 0, 0, jx8p, jx8p, roland_jx8p_state, empty_init, "Roland", "JX-8P Polyphonic Synthesizer (Ver. 3.x)", MACHINE_IS_SKELETON) -SYST(1985, jx8po, jx8p, 0, jx8p, jx8p, roland_jx8p_state, empty_init, "Roland", "JX-8P Polyphonic Synthesizer (Ver. 2.x)", MACHINE_IS_SKELETON) -SYST(1986, jx10, 0, 0, jx10, jx10, roland_jx8p_state, empty_init, "Roland", "JX-10 Super JX Polyphonic Synthesizer", MACHINE_IS_SKELETON) -SYST(1987, mks70, jx10, 0, jx10, mks70, roland_jx8p_state, empty_init, "Roland", "MKS-70 Super JX Polyphonic Synthesizer", MACHINE_IS_SKELETON) +SYST(1985, jx8p, 0, 0, jx8p, jx8p, roland_jx8p_state, empty_init, "Roland", "JX-8P Polyphonic Synthesizer (Ver. 3.x)", MACHINE_IS_SKELETON) +SYST(1985, jx8po, jx8p, 0, jx8po, jx8p, roland_jx8p_state, empty_init, "Roland", "JX-8P Polyphonic Synthesizer (Ver. 2.x)", MACHINE_IS_SKELETON) +SYST(1986, jx10, 0, 0, jx10, jx10, roland_jx8p_state, empty_init, "Roland", "JX-10 Super JX Polyphonic Synthesizer", MACHINE_IS_SKELETON) +SYST(1987, mks70, jx10, 0, jx10, mks70, roland_jx8p_state, empty_init, "Roland", "MKS-70 Super JX Polyphonic Synthesizer", MACHINE_IS_SKELETON) diff --git a/src/mame/machine/mb63h149.cpp b/src/mame/machine/mb63h149.cpp new file mode 100644 index 00000000000..b1091768c13 --- /dev/null +++ b/src/mame/machine/mb63h149.cpp @@ -0,0 +1,108 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/*************************************************************************** + + Roland MB63H149 gate array + + This ASIC was used to scan piano keyboards on several synthesizers. + Two mode pins allow it to interface with various microcontroller types. + It may generate the microcontroller clock, share one with it or be + independently clocked. It also can write to and read from a 2048 x + 8-bit SRAM over a private bus. + + MB63H130 was an older version of MB63H149 with a slightly different + pinout and no interrupt output. + +***************************************************************************/ + +#include "emu.h" +#include "mb63h149.h" + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definitions +DEFINE_DEVICE_TYPE(MB63H149, mb63h149_device, "mb63h149", "Roland MB63H149 Key Assigner") +DEFINE_DEVICE_TYPE(MB63H130, mb63h130_device, "mb63h130", "Roland MB63H130 Key Assigner") + + +//************************************************************************** +// DEVICE IMPLEMENTATION +//************************************************************************** + +//------------------------------------------------- +// mb63h149_device - constructor +//------------------------------------------------- + +mb63h149_device::mb63h149_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, type, tag, owner, clock) + , m_int_callback(*this) +{ +} + +mb63h149_device::mb63h149_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : mb63h149_device(mconfig, MB63H149, tag, owner, clock) +{ +} + + +//------------------------------------------------- +// mb63h130_device - constructor +//------------------------------------------------- + +mb63h130_device::mb63h130_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : mb63h149_device(mconfig, MB63H130, tag, owner, clock) +{ +} + + +//------------------------------------------------- +// device_resolve_objects - resolve objects that +// may be needed for other devices to set +// initial conditions at start time +//------------------------------------------------- + +void mb63h149_device::device_resolve_objects() +{ + m_int_callback.resolve_safe(); +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void mb63h149_device::device_start() +{ +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void mb63h149_device::device_reset() +{ +} + + +//------------------------------------------------- +// read - microcontroller read from gate array +//------------------------------------------------- + +u8 mb63h149_device::read(offs_t offset) +{ + // TODO + return 0; +} + + +//------------------------------------------------- +// write - microcontroller write to gate array +//------------------------------------------------- + +void mb63h149_device::write(offs_t offset, u8 data) +{ + // TODO +} diff --git a/src/mame/machine/mb63h149.h b/src/mame/machine/mb63h149.h new file mode 100644 index 00000000000..7122e402984 --- /dev/null +++ b/src/mame/machine/mb63h149.h @@ -0,0 +1,60 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/*************************************************************************** + + Roland MB63H149 gate array + +***************************************************************************/ + +#ifndef MAME_MACHINE_MB63H149_H +#define MAME_MACHINE_MB63H149_H + +#pragma once + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> mb63h149_device + +class mb63h149_device : public device_t +{ +public: + // device type constructor + mb63h149_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + // configuration + auto int_callback() { return m_int_callback.bind(); } + + // CPU read/write handlers + u8 read(offs_t offset); + void write(offs_t offset, u8 data); + +protected: + mb63h149_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + + // device-specific overrides + virtual void device_resolve_objects() override; + virtual void device_start() override; + virtual void device_reset() override; + +private: + // callback objects + devcb_write_line m_int_callback; +}; + +// ======================> mb63h130_device + +class mb63h130_device : public mb63h149_device +{ +public: + // device type constructor + mb63h130_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); +}; + + +// device type declarations +DECLARE_DEVICE_TYPE(MB63H149, mb63h149_device) +DECLARE_DEVICE_TYPE(MB63H130, mb63h130_device) + +#endif // MAME_MACHINE_MB63H149_H