VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

What should happen on an ATAPI device when a BIOS reboots? Does it get any inputs that signal it to reload it's signature in it's registers?

Afaik, the i440fx BIOS doesn't seem to use SRST or executing any command, so it doesn't reload the signature and start execute ATAPI commands and properly identify it as a ATAPI device?

UniPCemu does reload the signature when the ATAPI gets a SRST raised or during the EXECUTE DEVICE DIAGNOSTIC command.

Why wouldn't the BIOS do anything of those? Or does the PCIRST# already trigger that?

Edit: Or does this have anything to do with the PCIRST# signal?

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

Reply 1 of 1, by superfury

User metadata
Rank l33t++
Rank
l33t++

OK. Just modified the ATA/ATAPI PCI device to properly clear it's command register when receiving a PCIRST#.
Then I modified the ATA/ATAPI PCI command register to perform a ATA SRST on both IDE channels (essentially wiring the PCIRST to both channel's SRST pins) when setting the PCI command register bit 0 from 0 to 1.

That should (theoretically) fix the i440fx reboot not detecting the ATAPI channels anymore (since it can now find the signature without performing SRST itself first, which it doesn't seem to do itself).

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