summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2020-03-04 13:58:40 -0500
committer AJR <ajrhacker@users.noreply.github.com>2020-03-04 14:00:26 -0500
commitc641fe72db4cf7a7a90e8c8b58157d8092b05207 (patch)
treed9ab093353f1cca66f603ba30f8076150dceea39
parent542955160393a13bc566742a53a8d4332619d09d (diff)
New machines marked as NOT_WORKING
---------------------------------- Korg DS-8 Digital Synthesizer [DBWBP] Korg 707 Performance Synthesizer [DBWBP]
-rw-r--r--scripts/target/mame/mess.lua1
-rw-r--r--src/mame/drivers/korgds8.cpp244
-rw-r--r--src/mame/mame.lst4
-rw-r--r--src/mame/mess.flt1
4 files changed, 250 insertions, 0 deletions
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index 3a9506798d3..bc462d1927f 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -2627,6 +2627,7 @@ files {
createMESSProjects(_target, _subtarget, "korg")
files {
+ MAME_DIR .. "src/mame/drivers/korgds8.cpp",
MAME_DIR .. "src/mame/drivers/korgdss1.cpp",
MAME_DIR .. "src/mame/drivers/korgm1.cpp",
MAME_DIR .. "src/mame/drivers/poly800.cpp",
diff --git a/src/mame/drivers/korgds8.cpp b/src/mame/drivers/korgds8.cpp
new file mode 100644
index 00000000000..88dd50fc9a2
--- /dev/null
+++ b/src/mame/drivers/korgds8.cpp
@@ -0,0 +1,244 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/****************************************************************************
+
+ Skeleton driver for Korg DS-8 synthesizer.
+
+****************************************************************************/
+
+#include "emu.h"
+#include "bus/generic/carts.h"
+#include "bus/generic/slot.h"
+//#include "bus/midi/midi.h"
+#include "cpu/upd7810/upd7810.h"
+#include "machine/nvram.h"
+#include "sound/ym2151.h"
+#include "video/hd44780.h"
+#include "emupal.h"
+#include "screen.h"
+#include "speaker.h"
+
+class korg_ds8_state : public driver_device
+{
+public:
+ korg_ds8_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_card(*this, "card")
+ , m_kbd(*this, "KBD%u", 0U)
+ , m_sw(*this, "SW%u", 0U)
+ , m_scan(0)
+ , m_card_bank(0)
+ {
+ }
+
+ void ds8(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+
+private:
+ HD44780_PIXEL_UPDATE(lcd_pixel_update);
+
+ u8 kbd_sw_r();
+ void scan_w(u8 data);
+ u8 card_r(offs_t offset);
+ void card_w(offs_t offset, u8 data);
+ void ddl_w(u8 data);
+ void line_mute_w(u8 data);
+ void led_data_w(offs_t offset, u8 data);
+
+ void mem_map(address_map &map);
+
+ void palette_init_ds8(palette_device &palette);
+
+ required_device<upd7810_device> m_maincpu;
+ required_device<generic_slot_device> m_card;
+ required_ioport_array<16> m_kbd;
+ optional_ioport_array<8> m_sw;
+
+ u8 m_scan;
+ u16 m_card_bank;
+};
+
+void korg_ds8_state::machine_start()
+{
+ save_item(NAME(m_scan));
+ save_item(NAME(m_card_bank));
+}
+
+HD44780_PIXEL_UPDATE(korg_ds8_state::lcd_pixel_update)
+{
+ if (x < 5 && y < 8 && line < 2 && pos < 40)
+ bitmap.pix16(line * 8 + y, pos * 6 + x) = state;
+}
+
+u8 korg_ds8_state::kbd_sw_r()
+{
+ if (BIT(m_scan, 4))
+ return m_sw[m_scan & 0x07].read_safe(0xff);
+ else
+ return m_kbd[m_scan & 0x0f]->read();
+}
+
+void korg_ds8_state::scan_w(u8 data)
+{
+ m_scan = data;
+}
+
+u8 korg_ds8_state::card_r(offs_t offset)
+{
+ return m_card->read_ram(offset | m_card_bank);
+}
+
+void korg_ds8_state::card_w(offs_t offset, u8 data)
+{
+ m_card->write_ram(offset | m_card_bank, data);
+}
+
+void korg_ds8_state::ddl_w(u8 data)
+{
+}
+
+void korg_ds8_state::line_mute_w(u8 data)
+{
+ m_card_bank = (BIT(data, 7) ? 0x2000 : 0) | (BIT(data, 6) ? 0x4000 : 0);
+}
+
+void korg_ds8_state::led_data_w(offs_t offset, u8 data)
+{
+}
+
+void korg_ds8_state::mem_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom().region("program", 0);
+ map(0x8000, 0x9fff).rw(FUNC(korg_ds8_state::card_r), FUNC(korg_ds8_state::card_w));
+ map(0xa000, 0xbfff).ram().share("nvram");
+ map(0xc000, 0xc7ff).ram();
+ map(0xe000, 0xe001).mirror(0x1e).rw("fm", FUNC(ym2164_device::read), FUNC(ym2164_device::write));
+ map(0xe020, 0xe020).mirror(0x1f).w(FUNC(korg_ds8_state::ddl_w));
+ map(0xe040, 0xe040).mirror(0x1f).w(FUNC(korg_ds8_state::line_mute_w));
+ map(0xe060, 0xe060).mirror(0x1f).rw("lcdc", FUNC(hd44780_device::db_r), FUNC(hd44780_device::db_w));
+ map(0xe080, 0xe081).mirror(0x1e).w(FUNC(korg_ds8_state::led_data_w));
+}
+
+
+static INPUT_PORTS_START(ds8)
+ PORT_START("KBD0") // CN3A/B-1
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD1") // CN3A/B-2
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD2") // CN3A/B-3
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD3") // CN3A/B-4
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD4") // CN3A/B-5
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD5") // CN3A/B-6
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD6") // CN3A/B-7
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD7") // CN3A/B-8
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD8") // CN3A/B-9
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD9") // CN4A/B-1
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD10") // CN4A/B-2
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD11") // CN4A/B-3
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD12") // CN4A/B-4
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD13") // CN4A/B-5
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD14") // CN4A/B-6
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("KBD15") // CN4A/B-7
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("SW0") // CN5A/B-5
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("SW1") // CN5A/B-5
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("SW2") // CN5A/B-5
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("SW3") // CN5A/B-5
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+
+ PORT_START("SW4") // CN5A/B-1
+ PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
+INPUT_PORTS_END
+
+void korg_ds8_state::palette_init_ds8(palette_device &palette)
+{
+ palette.set_pen_color(0, rgb_t(131, 136, 139));
+ palette.set_pen_color(1, rgb_t( 92, 83, 88));
+}
+
+void korg_ds8_state::ds8(machine_config &config)
+{
+ UPD7810(config, m_maincpu, 12_MHz_XTAL / 3); // µPD78C10CW (FIXME: internalize divider)
+ m_maincpu->set_addrmap(AS_PROGRAM, &korg_ds8_state::mem_map);
+ m_maincpu->pa_in_cb().set(FUNC(korg_ds8_state::kbd_sw_r));
+ m_maincpu->pb_out_cb().set(FUNC(korg_ds8_state::scan_w));
+ m_maincpu->pc_out_cb().set("lcdc", FUNC(hd44780_device::rs_w)).bit(5);
+ m_maincpu->pc_out_cb().append("lcdc", FUNC(hd44780_device::rw_w)).bit(6);
+ m_maincpu->pc_out_cb().append("lcdc", FUNC(hd44780_device::e_w)).bit(7);
+
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // µPD4364 + battery
+
+ GENERIC_CARTSLOT(config, m_card, generic_plain_slot, nullptr, "ds8_card");
+
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update("lcdc", FUNC(hd44780_device::screen_update));
+ screen.set_size(6*40, 8*2);
+ screen.set_visarea_full();
+ screen.set_palette("palette");
+
+ PALETTE(config, "palette", FUNC(korg_ds8_state::palette_init_ds8), 2);
+
+ hd44780_device &lcdc(HD44780(config, "lcdc", 0));
+ lcdc.set_lcd_size(2, 40);
+ lcdc.set_pixel_update_cb(FUNC(korg_ds8_state::lcd_pixel_update));
+
+ SPEAKER(config, "lspeaker").front_left();
+ SPEAKER(config, "rspeaker").front_right();
+
+ ym2164_device &fm(YM2164(config, "fm", 3.579545_MHz_XTAL)); // YM2164 + YM3012
+ fm.add_route(0, "lspeaker", 1.00);
+ fm.add_route(1, "rspeaker", 1.00);
+}
+
+ROM_START(ds8)
+ ROM_REGION(0x8000, "program", 0)
+ ROM_LOAD("870214.ic9", 0x0000, 0x8000, CRC(6b418e7c) SHA1(f16f9d87f1d424335a04ab36fef9386ed0b7b159))
+ROM_END
+
+ROM_START(korg707)
+ ROM_REGION(0x8000, "program", 0)
+ ROM_LOAD("870904.ic7", 0x0000, 0x8000, CRC(3eb80aae) SHA1(8574f48c9a1724c483ac8ee7c82ea46d1f583d6d)) // 27C256
+ROM_END
+
+SYST(1986, ds8, 0, 0, ds8, ds8, korg_ds8_state, empty_init, "Korg", "DS-8 Digital Synthesizer", MACHINE_IS_SKELETON)
+SYST(1987, korg707, 0, 0, ds8, ds8, korg_ds8_state, empty_init, "Korg", "707 Performance Synthesizer", MACHINE_IS_SKELETON)
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index bc06bb5ea27..f076c49e77e 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -18684,6 +18684,10 @@ kontest // GX800 (c) 198? (Japan)
@source:kopunch.cpp
kopunch // 834-0103 (c) 1981 Sega
+@source:korgds8.cpp
+ds8 //
+korg707 //
+
@source:korgdss1.cpp
dss1 //
dssmsrk //
diff --git a/src/mame/mess.flt b/src/mame/mess.flt
index 51027a25322..ed9265cf7d7 100644
--- a/src/mame/mess.flt
+++ b/src/mame/mess.flt
@@ -438,6 +438,7 @@ kc.cpp
kdt6.cpp
kim1.cpp
konin.cpp
+korgds8.cpp
korgdss1.cpp
korgm1.cpp
kramermc.cpp