mirror of
https://github.com/holub/mame
synced 2025-04-24 09:20:02 +03:00
(MESS) ibm5150: Fixed keyboard regression introduced in r24103. On the ibm5150 the PPI PB2 output cannot influence the mainboard keyboard data output. (nw)
This commit is contained in:
parent
766c611365
commit
089c826d6c
@ -130,6 +130,9 @@ public:
|
||||
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w );
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user