Re: [hatari-devel] Suspected Hatari 2.3.0 regression (prefetch?) |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi Eero,
On 16 Dec 2020 at 2:13, Eero Tamminen wrote:
> On 12/16/20 12:46 AM, Roger Burrows wrote:
> > I'm working on an incompatibility (reported by Eero) between EmuTOS and
> TOS4
> > when running a program called DELMPAINT. I have previously been using
> Hatari
> > 2.2.1 to help debug this.
> >
> > I just switched to 2.3.0, and DELMPAINT now gets a bus error doing
> something
> > that it did before without crashing, when run with Hatari 2.2.1. The
> problem
> > occurs when DELMPAINT tries to copy the Falcon palette registers at
> > $ff9800-$ff9bff to its own memory. It does it with a loop that copies 512
> > bytes at a time. The program initialises a0 to $ff9800, a1 to its own
> memory,
> > then does the following loop twice:
> > movem.l (a0)+,d1-d7/a2 ; copy 32 bytes
> > movem.l d1-d7/a2,(a1)
> > movem.l (a0)+,d1-d7/a2-a6 ; copy 48 bytes
> > movem.l d1-d7/a2-a6,$20(a1)
> > ...
> > movem.l (a0)+,d1-d7/a2-a6 ; copy 48 bytes
> > movem.l d1-d7/a2-a6,$1a0(a1)
> > movem.l (a0)+,d1-d7/a2-a6 ; copy 48 bytes ***
> > movem.l d1-d7/a2-a6,$1d0(a1)
> >
> > The crash occurs in the second (and last) time through the loop, at the
> > instruction marked with *** above. After that instruction, a0 will point
> to
> > $ff9c00 (although that address has not been read, at least from a
> programming
> > POV). The error msg from Hatari is "Bus Error reading at address
> $ffff9c00".
> According to real device test results done with byte and word access:
> https://git.tuxfamily.org/hatari/hatari.git/tree/tests/buserror/results
>
> Only palette regs are readable, not the the area
> after them.
>
Yes, I know, but as reported, it's not actually reading that area.
> If prefetcher triggers now (2.2 -> 2.3) access
> errors when reading something that program didn't
> actually read, that does sound like a regression
> bug.
>
> Nicolas, any idea why MMU would prevent those?
>
>
> (I've been wondering about why some programs now
> need MMU, and bug like this sounds a plausible
> explanation. Toni is less likely to run across
> issues of bus errors happening at wrong place
> with Amiga, or it could be Hatari integration
> issue.)
>
Thanks for digging into this. Meanwhile, I'm still digging into DELMPAINT
problems :-). I've made a little progress in understanding the issues, which
happen when the rez is switched between a mode that uses the STE palette and a
mode that uses the Falcon palette. Sound familiar?
Roger
P.S. A test program to illustrate the problem I reported should be trivial, so
if you need one, I'm willing to write it.