summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine
diff options
context:
space:
mode:
author Wilbert Pol <wilbert@jdg.info>2013-09-10 20:54:34 +0000
committer Wilbert Pol <wilbert@jdg.info>2013-09-10 20:54:34 +0000
commit089c826d6c978ce28eeb6dd2165a1798d8ffb799 (patch)
tree72ae6bf958e66d46286c2913da33ba2adadfc4c7 /src/mess/machine
parent766c611365a0ba0ffce37e4eb91dff9184a1c381 (diff)
(MESS) ibm5150: Fixed keyboard regression introduced in r24103. On the ibm5150 the PPI PB2 output cannot influence the mainboard keyboard data output. (nw)
Diffstat (limited to 'src/mess/machine')
-rw-r--r--src/mess/machine/genpc.c36
1 files changed, 30 insertions, 6 deletions
diff --git a/src/mess/machine/genpc.c b/src/mess/machine/genpc.c
index b0d9debb9cd..0666d716db9 100644
--- a/src/mess/machine/genpc.c
+++ b/src/mess/machine/genpc.c
@@ -294,6 +294,21 @@ const struct pit8253_interface pc_pit8253_config =
* ON ON - one disk drive
*
**********************************************************/
+WRITE_LINE_MEMBER( ibm5150_mb_device::keyboard_clock_w )
+{
+ if (!m_ppi_keyboard_clear && !state && !m_ppi_shift_enable)
+ {
+ m_ppi_shift_enable = m_ppi_shift_register & 0x01;
+
+ m_ppi_shift_register >>= 1;
+ m_ppi_shift_register |= m_ppi_data_signal << 7;
+
+ m_pic8259->ir1_w(m_ppi_shift_enable);
+ m_pc_kbdc->data_write_from_mb(!m_ppi_shift_enable);
+ }
+}
+
+
WRITE_LINE_MEMBER( ibm5160_mb_device::keyboard_clock_w )
{
if (!m_ppi_keyboard_clear && !state && !m_ppi_shift_enable)
@@ -427,6 +442,12 @@ static const pc_kbdc_interface pc_kbdc_intf =
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, keyboard_data_w)
};
+static const pc_kbdc_interface pc_kbdc_intf_5150 =
+{
+ DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5150_mb_device, keyboard_clock_w),
+ DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, keyboard_data_w)
+};
+
/**********************************************************
*
* NMI handling
@@ -684,6 +705,9 @@ static const cassette_interface ibm5150_cassette_interface =
static MACHINE_CONFIG_FRAGMENT( ibm5150_mb_config )
MCFG_FRAGMENT_ADD(ibm5160_mb_config)
+ MCFG_DEVICE_REMOVE("pc_kbdc")
+ MCFG_PC_KBDC_ADD("pc_kbdc", pc_kbdc_intf_5150)
+
MCFG_CASSETTE_ADD( "cassette", ibm5150_cassette_interface )
MACHINE_CONFIG_END
@@ -843,15 +867,15 @@ WRITE8_MEMBER( ibm5150_mb_device::pc_ppi_portb_w )
m_cassette->change_state(( data & 0x08 ) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED,CASSETTE_MASK_MOTOR);
- m_ppi_clock_signal = ( m_ppi_keyb_clock ) ? 1 : 0;
- m_pc_kbdc->clock_write_from_mb(m_ppi_clock_signal);
-
-
/* If PB7 is set clear the shift register and reset the IRQ line */
if ( m_ppi_keyboard_clear )
{
- m_pic8259->ir1_w(0);
m_ppi_shift_register = 0;
- m_ppi_shift_enable = 1;
+ m_ppi_shift_enable = 0;
+ m_pic8259->ir1_w(m_ppi_shift_enable);
}
+
+ m_pc_kbdc->data_write_from_mb(!m_ppi_shift_enable);
+ m_ppi_clock_signal = ( m_ppi_keyb_clock ) ? 1 : 0;
+ m_pc_kbdc->clock_write_from_mb(m_ppi_clock_signal);
}