VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

What happens when a device would be requesting an IRQ(e.g. slave) and it's not selected? What then happens when it's selected after having a IRQ request ready?

Would it cache the IR line for the slave when the master is selected, raising it when the slave is selected? Or does it keep having the same voltage? Does switching from raised master to raised slave lower the IR line when switching over(selecting the other device)?

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

Reply 1 of 2, by manawyrm

User metadata
Rank Newbie
Rank
Newbie
superfury wrote on 2020-09-11, 13:06:

What happens when a device would be requesting an IRQ(e.g. slave) and it's not selected?

Nothing, the device will not drive the INTRQ line.
The host will either track which devices it is expecting interrupts for (linux does this) or it needs to check/poll the status of each device.

To quote from the Seagate ATA manual:

A tristate signal used to interrupt the host system. Asserted only when the drive has a pending interrupt, the drive is selected […]
Show full quote

A tristate signal used to interrupt the host
system. Asserted only when the drive has a
pending interrupt, the drive is selected, and
the host has cleared nIEN in the Device
Control register. If nIEN=1, or the drive is not
selected, this output is in a high-impedance
state, regardless of the presence or absence
of a pending interrupt.

(source: ftp://ftp.seagate.com/acrobat/reference/111-1c.pdf )

There's also some additional info about the handling of interrupts in the document.

Reply 2 of 2, by superfury

User metadata
Rank l33t++
Rank
l33t++

OK. And what happens when you switch to a different device on the same channel with both having IR raised? Will it lower, then raise after select is completed? Will it trigger an IRQ when switching from raised(master/slave) to raised(inversed master/slave)? So it lowers for a bit when switching between channels? What about from a lowered device to a raised device(e.g. setting or clearing the DRV bit to become inverted)?

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