changeset 334:4c91470e1a53

Only latch video mode at the very beginning of the frame to avoid problems with the cycle count getting out of sync with what I expect
author Mike Pavone <pavone@retrodev.com>
date Tue, 14 May 2013 00:46:34 -0700
parents f16136a3835d
children 14a937097c2b
files vdp.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vdp.c	Tue May 14 00:40:10 2013 -0700
+++ b/vdp.c	Tue May 14 00:46:34 2013 -0700
@@ -1111,7 +1111,7 @@
 	{
 		uint32_t line = context->cycles / MCLKS_LINE;
 		uint32_t active_lines = context->latched_mode & BIT_PAL ? PAL_ACTIVE : NTSC_ACTIVE;
-		if (!line) {
+		if (!context->cycles) {
 			latch_mode(context);
 		}
 		uint32_t linecyc = context->cycles % MCLKS_LINE;