Re: xenix install problems

From: Ray Arachelian <ray_at_email.domain.hidden>
Date: Fri, 13 Jul 2007 14:26:27 -0400

gilles wrote:
>
> I'm not sure RTE is really an active opcode for interrupts on a 68k. I
> know many emulators uses this opcode to detect the end of an IRQ but
> it may be a hack. The check for IRQ relaunch should be made when SR is
> modified (that may happen in RTE, but also in MOVE_SR)
>
>
I've seen both behaviors in various operating systems running on the Lisa, so you need to support both. The thing to watch for is the mask dropping, not necessarily the RTE opcode itself. I mentioned RTE in terms where you should look when running Xenix as debug your emulator. :-)

I'm not sure why this is the case, but I do see bunches of ISR's do silly things such as reading both the return address and the status flags, then restoring the status flag and doing something like JMP (A0) instead of just RTE.
>
> T1 and T2 are wired to the same IRQ line, in the VIA.
Correct, bit 7 (128) is an OR'ed bit of bits 0-6, so whenever any are set, so is bit 7, then it does an AND of the IFR and IER, if set, it fires the single IRQ line.

> You need to
> access VIA registers to clear the flag and then to clear the IRQ line.
> In that case, the VIA IRQ line will remain. It may be simpler to
> relanch the IRQ in the VIA code, but it's wrong to a strict electronic
> point of view.
> For now, I suspect a bug in the 68k core. I don't think all IRQ should
> be auto-acknoleged.
>
>
Yeah, don't do that. The emulator should behave exactly as the hardware, writing in hacks to get around the bugs in whatever OS you're trying to build is really bad. :-) It'll work, but then if you ever reuse or the VIA or other code, it'll cause nothing but headaches.

I'm fairly sure that if the interrupt service routine does not clear all of the interrupt flags in IFR/IER, the VIA will continue to trigger interrupts, until (IFR & IER & 0x7f)==0.

Note that there are different 6522 implementations out there, so you might want to check several docs. If I remember off the top of my head either the Synertek or the MOSTek was the more complete one of the docs out there.

--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "LisaList" group. To post to this group, send email to lisalist_at_email.domain.hidden To unsubscribe from this group, send email to lisalist-unsubscribe_at_email.domain.hidden For more options, visit this group at http://groups.google.com/group/lisalist?hl=en -~----------~----~----~----~------~----~------~--~--- Received on 2007-07-13 11:33:03

This archive was generated by hypermail 2.4.0 : 2020-01-13 12:15:21 EST