IRQ handling is broken and causes random obscure crashes (with patch)
Brought to you by:
markgrebe
On an interrupt IFF1 and IFF2 should be cleared. The emulator clears only IFF1 which causes code that saves/restores interrupt state to EI incorrectly.
The IFF1 -> IFF2 state is also mishandled for RETI although that probably affects nothing.