summaryrefslogtreecommitdiffstats
path: root/src/mame/machine/tigeroad.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/tigeroad.cpp')
-rw-r--r--src/mame/machine/tigeroad.cpp57
1 files changed, 14 insertions, 43 deletions
diff --git a/src/mame/machine/tigeroad.cpp b/src/mame/machine/tigeroad.cpp
index d433c60f52c..07bcd2fc3bd 100644
--- a/src/mame/machine/tigeroad.cpp
+++ b/src/mame/machine/tigeroad.cpp
@@ -133,19 +133,20 @@ READ16_MEMBER(pushman_state::mcu_comm_r)
m_mcu_semaphore = false;
return m_mcu_latch;
case 2: // expects bit 0 to be high when MCU has accepted command (other bits ignored)
- return m_host_semaphore ? 0x0000 : 0x0001;
+ return m_host_semaphore ? 0xfffe : 0xffff;
case 3: // expects bit 0 to be low when MCU has sent response (other bits ignored)
- return m_mcu_semaphore ? 0x0000 : 0x0001;
+ return m_mcu_semaphore ? 0xfffe : 0xffff;
}
logerror("unknown MCU read offset %X & %04X\n", offset, mem_mask);
- return 0x0000;
+ return 0xffff;
}
-WRITE16_MEMBER(pushman_state::mcu_comm_w)
+WRITE16_MEMBER(pushman_state::pushman_mcu_comm_w)
{
switch (offset & 0x01)
{
case 0:
+ data = flipendian_int16(data);
COMBINE_DATA(&m_host_latch);
break;
case 1:
@@ -156,6 +157,13 @@ WRITE16_MEMBER(pushman_state::mcu_comm_w)
}
}
+WRITE16_MEMBER(pushman_state::bballs_mcu_comm_w)
+{
+ COMBINE_DATA(&m_host_latch);
+ m_host_semaphore = true;
+ m_mcu->set_input_line(M68705_IRQ_LINE, ASSERT_LINE);
+}
+
WRITE8_MEMBER(pushman_state::mcu_pa_w)
{
m_mcu_output = (m_mcu_output & 0xff00) | (u16(data) & 0x00ff);
@@ -177,8 +185,8 @@ WRITE8_MEMBER(pushman_state::mcu_pc_w)
{
m_host_semaphore = false;
m_mcu->set_input_line(M68705_IRQ_LINE, CLEAR_LINE);
- m_mcu->pa_w(space, 0, (m_host_latch >> 8) & 0x00ff);
- m_mcu->pb_w(space, 0, (m_host_latch >> 0) & 0x00ff);
+ m_mcu->pa_w(space, 0, (m_host_latch >> 0) & 0x00ff);
+ m_mcu->pb_w(space, 0, (m_host_latch >> 8) & 0x00ff);
}
if (BIT(m_mcu_latch_ctl, 1) && !BIT(data, 1))
@@ -189,40 +197,3 @@ WRITE8_MEMBER(pushman_state::mcu_pc_w)
m_mcu_latch_ctl = data;
}
-
-
-/* ElSemi - Bouncing balls protection. */
-READ16_MEMBER(bballs_state::bballs_68705_r)
-{
- switch (offset)
- {
- case 0: // read and acknowledge MCU reply
- if (!space.debugger_access())
- m_mcu_semaphore = false;
- return m_mcu_latch;
- case 2: // pretend MCU accepts command instantly
- return 0x0001;
- case 3: // expects bit 0 to be low when MCU has sent response (other bits ignored)
- return m_mcu_semaphore ? 0x0000 : 0x0001;
- }
- logerror("unknown 68705 read offset %X & %04X\n", offset, mem_mask);
- return 0x0000;
-}
-
-WRITE16_MEMBER(bballs_state::bballs_68705_w)
-{
- m_mcu_latch = 0;
- if ((data >> 8) <= 0x0f)
- {
- m_mcu_latch = (data >> 6) & 0x03fc;
- if (data & 0x00ff)
- m_mcu_latch |= 2;
- m_mcu_semaphore = true;
- }
- else if (data >> 8)
- {
- if (data & 0x00ff)
- m_mcu_latch |= 2;
- m_mcu_semaphore = true;
- }
-}