summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/arkanoid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/arkanoid.c')
-rw-r--r--src/mame/machine/arkanoid.c114
1 files changed, 57 insertions, 57 deletions
diff --git a/src/mame/machine/arkanoid.c b/src/mame/machine/arkanoid.c
index f82732e3334..a2dfa04f01b 100644
--- a/src/mame/machine/arkanoid.c
+++ b/src/mame/machine/arkanoid.c
@@ -173,10 +173,10 @@ TO DO (2006.09.12) :
*/
-#define LOG_F000_R if (ARKANOID_BOOTLEG_VERBOSE) logerror("%04x: arkanoid_bootleg_f000_r - cmd = %02x - val = %02x\n", cpu_get_pc(&space.device()), m_bootleg_cmd, arkanoid_bootleg_val);
-#define LOG_F002_R if (ARKANOID_BOOTLEG_VERBOSE) logerror("%04x: arkanoid_bootleg_f002_r - cmd = %02x - val = %02x\n", cpu_get_pc(&space.device()), m_bootleg_cmd, arkanoid_bootleg_val);
-#define LOG_D018_W if (ARKANOID_BOOTLEG_VERBOSE) logerror("%04x: arkanoid_bootleg_d018_w - data = %02x - cmd = %02x\n", cpu_get_pc(&space.device()), data, m_bootleg_cmd);
-#define LOG_D008_R if (ARKANOID_BOOTLEG_VERBOSE) logerror("%04x: arkanoid_bootleg_d008_r - val = %02x\n", cpu_get_pc(&space.device()), arkanoid_bootleg_d008_val);
+#define LOG_F000_R if (ARKANOID_BOOTLEG_VERBOSE) logerror("%04x: arkanoid_bootleg_f000_r - cmd = %02x - val = %02x\n", space.device().safe_pc(), m_bootleg_cmd, arkanoid_bootleg_val);
+#define LOG_F002_R if (ARKANOID_BOOTLEG_VERBOSE) logerror("%04x: arkanoid_bootleg_f002_r - cmd = %02x - val = %02x\n", space.device().safe_pc(), m_bootleg_cmd, arkanoid_bootleg_val);
+#define LOG_D018_W if (ARKANOID_BOOTLEG_VERBOSE) logerror("%04x: arkanoid_bootleg_d018_w - data = %02x - cmd = %02x\n", space.device().safe_pc(), data, m_bootleg_cmd);
+#define LOG_D008_R if (ARKANOID_BOOTLEG_VERBOSE) logerror("%04x: arkanoid_bootleg_d008_r - val = %02x\n", space.device().safe_pc(), arkanoid_bootleg_d008_val);
/* Kludge for some bootlegs that read this address */
@@ -214,7 +214,7 @@ READ8_MEMBER(arkanoid_state::arkanoid_bootleg_f000_r)
LOG_F000_R
break;
default:
- logerror("%04x: arkanoid_bootleg_f000_r - cmd = %02x - unknown bootleg !\n", cpu_get_pc(&space.device()), m_bootleg_cmd);
+ logerror("%04x: arkanoid_bootleg_f000_r - cmd = %02x - unknown bootleg !\n", space.device().safe_pc(), m_bootleg_cmd);
break;
}
@@ -301,7 +301,7 @@ READ8_MEMBER(arkanoid_state::arkanoid_bootleg_f002_r)
LOG_F002_R
break;
default:
- logerror("%04x: arkanoid_bootleg_f002_r - cmd = %02x - unknown bootleg !\n", cpu_get_pc(&space.device()), m_bootleg_cmd);
+ logerror("%04x: arkanoid_bootleg_f002_r - cmd = %02x - unknown bootleg !\n", space.device().safe_pc(), m_bootleg_cmd);
break;
}
@@ -320,27 +320,27 @@ WRITE8_MEMBER(arkanoid_state::arkanoid_bootleg_d018_w)
switch (data)
{
case 0x36: /* unneeded value : no call 0x2050, unused A and overwritten HL (0x0313 -> 0x0340) */
- if (cpu_get_pc(&space.device()) == 0x7c47)
+ if (space.device().safe_pc() == 0x7c47)
m_bootleg_cmd = 0x00;
break;
case 0x38: /* unneeded value : no call 0x2050, unused A and fixed HL (0x7bd5) */
- if (cpu_get_pc(&space.device()) == 0x7b87)
+ if (space.device().safe_pc() == 0x7b87)
m_bootleg_cmd = 0x00;
break;
case 0x8a: /* unneeded value : no call 0x2050, unused A and overwritten HL (0x7b77 -> 0x7c1c) */
- if (cpu_get_pc(&space.device()) == 0x9661)
+ if (space.device().safe_pc() == 0x9661)
m_bootleg_cmd = 0x00;
break;
case 0xe3: /* unneeded value : call 0x2050 but fixed A (0x00) and fixed HL (0xed83) */
- if (cpu_get_pc(&space.device()) == 0x67e3)
+ if (space.device().safe_pc() == 0x67e3)
m_bootleg_cmd = 0x00;
break;
case 0xf7: /* unneeded value : 3 * 'NOP' at 0x034f + 2 * 'NOP' at 0x35b */
- if (cpu_get_pc(&space.device()) == 0x0349)
+ if (space.device().safe_pc() == 0x0349)
m_bootleg_cmd = 0x00;
break;
case 0xff: /* unneeded value : no call 0x2050, unused A and overwritten HL (0x7c4f -> 0x7d31) */
- if (cpu_get_pc(&space.device()) == 0x9670)
+ if (space.device().safe_pc() == 0x9670)
m_bootleg_cmd = 0x00;
break;
default:
@@ -353,37 +353,37 @@ WRITE8_MEMBER(arkanoid_state::arkanoid_bootleg_d018_w)
switch (data)
{
case 0x36: /* unneeded value : call 0x2050 but fixed A (0x2d) */
- if (cpu_get_pc(&space.device()) == 0x7c4c)
+ if (space.device().safe_pc() == 0x7c4c)
m_bootleg_cmd = 0x00;
break;
case 0x38: /* unneeded value : call 0x2050 but fixed A (0xf3) */
- if (cpu_get_pc(&space.device()) == 0x7b87)
+ if (space.device().safe_pc() == 0x7b87)
m_bootleg_cmd = 0x00;
break;
case 0x88: /* unneeded value : no read back */
- if (cpu_get_pc(&space.device()) == 0x67e3)
+ if (space.device().safe_pc() == 0x67e3)
m_bootleg_cmd = 0x00;
- if (cpu_get_pc(&space.device()) == 0x7c47)
+ if (space.device().safe_pc() == 0x7c47)
m_bootleg_cmd = 0x00;
break;
case 0x89: /* unneeded value : no read back */
- if (cpu_get_pc(&space.device()) == 0x67e5)
+ if (space.device().safe_pc() == 0x67e5)
m_bootleg_cmd = 0x00;
break;
case 0x8a: /* unneeded value : call 0x2050 but fixed A (0xa5) */
- if (cpu_get_pc(&space.device()) == 0x9661)
+ if (space.device().safe_pc() == 0x9661)
m_bootleg_cmd = 0x00;
break;
case 0xc0: /* unneeded value : no read back */
- if (cpu_get_pc(&space.device()) == 0x67e7)
+ if (space.device().safe_pc() == 0x67e7)
m_bootleg_cmd = 0x00;
break;
case 0xe3: /* unneeded value : call 0x2050 but fixed A (0x61) */
- if (cpu_get_pc(&space.device()) == 0x67e9)
+ if (space.device().safe_pc() == 0x67e9)
m_bootleg_cmd = 0x00;
break;
case 0xff: /* unneeded value : call 0x2050 but fixed A (0xe2) */
- if (cpu_get_pc(&space.device()) == 0x9670)
+ if (space.device().safe_pc() == 0x9670)
m_bootleg_cmd = 0x00;
break;
default:
@@ -396,11 +396,11 @@ WRITE8_MEMBER(arkanoid_state::arkanoid_bootleg_d018_w)
switch (data)
{
case 0x05: /* Check 1 */
- if (cpu_get_pc(&space.device()) == 0x0363)
+ if (space.device().safe_pc() == 0x0363)
m_bootleg_cmd = 0x05;
break;
case 0x0a: /* Check 2 */
- if (cpu_get_pc(&space.device()) == 0x0372)
+ if (space.device().safe_pc() == 0x0372)
m_bootleg_cmd = 0x0a;
break;
default:
@@ -413,41 +413,41 @@ WRITE8_MEMBER(arkanoid_state::arkanoid_bootleg_d018_w)
switch (data)
{
case 0x36: /* unneeded value : call 0x2050 but fixed A (0x2d) */
- if (cpu_get_pc(&space.device()) == 0x7c4c)
+ if (space.device().safe_pc() == 0x7c4c)
m_bootleg_cmd = 0x00;
break;
case 0x38: /* unneeded value : call 0x2050 but fixed A (0xf3) */
- if (cpu_get_pc(&space.device()) == 0x7b87)
+ if (space.device().safe_pc() == 0x7b87)
m_bootleg_cmd = 0x00;
break;
case 0x88: /* unneeded value : no read back */
- if (cpu_get_pc(&space.device()) == 0x67e3)
+ if (space.device().safe_pc() == 0x67e3)
m_bootleg_cmd = 0x00;
- if (cpu_get_pc(&space.device()) == 0x7c47)
+ if (space.device().safe_pc() == 0x7c47)
m_bootleg_cmd = 0x00;
break;
case 0x89: /* unneeded value : no read back */
- if (cpu_get_pc(&space.device()) == 0x67e5)
+ if (space.device().safe_pc() == 0x67e5)
m_bootleg_cmd = 0x00;
break;
case 0x8a: /* unneeded value : call 0x2050 but unused HL and fixed DE (0x7c1c) */
- if (cpu_get_pc(&space.device()) == 0x9661)
+ if (space.device().safe_pc() == 0x9661)
m_bootleg_cmd = 0x00;
break;
case 0xc0: /* unneeded value : no read back */
- if (cpu_get_pc(&space.device()) == 0x67e7)
+ if (space.device().safe_pc() == 0x67e7)
m_bootleg_cmd = 0x00;
break;
case 0xe3: /* unneeded value : call 0x2050 but fixed A (0x61) */
- if (cpu_get_pc(&space.device()) == 0x67e9)
+ if (space.device().safe_pc() == 0x67e9)
m_bootleg_cmd = 0x00;
break;
case 0xf7: /* unneeded value : call 0x2050 but never called (check code at 0x0340) */
- if (cpu_get_pc(&space.device()) == 0x0349)
+ if (space.device().safe_pc() == 0x0349)
m_bootleg_cmd = 0x00;
break;
case 0xff: /* unneeded value : no call 0x2050, unused A and fixed HL (0x7d31) */
- if (cpu_get_pc(&space.device()) == 0x9670)
+ if (space.device().safe_pc() == 0x9670)
m_bootleg_cmd = 0x00;
break;
default:
@@ -460,40 +460,40 @@ WRITE8_MEMBER(arkanoid_state::arkanoid_bootleg_d018_w)
switch (data)
{
case 0x36: /* unneeded value : call 0x2050 but fixed A (0x2d) */
- if (cpu_get_pc(&space.device()) == 0x7c4c)
+ if (space.device().safe_pc() == 0x7c4c)
m_bootleg_cmd = 0x00;
break;
case 0x38: /* unneeded value : call 0x2050 but fixed A (0xf3) */
- if (cpu_get_pc(&space.device()) == 0x7b87)
+ if (space.device().safe_pc() == 0x7b87)
m_bootleg_cmd = 0x00;
break;
case 0x88: /* unneeded value : no read back */
- if (cpu_get_pc(&space.device()) == 0x67e3)
+ if (space.device().safe_pc() == 0x67e3)
m_bootleg_cmd = 0x00;
- if (cpu_get_pc(&space.device()) == 0x7c47)
+ if (space.device().safe_pc() == 0x7c47)
m_bootleg_cmd = 0x00;
case 0x89: /* unneeded value : no read back */
- if (cpu_get_pc(&space.device()) == 0x67e5)
+ if (space.device().safe_pc() == 0x67e5)
m_bootleg_cmd = 0x00;
break;
case 0x8a: /* call 0x2050 with A read from 0xf002 and wrong HL */
- if (cpu_get_pc(&space.device()) == 0x9661)
+ if (space.device().safe_pc() == 0x9661)
m_bootleg_cmd = data;
break;
case 0xc0: /* unneeded value : no read back */
- if (cpu_get_pc(&space.device()) == 0x67e7)
+ if (space.device().safe_pc() == 0x67e7)
m_bootleg_cmd = 0x00;
break;
case 0xe3: /* unneeded value : call 0x2050 but fixed A (0x61) */
- if (cpu_get_pc(&space.device()) == 0x67e9)
+ if (space.device().safe_pc() == 0x67e9)
m_bootleg_cmd = 0x00;
break;
case 0xf7: /* unneeded value : 3 * 'NOP' at 0x034f + 'JR NZ,$035D' at 0x35b */
- if (cpu_get_pc(&space.device()) == 0x0349)
+ if (space.device().safe_pc() == 0x0349)
m_bootleg_cmd = 0x00;
break;
case 0xff: /* call 0x2050 with A read from 0xf002 and wrong HL */
- if (cpu_get_pc(&space.device()) == 0x9670)
+ if (space.device().safe_pc() == 0x9670)
m_bootleg_cmd = data;
break;
default:
@@ -506,48 +506,48 @@ WRITE8_MEMBER(arkanoid_state::arkanoid_bootleg_d018_w)
switch (data)
{
case 0x24: /* A read from 0xf002 (expected to be 0x9b) */
- if (cpu_get_pc(&space.device()) == 0xbd7a)
+ if (space.device().safe_pc() == 0xbd7a)
m_bootleg_cmd = data;
break;
case 0x36: /* call 0x2050 with A read from 0xf002 and wrong HL */
- if (cpu_get_pc(&space.device()) == 0x7c4c)
+ if (space.device().safe_pc() == 0x7c4c)
m_bootleg_cmd = data;
break;
case 0x38: /* call 0x2050 with A read from 0xf002 and wrong HL */
- if (cpu_get_pc(&space.device()) == 0x7b87)
+ if (space.device().safe_pc() == 0x7b87)
m_bootleg_cmd = data;
break;
case 0x88: /* unneeded value : no read back */
- if (cpu_get_pc(&space.device()) == 0x67e3)
+ if (space.device().safe_pc() == 0x67e3)
m_bootleg_cmd = 0x00;
- if (cpu_get_pc(&space.device()) == 0x7c47)
+ if (space.device().safe_pc() == 0x7c47)
m_bootleg_cmd = 0x00;
case 0x89: /* unneeded value : no read back */
- if (cpu_get_pc(&space.device()) == 0x67e5)
+ if (space.device().safe_pc() == 0x67e5)
m_bootleg_cmd = 0x00;
break;
case 0x8a: /* call 0x2050 with A read from 0xf002 and wrong HL */
- if (cpu_get_pc(&space.device()) == 0x9661)
+ if (space.device().safe_pc() == 0x9661)
m_bootleg_cmd = data;
break;
case 0xc0: /* unneeded value : no read back */
- if (cpu_get_pc(&space.device()) == 0x67e7)
+ if (space.device().safe_pc() == 0x67e7)
m_bootleg_cmd = 0x00;
break;
case 0xc3: /* A read from 0xf002 (expected to be 0x1d) */
- if (cpu_get_pc(&space.device()) == 0xbd8a)
+ if (space.device().safe_pc() == 0xbd8a)
m_bootleg_cmd = data;
break;
case 0xe3: /* call 0x2050 with A read from 0xf002 and wrong HL */
- if (cpu_get_pc(&space.device()) == 0x67e9)
+ if (space.device().safe_pc() == 0x67e9)
m_bootleg_cmd = data;
break;
case 0xf7: /* call 0x2050 with A read from 0xf002 and wrong HL */
- if (cpu_get_pc(&space.device()) == 0x0349)
+ if (space.device().safe_pc() == 0x0349)
m_bootleg_cmd = data;
break;
case 0xff: /* call 0x2050 with A read from 0xf002 and wrong HL */
- if (cpu_get_pc(&space.device()) == 0x9670)
+ if (space.device().safe_pc() == 0x9670)
m_bootleg_cmd = data;
break;
default:
@@ -558,7 +558,7 @@ WRITE8_MEMBER(arkanoid_state::arkanoid_bootleg_d018_w)
break;
default:
- logerror("%04x: arkanoid_bootleg_d018_w - data = %02x - unknown bootleg !\n", cpu_get_pc(&space.device()), data);
+ logerror("%04x: arkanoid_bootleg_d018_w - data = %02x - unknown bootleg !\n", space.device().safe_pc(), data);
break;
}
}
@@ -625,7 +625,7 @@ READ8_MEMBER(arkanoid_state::arkanoid_bootleg_d008_r)
arkanoid_bootleg_d008_bit[2] = 0; /* untested bit */
arkanoid_bootleg_d008_bit[3] = 0; /* untested bit */
arkanoid_bootleg_d008_bit[5] = 0; /* untested bit */
- logerror("%04x: arkanoid_bootleg_d008_r - unknown bootleg !\n",cpu_get_pc(&space.device()));
+ logerror("%04x: arkanoid_bootleg_d008_r - unknown bootleg !\n",space.device().safe_pc());
break;
}