summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/apple2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/apple2.cpp')
-rw-r--r--src/mame/drivers/apple2.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/mame/drivers/apple2.cpp b/src/mame/drivers/apple2.cpp
index 21cc5fcfc00..d43eb3fa842 100644
--- a/src/mame/drivers/apple2.cpp
+++ b/src/mame/drivers/apple2.cpp
@@ -677,10 +677,24 @@ u8 apple2_state::controller_strobe_r()
void apple2_state::controller_strobe_w(u8 data)
{
- m_joystick_x1_time = machine().time().as_double() + m_x_calibration * m_gameio->pdl0_r();
- m_joystick_y1_time = machine().time().as_double() + m_y_calibration * m_gameio->pdl1_r();
- m_joystick_x2_time = machine().time().as_double() + m_x_calibration * m_gameio->pdl2_r();
- m_joystick_y2_time = machine().time().as_double() + m_y_calibration * m_gameio->pdl3_r();
+ // 558 monostable one-shot timers; a running timer cannot be restarted
+ if (machine().time().as_double() >= m_joystick_x1_time)
+ {
+ m_joystick_x1_time = machine().time().as_double() + m_x_calibration * m_gameio->pdl0_r();
+ }
+ if (machine().time().as_double() >= m_joystick_y1_time)
+ {
+ m_joystick_y1_time = machine().time().as_double() + m_y_calibration * m_gameio->pdl1_r();
+ }
+ if (machine().time().as_double() >= m_joystick_x2_time)
+ {
+ m_joystick_x2_time = machine().time().as_double() + m_x_calibration * m_gameio->pdl2_r();
+ }
+ if (machine().time().as_double() >= m_joystick_y2_time)
+ {
+ m_joystick_y2_time = machine().time().as_double() + m_y_calibration * m_gameio->pdl3_r();
+ }
+
}
u8 apple2_state::c080_r(offs_t offset)