summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-12-29 13:25:50 -0500
committer AJR <ajrhacker@users.noreply.github.com>2018-12-29 13:25:50 -0500
commitceed23e8751644cfa3515501b475a86f3a8c5be7 (patch)
tree1ea0929021cd2c1d77b06552e6c221fddc4a05f5 /src
parenteca202adc4948e121dd13575168616feef92edb3 (diff)
mac128.cpp: Uninvert mouse movement
(nw) This most likely regressed with the SCC changes in d7eea22d29d754408c55f7320eefb02154ab966e.
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/mac128.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/mame/drivers/mac128.cpp b/src/mame/drivers/mac128.cpp
index 78c4bf9a395..7d829626451 100644
--- a/src/mame/drivers/mac128.cpp
+++ b/src/mame/drivers/mac128.cpp
@@ -506,6 +506,7 @@ void mac128_state::scc_mouse_irq(int x, int y)
static int lasty = 0;
static int lastx = 0;
+ // DCD lines are active low in hardware but active high to software
if (x && y)
{
if (m_last_was_x)
@@ -514,12 +515,12 @@ void mac128_state::scc_mouse_irq(int x, int y)
{
if(lastx)
{
- m_scc->dcda_w(CLEAR_LINE);
+ m_scc->dcda_w(1);
m_mouse_bit_x = 0;
}
else
{
- m_scc->dcda_w(ASSERT_LINE);
+ m_scc->dcda_w(0);
m_mouse_bit_x = 1;
}
}
@@ -527,12 +528,12 @@ void mac128_state::scc_mouse_irq(int x, int y)
{
if(lastx)
{
- m_scc->dcda_w(CLEAR_LINE);
+ m_scc->dcda_w(1);
m_mouse_bit_x = 1;
}
else
{
- m_scc->dcda_w(ASSERT_LINE);
+ m_scc->dcda_w(0);
m_mouse_bit_x = 0;
}
}
@@ -544,12 +545,12 @@ void mac128_state::scc_mouse_irq(int x, int y)
{
if(lasty)
{
- m_scc->dcdb_w(CLEAR_LINE);
+ m_scc->dcdb_w(1);
m_mouse_bit_y = 0;
}
else
{
- m_scc->dcdb_w(ASSERT_LINE);
+ m_scc->dcdb_w(0);
m_mouse_bit_y = 1;
}
}
@@ -557,12 +558,12 @@ void mac128_state::scc_mouse_irq(int x, int y)
{
if(lasty)
{
- m_scc->dcdb_w(CLEAR_LINE);
+ m_scc->dcdb_w(1);
m_mouse_bit_y = 1;
}
else
{
- m_scc->dcdb_w(ASSERT_LINE);
+ m_scc->dcdb_w(0);
m_mouse_bit_y = 0;
}
}
@@ -579,12 +580,12 @@ void mac128_state::scc_mouse_irq(int x, int y)
{
if(lastx)
{
- m_scc->dcda_w(CLEAR_LINE);
+ m_scc->dcda_w(1);
m_mouse_bit_x = 0;
}
else
{
- m_scc->dcda_w(ASSERT_LINE);
+ m_scc->dcda_w(0);
m_mouse_bit_x = 1;
}
}
@@ -592,12 +593,12 @@ void mac128_state::scc_mouse_irq(int x, int y)
{
if(lastx)
{
- m_scc->dcda_w(CLEAR_LINE);
+ m_scc->dcda_w(1);
m_mouse_bit_x = 1;
}
else
{
- m_scc->dcda_w(ASSERT_LINE);
+ m_scc->dcda_w(0);
m_mouse_bit_x = 0;
}
}
@@ -609,12 +610,12 @@ void mac128_state::scc_mouse_irq(int x, int y)
{
if(lasty)
{
- m_scc->dcdb_w(CLEAR_LINE);
+ m_scc->dcdb_w(1);
m_mouse_bit_y = 0;
}
else
{
- m_scc->dcdb_w(ASSERT_LINE);
+ m_scc->dcdb_w(0);
m_mouse_bit_y = 1;
}
}
@@ -622,12 +623,12 @@ void mac128_state::scc_mouse_irq(int x, int y)
{
if(lasty)
{
- m_scc->dcdb_w(CLEAR_LINE);
+ m_scc->dcdb_w(1);
m_mouse_bit_y = 1;
}
else
{
- m_scc->dcdb_w(ASSERT_LINE);
+ m_scc->dcdb_w(0);
m_mouse_bit_y = 0;
}
}