Mercurial > repos > blastem
diff genesis.c @ 2571:3d14db924e57
DMA fill and copy should not block VDP data or control port writes
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 02 Feb 2025 00:31:58 -0800 |
parents | f0ace2494df6 |
children | 5f725429d08f |
line wrap: on
line diff
--- a/genesis.c Sat Feb 01 23:22:37 2025 -0800 +++ b/genesis.c Sun Feb 02 00:31:58 2025 -0800 @@ -994,28 +994,7 @@ if (vdp_port < 0x10) { int blocked; if (vdp_port < 4) { - while (vdp_data_port_write(v_context, value) < 0) { - while(v_context->flags & FLAG_DMA_RUN) { - did_dma = 1; - vdp_run_dma_done(v_context, gen->frame_end); - if (v_context->cycles >= gen->frame_end) { - uint32_t cycle_diff = v_context->cycles - context->cycles; - uint32_t m68k_cycle_diff = (cycle_diff / MCLKS_PER_68K) * MCLKS_PER_68K; - if (m68k_cycle_diff < cycle_diff) { - m68k_cycle_diff += MCLKS_PER_68K; - } - context->cycles += m68k_cycle_diff; - gen->bus_busy = 1; - if (gen->header.type == SYSTEM_PICO || gen->header.type == SYSTEM_COPERA) { - sync_components_pico(context, 0); - } else { - sync_components(context, 0); - } - gen->bus_busy = 0; - } - } - //context->cycles = v_context->cycles; - } + vdp_data_port_write(v_context, value); } else if(vdp_port < 8) { vdp_run_context_full(v_context, context->cycles); before_cycle = v_context->cycles;