# HG changeset patch # User Mike Pavone # Date 1367558501 25200 # Node ID 969ee17471c5aa62730de34193c39b5b037c1970 # Parent df5bf4c113dc5ae217d5e889df51f1d01f2780b4 Protect debug prints for busreq/reset regs with appropriate macros diff -r df5bf4c113dc -r 969ee17471c5 blastem.c --- a/blastem.c Thu May 02 22:18:33 2013 -0700 +++ b/blastem.c Thu May 02 22:21:41 2013 -0700 @@ -136,8 +136,10 @@ #ifdef DO_DEBUG_PRINT #define dprintf printf +#define dputs puts #else #define dprintf +#define dputs #endif void sync_z80(z80_context * z_context, uint32_t mclks) @@ -390,7 +392,7 @@ busack_cycle = CYCLE_NEVER; } if (value & 1) { - puts("bus requesting Z80"); + dputs("bus requesting Z80"); busreq = 1; if(!reset) { busack_cycle = context->current_cycle + Z80_ACK_DELAY; @@ -398,7 +400,7 @@ } } else { if (busreq) { - puts("releasing z80 bus"); + dputs("releasing z80 bus"); z80_context * z_context = context->next_cpu; //TODO: Add necessary delay between release of busreq and resumption of execution z_context->current_cycle = (context->current_cycle * MCLKS_PER_68K) / MCLKS_PER_Z80; @@ -474,7 +476,7 @@ busack_cycle = CYCLE_NEVER; } if (value & 0x100) { - printf("bus requesting Z80 @ %d\n", (context->current_cycle * MCLKS_PER_68K) / MCLKS_PER_Z80); + dprintf("bus requesting Z80 @ %d\n", (context->current_cycle * MCLKS_PER_68K) / MCLKS_PER_Z80); busreq = 1; if(!reset) { busack_cycle = context->current_cycle + Z80_ACK_DELAY; @@ -482,7 +484,7 @@ } } else { if (busreq) { - printf("releasing Z80 bus @ %d\n", (context->current_cycle * MCLKS_PER_68K) / MCLKS_PER_Z80); + dprintf("releasing Z80 bus @ %d\n", (context->current_cycle * MCLKS_PER_68K) / MCLKS_PER_Z80); z80_context * z_context = context->next_cpu; //TODO: Add necessary delay between release of busreq and resumption of execution z_context->current_cycle = (context->current_cycle * MCLKS_PER_68K) / MCLKS_PER_Z80;