diff options
author | Mike Pavone <pavone@retrodev.com> | 2012-12-30 11:54:25 -0800 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2012-12-30 11:54:25 -0800 |
commit | d120b3df1f0991d11158c68ec7b26fcb3a4db512 (patch) | |
tree | d983714d8217eb9650445c4405c078150a7bc83d /vdp.c | |
parent | b4a15779b4bab155c9d17461c0cf645bb166b9c4 (diff) |
Fix 68K->VDP DMA
Diffstat (limited to 'vdp.c')
-rw-r--r-- | vdp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -225,7 +225,6 @@ void external_slot(vdp_context * context) context->vdpmem[context->address ^ 1] = context->dma_val >> 8; context->flags &= ~FLAG_DMA_PROG; } else { - context->dma_val = read_dma_value((context->regs[REG_DMASRC_H] << 16) | (context->regs[REG_DMASRC_M] << 8) | context->regs[REG_DMASRC_L]); context->vdpmem[context->address] = context->dma_val; context->flags |= FLAG_DMA_PROG; } @@ -284,6 +283,9 @@ void external_slot(vdp_context * context) if (!(context->flags & FLAG_DMA_PROG)) { context->address += context->regs[REG_AUTOINC]; context->regs[REG_DMASRC_L] += 1; + if (!context->regs[REG_DMASRC_L]) { + context->regs[REG_DMASRC_M] += 1; + } dma_len = ((context->regs[REG_DMALEN_H] << 8) | context->regs[REG_DMALEN_L]) - 1; context->regs[REG_DMALEN_H] = dma_len >> 8; context->regs[REG_DMALEN_L] = dma_len; |