diff vdp.c @ 1189:75ba222877f7

Force IPV4 for GDB remote debugging on Windows. Bind to localhost instead of unspecified address since listening on external ports probably isn't a good idea in the general case
author Michael Pavone <pavone@retrodev.com>
date Sun, 22 Jan 2017 19:40:32 -0800
parents 9de9d2c6ebe5
children 8dc50e50ced6
line wrap: on
line diff
--- a/vdp.c	Sun Jan 22 17:12:17 2017 -0800
+++ b/vdp.c	Sun Jan 22 19:40:32 2017 -0800
@@ -2432,8 +2432,8 @@
 				context->flags |= FLAG_DMA_RUN;
 				context->dma_cd = context->cd;
 				//printf("DMA start (length: %X) at cycle %d, frame: %d, vcounter: %d, hslot: %d\n", (context->regs[REG_DMALEN_H] << 8) | context->regs[REG_DMALEN_L], context->cycles, context->frame, context->vcounter, context->hslot);
-				if (!(context->regs[REG_DMASRC_H] & 0x80)) {
-					//printf("DMA Address: %X, New CD: %X, Source: %X, Length: %X\n", context->address, context->cd, (context->regs[REG_DMASRC_H] << 17) | (context->regs[REG_DMASRC_M] << 9) | (context->regs[REG_DMASRC_L] << 1), context->regs[REG_DMALEN_H] << 8 | context->regs[REG_DMALEN_L]);
+				if (!(context->regs[REG_DMASRC_H] & 0x80) && ((context->cd & 0xF) == CRAM_WRITE)) {
+					printf("DMA Address: %X, New CD: %X, Source: %X, Length: %X\n", context->address, context->cd, (context->regs[REG_DMASRC_H] << 17) | (context->regs[REG_DMASRC_M] << 9) | (context->regs[REG_DMASRC_L] << 1), context->regs[REG_DMALEN_H] << 8 | context->regs[REG_DMALEN_L]);
 					return 1;
 				} else {
 					//printf("DMA Copy Address: %X, New CD: %X, Source: %X\n", context->address, context->cd, (context->regs[REG_DMASRC_M] << 8) | context->regs[REG_DMASRC_L]);