summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/compiskb.c
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2013-12-22 16:27:05 +0000
committer smf- <smf-@users.noreply.github.com>2013-12-22 16:27:05 +0000
commit6c3f17c5956faefd2f1dc026468db2da03eee2bc (patch)
tree275f9cacd98df9821ae9e0e2a2ff4d155a4df358 /src/mess/machine/compiskb.c
parentb4c7b67ff9a1b12dd414502864cee66628b3bd19 (diff)
replaced read rx/cts/dcd callbacks in I8251 with write handlers, which allows multiple chips to be connected together without using glue methods. [smf]
Diffstat (limited to 'src/mess/machine/compiskb.c')
-rw-r--r--src/mess/machine/compiskb.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/mess/machine/compiskb.c b/src/mess/machine/compiskb.c
index 19672df68d6..4a7ba9bc97c 100644
--- a/src/mess/machine/compiskb.c
+++ b/src/mess/machine/compiskb.c
@@ -18,6 +18,7 @@
//**************************************************************************
#define I8748_TAG "i8748"
+#define SPEAKER_TAG "speaker"
@@ -239,7 +240,6 @@ ioport_constructor compis_keyboard_device::device_input_ports() const
compis_keyboard_device::compis_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, COMPIS_KEYBOARD, "Compis Keyboard", tag, owner, clock, "compiskb", __FILE__),
- m_write_irq(*this),
m_maincpu(*this, I8748_TAG),
m_speaker(*this, SPEAKER_TAG),
m_y1(*this, "Y1"),
@@ -252,7 +252,7 @@ compis_keyboard_device::compis_keyboard_device(const machine_config &mconfig, co
m_y8(*this, "Y8"),
m_y9(*this, "Y9"),
m_special(*this, "SPECIAL"),
- m_so(1),
+ m_out_tx_handler(*this),
m_bus(0xff),
m_keylatch(0)
{
@@ -266,17 +266,8 @@ compis_keyboard_device::compis_keyboard_device(const machine_config &mconfig, co
void compis_keyboard_device::device_start()
{
// resolve callbacks
- m_write_irq.resolve_safe();
-}
-
-
-//-------------------------------------------------
-// so_r - serial output read
-//-------------------------------------------------
-
-READ_LINE_MEMBER( compis_keyboard_device::so_r )
-{
- return m_so;
+ m_out_tx_handler.resolve_safe();
+ m_out_tx_handler(1);
}
@@ -334,7 +325,7 @@ WRITE8_MEMBER( compis_keyboard_device::bus_w )
output_set_led_value(LED_CAPS, BIT(data, 6));
// serial data out
- m_so = BIT(data, 7);
+ m_out_tx_handler(BIT(data, 7));
}