diff --git a/devices/ioctrl/heathrow.cpp b/devices/ioctrl/heathrow.cpp index 2c2c354..c77a1f9 100644 --- a/devices/ioctrl/heathrow.cpp +++ b/devices/ioctrl/heathrow.cpp @@ -77,8 +77,9 @@ HeathrowIC::HeathrowIC() : PCIDevice("mac-io/heathrow"), InterruptCtrl() std::bind(&AwacsScreamer::dma_out_stop, this->snd_codec) ); - // connect SCSI HW + // connect SCSI HW and the corresponding DMA channel this->mesh = dynamic_cast(gMachineObj->get_comp_by_name("Mesh")); + this->scsi_dma = std::unique_ptr (new DMAChannel()); // connect IDE HW this->ide_0 = dynamic_cast(gMachineObj->get_comp_by_name("Ide0")); @@ -117,6 +118,8 @@ void HeathrowIC::notify_bar_change(int bar_num) uint32_t HeathrowIC::dma_read(uint32_t offset, int size) { switch (offset >> 8) { + case MIO_OHARE_DMA_MESH: + return this->scsi_dma->reg_read(offset & 0xFF, size); case MIO_OHARE_DMA_FLOPPY: return this->floppy_dma->reg_read(offset & 0xFF, size); case MIO_OHARE_DMA_AUDIO_OUT: @@ -130,6 +133,9 @@ uint32_t HeathrowIC::dma_read(uint32_t offset, int size) { void HeathrowIC::dma_write(uint32_t offset, uint32_t value, int size) { switch (offset >> 8) { + case MIO_OHARE_DMA_MESH: + this->scsi_dma->reg_write(offset & 0xFF, value, size); + break; case MIO_OHARE_DMA_FLOPPY: this->floppy_dma->reg_write(offset & 0xFF, value, size); break; diff --git a/devices/ioctrl/macio.h b/devices/ioctrl/macio.h index ecfef30..cd70f69 100644 --- a/devices/ioctrl/macio.h +++ b/devices/ioctrl/macio.h @@ -298,6 +298,7 @@ private: BigMac* bmac; // Ethernet MAC cell // DMA channels + std::unique_ptr scsi_dma; std::unique_ptr snd_out_dma; std::unique_ptr floppy_dma; };