summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/cpu')
-rw-r--r--src/emu/cpu/hd6309/hd6309.c10
-rw-r--r--src/emu/cpu/i8051/i8051.c6
-rw-r--r--src/emu/cpu/i8085/i8085.c10
-rw-r--r--src/emu/cpu/i86/i286.c10
-rw-r--r--src/emu/cpu/i86/i86.c16
-rw-r--r--src/emu/cpu/konami/konami.c7
-rw-r--r--src/emu/cpu/lh5801/lh5801.c6
-rw-r--r--src/emu/cpu/m6502/m4510.c20
-rw-r--r--src/emu/cpu/m6502/m6502.c6
-rw-r--r--src/emu/cpu/m6502/m6509.c6
-rw-r--r--src/emu/cpu/m6502/m65ce02.c6
-rw-r--r--src/emu/cpu/m6800/m6800.c6
-rw-r--r--src/emu/cpu/m6809/m6809.c6
-rw-r--r--src/emu/cpu/pdp1/pdp1.c16
-rw-r--r--src/emu/cpu/pdp1/tx0.c8
-rw-r--r--src/emu/cpu/s2650/s2650.c6
-rw-r--r--src/emu/cpu/saturn/saturn.c6
-rw-r--r--src/emu/cpu/sc61860/sc61860.c7
-rw-r--r--src/emu/cpu/sh2/sh2.c14
-rw-r--r--src/emu/cpu/sh4/sh4.c6
-rw-r--r--src/emu/cpu/tms34010/34010gfx.c7
-rw-r--r--src/emu/cpu/tms34010/tms34010.c7
-rw-r--r--src/emu/cpu/tms7000/tms7000.c10
-rw-r--r--src/emu/cpu/z180/z180.c6
-rw-r--r--src/emu/cpu/z80/z80.c6
-rw-r--r--src/emu/cpu/z8000/z8000.c6
26 files changed, 61 insertions, 159 deletions
diff --git a/src/emu/cpu/hd6309/hd6309.c b/src/emu/cpu/hd6309/hd6309.c
index 0c9ff68904e..98063c8e62e 100644
--- a/src/emu/cpu/hd6309/hd6309.c
+++ b/src/emu/cpu/hd6309/hd6309.c
@@ -107,11 +107,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
#ifndef true
#define true 1
@@ -571,7 +567,7 @@ static void set_irq_line(int irqline, int state)
{
if (hd6309.nmi_state == state) return;
hd6309.nmi_state = state;
- LOG(("HD6309#%d set_irq_line (NMI) %d (PC=%4.4X)\n", cpu_getactivecpu(), state, pPC));
+ LOG(("HD6309#%d set_irq_line (NMI) %d (PC=%4.4X)\n", cpu_getactivecpu(), state, pPC.d));
if( state == CLEAR_LINE ) return;
/* if the stack was not yet initialized */
@@ -610,7 +606,7 @@ static void set_irq_line(int irqline, int state)
}
else if (irqline < 2)
{
- LOG(("HD6309#%d set_irq_line %d, %d (PC=%4.4X)\n", cpu_getactivecpu(), irqline, state, pPC));
+ LOG(("HD6309#%d set_irq_line %d, %d (PC=%4.4X)\n", cpu_getactivecpu(), irqline, state, pPC.d));
hd6309.irq_state[irqline] = state;
if (state == CLEAR_LINE) return;
CHECK_IRQ_LINES();
diff --git a/src/emu/cpu/i8051/i8051.c b/src/emu/cpu/i8051/i8051.c
index 142ee0c2191..d4d856af716 100644
--- a/src/emu/cpu/i8051/i8051.c
+++ b/src/emu/cpu/i8051/i8051.c
@@ -68,11 +68,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
//Prototypes
diff --git a/src/emu/cpu/i8085/i8085.c b/src/emu/cpu/i8085/i8085.c
index db23ae009ea..119b3e907da 100644
--- a/src/emu/cpu/i8085/i8085.c
+++ b/src/emu/cpu/i8085/i8085.c
@@ -120,18 +120,14 @@
/*int survival_prot = 0; */
-#define VERBOSE 0
-
#include "debugger.h"
#include "i8085.h"
#include "i8085cpu.h"
#include "i8085daa.h"
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define VERBOSE 0
+
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
#define I8085_INTR 0xff
diff --git a/src/emu/cpu/i86/i286.c b/src/emu/cpu/i86/i286.c
index f24daa0163b..604d816c949 100644
--- a/src/emu/cpu/i86/i286.c
+++ b/src/emu/cpu/i86/i286.c
@@ -7,6 +7,9 @@
#include "debugger.h"
+#define VERBOSE 0
+#define LOG(x) do { if (VERBOSE) mame_printf_debug x; } while (0)
+
/* All post-i286 CPUs have a 16MB address space */
#define AMASK I.amask
@@ -219,12 +222,7 @@ static int i80286_execute(int num_cycles)
/* run until we're out */
while(i80286_ICount>0)
{
-
-//#define VERBOSE_DEBUG
-#ifdef VERBOSE_DEBUG
- mame_printf_debug("[%04x:%04x]=%02x\tF:%04x\tAX=%04x\tBX=%04x\tCX=%04x\tDX=%04x %d%d%d%d%d%d%d%d%d\n",I.sregs[CS],I.pc - I.base[CS],ReadByte(I.pc),I.flags,I.regs.w[AX],I.regs.w[BX],I.regs.w[CX],I.regs.w[DX], I.AuxVal?1:0, I.OverVal?1:0, I.SignVal?1:0, I.ZeroVal?1:0, I.CarryVal?1:0, I.ParityVal?1:0,I.TF, I.IF, I.DirVal<0?1:0);
-#endif
-
+ LOG(("[%04x:%04x]=%02x\tF:%04x\tAX=%04x\tBX=%04x\tCX=%04x\tDX=%04x %d%d%d%d%d%d%d%d%d\n",I.sregs[CS],I.pc - I.base[CS],ReadByte(I.pc),I.flags,I.regs.w[AX],I.regs.w[BX],I.regs.w[CX],I.regs.w[DX], I.AuxVal?1:0, I.OverVal?1:0, I.SignVal?1:0, I.ZeroVal?1:0, I.CarryVal?1:0, I.ParityVal?1:0,I.TF, I.IF, I.DirVal<0?1:0));
CALL_MAME_DEBUG;
seg_prefix=FALSE;
diff --git a/src/emu/cpu/i86/i86.c b/src/emu/cpu/i86/i86.c
index 0c3918a3015..bff09f33d14 100644
--- a/src/emu/cpu/i86/i86.c
+++ b/src/emu/cpu/i86/i86.c
@@ -14,6 +14,9 @@
extern int i386_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, int mode);
+#define VERBOSE 0
+#define LOG(x) do { if (VERBOSE) mame_printf_debug x; } while (0)
+
/* All pre-i286 CPUs have a 1MB address space */
#define AMASK 0xfffff
@@ -237,12 +240,9 @@ static int i8086_execute(int num_cycles)
/* run until we're out */
while (i8086_ICount > 0)
{
-//#define VERBOSE_DEBUG
-#ifdef VERBOSE_DEBUG
- logerror("[%04x:%04x]=%02x\tF:%04x\tAX=%04x\tBX=%04x\tCX=%04x\tDX=%04x %d%d%d%d%d%d%d%d%d\n",
+ LOG(("[%04x:%04x]=%02x\tF:%04x\tAX=%04x\tBX=%04x\tCX=%04x\tDX=%04x %d%d%d%d%d%d%d%d%d\n",
I.sregs[CS], I.pc - I.base[CS], ReadByte(I.pc), I.flags, I.regs.w[AX], I.regs.w[BX], I.regs.w[CX], I.regs.w[DX], I.AuxVal ? 1 : 0, I.OverVal ? 1 : 0,
- I.SignVal ? 1 : 0, I.ZeroVal ? 1 : 0, I.CarryVal ? 1 : 0, I.ParityVal ? 1 : 0, I.TF, I.IF, I.DirVal < 0 ? 1 : 0);
-#endif
+ I.SignVal ? 1 : 0, I.ZeroVal ? 1 : 0, I.CarryVal ? 1 : 0, I.ParityVal ? 1 : 0, I.TF, I.IF, I.DirVal < 0 ? 1 : 0));
CALL_MAME_DEBUG;
seg_prefix = FALSE;
@@ -296,10 +296,8 @@ static int i80186_execute(int num_cycles)
/* run until we're out */
while (i8086_ICount > 0)
{
-#ifdef VERBOSE_DEBUG
- mame_printf_debug("[%04x:%04x]=%02x\tAX=%04x\tBX=%04x\tCX=%04x\tDX=%04x\n", I.sregs[CS], I.pc, ReadByte(I.pc), I.regs.w[AX],
- I.regs.w[BX], I.regs.w[CX], I.regs.w[DX]);
-#endif
+ LOG(("[%04x:%04x]=%02x\tAX=%04x\tBX=%04x\tCX=%04x\tDX=%04x\n", I.sregs[CS], I.pc, ReadByte(I.pc), I.regs.w[AX],
+ I.regs.w[BX], I.regs.w[CX], I.regs.w[DX]));
CALL_MAME_DEBUG;
seg_prefix = FALSE;
diff --git a/src/emu/cpu/konami/konami.c b/src/emu/cpu/konami/konami.c
index 83c71f03f78..cc3be47363e 100644
--- a/src/emu/cpu/konami/konami.c
+++ b/src/emu/cpu/konami/konami.c
@@ -39,12 +39,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
-
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/* Konami Registers */
typedef struct
diff --git a/src/emu/cpu/lh5801/lh5801.c b/src/emu/cpu/lh5801/lh5801.c
index 223a2dee576..80fa6a8bff5 100644
--- a/src/emu/cpu/lh5801/lh5801.c
+++ b/src/emu/cpu/lh5801/lh5801.c
@@ -26,11 +26,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
enum {
LH5801_T=1,
diff --git a/src/emu/cpu/m6502/m4510.c b/src/emu/cpu/m6502/m4510.c
index ae45f9ff382..3fe62889a97 100644
--- a/src/emu/cpu/m6502/m4510.c
+++ b/src/emu/cpu/m6502/m4510.c
@@ -117,11 +117,7 @@ z: xxxx address bits a19 .. a16 for memory accesses with a15 1 ?
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
typedef struct {
@@ -245,7 +241,7 @@ INLINE void m4510_take_irq(void)
P = (P & ~F_D) | F_I; /* knock out D and set I flag */
PCL = RDMEM(EAD);
PCH = RDMEM(EAD+1);
- LOG((errorlog,"M4510#%d takes IRQ ($%04x)\n", cpu_getactivecpu(), PCD));
+ LOG(("M4510#%d takes IRQ ($%04x)\n", cpu_getactivecpu(), PCD));
/* call back the cpuintrf to let it clear the line */
if (m4510.irq_callback) (*m4510.irq_callback)(0);
CHANGE_PC;
@@ -276,16 +272,16 @@ static int m4510_execute(int cycles)
/* check if the I flag was just reset (interrupts enabled) */
if( m4510.after_cli )
{
- LOG((errorlog,"M4510#%d after_cli was >0", cpu_getactivecpu()));
+ LOG(("M4510#%d after_cli was >0", cpu_getactivecpu()));
m4510.after_cli = 0;
if (m4510.irq_state != CLEAR_LINE)
{
- LOG((errorlog,": irq line is asserted: set pending IRQ\n"));
+ LOG((": irq line is asserted: set pending IRQ\n"));
m4510.pending_irq = 1;
}
else
{
- LOG((errorlog,": irq line is clear\n"));
+ LOG((": irq line is clear\n"));
}
}
else
@@ -305,7 +301,7 @@ static void m4510_set_irq_line(int irqline, int state)
m4510.nmi_state = state;
if( state != CLEAR_LINE )
{
- LOG((errorlog, "M4510#%d set_nmi_line(ASSERT)\n", cpu_getactivecpu()));
+ LOG(("M4510#%d set_nmi_line(ASSERT)\n", cpu_getactivecpu()));
EAD = M4510_NMI_VEC;
m4510_ICount -= 7;
PUSH(PCH);
@@ -314,7 +310,7 @@ static void m4510_set_irq_line(int irqline, int state)
P = (P & ~F_D) | F_I; /* knock out D and set I flag */
PCL = RDMEM(EAD);
PCH = RDMEM(EAD+1);
- LOG((errorlog,"M4510#%d takes NMI ($%04x)\n", cpu_getactivecpu(), PCD));
+ LOG(("M4510#%d takes NMI ($%04x)\n", cpu_getactivecpu(), PCD));
CHANGE_PC;
}
}
@@ -323,7 +319,7 @@ static void m4510_set_irq_line(int irqline, int state)
m4510.irq_state = state;
if( state != CLEAR_LINE )
{
- LOG((errorlog, "M4510#%d set_irq_line(ASSERT)\n", cpu_getactivecpu()));
+ LOG(("M4510#%d set_irq_line(ASSERT)\n", cpu_getactivecpu()));
m4510.pending_irq = 1;
}
}
diff --git a/src/emu/cpu/m6502/m6502.c b/src/emu/cpu/m6502/m6502.c
index b97790c5184..b219fd6481a 100644
--- a/src/emu/cpu/m6502/m6502.c
+++ b/src/emu/cpu/m6502/m6502.c
@@ -45,11 +45,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
diff --git a/src/emu/cpu/m6502/m6509.c b/src/emu/cpu/m6502/m6509.c
index a6a7ad482d3..9cef38e8e81 100644
--- a/src/emu/cpu/m6502/m6509.c
+++ b/src/emu/cpu/m6502/m6509.c
@@ -53,11 +53,7 @@ addresses take place.
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
typedef struct {
diff --git a/src/emu/cpu/m6502/m65ce02.c b/src/emu/cpu/m6502/m65ce02.c
index 36d2b0c6928..234c37630df 100644
--- a/src/emu/cpu/m6502/m65ce02.c
+++ b/src/emu/cpu/m6502/m65ce02.c
@@ -45,11 +45,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/* Layout of the registers in the debugger */
diff --git a/src/emu/cpu/m6800/m6800.c b/src/emu/cpu/m6800/m6800.c
index b4a1de2e2d3..59a6994235d 100644
--- a/src/emu/cpu/m6800/m6800.c
+++ b/src/emu/cpu/m6800/m6800.c
@@ -78,11 +78,7 @@ TODO:
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
#if 0
/* CPU subtypes, needed for extra insn after TAP/CLI/SEI */
diff --git a/src/emu/cpu/m6809/m6809.c b/src/emu/cpu/m6809/m6809.c
index 86bf1503d62..4089a41f36a 100644
--- a/src/emu/cpu/m6809/m6809.c
+++ b/src/emu/cpu/m6809/m6809.c
@@ -80,11 +80,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
#ifdef MAME_DEBUG
extern offs_t m6809_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
diff --git a/src/emu/cpu/pdp1/pdp1.c b/src/emu/cpu/pdp1/pdp1.c
index fbe0d9bfe43..dd86985360a 100644
--- a/src/emu/cpu/pdp1/pdp1.c
+++ b/src/emu/cpu/pdp1/pdp1.c
@@ -918,19 +918,15 @@ static void pdp1_set_info(UINT32 state, cpuinfo *info)
case CPUINFO_INT_REGISTER + PDP1_SNGL_INST: pdp1.sngl_inst = info->i ? 1 : 0; break;
case CPUINFO_INT_REGISTER + PDP1_EXTEND_SW: pdp1.extend_sw = info->i ? 1 : 0; break;
case CPUINFO_INT_REGISTER + PDP1_RUN: pdp1.run = info->i ? 1 : 0; break;
-#if LOG
- case CPUINFO_INT_REGISTER + PDP1_CYC: logerror("pdp1_set_reg to cycle flip-flop ignored\n");/* no way!*/ break;
- case CPUINFO_INT_REGISTER + PDP1_DEFER: logerror("pdp1_set_reg to defer flip-flop ignored\n");/* no way!*/ break;
- case CPUINFO_INT_REGISTER + PDP1_BRK_CTR: logerror("pdp1_set_reg to break counter ignored\n");/* no way!*/ break;
-#endif
+ case CPUINFO_INT_REGISTER + PDP1_CYC: if (LOG) logerror("pdp1_set_reg to cycle flip-flop ignored\n");/* no way!*/ break;
+ case CPUINFO_INT_REGISTER + PDP1_DEFER: if (LOG) logerror("pdp1_set_reg to defer flip-flop ignored\n");/* no way!*/ break;
+ case CPUINFO_INT_REGISTER + PDP1_BRK_CTR: if (LOG) logerror("pdp1_set_reg to break counter ignored\n");/* no way!*/ break;
case CPUINFO_INT_REGISTER + PDP1_RIM: pdp1.rim = info->i ? 1 : 0; break;
case CPUINFO_INT_REGISTER + PDP1_SBM: pdp1.sbm = info->i ? 1 : 0; break;
case CPUINFO_INT_REGISTER + PDP1_EXD: EXD = (pdp1.extend_support && info->i) ? 1 : 0; break;
-#if LOG
- case CPUINFO_INT_REGISTER + PDP1_IOC: logerror("pdp1_set_reg to ioc flip-flop ignored\n");/* no way!*/ break;
- case CPUINFO_INT_REGISTER + PDP1_IOH: logerror("pdp1_set_reg to ioh flip-flop ignored\n");/* no way!*/ break;
- case CPUINFO_INT_REGISTER + PDP1_IOS: logerror("pdp1_set_reg to ios flip-flop ignored\n");/* no way!*/ break;
-#endif
+ case CPUINFO_INT_REGISTER + PDP1_IOC: if (LOG) logerror("pdp1_set_reg to ioc flip-flop ignored\n");/* no way!*/ break;
+ case CPUINFO_INT_REGISTER + PDP1_IOH: if (LOG) logerror("pdp1_set_reg to ioh flip-flop ignored\n");/* no way!*/ break;
+ case CPUINFO_INT_REGISTER + PDP1_IOS: if (LOG) logerror("pdp1_set_reg to ios flip-flop ignored\n");/* no way!*/ break;
case CPUINFO_INT_REGISTER + PDP1_START_CLEAR: pulse_start_clear(); break;
case CPUINFO_INT_REGISTER + PDP1_IO_COMPLETE: pdp1.ios = 1; break;
}
diff --git a/src/emu/cpu/pdp1/tx0.c b/src/emu/cpu/pdp1/tx0.c
index c1ffe8b4688..dd68bad696f 100644
--- a/src/emu/cpu/pdp1/tx0.c
+++ b/src/emu/cpu/pdp1/tx0.c
@@ -432,11 +432,9 @@ static void tx0_set_info(UINT32 state, cpuinfo *info)
case CPUINFO_INT_REGISTER + TX0_STOP_CYC1: tx0.stop_cyc1 = info->i ? 1 : 0; break;
case CPUINFO_INT_REGISTER + TX0_RUN: tx0.run = info->i ? 1 : 0; break;
case CPUINFO_INT_REGISTER + TX0_RIM: tx0.rim = info->i ? 1 : 0; break;
-#if LOG
- case CPUINFO_INT_REGISTER + TX0_CYCLE: logerror("tx0_set_reg to cycle counter ignored\n");/* no way!*/ break;
- case CPUINFO_INT_REGISTER + TX0_IOH: logerror("tx0_set_reg to ioh flip-flop ignored\n");/* no way!*/ break;
- case CPUINFO_INT_REGISTER + TX0_IOS: logerror("tx0_set_reg to ios flip-flop ignored\n");/* no way!*/ break;
-#endif
+ case CPUINFO_INT_REGISTER + TX0_CYCLE: if (LOG) logerror("tx0_set_reg to cycle counter ignored\n");/* no way!*/ break;
+ case CPUINFO_INT_REGISTER + TX0_IOH: if (LOG) logerror("tx0_set_reg to ioh flip-flop ignored\n");/* no way!*/ break;
+ case CPUINFO_INT_REGISTER + TX0_IOS: if (LOG) logerror("tx0_set_reg to ios flip-flop ignored\n");/* no way!*/ break;
case CPUINFO_INT_REGISTER + TX0_RESET: pulse_reset(); break;
case CPUINFO_INT_REGISTER + TX0_IO_COMPLETE:tx0.ios = 1; break;
}
diff --git a/src/emu/cpu/s2650/s2650.c b/src/emu/cpu/s2650/s2650.c
index 3b86dae50ec..eacf6555b5b 100644
--- a/src/emu/cpu/s2650/s2650.c
+++ b/src/emu/cpu/s2650/s2650.c
@@ -19,11 +19,7 @@
/* define this to have some interrupt information logged */
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/* define this to expand all EA calculations inline */
#define INLINE_EA 1
diff --git a/src/emu/cpu/saturn/saturn.c b/src/emu/cpu/saturn/saturn.c
index 6caceb0dda9..dc8fc0f6cf7 100644
--- a/src/emu/cpu/saturn/saturn.c
+++ b/src/emu/cpu/saturn/saturn.c
@@ -49,11 +49,7 @@ typedef union {
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/****************************************************************************
diff --git a/src/emu/cpu/sc61860/sc61860.c b/src/emu/cpu/sc61860/sc61860.c
index 4da083297d9..7eca1e0e760 100644
--- a/src/emu/cpu/sc61860/sc61860.c
+++ b/src/emu/cpu/sc61860/sc61860.c
@@ -35,12 +35,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
-
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/****************************************************************************
* The 61860 registers.
diff --git a/src/emu/cpu/sh2/sh2.c b/src/emu/cpu/sh2/sh2.c
index 57ea7e545c3..702f283f86c 100644
--- a/src/emu/cpu/sh2/sh2.c
+++ b/src/emu/cpu/sh2/sh2.c
@@ -108,11 +108,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
typedef struct
{
@@ -2886,18 +2882,20 @@ static void sh2_set_frt_input(int cpunum, int state)
static void set_irq_line(int irqline, int state)
{
if (irqline == INPUT_LINE_NMI)
- {
+ {
if (sh2.nmi_line_state == state)
return;
sh2.nmi_line_state = state;
if( state == CLEAR_LINE )
+ {
LOG(("SH-2 #%d cleared nmi\n", cpu_getactivecpu()));
+ }
else
- {
+ {
LOG(("SH-2 #%d assert nmi\n", cpu_getactivecpu()));
sh2_exception("sh2_set_irq_line/nmi", 16);
- }
+ }
}
else
{
diff --git a/src/emu/cpu/sh4/sh4.c b/src/emu/cpu/sh4/sh4.c
index 61e26701aed..aeae6d7a924 100644
--- a/src/emu/cpu/sh4/sh4.c
+++ b/src/emu/cpu/sh4/sh4.c
@@ -34,11 +34,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
#define EXPPRI(pl,po,p,n) (((4-(pl)) << 24) | ((15-(po)) << 16) | ((p) << 8) | (255-(n)))
#define NMIPRI() EXPPRI(3,0,16,SH4_INTC_NMI)
diff --git a/src/emu/cpu/tms34010/34010gfx.c b/src/emu/cpu/tms34010/34010gfx.c
index c4f82421a86..c6d9c8ff2ae 100644
--- a/src/emu/cpu/tms34010/34010gfx.c
+++ b/src/emu/cpu/tms34010/34010gfx.c
@@ -9,11 +9,8 @@
#ifndef RECURSIVE_INCLUDE
-#if LOG_GRAPHICS_OPS
-#define LOGGFX(x) do { if (input_code_pressed(KEYCODE_L)) logerror x ; } while (0)
-#else
-#define LOGGFX(x)
-#endif
+#define LOG_GFX_OPS 0
+#define LOGGFX(x) do { if (LOG_GFX_OPS && input_code_pressed(KEYCODE_L)) logerror x; } while (0)
/* Graphics Instructions */
diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c
index dabb1bd58fd..d8b08c578c8 100644
--- a/src/emu/cpu/tms34010/tms34010.c
+++ b/src/emu/cpu/tms34010/tms34010.c
@@ -24,12 +24,7 @@
#define LOG_CONTROL_REGS 0
#define LOG_GRAPHICS_OPS 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
-
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/***************************************************************************
CORE STATE
diff --git a/src/emu/cpu/tms7000/tms7000.c b/src/emu/cpu/tms7000/tms7000.c
index ad099dae1eb..a52351d0e09 100644
--- a/src/emu/cpu/tms7000/tms7000.c
+++ b/src/emu/cpu/tms7000/tms7000.c
@@ -34,11 +34,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/* Private prototypes */
@@ -565,8 +561,8 @@ static void tms7000_service_timer1( void )
{
tms7000.t1_decrementer = tms7000.pf[2]; /* Reload decrementer (8 bit) */
cpunum_set_input_line( cpu_getactivecpu(), TMS7000_IRQ2_LINE, HOLD_LINE);
- LOG( ("tms7000: trigger int2 (cycles: %d)\t%d\tdelta %d\n", activecpu_gettotalcycles(), activecpu_gettotalcycles() - tick, tms7000_cycles_per_INT2-(activecpu_gettotalcycles() - tick) );
- tick = activecpu_gettotalcycles() );
+ //LOG( ("tms7000: trigger int2 (cycles: %d)\t%d\tdelta %d\n", activecpu_gettotalcycles(), activecpu_gettotalcycles() - tick, tms7000_cycles_per_INT2-(activecpu_gettotalcycles() - tick) );
+ //tick = activecpu_gettotalcycles() );
/* Also, cascade out to timer 2 - timer 2 unimplemented */
}
}
diff --git a/src/emu/cpu/z180/z180.c b/src/emu/cpu/z180/z180.c
index d9ea75f3ff9..597fd1db96a 100644
--- a/src/emu/cpu/z180/z180.c
+++ b/src/emu/cpu/z180/z180.c
@@ -51,11 +51,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/* execute main opcodes inside a big switch statement */
#ifndef BIG_SWITCH
diff --git a/src/emu/cpu/z80/z80.c b/src/emu/cpu/z80/z80.c
index ee65c4c868c..5180d7d7ffb 100644
--- a/src/emu/cpu/z80/z80.c
+++ b/src/emu/cpu/z80/z80.c
@@ -99,11 +99,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/* execute main opcodes inside a big switch statement */
#ifndef BIG_SWITCH
diff --git a/src/emu/cpu/z8000/z8000.c b/src/emu/cpu/z8000/z8000.c
index 0a3e089e19b..5bdc578a7cd 100644
--- a/src/emu/cpu/z8000/z8000.c
+++ b/src/emu/cpu/z8000/z8000.c
@@ -51,11 +51,7 @@
#define VERBOSE 0
-#if VERBOSE
-#define LOG(x) logerror x
-#else
-#define LOG(x)
-#endif
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/* opcode execution table */
Z8000_exec *z8000_exec = NULL;