process: rewrite the interrupt handling logic to be sane
We get rid of the whole UZI inherited irq stack madness as it leaves us
with a bunch of hard/unfixable problems.
Instead
- We only need one interrupt stack (although several if the banking is easier
still works just fine)
- We don't task switch on the IRQ stack, instead if we are going to be
pre-empting we pull a stunt with push/reti to complete the IRQ to
the devices and then task switch on the syscall stack and do
signal processing
This fixes all the pre-emption related crashes and mess with map saving. We
never have to bail from an IRQ because we are already in it. Various other
bits become cleaner.
In the process also rewrite (hopefully correctly this time) the Z80 signal
return paths.
This will probably break everything except Z80 platform devices using the
bankfixed helpers.
Note: The new IRQ code breaks sdltrs. I'll upload some patches for that
when I get a bit of time. Elements of the IRQ emulation and also reti
emulation are buggy in sdltrs it seems.
FIXME:
- At least one additional di to work around bits of the trs80 bugs
can go away