comparison 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
comparison
equal deleted inserted replaced
1169:82d8b9324b10 1170:9170fc4d9835
1172 if (!col) { 1172 if (!col) {
1173 return; 1173 return;
1174 } 1174 }
1175 col -= 2; 1175 col -= 2;
1176 dst = context->output + col * 8; 1176 dst = context->output + col * 8;
1177 uint32_t color = context->colors[context->regs[REG_BG_COLOR]]; 1177 uint32_t color = context->colors[context->regs[REG_BG_COLOR] & 0x3F];
1178 for (int i = 0; i < 16; i++) 1178 for (int i = 0; i < 16; i++)
1179 { 1179 {
1180 *(dst++) = color; 1180 *(dst++) = color;
1181 } 1181 }
1182 return; 1182 return;