Mercurial > repos > blastem
comparison 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 |
comparison
equal
deleted
inserted
replaced
1370:eaca4443e831 | 1371:5b20840711c1 |
---|---|
297 } | 297 } |
298 } | 298 } |
299 //context->current_cycle = v_context->cycles; | 299 //context->current_cycle = v_context->cycles; |
300 } | 300 } |
301 } else if(vdp_port < 8) { | 301 } else if(vdp_port < 8) { |
302 vdp_run_context_full(v_context, context->current_cycle); | |
302 blocked = vdp_control_port_write(v_context, value); | 303 blocked = vdp_control_port_write(v_context, value); |
303 if (blocked) { | 304 if (blocked) { |
304 while (blocked) { | 305 while (blocked) { |
305 while(v_context->flags & FLAG_DMA_RUN) { | 306 while(v_context->flags & FLAG_DMA_RUN) { |
306 vdp_run_dma_done(v_context, gen->frame_end); | 307 vdp_run_dma_done(v_context, gen->frame_end); |
371 if (vdp_port & 0xE0) { | 372 if (vdp_port & 0xE0) { |
372 fatal_error("machine freeze due to write to Z80 address %X\n", 0x7F00 | vdp_port); | 373 fatal_error("machine freeze due to write to Z80 address %X\n", 0x7F00 | vdp_port); |
373 } | 374 } |
374 if (vdp_port < 0x10) { | 375 if (vdp_port < 0x10) { |
375 //These probably won't currently interact well with the 68K accessing the VDP | 376 //These probably won't currently interact well with the 68K accessing the VDP |
376 vdp_run_context(gen->vdp, context->current_cycle); | |
377 if (vdp_port < 4) { | 377 if (vdp_port < 4) { |
378 vdp_run_context(gen->vdp, context->current_cycle); | |
378 vdp_data_port_write(gen->vdp, value << 8 | value); | 379 vdp_data_port_write(gen->vdp, value << 8 | value); |
379 } else if (vdp_port < 8) { | 380 } else if (vdp_port < 8) { |
381 vdp_run_context_full(gen->vdp, context->current_cycle); | |
380 vdp_control_port_write(gen->vdp, value << 8 | value); | 382 vdp_control_port_write(gen->vdp, value << 8 | value); |
381 } else { | 383 } else { |
382 fatal_error("Illegal write to HV Counter port %X\n", vdp_port); | 384 fatal_error("Illegal write to HV Counter port %X\n", vdp_port); |
383 } | 385 } |
384 } else if (vdp_port < 0x18) { | 386 } else if (vdp_port < 0x18) { |