From f6213d124841f9e24d3f9caddf5a991781e8d46b Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 7 Feb 2020 21:45:00 -0500 Subject: New machines marked as NOT_WORKING ---------------------------------- Ampex 230 [Bitsavers] --- scripts/target/mame/mess.lua | 2 + src/mame/drivers/ampex210.cpp | 100 ++++++++++++++-- src/mame/machine/ampex210_kbd.cpp | 246 ++++++++++++++++++++++++++++++++++++++ src/mame/machine/ampex210_kbd.h | 40 +++++++ src/mame/mame.lst | 1 + 5 files changed, 380 insertions(+), 9 deletions(-) create mode 100644 src/mame/machine/ampex210_kbd.cpp create mode 100644 src/mame/machine/ampex210_kbd.h diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index a4ea8bf412c..4435c641019 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -4075,6 +4075,8 @@ files { MAME_DIR .. "src/mame/drivers/am1000.cpp", MAME_DIR .. "src/mame/drivers/ampex.cpp", MAME_DIR .. "src/mame/drivers/ampex210.cpp", + MAME_DIR .. "src/mame/machine/ampex210_kbd.cpp", + MAME_DIR .. "src/mame/machine/ampex210_kbd.h", MAME_DIR .. "src/mame/drivers/ampscarp.cpp", MAME_DIR .. "src/mame/drivers/amust.cpp", MAME_DIR .. "src/mame/drivers/anzterm.cpp", diff --git a/src/mame/drivers/ampex210.cpp b/src/mame/drivers/ampex210.cpp index 6f9c0152eea..57ce13e1672 100644 --- a/src/mame/drivers/ampex210.cpp +++ b/src/mame/drivers/ampex210.cpp @@ -2,14 +2,17 @@ // copyright-holders:AJR /*************************************************************************** - Skeleton driver for Ampex 210/210+ video display terminals. + Skeleton driver for Ampex 210(+) and 230(+) video display terminals. ****************************************************************************/ #include "emu.h" #include "cpu/z80/z80.h" +#include "machine/ampex210_kbd.h" #include "machine/mos6551.h" #include "machine/nvram.h" +#include "machine/z80ctc.h" +#include "machine/z80dart.h" #include "video/scn2674.h" #include "screen.h" @@ -24,15 +27,21 @@ public: { } void ampex210p(machine_config &config); + void ampex230(machine_config &config); private: + void common_video(machine_config &config); + SCN2672_DRAW_CHARACTER_MEMBER(draw_character); - void mem_map(address_map &map); - void io_map(address_map &map); + void ampex210_mem(address_map &map); + void ampex230_mem(address_map &map); + void ampex210_io(address_map &map); + void ampex230_io(address_map &map); void vram_map(address_map &map); + void vram2_map(address_map &map); - required_device m_maincpu; + required_device m_maincpu; required_region_ptr m_chargen; }; @@ -41,14 +50,22 @@ SCN2672_DRAW_CHARACTER_MEMBER(ampex210_state::draw_character) { } -void ampex210_state::mem_map(address_map &map) +void ampex210_state::ampex210_mem(address_map &map) { map(0x0000, 0x7fff).rom().region("maincpu", 0); map(0x8000, 0x87ff).ram().share("nvram"); map(0x8800, 0x9fff).ram(); } -void ampex210_state::io_map(address_map &map) +void ampex210_state::ampex230_mem(address_map &map) +{ + map(0x0000, 0x7fff).rom().region("maincpu", 0); + map(0x8000, 0x8007).rw("pvtc", FUNC(scn2672_device::read), FUNC(scn2672_device::write)); + map(0xa000, 0xbfff).ram(); + map(0xc000, 0xdfff).ram().share("nvram"); +} + +void ampex210_state::ampex210_io(address_map &map) { map.global_mask(0xff); map(0x00, 0x07).rw("pvtc", FUNC(scn2672_device::read), FUNC(scn2672_device::write)); @@ -59,11 +76,27 @@ void ampex210_state::io_map(address_map &map) map(0xc7, 0xc7).nopw(); } +void ampex210_state::ampex230_io(address_map &map) +{ + map.global_mask(0xff); + map(0x10, 0x10).w("pvtc", FUNC(scn2672_device::buffer_w)); + map(0x11, 0x11).r("pvtc", FUNC(scn2672_device::buffer_r)); + map(0x12, 0x12).w("pvtc", FUNC(scn2672_device::attr_buffer_w)); + map(0x13, 0x13).r("pvtc", FUNC(scn2672_device::attr_buffer_r)); + map(0x30, 0x33).rw("ctc", FUNC(z80ctc_device::read), FUNC(z80ctc_device::write)); + map(0x40, 0x43).rw("dart", FUNC(z80dart_device::ba_cd_r), FUNC(z80dart_device::ba_cd_w)); +} + void ampex210_state::vram_map(address_map &map) { map(0x0000, 0x1fff).ram(); // MB8464A-10L (second half unused?) } +void ampex210_state::vram2_map(address_map &map) +{ + map(0x0000, 0x1fff).ram(); +} + static INPUT_PORTS_START(ampex210p) INPUT_PORTS_END @@ -72,8 +105,8 @@ INPUT_PORTS_END void ampex210_state::ampex210p(machine_config &config) { Z80(config, m_maincpu, 3.6864_MHz_XTAL); // Z80ACPU; clock uncertain - m_maincpu->set_addrmap(AS_PROGRAM, &ex210_state::mem_map); - m_maincpu->set_addrmap(AS_IO, &ex210_state::io_map); + m_maincpu->set_addrmap(AS_PROGRAM, &ex210_state::ampex210_mem); + m_maincpu->set_addrmap(AS_IO, &ex210_state::ampex210_io); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // UM6116-2 @@ -88,11 +121,51 @@ void ampex210_state::ampex210p(machine_config &config) pvtc.set_screen("screen"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_color(rgb_t::amber()); screen.set_raw(19.602_MHz_XTAL, 900, 0, 720, 363, 0, 300); //screen.set_raw(32.147_MHz_XTAL, 1476, 0, 1188, 363, 0, 300); screen.set_screen_update("pvtc", FUNC(scn2672_device::screen_update)); } +static const z80_daisy_config daisy_chain[] = +{ + { "dart" }, + { "ctc" }, + { nullptr } +}; + +void ampex210_state::ampex230(machine_config &config) +{ + Z80(config, m_maincpu, 3.6864_MHz_XTAL); // Z80ACPU; clock uncertain + m_maincpu->set_addrmap(AS_PROGRAM, &ex210_state::ampex230_mem); + m_maincpu->set_addrmap(AS_IO, &ex210_state::ampex230_io); + m_maincpu->set_daisy_config(daisy_chain); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + z80ctc_device &ctc(Z80CTC(config, "ctc", 3.6864_MHz_XTAL)); // Z8430AB1 + ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); + + z80dart_device &dart(Z80DART(config, "dart", 3.6864_MHz_XTAL)); // Z80847004PSC + dart.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); + + AMPEX230_KEYBOARD(config, "keyboard"); + + scn2672_device &pvtc(SCN2672(config, "pvtc", 19.602_MHz_XTAL / 9)); // MC2672B4P + pvtc.intr_callback().set_inputline("maincpu", INPUT_LINE_NMI); + pvtc.set_character_width(9); + pvtc.set_display_callback(FUNC(ampex210_state::draw_character)); + pvtc.set_addrmap(0, &ex210_state::vram_map); + pvtc.set_addrmap(1, &ex210_state::vram2_map); + pvtc.set_screen("screen"); + + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_color(rgb_t::amber()); + screen.set_raw(19.602_MHz_XTAL, 900, 0, 720, 363, 0, 312); + //screen.set_raw(32.147_MHz_XTAL, 1476, 0, 1188, 363, 0, 312); + screen.set_screen_update("pvtc", FUNC(scn2672_device::screen_update)); +} + ROM_START(ampex210p) // Z80 (+6551,MC2672,3515260-01, 3 xtals, speaker) // 8k ram // amber ROM_REGION(0x8000, "maincpu", 0) @@ -102,4 +175,13 @@ ROM_START(ampex210p) // Z80 (+6551,MC2672,3515260-01, 3 xtals, speaker) // 8k ra ROM_LOAD("35-526-01.u3", 0x0000, 0x1000, CRC(4659bcd2) SHA1(554574f55ed875baba0a6133648c44df763cc5c4)) ROM_END -COMP(1989, ampex210p, 0, 0, ampex210p, ampex210p, ampex210_state, empty_init, "Ampex", "210+", MACHINE_IS_SKELETON) +ROM_START(ampex230) + ROM_REGION(0x8000, "maincpu", 0) + ROM_LOAD("230_u11.bin", 0x0000, 0x8000, CRC(c8f93719) SHA1(81019b42245ca60c7de3ee5d3194c4d22fd38a8d)) + + ROM_REGION(0x2000, "chargen", 0) + ROM_LOAD("230_u2.bin", 0x0000, 0x2000, CRC(7143b773) SHA1(616d3c0c1a1f7a00bf16857324043955ab842994)) +ROM_END + +COMP(1989, ampex210p, 0, 0, ampex210p, ampex210p, ampex210_state, empty_init, "Ampex", "210+", MACHINE_IS_SKELETON) +COMP(1989, ampex230, 0, 0, ampex230, ampex210p, ampex210_state, empty_init, "Ampex", "230", MACHINE_IS_SKELETON) diff --git a/src/mame/machine/ampex210_kbd.cpp b/src/mame/machine/ampex210_kbd.cpp new file mode 100644 index 00000000000..177a1f66a42 --- /dev/null +++ b/src/mame/machine/ampex210_kbd.cpp @@ -0,0 +1,246 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/******************************************************************************* + + Keyboard emulation for Ampex 210 and related terminals. + +*******************************************************************************/ + +#include "emu.h" +#include "ampex210_kbd.h" + +//************************************************************************** +// DEVICE TYPE DEFINITION +//************************************************************************** + +DEFINE_DEVICE_TYPE(AMPEX230_KEYBOARD, ampex230_keyboard_device, "ampex230_kbd", "Ampex 230 Keyboard") + +ampex230_keyboard_device::ampex230_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, AMPEX230_KEYBOARD, tag, owner, clock) + , m_mcu(*this, "mcu") + , m_key_row(*this, "ROW%d", 0) + , m_key_scan(0) +{ +} + +//************************************************************************** +// INPUT MATRIX +//************************************************************************** + +static INPUT_PORTS_START(ampex230_keyboard) + PORT_START("ROW0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW6") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW7") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW8") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW9") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW10") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW11") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW12") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) + + PORT_START("ROW13") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) +INPUT_PORTS_END + +ioport_constructor ampex230_keyboard_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(ampex230_keyboard); +} + +//************************************************************************** +// DEVICE INITIALIZATION AND STARTUP +//************************************************************************** + +void ampex230_keyboard_device::device_resolve_objects() +{ +} + +void ampex230_keyboard_device::device_start() +{ + save_item(NAME(m_key_scan)); +} + +//************************************************************************** +// MCU I/O HANDLERS +//************************************************************************** + +u8 ampex230_keyboard_device::bus_r() +{ + u8 result = 0xff; + for (int j = 0; j < 14; j++) + if (!BIT(m_key_scan, j)) + result &= m_key_row[j]->read(); + + return result; +} + +READ_LINE_MEMBER(ampex230_keyboard_device::t0_r) +{ + return 1; +} + +READ_LINE_MEMBER(ampex230_keyboard_device::t1_r) +{ + return 1; +} + +void ampex230_keyboard_device::p1_w(u8 data) +{ + m_key_scan = (m_key_scan & 0x00ff) | u16(data & 0x3f) << 8; +} + +void ampex230_keyboard_device::p2_w(u8 data) +{ + m_key_scan = (m_key_scan & 0x3f00) | data; +} + +//************************************************************************** +// CONFIGURATION AND ROM DEFINITION +//************************************************************************** + +void ampex230_keyboard_device::device_add_mconfig(machine_config &config) +{ + I8048(config, m_mcu, 4.9152_MHz_XTAL); // TMP8048P-1251 + m_mcu->bus_in_cb().set(FUNC(ampex230_keyboard_device::bus_r)); + m_mcu->t0_in_cb().set(FUNC(ampex230_keyboard_device::t0_r)); + m_mcu->t1_in_cb().set(FUNC(ampex230_keyboard_device::t1_r)); + m_mcu->p1_out_cb().set(FUNC(ampex230_keyboard_device::p1_w)); + m_mcu->p2_out_cb().set(FUNC(ampex230_keyboard_device::p2_w)); +} + +ROM_START(ampex230_kbd) + ROM_REGION(0x400, "mcu", 0) + ROM_LOAD("3515245-05.u1", 0x000, 0x400, CRC(f8133738) SHA1(46953d6b511ee37ca0aa2316af39c875b22ee2a7)) +ROM_END + +const tiny_rom_entry *ampex230_keyboard_device::device_rom_region() const +{ + return ROM_NAME(ampex230_kbd); +} diff --git a/src/mame/machine/ampex210_kbd.h b/src/mame/machine/ampex210_kbd.h new file mode 100644 index 00000000000..7512d9deaee --- /dev/null +++ b/src/mame/machine/ampex210_kbd.h @@ -0,0 +1,40 @@ +// license:BSD-3-Clause +// copyright-holders:AJR + +#ifndef MAME_MACHINE_AMPEX210_KBD_H +#define MAME_MACHINE_AMPEX210_KBD_H + +#include "cpu/mcs48/mcs48.h" + +class ampex230_keyboard_device : public device_t +{ +public: + // construction/destruction + ampex230_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + +protected: + // device-level overrides + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual ioport_constructor device_input_ports() const override; + virtual void device_resolve_objects() override; + virtual void device_start() override; + +private: + // handlers + u8 bus_r(); + DECLARE_READ_LINE_MEMBER(t0_r); + DECLARE_READ_LINE_MEMBER(t1_r); + void p1_w(u8 data); + void p2_w(u8 data); + + required_device m_mcu; + required_ioport_array<14> m_key_row; + + u16 m_key_scan; +}; + +// device type declaration +DECLARE_DEVICE_TYPE(AMPEX230_KEYBOARD, ampex230_keyboard_device) + +#endif // MAME_MACHINE_AMPEX210_KBD_H diff --git a/src/mame/mame.lst b/src/mame/mame.lst index fbfe3027e17..7ca9f2efa5b 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -1288,6 +1288,7 @@ dialog80 // Ampex Dialogue 80 @source:ampex210.cpp ampex210p // +ampex230 // @source:ampro.cpp ampro // -- cgit v1.2.3