Mercurial > repos > blastem
diff vdp.c @ 63:a6dd5b7a971b
Add FPS counter to console output
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 19 Dec 2012 20:53:59 -0800 |
parents | a6a19c45d358 |
children | aef6302770c2 |
line wrap: on
line diff
--- a/vdp.c Wed Dec 19 20:53:45 2012 -0800 +++ b/vdp.c Wed Dec 19 20:53:59 2012 -0800 @@ -892,14 +892,21 @@ if (context->flags & FLAG_PENDING) { context->address = (context->address & 0x3FFF) | (value << 14); context->cd = (context->cd & 0x3) | ((value >> 2) & 0x3C); + if (context->cd & 0x30) { + puts("attempt to use DMA detected!"); + } + //printf("New Address: %X, New CD: %X\n", context->address, context->cd); context->flags &= ~FLAG_PENDING; } else { if ((value & 0xC000) == 0x8000) { //Register write uint8_t reg = (value >> 8) & 0x1F; if (reg < VDP_REGS) { - //printf("register %d set to %X\n", reg, value); + //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"); + }*/ } } else { context->flags |= FLAG_PENDING;