Fixed 16-bit DMA reads, fixes error 10482 on MCA IBM PS/2's with IBM ESDI controller.
This commit is contained in:
@@ -1243,13 +1243,13 @@ _dma_read(uint32_t addr, dma_t *dma_c)
|
||||
static uint16_t
|
||||
_dma_readw(uint32_t addr, dma_t *dma_c)
|
||||
{
|
||||
uint8_t temp;
|
||||
uint16_t temp;
|
||||
|
||||
if (dma_advanced) {
|
||||
if (dma_c->sg_status & 1)
|
||||
dma_c->sg_status = (dma_c->sg_status & 0x0f) | (dma_sg(&temp, 2, 1, dma_c) << 4);
|
||||
dma_c->sg_status = (dma_c->sg_status & 0x0f) | (dma_sg((uint8_t *) &temp, 2, 1, dma_c) << 4);
|
||||
else
|
||||
dma_bm_read(addr, &temp, 2, dma_transfer_size(dma_c));
|
||||
dma_bm_read(addr, (uint8_t *) &temp, 2, dma_transfer_size(dma_c));
|
||||
} else
|
||||
temp = _dma_read(addr, dma_c) | (_dma_read(addr + 1, dma_c) << 8);
|
||||
|
||||
|
Reference in New Issue
Block a user