diff options
author | 2018-10-10 17:18:38 -0400 | |
---|---|---|
committer | 2018-10-10 17:18:38 -0400 | |
commit | 73cc34252959ffb4df10f7896299919d16ba584d (patch) | |
tree | 6f2ebf7b389fc974b55f543a817faa5297be89aa | |
parent | bc9db8dafc289b7bfcde4e9d454bf6809babab38 (diff) | |
parent | 2fa61e9d607afd9a4c6a365120a03fe22136e535 (diff) |
Merge pull request #4112 from hp9k/tms9914_feoi_fix
tms9914: latch EOI flag until next byte is sent
-rw-r--r-- | src/devices/machine/tms9914.cpp | 23 | ||||
-rw-r--r-- | src/devices/machine/tms9914.h | 1 |
2 files changed, 16 insertions, 8 deletions
diff --git a/src/devices/machine/tms9914.cpp b/src/devices/machine/tms9914.cpp index 4f47302a187..10010848f9d 100644 --- a/src/devices/machine/tms9914.cpp +++ b/src/devices/machine/tms9914.cpp @@ -285,6 +285,19 @@ WRITE8_MEMBER(tms9914_device::reg8_w) case REG_W_DO: m_reg_do = data; + + if (m_next_eoi) { + m_next_eoi = false; + if (!m_swrst) { + if (m_t_eoi_state == FSM_T_ENIS) { + m_t_eoi_state = FSM_T_ENRS; + } else if (m_t_eoi_state == FSM_T_ENAS) { + m_t_eoi_state = FSM_T_ERAS; + } + } + + } + set_accrq(false); if (!m_swrst) { BIT_CLR(m_reg_int0_status , REG_INT0_BO_BIT); @@ -1131,6 +1144,7 @@ void tms9914_device::if_cmd_received(uint8_t if_cmd) void tms9914_device::dab_received(uint8_t dab , bool eoi) { LOG("%.6f RX DAB:%02x/%d\n" , machine().time().as_double() , dab , eoi); + m_reg_di = dab; if (!m_shdw) { m_ah_anhs = true; set_int0_bit(REG_INT0_BI_BIT); @@ -1141,7 +1155,6 @@ void tms9914_device::dab_received(uint8_t dab , bool eoi) if (m_hdfe && eoi) { m_ah_aehs = true; } - m_reg_di = dab; } void tms9914_device::do_aux_cmd(unsigned cmd , bool set_bit) @@ -1219,13 +1232,7 @@ void tms9914_device::do_aux_cmd(unsigned cmd , bool set_bit) break; case AUXCMD_FEOI: - if (!m_swrst) { - if (m_t_eoi_state == FSM_T_ENIS) { - m_t_eoi_state = FSM_T_ENRS; - } else if (m_t_eoi_state == FSM_T_ENAS) { - m_t_eoi_state = FSM_T_ERAS; - } - } + m_next_eoi = true; break; case AUXCMD_LON: diff --git a/src/devices/machine/tms9914.h b/src/devices/machine/tms9914.h index ff5f62e6680..08b413af2d9 100644 --- a/src/devices/machine/tms9914.h +++ b/src/devices/machine/tms9914.h @@ -317,6 +317,7 @@ private: void update_ifc(); void update_ren(); void set_accrq(bool state); + bool m_next_eoi; }; // device type definition |