Actually fix the fixed dma.

This commit is contained in:
TC1995
2022-07-19 19:21:15 +02:00
parent d3350fa06c
commit 2df92dc7f3

View File

@@ -592,7 +592,7 @@ static uint8_t
dma_ps2_read(uint16_t addr, void *priv)
{
dma_t *dma_c = &dma[dma_ps2.xfr_channel];
uint8_t temp = 0xff;
uint8_t temp = 0;
switch (addr) {
case 0x1a:
@@ -650,7 +650,6 @@ dma_ps2_read(uint16_t addr, void *priv)
}
break;
}
return(temp);
}
@@ -729,7 +728,7 @@ dma_ps2_write(uint16_t addr, uint8_t val, void *priv)
mode |= 8;
else if ((val & DMA_PS2_XFER_MASK) == DMA_PS2_XFER_IO_TO_MEM)
mode |= 4;
dma_c->mode = (dma_c->mode & ~0x2c) | mode;
dma_c->mode = (dma_c->mode & ~0x2c) | 0x10 | mode;
dma_c->ps2_mode = val;
dma_c->size = val & DMA_PS2_SIZE16;
break;