diff vdp.c @ 1170:9170fc4d9835

Don't adjust cycles every frame. Only when we start getting close to UINT_MAX. Don't adjust all the way down to zero when we do adjust. Shouldn't fix anything, but may make debugging current issues easier.
author Michael Pavone <pavone@retrodev.com>
date Sun, 15 Jan 2017 22:54:01 -0800
parents 82d8b9324b10
children 43fa92976ff2
line wrap: on
line diff
--- a/vdp.c	Sun Jan 15 22:38:31 2017 -0800
+++ b/vdp.c	Sun Jan 15 22:54:01 2017 -0800
@@ -1174,7 +1174,7 @@
 		}
 		col -= 2;
 		dst = context->output + col * 8;
-		uint32_t color = context->colors[context->regs[REG_BG_COLOR]];
+		uint32_t color = context->colors[context->regs[REG_BG_COLOR] & 0x3F];
 		for (int i = 0; i < 16; i++)
 		{
 			*(dst++) = color;