summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Curt Coder <curtcoder@mail.com>2014-11-02 11:39:22 +0200
committer Curt Coder <curtcoder@mail.com>2014-11-02 11:39:30 +0200
commitd273f3565cc56fb0eaed807601c8c054b2951126 (patch)
tree8ea813a6c3b0a6414c1983313759edd9f0f1ccb2
parentf1d9ba9df8c52c9441f49e9a1f6801c69109c7a2 (diff)
(MESS) victor9k: Keyboard WIP. (nw)
-rw-r--r--src/mess/drivers/victor9k.c2
-rw-r--r--src/mess/machine/victor9kb.c82
-rw-r--r--src/mess/machine/victor9kb.h2
3 files changed, 32 insertions, 54 deletions
diff --git a/src/mess/drivers/victor9k.c b/src/mess/drivers/victor9k.c
index 87e8122a879..f2408080bf7 100644
--- a/src/mess/drivers/victor9k.c
+++ b/src/mess/drivers/victor9k.c
@@ -770,6 +770,7 @@ WRITE_LINE_MEMBER( victor9k_state::via6_irq_w )
WRITE_LINE_MEMBER( victor9k_state::kbrdy_w )
{
+ //logerror("KBRDY %u\n", state);
m_via2->write_cb1(state);
m_pic->ir6_w(state ? CLEAR_LINE : ASSERT_LINE);
@@ -777,6 +778,7 @@ WRITE_LINE_MEMBER( victor9k_state::kbrdy_w )
WRITE_LINE_MEMBER( victor9k_state::kbdata_w )
{
+ //logerror("KBDATA %u\n", state);
m_via2->write_cb2(state);
m_via2->write_pa6(state);
}
diff --git a/src/mess/machine/victor9kb.c b/src/mess/machine/victor9kb.c
index 64b1ab01382..d4b5c4e57ee 100644
--- a/src/mess/machine/victor9kb.c
+++ b/src/mess/machine/victor9kb.c
@@ -28,7 +28,6 @@
const device_type VICTOR9K_KEYBOARD = &device_creator<victor9k_keyboard_device>;
-
//-------------------------------------------------
// ROM( victor9k_keyboard )
//-------------------------------------------------
@@ -237,28 +236,28 @@ ioport_constructor victor9k_keyboard_device::device_input_ports() const
// victor9k_keyboard_device - constructor
//-------------------------------------------------
-victor9k_keyboard_device::victor9k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, VICTOR9K_KEYBOARD, "Victor 9000 Keyboard", tag, owner, clock, "victor9kb", __FILE__),
- m_maincpu(*this, I8021_TAG),
- m_y0(*this, "Y0"),
- m_y1(*this, "Y1"),
- m_y2(*this, "Y2"),
- m_y3(*this, "Y3"),
- m_y4(*this, "Y4"),
- m_y5(*this, "Y5"),
- m_y6(*this, "Y6"),
- m_y7(*this, "Y7"),
- m_y8(*this, "Y8"),
- m_y9(*this, "Y9"),
- m_ya(*this, "YA"),
- m_yb(*this, "YB"),
- m_yc(*this, "YC"),
- m_kbrdy_handler(*this),
- m_kbdata_handler(*this),
- m_y(0),
- m_kbrdy(1),
- m_kbdata(1),
- m_kback(1)
+victor9k_keyboard_device::victor9k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, VICTOR9K_KEYBOARD, "Victor 9000 Keyboard", tag, owner, clock, "victor9kb", __FILE__),
+ m_maincpu(*this, I8021_TAG),
+ m_y0(*this, "Y0"),
+ m_y1(*this, "Y1"),
+ m_y2(*this, "Y2"),
+ m_y3(*this, "Y3"),
+ m_y4(*this, "Y4"),
+ m_y5(*this, "Y5"),
+ m_y6(*this, "Y6"),
+ m_y7(*this, "Y7"),
+ m_y8(*this, "Y8"),
+ m_y9(*this, "Y9"),
+ m_ya(*this, "YA"),
+ m_yb(*this, "YB"),
+ m_yc(*this, "YC"),
+ m_kbrdy_handler(*this),
+ m_kbdata_handler(*this),
+ m_y(0),
+ m_kbrdy(1),
+ m_kbdata(1),
+ m_kback(1)
{
}
@@ -291,36 +290,17 @@ void victor9k_keyboard_device::device_reset()
//-------------------------------------------------
-// kbrdy_r -
-//-------------------------------------------------
-
-READ_LINE_MEMBER( victor9k_keyboard_device::kbrdy_r )
-{
- return m_kbrdy;
-}
-
-
-//-------------------------------------------------
// kback_w -
//-------------------------------------------------
WRITE_LINE_MEMBER( victor9k_keyboard_device::kback_w )
{
+ //logerror("KBACK %u\n", state);
m_kback = state;
}
//-------------------------------------------------
-// kbdata_r -
-//-------------------------------------------------
-
-READ_LINE_MEMBER( victor9k_keyboard_device::kbdata_r )
-{
- return m_kbdata;
-}
-
-
-//-------------------------------------------------
// kb_p1_r -
//-------------------------------------------------
@@ -360,7 +340,7 @@ WRITE8_MEMBER( victor9k_keyboard_device::kb_p1_w )
m_y = data & 0x0f;
}
- logerror("P1 %02x\n", data);
+ //logerror("P1 %02x\n", data);
}
@@ -374,14 +354,14 @@ WRITE8_MEMBER( victor9k_keyboard_device::kb_p2_w )
bit description
- P20 keylatch enable ?
- P21
- P22 key available ?
- P23 data ?
+ P20 ?
+ P21 KBRDY
+ P22 ?
+ P23 KBDATA
*/
- int kbrdy = BIT(data, 2);
+ int kbrdy = BIT(data, 1);
if (m_kbrdy != kbrdy)
{
@@ -397,7 +377,7 @@ WRITE8_MEMBER( victor9k_keyboard_device::kb_p2_w )
m_kbdata_handler(m_kbdata);
}
- logerror("P2 %01x\n", data & 0x0f);
+ //logerror("P2 %02x\n", data);
}
@@ -407,7 +387,5 @@ WRITE8_MEMBER( victor9k_keyboard_device::kb_p2_w )
READ8_MEMBER( victor9k_keyboard_device::kb_t1_r )
{
- logerror("read T1 %u\n", m_kback);
-
return m_kback;
}
diff --git a/src/mess/machine/victor9kb.h b/src/mess/machine/victor9kb.h
index a126ac67069..76bbd17171c 100644
--- a/src/mess/machine/victor9kb.h
+++ b/src/mess/machine/victor9kb.h
@@ -51,9 +51,7 @@ public:
virtual machine_config_constructor device_mconfig_additions() const;
virtual ioport_constructor device_input_ports() const;
- DECLARE_READ_LINE_MEMBER( kbrdy_r );
DECLARE_WRITE_LINE_MEMBER( kback_w );
- DECLARE_READ_LINE_MEMBER( kbdata_r );
// not really public
DECLARE_READ8_MEMBER( kb_p1_r );