[hatari-devel] Regression when restoring desktop.inf
Nicolas Pomarède
npomarede at corp.free.fr
Fri May 20 15:07:43 CEST 2011
Le 19/05/2011 11:33, Nicolas Pomarède a écrit :
> I ran "hg bisect" (really useful command) and I found the commit that
> breaks restoring med res in my case ; well, the strangest part of this
> is that it's commit 3315, the one where I changed the timing for the "TX
> buffer empty" bit in ikbd.c ! Quite unrelated at first sight, but well.
>
> So, it seems old thoses are relying on some kind of timing/behaviour
> that is not correctly emulated here. I will try to find the cause of the
> problem.
>
> Nicolas
Well, after spending quite some time with different disasm of hatari
booting to the desktop using different values of ACIA_CYCLE to emulate
the TX delay in the ACIA, I came to the conclusion that the TOS has some
bugs, which under certain conditions are causing some parts of the
system memory being overwritten by the stack (movem xxx,-(a7)).
In that case addr $6122/$6124 used to restore the resolution are filled
with stack pointers !
Of course, sthg is certainly wrong with our ACIA's timings, since this
works on real hardware, but still it seems that's tos 1.02/1.04 are
working more or less by luck regarding this specific ACIA's integration
(I think the stack was not allocated big enough to handle too many
levels of jsr/bsr/trap/exception)
For now, I put 1000 cycles as a delay. When I got time, I'll try to do
some measures on a real ST.
Nicolas
More information about the hatari-devel
mailing list