comparison vdp.c @ 84:2d1ae596db7a

Fix long reads from IO ports or long reads that trigger sync cycles by saving rdi. Possibly fix word wide IO reads.
author Mike Pavone <pavone@retrodev.com>
date Wed, 26 Dec 2012 17:34:59 -0800
parents 2c7267617d71
children 60b5c9e2f4e0
comparison
equal deleted inserted replaced
83:2c7267617d71 84:2d1ae596db7a
311 //skip auto-increment and removal of entry from fifo 311 //skip auto-increment and removal of entry from fifo
312 return; 312 return;
313 } 313 }
314 break; 314 break;
315 case CRAM_WRITE: 315 case CRAM_WRITE:
316 //printf("CRAM Write: %X to %X\n", start->value, context->address); 316 printf("CRAM Write: %X to %X, autoinc: %d\n", start->value, context->address, context->regs[REG_AUTOINC]);
317 context->cram[(context->address/2) & (CRAM_SIZE-1)] = start->value; 317 context->cram[(context->address/2) & (CRAM_SIZE-1)] = start->value;
318 break; 318 break;
319 case VSRAM_WRITE: 319 case VSRAM_WRITE:
320 if (((context->address/2) & 63) < VSRAM_SIZE) { 320 if (((context->address/2) & 63) < VSRAM_SIZE) {
321 //printf("VSRAM Write: %X to %X\n", start->value, context->address); 321 //printf("VSRAM Write: %X to %X\n", start->value, context->address);
1027 //printf("control port write: %X\n", value); 1027 //printf("control port write: %X\n", value);
1028 if (context->flags & FLAG_PENDING) { 1028 if (context->flags & FLAG_PENDING) {
1029 context->address = (context->address & 0x3FFF) | (value << 14); 1029 context->address = (context->address & 0x3FFF) | (value << 14);
1030 context->cd = (context->cd & 0x3) | ((value >> 2) & 0x3C); 1030 context->cd = (context->cd & 0x3) | ((value >> 2) & 0x3C);
1031 context->flags &= ~FLAG_PENDING; 1031 context->flags &= ~FLAG_PENDING;
1032 //printf("New Address: %X, New CD: %X\n", context->address, context->cd); 1032 printf("New Address: %X, New CD: %X\n", context->address, context->cd);
1033 if (context->cd & 0x20) { 1033 if (context->cd & 0x20) {
1034 if((context->regs[REG_DMASRC_H] & 0xC0) != 0x80) { 1034 if((context->regs[REG_DMASRC_H] & 0xC0) != 0x80) {
1035 //DMA copy or 68K -> VDP, transfer starts immediately 1035 //DMA copy or 68K -> VDP, transfer starts immediately
1036 context->flags |= FLAG_DMA_RUN; 1036 context->flags |= FLAG_DMA_RUN;
1037 if (!(context->regs[REG_DMASRC_H] & 0x80)) { 1037 if (!(context->regs[REG_DMASRC_H] & 0x80)) {