From d45cb844c7bd14bc7449b40f0b8153a139c070b0 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 23 May 2017 21:09:38 -0700 Subject: 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 --- genesis.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'genesis.c') diff --git a/genesis.c b/genesis.c index 3b86692..382950f 100644 --- a/genesis.c +++ b/genesis.c @@ -299,6 +299,7 @@ static m68k_context * vdp_port_write(uint32_t vdp_port, m68k_context * context, //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 @@ static void * z80_vdp_port_write(uint32_t vdp_port, void * vcontext, uint8_t val } 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); -- cgit v1.2.3