Re: [hatari-devel] 68040/060 MMU bug fix |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Hello Toni, thank you for pointing out this fix! This finally does no longer fit my interrupt polling code in run_mmu030 and run_mmu040: So it is time to use the WinUAE method of interrupting. There are questions and suggestions arising that may also be relevant for Hatari: The interrupt code of WinUAE is quite confusing. Is my understanding of the code correct and all I have to do is set SPCFLAG_INT if the interrupt priority line changes (gets raised or lowered)? I’m only using run_mmu030() and run_mmu040(). Unfortunately there is a little difference in the way interrupts are handled by Previous and WinUAE/Hatari. WinUAE/Hatari does this: intr = intlev(); if (intr > 0 && (intr > regs.intmask || intr == 7)) do_interrupt(intr); Previous does this: intr = intlev (); if (intr>regs.intmask || (intr==7 && intr>lastintr)) Exception (intr + 24); lastintr = intr; This reflects the behaviour of the real CPU and is necessary to correctly handle level 7 interrupts (avoid nested NMIs). Is there a chance this will be fixed in WinUAE? The complexity of interrupt code in WinUAE is very high due to handling lots of different CPUs and emulation modes. This increases the chance to mess things up unintentionally. There is interrupt code in lots of places using SPCFLAG_INT, SPCFLAG_DOINT, regs.ipl[0], regs,ipl[1], regs.ipl[2], ipl_pin, ipl_pin_p, do_interrupt(), check_interrupt(), ipl_fetch_xxx(), doint(), checkint(), m68k_interrupt_delay, m68k_accurate_ipl … just to name a few. Is there a chance this will be cleaned up a bit which would also improve performance? Regards, Andreas
|
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |