From 6c05d358e7bec7834489184e024e482cb5897da9 Mon Sep 17 00:00:00 2001 From: Sylvain Glaize Date: Tue, 1 Sep 2020 21:34:31 +0200 Subject: [PATCH] =?UTF-8?q?VG5000=C2=B5=20update:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add support for the "Delta" key The "Delta" key on the VG5000ยต keyboard is wired to directly assert the NMI line of the Z80. The handler for the NMI in the BASIC ROM checks if the CTRL key is also depressed and then causes a soft reset. This routine can be hooked to produce other effects than soft reset. --- src/mame/drivers/vg5k.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/mame/drivers/vg5k.cpp b/src/mame/drivers/vg5k.cpp index 4ec747f2831..9aa760e8c35 100644 --- a/src/mame/drivers/vg5k.cpp +++ b/src/mame/drivers/vg5k.cpp @@ -82,6 +82,8 @@ public: void init_vg5k(); + DECLARE_INPUT_CHANGED_MEMBER(delta_button); + private: required_device m_maincpu; required_device m_ef9345; @@ -306,6 +308,8 @@ static INPUT_PORTS_START( vg5k ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START("direct") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_END) PORT_NAME("DELTA") PORT_CHANGED_MEMBER(DEVICE_SELF, vg5k_state, delta_button, 0) INPUT_PORTS_END @@ -327,6 +331,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(vg5k_state::vg5k_scanline) m_ef9345->update_scanline((uint16_t)param); } +INPUT_CHANGED_MEMBER(vg5k_state::delta_button) +{ + // The yellow Delta key on the keyboard is wired so that it asserts directly the NMI line of the Z80. + if (!newval) { + m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); + } +} + void vg5k_state::machine_start() { @@ -338,6 +350,7 @@ void vg5k_state::machine_reset() m_ef9345_offset = 0; } + /* F4 Character Displayer */ static const gfx_layout vg5k_charlayout = {