summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author therealmogminer@gmail.com <therealmogminer@gmail.com>2016-08-29 17:35:45 +0200
committer therealmogminer@gmail.com <therealmogminer@gmail.com>2016-08-29 17:36:24 +0200
commita1cce8e98d7c5d746169d05218d613b72f4470fc (patch)
treee9b8a80825cd2538d738a9f0fb5bb693a38ad257
parent46bf1ce04bf75f7e5e613a993ac0cf1859b068ec (diff)
Fix MT05813, memory trashing by z8536 device
-rw-r--r--src/devices/machine/z8536.cpp8
-rw-r--r--src/devices/machine/z8536.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/machine/z8536.cpp b/src/devices/machine/z8536.cpp
index f10b1c8f97a..9a036d12b5a 100644
--- a/src/devices/machine/z8536.cpp
+++ b/src/devices/machine/z8536.cpp
@@ -1003,19 +1003,19 @@ READ8_MEMBER( z8536_device::read )
{
switch (offset & 0x03)
{
- case PORT_C:
+ case 0:
data = read_register(PORT_C_DATA);
break;
- case PORT_B:
+ case 1:
data = read_register(PORT_B_DATA);
break;
- case PORT_A:
+ case 2:
data = read_register(PORT_A_DATA);
break;
- case CONTROL:
+ case 3:
switch (m_state)
{
case STATE_1:
diff --git a/src/devices/machine/z8536.h b/src/devices/machine/z8536.h
index 45be2aab010..4a6170e99ae 100644
--- a/src/devices/machine/z8536.h
+++ b/src/devices/machine/z8536.h
@@ -146,9 +146,9 @@ private:
// ports
enum
{
- PORT_C = 0,
+ PORT_A = 0,
PORT_B,
- PORT_A,
+ PORT_C,
CONTROL
};