Re: [hatari-devel] 68000: Wrong order of bus accesses for move.l xx,-(Ay)

[ Thread Index | Date Index | More Archives ]

Le 25/01/2018 à 20:46, Christian Zietz a écrit :

while reproducing a crash seen on a real ST using Hatari I found what I
think is a wrong order of bus accesses during MOVE.L (and possibly other
instructions) when using register pre-decrement address mode as the
destination. This is for ST emulation (68000 CPU), where a long word
access is split into two bus accesses.

Consider the following test program that does a...

MOVE.L D0,-(A0)

... with A0 being 0. This will of course trigger a bus error. The access
address of this error read from the exception stack frame is then printed.

On a real ST, you'll see the message "Bus error at: $FFFFFFFE", i.e. the
least significant word is written first and causes the bus error. This
agrees with what's documented in "Yet Another Cycle Hunting Table". On
Hatari, however, you'll see "Bus error at: $FFFFFFFC", i.e. the most
significant word seems to be written first. (I tested this with the
latest Hatari build from

Apart from a wrong stack frame, this can cause other issues, e.g. when
writing to hardware registers where the order of the accesses can be


several cases like this were fixed lately, affecting stack for bus/address error, but it's possible some case remain.

Do you get the same stack on real ST when causing an address error (for example if A0=1) ? If so, I guess Toni will be able to reproduce this on Amiga and update the cpu core accordingly.


Mail converted by MHonArc 2.6.19+