mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
Switched to use the standard compile-time logging pattern, which is more widely compatible (varags macros aren't C89 compliant).
This commit is contained in:
parent
bf53837ffa
commit
4b9f336c1f
@ -24,8 +24,10 @@
|
|||||||
#include "memconv.h"
|
#include "memconv.h"
|
||||||
#include "z80dma.h"
|
#include "z80dma.h"
|
||||||
|
|
||||||
#define DEBUG(x...)
|
#define VERBOSE 0
|
||||||
//#define DEBUG(x...) printf(x)
|
|
||||||
|
#define LOG(x) do { if (VERBOSE) printf x; } while (0)
|
||||||
|
|
||||||
|
|
||||||
#define REGNUM(_m, _s) (((_m)<<3) + (_s))
|
#define REGNUM(_m, _s) (((_m)<<3) + (_s))
|
||||||
#define GET_REGNUM(_c, _r) (&(_r) - &(WR0(_c)))
|
#define GET_REGNUM(_c, _r) (&(_r) - &(WR0(_c)))
|
||||||
@ -393,13 +395,13 @@ static void z80dma_write(int which, offs_t offset, UINT8 data)
|
|||||||
fatalerror("Unimplemented WR6 command %02x", data);
|
fatalerror("Unimplemented WR6 command %02x", data);
|
||||||
break;
|
break;
|
||||||
case 0xC3: /* Reset */
|
case 0xC3: /* Reset */
|
||||||
DEBUG("Reset\n");
|
LOG(("Reset\n"));
|
||||||
break;
|
break;
|
||||||
case 0xCF: /* Load */
|
case 0xCF: /* Load */
|
||||||
cntx->addressA = PORTA_ADDRESS(cntx);
|
cntx->addressA = PORTA_ADDRESS(cntx);
|
||||||
cntx->addressB = PORTB_ADDRESS(cntx);
|
cntx->addressB = PORTB_ADDRESS(cntx);
|
||||||
cntx->count = BLOCKLEN(cntx);
|
cntx->count = BLOCKLEN(cntx);
|
||||||
DEBUG("Load A: %x B: %x N: %x\n", cntx->addressA, cntx->addressB, cntx->count);
|
LOG(("Load A: %x B: %x N: %x\n", cntx->addressA, cntx->addressB, cntx->count));
|
||||||
break;
|
break;
|
||||||
case 0x83: /* Disable dma */
|
case 0x83: /* Disable dma */
|
||||||
cntx->dma_enabled = 0;
|
cntx->dma_enabled = 0;
|
||||||
@ -461,7 +463,7 @@ void z80dma_rdy_write(int which, int state)
|
|||||||
int param;
|
int param;
|
||||||
|
|
||||||
param = (which << 1) | (state ? 1 : 0);
|
param = (which << 1) | (state ? 1 : 0);
|
||||||
DEBUG("RDY: %d Active High: %d\n", state, READY_ACTIVE_HIGH(&dma[which]));
|
LOG(("RDY: %d Active High: %d\n", state, READY_ACTIVE_HIGH(&dma[which])));
|
||||||
timer_call_after_resynch(NULL, param, z80dma_rdy_write_callback);
|
timer_call_after_resynch(NULL, param, z80dma_rdy_write_callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user