diff genesis.c @ 1371:5b20840711c1

Remove HINT_FUDGE and make a small adjustment to how VDP syncs with rest of system instead. Worse results on CRAM dot issue, but much less of a hack
author Michael Pavone <pavone@retrodev.com>
date Tue, 23 May 2017 21:09:38 -0700
parents 30123ca5856c
children d78ef6f4fba2
line wrap: on
line diff
--- a/genesis.c	Tue May 23 21:07:56 2017 -0700
+++ b/genesis.c	Tue May 23 21:09:38 2017 -0700
@@ -299,6 +299,7 @@
 				//context->current_cycle = v_context->cycles;
 			}
 		} else if(vdp_port < 8) {
+			vdp_run_context_full(v_context, context->current_cycle);
 			blocked = vdp_control_port_write(v_context, value);
 			if (blocked) {
 				while (blocked) {
@@ -373,10 +374,11 @@
 	}
 	if (vdp_port < 0x10) {
 		//These probably won't currently interact well with the 68K accessing the VDP
-		vdp_run_context(gen->vdp, context->current_cycle);
 		if (vdp_port < 4) {
+			vdp_run_context(gen->vdp, context->current_cycle);
 			vdp_data_port_write(gen->vdp, value << 8 | value);
 		} else if (vdp_port < 8) {
+			vdp_run_context_full(gen->vdp, context->current_cycle);
 			vdp_control_port_write(gen->vdp, value << 8 | value);
 		} else {
 			fatal_error("Illegal write to HV Counter port %X\n", vdp_port);