Reply 420 of 702, by superfury
Hmmm... If an IRET returns, does it inhibit interrupts like STI does?
The new 85C496 motherboard emulation has an issue with the IRQ14/15 in level-triggered mode(from the ELCR registers), while the hard drive is in legacy mode, thus being in edge-triggered mode(leaving the IRQ line high when triggering it).
So it generates an infinite interrupt storm in this case, retriggering after each IRET instruction.
Edit: OK. So now I've modified the ELCR behaviour to apply to the PCI IRQ (PIRQ) lines only, the legacy lines being unaffected by it (they have their ELCR bits forced to 0, effectively).
So now the hard drives are detected correctly on the 85C496 motherboard emulation, but won't be booted from somehow? PCI IRQs should work properly as well, provided the ELCR is setup correctly by the OS.
The CD-ROM drives also aren't detected on the 85C496 chipset for some reason?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io