Re: [hatari-devel] TT with 8 MHz crashing (with NVDI)

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


Since is seems to have to do with interrupt handling:


NVDI uses two different routines to install as mouse handler when calling Initmouse(), one that lowers the interrupt to level 5, and one that doesn't:


mouse_int_nolower:

    move.w     sr,-(a7)

    movem.l    d0-d3/a0-a1,-(a7)

    bra.s      mouse_int_but


mouse_int_lower:

    move.w     sr,-(a7)

    movem.l    d0-d3/a0-a1,-(a7)

    ori.w      #0x0700,sr

    andi.w     #0xFDFF,sr               /* lower to IPL 5 */


mouse_int_but:

(actual processing is done here)


The one that lowers the interrupt, is normally only used when a MagX cookie is detected. However, it can also be enforced when (nvdi_conf & 0x600) == 0x400


nvdi_conf is the configuration that can normally be set with NVDICONF.CPX, however in current versions of NVDI that CPX does not seem to be able to change those flags. The configuration bits is a 16bit value that is stored at offset 6 of the structure the NVDI cookie points to.


Maybe your version lowers the interrupt, causing other interrupts to occur during mouse processing, and maybe corrupting the interrupt stack? That might also explain why there is a difference between 8MHz/32Mhz, because with 8Mhz it takes longer to process the interrupt, making interruptions by other exceptions more likely.




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