summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/apple2e.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/apple2e.cpp')
-rw-r--r--src/mame/drivers/apple2e.cpp48
1 files changed, 25 insertions, 23 deletions
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index 6956d51b541..b560a9b8917 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -780,8 +780,8 @@ void apple2e_state::machine_start()
}
// precalculate joystick time constants
- m_x_calibration = attotime::from_usec(12).as_double();
- m_y_calibration = attotime::from_usec(13).as_double();
+ m_x_calibration = attotime::from_nsec(10800).as_double();
+ m_y_calibration = attotime::from_nsec(10800).as_double();
// cache slot devices
for (int i = 0; i <= 7; i++)
@@ -1592,6 +1592,7 @@ void apple2e_state::do_io(address_space &space, int offset, bool is_iic)
READ8_MEMBER(apple2e_state::c000_r)
{
if(machine().side_effects_disabled()) return read_floatingbus();
+ u8 uFloatingBus7 = read_floatingbus() & 0x7f;
if ((offset & 0xf0) == 0x00) // keyboard latch, $C000 is really 00-0F
{
@@ -1656,43 +1657,43 @@ READ8_MEMBER(apple2e_state::c000_r)
case 0x68:
if (m_cassette)
{
- return m_cassette->input() > 0.0 ? 0x80 : 0;
+ return (m_cassette->input() > 0.0 ? 0x80 : 0) | uFloatingBus7;
}
- return 0;
+ return uFloatingBus7;
case 0x61: // button 0 or Open Apple
case 0x69:
- return ((m_joybuttons->read() & 0x10) || (m_kbspecial->read() & 0x10)) ? 0x80 : 0;
+ return (((m_joybuttons->read() & 0x10) || (m_kbspecial->read() & 0x10)) ? 0x80 : 0) | uFloatingBus7;
case 0x62: // button 1 or Solid Apple
case 0x6a:
- return ((m_joybuttons->read() & 0x20) || (m_kbspecial->read() & 0x20)) ? 0x80 : 0;
+ return (((m_joybuttons->read() & 0x20) || (m_kbspecial->read() & 0x20)) ? 0x80 : 0) | uFloatingBus7;
case 0x63: // button 2 or SHIFT key
case 0x6b:
- return ((m_joybuttons->read() & 0x40) || (m_kbspecial->read() & 0x06)) ? 0x80 : 0;
+ return (((m_joybuttons->read() & 0x40) || (m_kbspecial->read() & 0x06)) ? 0x80 : 0) | uFloatingBus7;
case 0x64: // joy 1 X axis
case 0x6c:
- return (machine().time().as_double() < m_joystick_x1_time) ? 0x80 : 0;
+ return ((machine().time().as_double() < m_joystick_x1_time) ? 0x80 : 0) | uFloatingBus7;
case 0x65: // joy 1 Y axis
case 0x6d:
- return (machine().time().as_double() < m_joystick_y1_time) ? 0x80 : 0;
+ return ((machine().time().as_double() < m_joystick_y1_time) ? 0x80 : 0) | uFloatingBus7;
case 0x66: // joy 2 X axis
case 0x6e:
- return (machine().time().as_double() < m_joystick_x2_time) ? 0x80 : 0;
+ return ((machine().time().as_double() < m_joystick_x2_time) ? 0x80 : 0) | uFloatingBus7;
case 0x67: // joy 2 Y axis
case 0x6f:
- return (machine().time().as_double() < m_joystick_y2_time) ? 0x80 : 0;
+ return ((machine().time().as_double() < m_joystick_y2_time) ? 0x80 : 0) | uFloatingBus7;
case 0x7e: // read IOUDIS
- return m_ioudis ? 0x80 : 0x00;
+ return (m_ioudis ? 0x80 : 0x00) | uFloatingBus7;
case 0x7f: // read DHIRES
- return m_video->m_dhires ? 0x00 : 0x80;
+ return (m_video->m_dhires ? 0x00 : 0x80) | uFloatingBus7;
default:
do_io(space, offset, false);
@@ -1833,6 +1834,7 @@ WRITE8_MEMBER(apple2e_state::c000_w)
READ8_MEMBER(apple2e_state::c000_iic_r)
{
if(machine().side_effects_disabled()) return read_floatingbus();
+ u8 uFloatingBus7 = read_floatingbus() & 0x7f;
if ((offset & 0xf0) == 0x00) // keyboard latch, $C000 is really 00-0F
{
@@ -1908,43 +1910,43 @@ READ8_MEMBER(apple2e_state::c000_iic_r)
return m_y0edge ? 0x80 : 0x00;
case 0x60: // 40/80 column switch (IIc only)
- return (m_sysconfig->read() & 0x04) ? 0x80 : 0;
+ return ((m_sysconfig->read() & 0x04) ? 0x80 : 0) | uFloatingBus7;
case 0x61: // button 0 or Open Apple or mouse button 1
case 0x69:
- return ((m_joybuttons->read() & 0x10) || (m_kbspecial->read() & 0x10)) ? 0x80 : 0;
+ return (((m_joybuttons->read() & 0x10) || (m_kbspecial->read() & 0x10)) ? 0x80 : 0) | uFloatingBus7;
case 0x62: // button 1 or Solid Apple
case 0x6a:
- return ((m_joybuttons->read() & 0x20) || (m_kbspecial->read() & 0x20)) ? 0x80 : 0;
+ return (((m_joybuttons->read() & 0x20) || (m_kbspecial->read() & 0x20)) ? 0x80 : 0) | uFloatingBus7;
case 0x63: // mouse button 2 (no other function on IIc)
case 0x6b:
- return m_mouseb->read() ? 0 : 0x80;
+ return (m_mouseb->read() ? 0 : 0x80) | uFloatingBus7;
case 0x64: // joy 1 X axis
case 0x6c:
- return (machine().time().as_double() < m_joystick_x1_time) ? 0x80 : 0;
+ return ((machine().time().as_double() < m_joystick_x1_time) ? 0x80 : 0) | uFloatingBus7;
case 0x65: // joy 1 Y axis
case 0x6d:
- return (machine().time().as_double() < m_joystick_y1_time) ? 0x80 : 0;
+ return ((machine().time().as_double() < m_joystick_y1_time) ? 0x80 : 0) | uFloatingBus7;
case 0x66: // mouse X1 (IIc only)
case 0x6e:
- return m_x1 ? 0x80 : 0;
+ return (m_x1 ? 0x80 : 0) | uFloatingBus7;
case 0x67: // mouse Y1 (IIc only)
case 0x6f:
- return m_y1 ? 0x80 : 0;
+ return (m_y1 ? 0x80 : 0) | uFloatingBus7;
case 0x7e: // read IOUDIS
m_vbl = false;
lower_irq(IRQ_VBL);
- return m_ioudis ? 0x80 : 0x00;
+ return (m_ioudis ? 0x80 : 0x00) | uFloatingBus7;
case 0x7f: // read DHIRES
- return m_video->m_dhires ? 0x00 : 0x80;
+ return (m_video->m_dhires ? 0x00 : 0x80) | uFloatingBus7;
default:
do_io(space, offset, true);