diff vdp.c @ 151:6b593ea0ed90

Implement MULU/MULS and DIVU/DIVS
author Mike Pavone <pavone@retrodev.com>
date Thu, 03 Jan 2013 22:07:40 -0800
parents 139e5dcd6aa3
children 8b846bcff6a2
line wrap: on
line diff
--- a/vdp.c	Tue Jan 01 09:40:17 2013 -0800
+++ b/vdp.c	Thu Jan 03 22:07:40 2013 -0800
@@ -205,6 +205,7 @@
 				break;
 			case CRAM_WRITE:
 				context->cram[(context->address/2) & (CRAM_SIZE-1)] = read_dma_value((context->regs[REG_DMASRC_H] << 16) | (context->regs[REG_DMASRC_M] << 8) | context->regs[REG_DMASRC_L]);
+				//printf("CRAM DMA | %X set to %X from %X at %d\n", (context->address/2) & (CRAM_SIZE-1), context->cram[(context->address/2) & (CRAM_SIZE-1)], (context->regs[REG_DMASRC_H] << 17) | (context->regs[REG_DMASRC_M] << 9) | (context->regs[REG_DMASRC_L] << 1), context->cycles);
 				break;
 			case VSRAM_WRITE:
 				if (((context->address/2) & 63) < VSRAM_SIZE) {
@@ -310,7 +311,7 @@
 					}
 					break;
 				case CRAM_WRITE:
-					//printf("CRAM Write: %X to %X\n", start->value, context->address);
+					//printf("CRAM Write | %X to %X\n", start->value, (start->address/2) & (CRAM_SIZE-1));
 					context->cram[(start->address/2) & (CRAM_SIZE-1)] = start->value;
 					break;
 				case VSRAM_WRITE:
@@ -1047,9 +1048,9 @@
 			if (reg < VDP_REGS) {
 				//printf("register %d set to %X\n", reg, value & 0xFF);
 				context->regs[reg] = value;
-				/*if (reg == REG_MODE_2) {
-					printf("Display is now %s\n", (context->regs[REG_MODE_2] & DISPLAY_ENABLE) ? "enabled" : "disabled");
-				}*/
+				if (reg == REG_MODE_2) {
+					//printf("Display is now %s\n", (context->regs[REG_MODE_2] & DISPLAY_ENABLE) ? "enabled" : "disabled");
+				}
 			}
 		} else {
 			context->flags |= FLAG_PENDING;