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

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


On 11 Aug 2019 at 14:12, Christian Zietz wrote:
> 
> 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.
> 
Great analysis, Christian!

> 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?
> 
Maybe turning off interrupts during the cartridge Pexec() code?

Roger




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