diff options
author | Lord-Nightmare <Lord-Nightmare@users.noreply.github.com> | 2017-03-10 10:46:51 -0500 |
---|---|---|
committer | Lord-Nightmare <Lord-Nightmare@users.noreply.github.com> | 2017-03-10 11:01:46 -0500 |
commit | 5cabab001fbdf0a8430ace23c4fbfd5b13519f03 (patch) | |
tree | 7584324bf95e1c47015cc71245bd3b24c658f4ee | |
parent | 3e867504c1f13b0a0e24f9c9428e7ca8539dcd23 (diff) |
pes.cpp: use combined /RS and /WS function since the MCU/CPU can in theory change both lines at once, and since it uses a TMS5220C it does matter in this case. [Lord Nightmare]
-rw-r--r-- | src/mame/drivers/pes.cpp | 12 | ||||
-rw-r--r-- | src/mame/includes/pes.h | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/mame/drivers/pes.cpp b/src/mame/drivers/pes.cpp index 0461e47042b..d5d7cb0ba32 100644 --- a/src/mame/drivers/pes.cpp +++ b/src/mame/drivers/pes.cpp @@ -117,15 +117,13 @@ WRITE8_MEMBER(pes_state::data_from_i8031) } /* Port Handlers */ -WRITE8_MEMBER( pes_state::rsws_w ) +WRITE8_MEMBER( pes_state::rsq_wsq_w ) { - m_wsstate = data&0x1; // /ws is bit 0 - m_rsstate = (data&0x2)>>1; // /rs is bit 1 #ifdef DEBUG_PORTS - logerror("port0 write: RSWS states updated: /RS: %d, /WS: %d\n", m_rsstate, m_wsstate); + logerror("port0 write: RSWS states updated: /RS: %d, /WS: %d\n", (data&0x2)>>1, data&0x1); #endif - m_speech->rsq_w(m_rsstate); - m_speech->wsq_w(m_wsstate); + /* /RS is bit 1, /WS is bit 0 */ + m_speech->combined_rsq_wsq_w(space, 0, data&0x3); } WRITE8_MEMBER( pes_state::port1_w ) @@ -233,7 +231,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START(i80c31_io, AS_IO, 8, pes_state) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x0, 0x0) AM_WRITE(rsws_w) /* /WS(0) and /RS(1) */ + AM_RANGE(0x0, 0x0) AM_WRITE(rsq_wsq_w) /* /WS(0) and /RS(1) */ AM_RANGE(0x1, 0x1) AM_READWRITE(port1_r, port1_w) /* tms5220 reads and writes */ AM_RANGE(0x3, 0x3) AM_READWRITE(port3_r, port3_w) /* writes and reads from port 3, see top of file */ ADDRESS_MAP_END diff --git a/src/mame/includes/pes.h b/src/mame/includes/pes.h index 4ca2766f8f4..dcd93cda9f0 100644 --- a/src/mame/includes/pes.h +++ b/src/mame/includes/pes.h @@ -40,7 +40,7 @@ public: uint8_t m_infifo_head_ptr; // " head virtual void machine_reset() override; - DECLARE_WRITE8_MEMBER(rsws_w); + DECLARE_WRITE8_MEMBER(rsq_wsq_w); DECLARE_WRITE8_MEMBER(port1_w); DECLARE_WRITE8_MEMBER(port3_w); DECLARE_READ8_MEMBER(port1_r); |