VOGONS


ATAPI vs drive select?

Topic actions

First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

Do ATAPI drives respond the same as ATA drive wrt the drive select? So if the slave has it's registers (other than the command register) written, does the master have it's registers written as well?
What happens if two ATAPI drives are on the channels? Does the master respond to the slave writes or vise versa?

If that applies, won't it cause issues if both drives respond (and are both ATAPI drives) when releasing the bus for servicing (if the command set is supported)? Because writes will mess up the unselected drive's registers and/or signatures loaded in them?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 1 of 3, by weedeewee

User metadata
Rank l33t
Rank
l33t

I don't know enough about it but have you checked this manual ?
https://hddguru.com/download/documentation/AT … ATA-ATAPI-5.pdf

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 2 of 3, by superfury

User metadata
Rank l33t++
Rank
l33t++

Hmmmm... It also says nothing about the exact way the DRV bit selects the drive.

Could it be that both drives always accept writes to all registers (except the command register), then use the DRV bit in their own device/head (or drive/head in ATA-1) register to determine if they're selected?

So that would mean that the value in the drive/head register for device #1 (the slave device) would always get destroyed when performing a SRST reset? Since the drive/head register would become overwritten when reselected?
The other registers (the signature) might be preserved, assuming that the master doesn't get the slave values overwritten by the host writing the master's command block registers?

So the only way to detect both master and slave CD-ROM drives using a SRST command is by ignoring the drive/head register and only checking the other registers by reading them and not writing them until both drives have their registers read first(except the drive/head register, which will always be overwritten when selecting the slave drive)?

Edit: Also, what happens if an ATAPI drive releases the bus due to an IRQ or starts raising an IRQ while the drive isn't selected? The other drive on the channel could have the interrupt reason register overwritten, together with any relevant data in the cylinder registers?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 3 of 3, by weedeewee

User metadata
Rank l33t
Rank
l33t

there's two persons on this forum which I'm sure could answer your questions or point you to the right info though neither is very active here.
electric_monk & sintech

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port