Re: [hatari-devel] Hatari hangs with NVDI when MMU is enabled |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Hatari hangs with NVDI when MMU is enabled
- From: Christian Zietz <czietz@xxxxxxx>
- Date: Sun, 30 Sep 2018 16:56:17 +0200
- Autocrypt: addr=czietz@xxxxxxx; prefer-encrypt=mutual; keydata= xsDiBDdn2AURBADksdHVyN55nv0lx4qGx+GQMrbo7zs7lSkAfhkgmgqp84xUeUiWI/kj1on/ wxkmJ96Yzt0ktDbZYM0C9Z66M3rLfXE1vXALHhegeMuOy/tVWybcohRrhfB7tmANTESJOZke 0lZZ59DcIfFoqLYErb6qX8nLPYnOv6sFubxnhuF9QQCg/3GaIR1sVK9Xq+b4B9BtVxd7cHMD /i2hAEOX3WY3K7PNZJziYF54uBbGiVS88W41l1RARcaeogIZcAKpFH3on+Tf60fAC85MCp17 QIeP44hj4Cf46B+UTVhf3EFG4IOsLRxUonpt7dKO8txsKFN/OFsjlPOuDyg7XMpEWkTWZetm HC9/0pcApIXSDnggde4T8AX6nn/+A/4hBOhPxuvkV7Uw/ebLYwXrLo2vt9OvvC1VfeywNseq PIkFX/+n/+niBS+Cb2ess2SVQNKJ9vP5+vBxg5AMfQXqk1ONldGQ/ARHmL6+Iuo47mO51e7R i691hq13wHUvyKh1AN7fpKI2m3YW55XEQ+3iTMIZcqfjr6xYgG8GJTppdc0gQ2hyaXN0aWFu IFppZXR6IDxjemlldHpAZ214Lm5ldD7CYwQQEQIAIwIZAQIeAQIXgAUCVGD5IgcLCQgHAwIB BhUIAgkKCwQWAgMBAAoJEFLLl/ZtoCXKubQAoIHNaurSMQB8MHDoTk3B7WHk2ApoAJ0egA8q aNoVj0kU4+OjeGzFiSHMOs7BTQQ3Z9gFEAgA9kJXtwh/CBdyorrWqULzBej5UxE5T7bxbrlL OCDaAadWoxTpj0BV89AHxstDqZSt90xkhkn4DIO9ZekX1KHTUPj1WV/cdlJPPT2N286Z4VeS Wc39uK50T8X8dryDxUcwYc58yWb/Ffm7/ZFexwGq01uejaClcjrUGvC/RgBYK+X0iP1YTknb zSC0neSRBzZrM2w4DUUdD3yIsxx8Wy2O9vPJI8BD8KVbGI2Ou1WMuF040zT9fBdXQ6MdGGze MyEstSr/POGxKUAYEY18hKcKctaGxAMZyAcpesqVDNmWn6vQClCbAkbTCD1mpF1Bn5x8vYlL IhkmuquiXsNV6TILOwACAgf+JhucyZDzOWGht9e0U71kC2bxIOr4iz+ADd3sxS62okrocHXp B9zYDhmJ74BFfC7xMd9bwWNj7YR0yiUdOzY27OcXcEkVmhVBW6AqxuRAKfmYMvvnyR5z5OP6 vg2YSzgOmooc5vequa5YIjLmFkuRlglLiEgdW9gPBFtirNqxOtAqSxEcRrblSn8JBEU51Ii6 SVVuo1nXOP11g8rVO4YvEED89pHT4jgLZu4th1N+mDumNZlqyUIxZ4tQyw3X2OWvEbKWGn2j h0ZywaomUTpVA+wiwxndawP40oowFYT8LNeLtfZyq6xPpQmT2DaNhP4gdy3qkDfnmXkc2zFM YukXo8I/AwUYN2fYBVLLl/ZtoCXKEQKA3QCfTJstYzXurbt9ZnoTU3SFQQmG0/wAoNX91nWM nsS7JOepPAzOUoke4AIi
- Openpgp: preference=signencrypt
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