Re: [hatari-devel] Data cache Issues? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On maanantai 08 kesäkuu 2015, Nicolas Pomarède wrote:
> just to be sure the problem was not related to the depacker, I extracted
> "Whirlpool" demo by manually depacking the Atomic 3.5 data.
> The resulting program was still crashing, so it was another problem than
> clearing the cache after depacking.
> Adding some checks showed that it was a data cache mismatch.
>
> After quite some low level debugging and diving into the cache's inner
> work :) , I found it was related to a case where a write to memory
> didn't correctly invalidate an old entry in the data cache (on a
> 'miss'), causing subsequent reads to return an old value instead of the
> most recent one, hence the crash.
>
> Whirlpool is now running correctly, even when packed (but the fact that
> the depacker doesn't clear cache could still lead to crash sometimes,
> although it should be very rare)
>
> Eero, could you test again those demos that didn't work and for which
> you added a note ?
I've gone through small subset of Falcon games. Before this fix
about half of the games had problems, not anymore.
B-o-R works now (freezes still in Hall of Fame, but game itself starts).
Racer game also works. I think this is first time for me, ever.
Yepyha demo works until end part, i.e. better than earlier.
Whirpool demo starts fine too.
Corsair game bombs with latest Hatari, but works with version
before enabling data cache:
M68000 Bus Error reading at address $fffffc PC=$1f79a.
PM's Heretic works with oldUAE, but crashes with data caches:
prefetch mismatch pc=4158e addr=3314cb size=2 cache=33ffb9 != mem=3345a9, d-
cache error ?
M68000 Bus Error reading at address $4 PC=$414c0.
Firestarter demo resets with data caches and shows following:
----------
GEMDOS 0x3D Fopen("C:\FIRESTAR.PRG", read-only) at PC=0xFA002A
GEMDOS 0x4B Pexec(7, 0x0, 0xf730, 0x0) at PC 0xFA002A
GEMDOS 0x3E Fclose(64) at PC 0xFA002A
prefetch mismatch pc=e03cac addr=3f8192 size=2 cache=20002 != mem=20ff6, d-
cache error ?
prefetch mismatch pc=e10672 addr=3f80ea size=2 cache=0 != mem=3e86, d-cache
error ?
M68000 Bus Error reading at address $fff606 PC=$213e0.
Sentry 2.2 by Eagle
Exception 2 (213e0) at 213e0 -> e00fb6!
prefetch mismatch pc=e00d48 addr=3f80ee size=2 cache=ac20 != mem=38, d-cache
error ?
prefetch mismatch pc=e00d0e addr=3f80e2 size=2 cache=d3e != mem=4d2, d-cache
error ?
prefetch mismatch pc=e03d32 addr=3f80d6 size=2 cache=8f70 != mem=8ad, d-
cache error ?
prefetch mismatch pc=e03d36 addr=3f80e2 size=2 cache=e00d3e != mem=e03c64,
d-cache error ?
prefetch mismatch pc=e00d0e addr=3f80e2 size=2 cache=3c64 != mem=4d2, d-
cache error ?
Bus error wget at 02b202b0
M68000 Bus Error reading at address $2b202b0 PC=$2b202b2.
Exception 2 (2b202b2) at 2b202b2 -> e00fb6!
prefetch mismatch pc=e00fde addr=3f8090 size=1 cache=8f70 != mem=2b00000, d-
cache error ?
prefetch mismatch pc=e09526 addr=3f8046 size=2 cache=e00000 != mem=e0950c,
d-cache error ?
CPU reset PC=e00038 (ROM memory)..
6888x no FPU: F357-0000 PC=00E004A6
Exception 2 (e02cde) at e02cde -> e02ce6!
Exception 2 (e0184e) at e0184e -> e01836!
Exception 2 (e0184e) at e0184e -> e01836!
CPU reset PC=e00038 (ROM memory)..
----------
- Eero
PS. Some demos which use DSP just for background music and
worked earlier worked without DSP, need now DSP. I've
updated compatibility list with notes about this.