# HG changeset patch # User Michael Pavone # Date 1492498701 25200 # Node ID 0849e9356bfe55460da63f6a91447a835f688e83 # Parent df3d690cb2c334622887017bb2990868b4577c41 Fix time 68K is locked out of bus when doing a 128KB VRAM mode DMA transfer. Fixes a number of problems in Overdrive 2 diff -r df3d690cb2c3 -r 0849e9356bfe vdp.c --- a/vdp.c Mon Apr 17 20:54:33 2017 -0700 +++ b/vdp.c Mon Apr 17 23:58:21 2017 -0700 @@ -2432,9 +2432,12 @@ dmalen = 0x10000; } uint32_t min_dma_complete = dmalen * (context->regs[REG_MODE_4] & BIT_H40 ? 16 : 20); - if ((context->regs[REG_DMASRC_H] & 0xC0) == 0xC0 || (context->cd & 0xF) == VRAM_WRITE) { + if ( + (context->regs[REG_DMASRC_H] & 0xC0) == 0xC0 + || (((context->cd & 0xF) == VRAM_WRITE) && !(context->regs[REG_MODE_2] & BIT_128K_VRAM))) { //DMA copies take twice as long to complete since they require a read and a write //DMA Fills and transfers to VRAM also take twice as long as it requires 2 writes for a single word + //unless 128KB mode is enabled min_dma_complete *= 2; } min_dma_complete += context->cycles;