Re: [hatari-devel] TT emulation crashes when there is no ACSI drive

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


Christian Zietz schrieb:

> Ah, that was the key missing piece of information! Now I can see the
> bug, too. And I guess Eero and Nicolas could find the reason behind it.

My initial analysis for the Hatari developers to continue on:

It is stack corruption after all -- like I speculated before. While
running AUTO programs, TOS is operating with a dangerously low stack,
very close to the GEMDOS register save area. The Hatari cartridge Pexec
code also needs some stack space. Thus, if a MFP interrupt occurs at
precisely the wrong moment (i.e. within a GEMDOS call from
load_n_reloc), the stack overflows into the save area and upon return
from GEMDOS the A6 register is wrong, ultimately causing the crash Uwe
is experiencing.

Even minute changes in timing, like switching to "cycle exact" mode or
renaming the file (which probably makes some code running a bit longer
while comparing file names) makes the MFP interrupt happen at a less
critical moment.

Yet, this was a time bomb waiting to be triggered. I don't have a
solution at hand, though. Maybe switch to another stack during the
cartridge Pexec code?

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/