>If you use linux drivers, you have to make sure that the used
>hardware resources are not available to AmigaOS side and that
>such things as irq's are cleared in case of cpu emulation reset.
Actually, Harald, if you use linux drivers, you *don't* have to worry
about clearing interrupts in case of an emulation reset. That's because the
driver (which handles the interrupts) doesn't go away when the emulated
Amiga gets rebooted.
As for the idea of making an AHI driver that uses the linux driver for
the raw hardware access --- it is a good idea, and I have just such a
driver ready and working, and will release it under the GPL soon. Yes,
I know how much everyone must by now hate the word "soon", and trust me,
so do I.....
If you want to do it yourself, anyway (it's an interesting challenge),
be warned that things are not quite as simple as one might at first
assume. AHI's hardware drivers are not just information sinks; They
are also supposed to inform the higher AHI layers about having finished
playback of a buffer.
Because the main emulation thread MUST NEVER block (when it does, the
68k CPU emulation is blocked....), you need to either
a) Poll the state of the linux driver quite often, or
b) Run the actual driver access in a separate x86 thread.
(a) tends to be detrimental to performance (ideally, the driver will have
no more than 10ms of data buffered up, so you probably need to catch
a buffer-writable condition within about 2ms. That's 500+ timer interrupts
per second). (b) is the way to go, but it requires a bit of experience
(and maybe even some inside knowledge) with such arrangements under
Amithlon.
Bernie