Merge pull request #5137 from 86Box/tc1995

Okay, maybe for the 53c400 only so.
This commit is contained in:
Miran Grča
2025-01-13 00:56:58 +01:00
committed by GitHub
2 changed files with 2 additions and 4 deletions

View File

@@ -197,7 +197,7 @@ ncr5380_bus_read(ncr_t *ncr)
phase = (ncr->cur_bus & SCSI_PHASE_MESSAGE_IN);
if (phase == SCSI_PHASE_DATA_IN) {
if (ncr->dma_mode == DMA_IDLE) {
if ((ncr->dma_mode == DMA_IDLE) || ncr->dma_initiator_receive_ext) {
ncr5380_log("Phase Data In.\n");
if ((dev->sc != NULL) && (dev->sc->temp_buffer != NULL))
ncr->tx_data = dev->sc->temp_buffer[ncr->data_pos++];
@@ -210,7 +210,7 @@ ncr5380_bus_read(ncr_t *ncr)
ncr->state = STATE_IDLE;
ncr->cur_bus &= ~BUS_BSY;
} else {
if (ncr->dma_mode == DMA_IDLE)
if ((ncr->dma_mode == DMA_IDLE) || ncr->dma_send_ext)
ncr->state = STATE_DATAOUT;
}
} else if (phase == SCSI_PHASE_STATUS) {

View File

@@ -287,7 +287,6 @@ write_again:
t128->block_count = (t128->block_count - 1) & 0xff;
t128_log("T128 Remaining blocks to be written=%d\n", t128->block_count);
if (!t128->block_count) {
ncr->dma_mode = DMA_IDLE;
t128->block_loaded = 0;
t128_log("IO End of write transfer\n");
ncr->tcr |= TCR_LAST_BYTE_SENT;
@@ -344,7 +343,6 @@ read_again:
t128_log("T128 Remaining blocks to be read=%d, status=%02x, len=%i, cdb[0] = %02x\n", t128->block_count, t128->status, dev->buffer_length, ncr->command[0]);
if (!t128->block_count) {
t128->block_loaded = 0;
ncr->dma_mode = DMA_IDLE;
t128_log("IO End of read transfer\n");
ncr->isr |= STATUS_END_OF_DMA;
timer_stop(&t128->timer);