mirror of
https://github.com/holub/mame
synced 2025-05-20 20:58:51 +03:00
[z80dma]: Fixed ready flag when the DMA disabled/enabled commands are used
This commit is contained in:
parent
b6e43d1bfd
commit
b8932cd741
@ -151,6 +151,7 @@ static void z80dma_do_read(const device_config *device)
|
|||||||
else
|
else
|
||||||
cntx->latch = cntx->intf->portA_read(device, cntx->addressA);
|
cntx->latch = cntx->intf->portA_read(device, cntx->addressA);
|
||||||
|
|
||||||
|
LOG(("A src: %04x \n",cntx->addressA));
|
||||||
cntx->addressA += PORTA_FIXED(cntx) ? 0 : PORTA_INC(cntx) ? PORTA_STEP(cntx) : -PORTA_STEP(cntx);
|
cntx->addressA += PORTA_FIXED(cntx) ? 0 : PORTA_INC(cntx) ? PORTA_STEP(cntx) : -PORTA_STEP(cntx);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -160,6 +161,7 @@ static void z80dma_do_read(const device_config *device)
|
|||||||
else
|
else
|
||||||
cntx->latch = cntx->intf->portB_read(device, cntx->addressB);
|
cntx->latch = cntx->intf->portB_read(device, cntx->addressB);
|
||||||
|
|
||||||
|
LOG(("B src: %04x \n",cntx->addressB));
|
||||||
cntx->addressB += PORTB_FIXED(cntx) ? 0 : PORTB_INC(cntx) ? PORTB_STEP(cntx) : -PORTB_STEP(cntx);
|
cntx->addressB += PORTB_FIXED(cntx) ? 0 : PORTB_INC(cntx) ? PORTB_STEP(cntx) : -PORTB_STEP(cntx);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -192,6 +194,7 @@ static int z80dma_do_write(const device_config *device)
|
|||||||
else
|
else
|
||||||
cntx->intf->portB_write(device, cntx->addressB, cntx->latch);
|
cntx->intf->portB_write(device, cntx->addressB, cntx->latch);
|
||||||
|
|
||||||
|
LOG(("B dst: %04x \n",cntx->addressB));
|
||||||
cntx->addressB += PORTB_FIXED(cntx) ? 0 : PORTB_INC(cntx) ? PORTB_STEP(cntx) : -PORTB_STEP(cntx);
|
cntx->addressB += PORTB_FIXED(cntx) ? 0 : PORTB_INC(cntx) ? PORTB_STEP(cntx) : -PORTB_STEP(cntx);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -201,6 +204,7 @@ static int z80dma_do_write(const device_config *device)
|
|||||||
else
|
else
|
||||||
cntx->intf->portA_write(device, cntx->addressA, cntx->latch);
|
cntx->intf->portA_write(device, cntx->addressA, cntx->latch);
|
||||||
|
|
||||||
|
LOG(("A dst: %04x \n",cntx->addressA));
|
||||||
cntx->addressA += PORTA_FIXED(cntx) ? 0 : PORTA_INC(cntx) ? PORTA_STEP(cntx) : -PORTA_STEP(cntx);
|
cntx->addressA += PORTA_FIXED(cntx) ? 0 : PORTA_INC(cntx) ? PORTA_STEP(cntx) : -PORTA_STEP(cntx);
|
||||||
}
|
}
|
||||||
cntx->count--;
|
cntx->count--;
|
||||||
@ -418,11 +422,13 @@ WRITE8_DEVICE_HANDLER( z80dma_w )
|
|||||||
case 0x83: /* Disable dma */
|
case 0x83: /* Disable dma */
|
||||||
LOG(("Disable DMA\n"));
|
LOG(("Disable DMA\n"));
|
||||||
cntx->dma_enabled = 0;
|
cntx->dma_enabled = 0;
|
||||||
|
cntx->rdy = 1 ^ ((WR5(cntx) & 0x8)>>3);
|
||||||
z80dma_rdy_w(device, 0, cntx->rdy);
|
z80dma_rdy_w(device, 0, cntx->rdy);
|
||||||
break;
|
break;
|
||||||
case 0x87: /* Enable dma */
|
case 0x87: /* Enable dma */
|
||||||
LOG(("Enable DMA\n"));
|
LOG(("Enable DMA\n"));
|
||||||
cntx->dma_enabled = 1;
|
cntx->dma_enabled = 1;
|
||||||
|
cntx->rdy = (WR5(cntx) & 0x8)>>3;
|
||||||
z80dma_rdy_w(device, 0, cntx->rdy);
|
z80dma_rdy_w(device, 0, cntx->rdy);
|
||||||
break;
|
break;
|
||||||
case 0xBB:
|
case 0xBB:
|
||||||
|
Loading…
Reference in New Issue
Block a user