Re: [hatari-devel] Adding cache support for the MegaSTE -> DONE |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Le 04/09/2024 à 21:30, Eero Tamminen a écrit :
PS. Wouldn't most correct behavior for SafeCopy/SafeClear would actually
be to have last pieces of data written to memory, going also to cache,
instead of cache having been flushed?
That would be rather complicated depending on the cache type. For
MegaSTE's cache the structure is rather simple and it has the advantage
of being unified between code and data, so you don't really have to
worry about updating one data cache or one instr cache and pushing into
cache every read/write made by stMemory functions could be doable.
for cpu >= 68020 it would be more complex due to having 2 caches.
also many programs or even TOS expect the cache to be wrong after doing
some IO access and will explicitely flush the cache. So trying to
maintain the cache's consistancy anyway would be a lost effort.
I'm not sure it would be worth the effort of adding code for that, or
even speding too much time thinking about how to do it :)
Nicolas