summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author mahlemiut <mahlemiut@users.noreply.github.com>2014-01-29 11:09:18 +0000
committer mahlemiut <mahlemiut@users.noreply.github.com>2014-01-29 11:09:18 +0000
commit972887faff192901353196798a138c616299a576 (patch)
treecbe5fb58ce6b1eaf683e4ec915c86c2d045b4346 /src
parent691d46b684bd3213f9467f3a509931b53b15ee87 (diff)
(MESS) amstrad: mouse inputs should be low when active. Fixes movements appearing on boot when the mouse hasn't been moved.
Diffstat (limited to 'src')
-rw-r--r--src/mess/machine/amstrad.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c
index 32b35d97aec..909420a58bd 100644
--- a/src/mess/machine/amstrad.c
+++ b/src/mess/machine/amstrad.c
@@ -2710,18 +2710,18 @@ IRQ_CALLBACK_MEMBER(amstrad_state::amstrad_cpu_acknowledge_int)
static UINT8 prev_x,prev_y;
UINT8 data_x, data_y;
- m_amx_mouse_data = 0;
+ m_amx_mouse_data = 0x0f;
data_x = m_io_mouse1->read_safe(0) & 0xff;
data_y = m_io_mouse2->read_safe(0) & 0xff;
- if(data_x < prev_x)
- m_amx_mouse_data |= 0x08;
if(data_x > prev_x)
- m_amx_mouse_data |= 0x04;
- if(data_y < prev_y)
- m_amx_mouse_data |= 0x02;
+ m_amx_mouse_data &= ~0x08;
+ if(data_x < prev_x)
+ m_amx_mouse_data &= ~0x04;
if(data_y > prev_y)
- m_amx_mouse_data |= 0x01;
+ m_amx_mouse_data &= ~0x02;
+ if(data_y < prev_y)
+ m_amx_mouse_data &= ~0x01;
m_amx_mouse_data |= (m_io_mouse3->read_safe(0) << 4);
prev_x = data_x;
prev_y = data_y;