mirror of
https://github.com/mamedev/mame.git
synced 2024-11-18 10:06:19 +01:00
pia6821: roll back port A read change.
This commit is contained in:
parent
c5be2b3fe8
commit
0074e4df45
1 changed files with 6 additions and 5 deletions
|
@ -237,11 +237,12 @@ uint8_t pia6821_device::get_in_a_value()
|
|||
}
|
||||
}
|
||||
|
||||
// For port A, when the port is in output mode, other devices can drive the pins too.
|
||||
// If they load the lines so the voltage changes from what the PIA is outputting, that
|
||||
// value will be read back.
|
||||
// TODO: Figure out if any boards do this, and compensate.
|
||||
ret = (m_out_a & m_ddr_a) | (port_a_data & ~m_ddr_a);
|
||||
// - connected pins are always read
|
||||
// - disconnected pins read the output buffer in output mode
|
||||
// - disconnected pins are HI in input mode
|
||||
ret = (~m_port_a_z_mask & port_a_data) |
|
||||
( m_port_a_z_mask & m_ddr_a & m_out_a) |
|
||||
( m_port_a_z_mask & ~m_ddr_a);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue