diff --git a/devices/ioctrl/grandcentral.cpp b/devices/ioctrl/grandcentral.cpp index 9b16433..eacb2c0 100644 --- a/devices/ioctrl/grandcentral.cpp +++ b/devices/ioctrl/grandcentral.cpp @@ -83,6 +83,13 @@ GrandCentral::GrandCentral() : PCIDevice("mac-io/grandcentral"), InterruptCtrl() std::bind(&AwacsScreamer::dma_out_start, this->awacs.get()), std::bind(&AwacsScreamer::dma_out_stop, this->awacs.get()) ); + this->snd_in_dma = std::unique_ptr (new DMAChannel("snd_in")); + this->snd_in_dma->register_dma_int(this, this->register_dma_int(IntSrc::DMA_DAVBUS_Rx)); + this->awacs->set_dma_in(this->snd_in_dma.get()); + this->snd_in_dma->set_callbacks( + std::bind(&AwacsScreamer::dma_in_start, this->awacs.get()), + std::bind(&AwacsScreamer::dma_in_stop, this->awacs.get()) + ); // connect serial HW this->escc = dynamic_cast(gMachineObj->get_comp_by_name("Escc")); @@ -201,6 +208,9 @@ uint32_t GrandCentral::read(uint32_t rgn_start, uint32_t offset, int size) return this->floppy_dma->reg_read(offset & 0xFF, size); case MIO_GC_DMA_AUDIO_OUT: return this->snd_out_dma->reg_read(offset & 0xFF, size); + case MIO_GC_DMA_AUDIO_IN: + //LOG_F(WARNING, "%s: Unsupported DMA channel MIO_GC_DMA_AUDIO_IN read @%02x.%c", this->name.c_str(), offset & 0xFF, SIZE_ARG(size)); + return 0; // this->snd_in_dma->reg_read(offset & 0xFF, size); case MIO_GC_DMA_SCSI_MESH: return this->mesh_dma->reg_read(offset & 0xFF, size); default: @@ -301,6 +311,10 @@ void GrandCentral::write(uint32_t rgn_start, uint32_t offset, uint32_t value, in case MIO_GC_DMA_AUDIO_OUT: this->snd_out_dma->reg_write(offset & 0xFF, value, size); break; + case MIO_GC_DMA_AUDIO_IN: + LOG_F(WARNING, "%s: Unsupported DMA channel MIO_GC_DMA_AUDIO_IN write @%02x.%c = %0*x", this->name.c_str(), offset & 0xFF, SIZE_ARG(size), size * 2, value); + //this->snd_in_dma->reg_write(offset & 0xFF, value, size); + break; case MIO_GC_DMA_SCSI_MESH: this->mesh_dma->reg_write(offset & 0xFF, value, size); break; diff --git a/devices/ioctrl/macio.h b/devices/ioctrl/macio.h index 005cc4c..ec9ba8c 100644 --- a/devices/ioctrl/macio.h +++ b/devices/ioctrl/macio.h @@ -185,6 +185,7 @@ private: std::unique_ptr curio_dma; std::unique_ptr mesh_dma; std::unique_ptr snd_out_dma; + std::unique_ptr snd_in_dma; std::unique_ptr floppy_dma; };