Skip to content

Commit c6116fc

Browse files
grandcentral: pass Curio DREQ state to its DMA channel.
Bit 5 of the channel status register of the SCSI0 DMA channel reflects the DREQ signal from Curio. The old SCSI API still used in some Macintosh applications - most notably HD SC Setup and Drive Setup - relies on this API and that signal to be implemented.
1 parent 86ce9b0 commit c6116fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

devices/ioctrl/grandcentral.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ GrandCentral::GrandCentral() : PCIDevice("mac-io/grandcentral"), InterruptCtrl()
126126
this->curio_dma = std::unique_ptr<DMAChannel> (new DMAChannel("curio_scsi"));
127127
this->curio_dma->register_dma_int(this, this->register_dma_int(IntSrc::DMA_SCSI_CURIO));
128128
this->curio->set_dma_channel(this->curio_dma.get());
129+
this->curio->set_drq_callback([this](const uint8_t drq_state) {
130+
this->curio_dma->set_stat((drq_state & 1) << 5);
131+
});
129132

130133
// connect Ethernet HW
131134
this->mace = dynamic_cast<MaceController*>(gMachineObj->get_comp_by_name("Mace"));

0 commit comments

Comments
 (0)