Re: [hatari-devel] Hatari hangs with NVDI when MMU is enabled

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


Thank you, Christian, for this detailed analysis.

> Christian Zietz schrieb:
> 
> > - NVDI also works with MMU when I tick either "Prefetch mode" or "Cycle
> > exact" in the CPU options.
> > 
> > Maybe this already rings a bell with the Hatari CPU experts, otherwise
> > I'll have a deeper look later.
> 
> Well, it seems like in this particular configuration (MMU = on, Prefetch
> mode = off, Cycle exact = off) something goes wrong within the CPU. More
> specifically, with the installation of NVDI's TRAP #2 handler.
> 
> See below for an example. A memory dump at address 0x88 clearly shows
> that the address should be 0x0104658c which is the handler that NVDI had
> just installed before. However, after single-stepping, Hatari ends up at
> 0x0109a0f4 which incidentally is the address of the previous TRAP #2
> handler.
> 
> So it seems as if Hatari uses and old (cached?) address for the TRAP #2
> handler, which in turn is unexpected to NVDI and causes it to fail in an
> endless loop.
> 
> CPU=$e25508, VBL=758, FrameCycles=280444, HBL=312, LineCycles=892, DSP=N/A
> $00e25508 : 4e42                               trap      #2
> > m $88
> 00000088: 01 04 65 8c 00 e0 12 1c 00 e0 12 1c 00 e0 12 1c
> 00000098: 00 e0 12 1c 00 e0 12 1c 00 e0 12 1c 00 e0 12 1c
> 000000A8: 00 e0 12 1c 00 e0 12 1c 00 e0 12 1c 01 09 9e f2
> 000000B8: 01 04 4b 42 01 03 81 ba 00 e0 12 1c 00 e0 12 1c
> 000000C8: 00 e0 12 1c 00 e0 12 1c 00 e0 12 1c 00 e0 12 1c
> 000000D8: 00 e0 12 1c 00 e0 12 1c 00 e0 12 1c 00 e0 12 1c
> 000000E8: 00 e0 12 1c 00 e0 12 1c 00 e0 12 1c 00 e0 12 1c
> 000000F8: 00 e0 12 1c 00 e0 12 1c 00 00 00 00 00 00 00 00
> > s
> 
> CPU=$109a0f4, VBL=758, FrameCycles=280448, HBL=313, LineCycles=0, DSP=N/A
> $0109a0f4 : 0c40 00c8                          cmpi.w    #$c8,d0
> 
> Inserting a...
> > w 0x88 0x01 0x04 0x65 0x8c
> ... (which probably invalidates the cache) before single-stepping fixes
> the problem.
> 
> With that I have to stop my investigation. Sorry! Someone else who knows
> the internals of Hatari's 68030 emulation better needs to take over here.
> 
> Regards
> Christian
> -- 
> Christian Zietz  -  CHZ-Soft  -  czietz@xxxxxxx
> WWW: http://www.chzsoft.de/
> PGP/GnuPG-Key-ID: 0x52CB97F66DA025CA / 0x6DA025CA
> 
> 



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