From 2ca1e6fe12a3f94035ea24b3c27a4acf447f1830 Mon Sep 17 00:00:00 2001 From: AJR Date: Sat, 14 Mar 2020 19:33:09 -0400 Subject: [PATCH] New machines marked as NOT_WORKING ---------------------------------- Roland Juno-6 (JU-6) Polyphonic Synthesizer [DBWBP] --- scripts/target/mame/mess.lua | 1 + src/mame/drivers/juno6.cpp | 129 +++++++++++++++++++++++++++++++++++ src/mame/mame.lst | 3 + src/mame/mess.flt | 1 + 4 files changed, 134 insertions(+) create mode 100644 src/mame/drivers/juno6.cpp diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 20722dd928a..d8c42c5812f 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -3238,6 +3238,7 @@ files { createMESSProjects(_target, _subtarget, "roland") files { MAME_DIR .. "src/mame/drivers/alphajuno.cpp", + MAME_DIR .. "src/mame/drivers/juno6.cpp", MAME_DIR .. "src/mame/drivers/roland_cm32p.cpp", MAME_DIR .. "src/mame/drivers/roland_d10.cpp", MAME_DIR .. "src/mame/drivers/roland_d50.cpp", diff --git a/src/mame/drivers/juno6.cpp b/src/mame/drivers/juno6.cpp new file mode 100644 index 00000000000..49739a84e4f --- /dev/null +++ b/src/mame/drivers/juno6.cpp @@ -0,0 +1,129 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/**************************************************************************** + + Skeleton driver for Roland Juno-6 analog synthesizer. + + The original JU-6 had no MIDI support, but this feature could be and was + added through retrofits since the same 8049 program supports MIDI on the + Juno-60. + +****************************************************************************/ + +#include "emu.h" +#include "cpu/mcs48/mcs48.h" +#include "machine/74259.h" +#include "machine/clock.h" +#include "machine/i8251.h" +#include "machine/pit8253.h" + +class juno6_state : public driver_device +{ +public: + juno6_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_pit(*this, "pit%u", 1U) + , m_latch(*this, "latch") + , m_usart(*this, "usart") + { + } + + void juno6(machine_config &config); + +protected: + virtual void machine_start() override; + +private: + u8 keyboard_r(); + u8 db_r(); + void db_w(u8 data); + void p2_w(u8 data); + + void ext_map(address_map &map); + + required_device m_maincpu; + required_device_array m_pit; + required_device m_latch; + required_device m_usart; + + u8 m_db; +}; + +void juno6_state::machine_start() +{ + save_item(NAME(m_db)); +} + + +u8 juno6_state::keyboard_r() +{ + return 0; +} + +u8 juno6_state::db_r() +{ + u8 p2 = m_maincpu->p2_r(); + + if (!BIT(p2, 3)) + return m_usart->read(p2 & 0x01); + + return 0xff; +} + +void juno6_state::db_w(u8 data) +{ + u8 p2 = m_maincpu->p2_r(); + + if (!BIT(p2, 3)) + m_usart->write(p2 & 0x01, data); + if (!BIT(p2, 4)) + m_pit[0]->write(p2 & 0x03, data); + if (!BIT(p2, 5)) + m_pit[1]->write(p2 & 0x03, data); + + m_db = data; +} + +void juno6_state::p2_w(u8 data) +{ + if (!BIT(data, 7)) + m_latch->write_bit(data & 0x07, BIT(m_db, 7)); +} + +void juno6_state::ext_map(address_map &map) +{ + map(0x00, 0x00).mirror(0xff).r(FUNC(juno6_state::db_r)); +} + + +static INPUT_PORTS_START(juno6) +INPUT_PORTS_END + +void juno6_state::juno6(machine_config &config) +{ + I8049(config, m_maincpu, 11_MHz_XTAL); + m_maincpu->set_addrmap(AS_IO, &juno6_state::ext_map); + m_maincpu->p1_in_cb().set(FUNC(juno6_state::keyboard_r)); + m_maincpu->bus_out_cb().set(FUNC(juno6_state::db_w)); + m_maincpu->p2_out_cb().set(FUNC(juno6_state::p2_w)); + + PIT8253(config, m_pit[0]); + PIT8253(config, m_pit[1]); + + CD4099(config, m_latch); + + I8251(config, m_usart, 4_MHz_XTAL / 2); + m_usart->rts_handler().set(m_usart, FUNC(i8251_device::write_cts)); + + clock_device &midiclock(CLOCK(config, "midiclock", 4_MHz_XTAL / 8)); + midiclock.signal_handler().set(m_usart, FUNC(i8251_device::write_txc)); + midiclock.signal_handler().append(m_usart, FUNC(i8251_device::write_txc)); +} + +ROM_START(juno6) + ROM_REGION(0x800, "maincpu", 0) + ROM_LOAD("upd8049c-238.ic56", 0x000, 0x800, CRC(18fa7cc5) SHA1(eebda5bbe6c3153a5549de1853e69da403811df3)) +ROM_END + +SYST(1982, juno6, 0, 0, juno6, juno6, juno6_state, empty_init, "Roland", "Juno-6 (JU-6) Polyphonic Synthesizer", MACHINE_IS_SKELETON) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index ebb48ea4d0e..c141c9ee6ff 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -18389,6 +18389,9 @@ jungleyo @source:junior.cpp junior // +@source:juno6.cpp +juno6 // + @source:junofrst.cpp junofrst // GX310 (c) 1983 Konami junofrstg // GX310 (c) 1983 Konami + Gottlieb license diff --git a/src/mame/mess.flt b/src/mame/mess.flt index cf280103527..530479c3d6d 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -429,6 +429,7 @@ jtc.cpp juicebox.cpp juku.cpp junior.cpp +juno6.cpp jupace.cpp jupiter.cpp k1003.cpp