hp9895: 2 bugs fixed: NMI handling & secondary addressing in PHI chip

This commit is contained in:
fulivi 2017-10-25 16:22:40 +02:00
parent 65d697d94d
commit a6b76aab2f
2 changed files with 5 additions and 1 deletions

View File

@ -484,6 +484,10 @@ WRITE8_MEMBER(hp9895_device::phi_dio_w)
WRITE_LINE_MEMBER(hp9895_device::phi_int_w)
{
m_cpu->set_input_line(INPUT_LINE_NMI , state);
if (state) {
// Ensure the event queue is emptied before executing any other instruction
m_cpu->yield();
}
}
READ8_MEMBER(hp9895_device::phi_reg_r)

View File

@ -1246,7 +1246,7 @@ bool phi_device::if_cmd_received(uint8_t byte)
}
} else {
// command is a secondary address
if (m_t_state == PHI_T_ID1 && my_addr) {
if (m_t_state == PHI_T_ID1 && (m_l_state == PHI_L_LADS) == !!lon_msg() && my_addr) {
// Start IDENTIFY sequence
m_t_state = PHI_T_ID2;
} else if (m_t_state >= PHI_T_ID2 && m_t_state <= PHI_T_ID6 && !my_addr) {