Re: [hatari-devel] Data cache Issues?

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


Le 06/06/2015 00:01, Eero Tamminen a écrit :

I think it should be enough to do that only for Fread(), as only
that can be used to load code into memory.

(I.e. there might be separate functions for data & instruction
cache invalidation, and in future also for 040 data cache flushing.)

Note: Debugger's binary data load functions will also need to flush
instruction cache for the same reason.  Currently they just use
STMemory memory write functions.


hi

Yes, access to DTA are unlikely to change the instruction cache, I will do 2 spearate functions.


and I can now
run Virtual City in prefetch/compatible or CE modes (those 2 modes make
use of the instruction cache)

The version I had still bombs, but then I loaded the version from pouet.net,
and that works fine.  On comparing them, the version I had was packed with
JAM packer.  I threw that away as apparently it's also causing the issues
with autostart + >4MB memory consumption.

I updated Hatari docs accordingly.


Please test again with Beats Of Rage and your other demos, it should
hopefully work better.

They still don't work.

Firestarter is packed with Sentry 2.2.

I found another demo that doesn't work with caches, but works
by changing cancahe030():
	http://www.pouet.net/prod.php?which=13601


In all these cases, I think the problem is the packer : when unpacking, some intructions will be "created" and the cache must be updated accordingly. So, IMO any packer that doesn't flush the instr cache in CACR after depacking and before jumping to the depacked program is likely to crash depending on various "random" factors (state of the memory before running, state of the instruction cache, where the program will be unpacked, etc.)


So standard 68000 packers like the STF are not correct if they don't flush the caches at the end, there's nothing Hatari can do about this.

Nicolas





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