Re: [hatari-devel] Issues with cache hits/misses?

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


Hi,

On tiistai 02 kesäkuu 2015, Nicolas Pomarède wrote:
> Le 01/06/2015 19:34, Nicolas Pomarède a écrit :
> > I changed calls for do_put_mem_xxxx ; other places are often using
> > STMemory_WriteXXXX. So adding a call to flush cache just in this
> > function should be enough (that was my plan, but I forgot to do it
> > yesterday :) )
> 
> I changed STMemory_Write(), but other functions that do memcpy or
> similar to the ST memory should be updated too.

After some testing, there are at least some Falcon
demos that worked earlier which don't work anymore:
- yepyha
- virtual city

And Laurent's Beats of Rage freezes (with music playing on bg)
to the score table at startup, so I think there may still
be problems with cache.


Places which use do_put_mem_* could potentially changed
to STMemory_Write*:

$ grep -l do_put_mem_ $(find src/ -type f|grep -v cpu/)
src/includes/ioMem.h
src/falcon/crossbar.c
src/stMemory.c
src/msa.c
src/gemdos.c
src/video.c

stMemory.c has the wrappers so it can be ignored.

ioMem.h wrappers can be ignored as IO-mem isn't cached, right?

gemdos.c I've reviewed and all places using those functions do
also other direct Atari memory access so changing them doesn't
help, I've just commented them a bit more and moved flushing
as first thing for consistency (same thing also in STMemory.c).

Nicolas, can you look into rest C-files?


There are also places accessing STRam[] directly:

$ grep -l STRam $(find src/ -type f|grep -v cpu/)
src/includes/ioMem.h
src/includes/stMemory.h
src/debug/profilecpu.c
src/falcon/crossbar.c
src/falcon/videl.c
src/hdc.c
src/fdc.c
src/tos.c
src/stMemory.c
src/dmaSnd.c
src/memorySnapShot.c
src/video.c

Most of these are just reading STRam(), but some are also
writing, those need also to be reviewed.

I'll look next into debug/* and falcon/* files.


	- Eero



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