diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-04-17 23:58:21 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-04-17 23:58:21 -0700 |
commit | fcf214234273a837e7d446a0c6d22aa2a5bb4784 (patch) | |
tree | 845dd84f4baf16d16ffdbbcadea6a7c5e90abc94 /vdp.c | |
parent | b0e95d693f4fa5a318fb1f4605dd3608abe01b0f (diff) |
Fix time 68K is locked out of bus when doing a 128KB VRAM mode DMA transfer. Fixes a number of problems in Overdrive 2
Diffstat (limited to 'vdp.c')
-rw-r--r-- | vdp.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2432,9 +2432,12 @@ void vdp_run_dma_done(vdp_context * context, uint32_t target_cycles) 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; |