Re: [hatari-devel] DSP for Previous

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 11/06/2015 23:08, Andreas Grabher a écrit :
You're welcome! I found some more problems. But now it seems that the
DSP works for me!

Most problems i found were related to the interrupt system. It does not
reflect real behavior. I think i found most issues, but with this method
of doing interrupts we will run into further problems sooner or later. I
think it needs to be rewritten. My current patch is just a workaround.

Now it works like this:
The device sends the interrupt to the DSP like some kind of message. If
it is not masked, it is then added to a list. The DSP reads the
interrupt from the list, removes it and executes the interrupt service
routine. If a masked interrupt is unmasked, the interrupt message needs
to be re-sent. If an interrupt is on the list while it gets masked, it
needs to be removed from the list. If the service routine does not make
the device release the interrupt on first try, it needs to be sent
again, if it isn't masked.

How it should work:
The device asserts the interrupt line. The DSP samples the line and sees
the interrupt, if it is not masked. It executes the service routine,
which then makes the device release the interrupt line. If a masked
interrupt is unmasked, the DSP will start seeing it. If a pending
interrupt is masked, the DSP will no longer see it. If the service
routine does not make the device release the interrupt, the DSP will
keep on seeing it, unless it is masked.



Hi

thanks for your patch ; regarding changing the interrupt behaviour, the current one might not be complete, but it seems it doesn't cause failure so far (because demos/programs don't rely on it), so I think we should wait after 1.9 is released before doing big changes in Hatari.

But we certainly need to handle it by having a pending and a mask registers (as for the 680xx), not temporarily as a list ; better go for the good way to handle it, instead of having an intermediate one with lists (and handling mask/pending is in fact much simpler than handling lists of events, resending events, ...)

As for the rest, I think Laurent knows the DSP better than I do :)

Nicolas





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/