From bd56f5fa899f2c453d51a32af1a693e80a3369af Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 15 Jan 2017 22:54:01 -0800 Subject: 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. --- vdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vdp.c') diff --git a/vdp.c b/vdp.c index 701c894..38bb36d 100644 --- a/vdp.c +++ b/vdp.c @@ -1174,7 +1174,7 @@ static void render_map_output(uint32_t line, int32_t col, vdp_context * context) } 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; -- cgit v1.2.3