Previous 15994 Revisions Next

r5835 Monday 21st September, 2009 at 17:25:12 UTC by Angelo Salese
[z80dma]: Fixed ready flag when the DMA disabled/enabled commands are used
[src/emu/machine]z80dma.c

src/emu/machine/z80dma.c
r5834r5835
151151            else
152152               cntx->latch = cntx->intf->portA_read(device, cntx->addressA);
153153
154            LOG(("A src: %04x \n",cntx->addressA));
154155            cntx->addressA += PORTA_FIXED(cntx) ? 0 : PORTA_INC(cntx) ? PORTA_STEP(cntx) : -PORTA_STEP(cntx);
155156         }
156157         else
r5834r5835
160161            else
161162               cntx->latch = cntx->intf->portB_read(device, cntx->addressB);
162163
164            LOG(("B src: %04x \n",cntx->addressB));
163165            cntx->addressB += PORTB_FIXED(cntx) ? 0 : PORTB_INC(cntx) ? PORTB_STEP(cntx) : -PORTB_STEP(cntx);
164166         }
165167         break;
r5834r5835
192194            else
193195               cntx->intf->portB_write(device, cntx->addressB, cntx->latch);
194196
197            LOG(("B dst: %04x \n",cntx->addressB));
195198            cntx->addressB += PORTB_FIXED(cntx) ? 0 : PORTB_INC(cntx) ? PORTB_STEP(cntx) : -PORTB_STEP(cntx);
196199         }
197200         else
r5834r5835
201204            else
202205               cntx->intf->portA_write(device, cntx->addressA, cntx->latch);
203206
207            LOG(("A dst: %04x \n",cntx->addressA));
204208            cntx->addressA += PORTA_FIXED(cntx) ? 0 : PORTA_INC(cntx) ? PORTA_STEP(cntx) : -PORTA_STEP(cntx);
205209         }
206210         cntx->count--;
r5834r5835
418422            case 0x83:   /* Disable dma */
419423               LOG(("Disable DMA\n"));
420424               cntx->dma_enabled = 0;
425               cntx->rdy = 1 ^ ((WR5(cntx) & 0x8)>>3);
421426               z80dma_rdy_w(device, 0, cntx->rdy);
422427               break;
423428            case 0x87:   /* Enable dma */
424429               LOG(("Enable DMA\n"));
425430               cntx->dma_enabled = 1;
431               cntx->rdy = (WR5(cntx) & 0x8)>>3;
426432               z80dma_rdy_w(device, 0, cntx->rdy);
427433               break;
428434            case 0xBB:

Previous 15994 Revisions Next


© 1998-2018 The MESS Team