cache clean fix
This commit is contained in:
parent
42c8119010
commit
f50ad10a9b
2 changed files with 5 additions and 7 deletions
|
@ -3412,6 +3412,7 @@ void flush_translation_cache_ram()
|
||||||
(ram_translation_ptr - ram_translation_cache) + 0x100);
|
(ram_translation_ptr - ram_translation_cache) + 0x100);
|
||||||
#endif
|
#endif
|
||||||
ram_translation_ptr = ram_translation_cache;
|
ram_translation_ptr = ram_translation_cache;
|
||||||
|
last_ram_translation_ptr = ram_translation_cache;
|
||||||
ram_block_tag_top = 0x0101;
|
ram_block_tag_top = 0x0101;
|
||||||
if(iwram_code_min != 0xFFFFFFFF)
|
if(iwram_code_min != 0xFFFFFFFF)
|
||||||
{
|
{
|
||||||
|
@ -3467,6 +3468,7 @@ void flush_translation_cache_rom()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rom_translation_ptr = rom_translation_cache;
|
rom_translation_ptr = rom_translation_cache;
|
||||||
|
last_rom_translation_ptr = rom_translation_cache;
|
||||||
memset(rom_branch_hash, 0, sizeof(rom_branch_hash));
|
memset(rom_branch_hash, 0, sizeof(rom_branch_hash));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3479,6 +3481,7 @@ void flush_translation_cache_bios()
|
||||||
|
|
||||||
bios_block_tag_top = 0x0101;
|
bios_block_tag_top = 0x0101;
|
||||||
bios_translation_ptr = bios_translation_cache;
|
bios_translation_ptr = bios_translation_cache;
|
||||||
|
last_bios_translation_ptr = bios_translation_cache;
|
||||||
memset(bios_rom + 0x4000, 0, 0x4000);
|
memset(bios_rom + 0x4000, 0, 0x4000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -646,12 +646,10 @@ u8 *last_ram_translation_ptr = ram_translation_cache;
|
||||||
u8 *last_bios_translation_ptr = bios_translation_cache;
|
u8 *last_bios_translation_ptr = bios_translation_cache;
|
||||||
|
|
||||||
#define translate_invalidate_dcache_one(which) \
|
#define translate_invalidate_dcache_one(which) \
|
||||||
if (which##_translation_ptr < last_##which##_translation_ptr) \
|
|
||||||
last_##which##_translation_ptr = which##_translation_cache; \
|
|
||||||
if (which##_translation_ptr > last_##which##_translation_ptr) \
|
if (which##_translation_ptr > last_##which##_translation_ptr) \
|
||||||
{ \
|
{ \
|
||||||
/*warm_cache_op_range(WOP_D_CLEAN, last_##which##_translation_ptr, \
|
warm_cache_op_range(WOP_D_CLEAN, last_##which##_translation_ptr, \
|
||||||
which##_translation_ptr - last_##which##_translation_ptr);*/ \
|
which##_translation_ptr - last_##which##_translation_ptr); \
|
||||||
warm_cache_op_range(WOP_I_INVALIDATE, last_##which##_translation_ptr, 32);\
|
warm_cache_op_range(WOP_I_INVALIDATE, last_##which##_translation_ptr, 32);\
|
||||||
last_##which##_translation_ptr = which##_translation_ptr; \
|
last_##which##_translation_ptr = which##_translation_ptr; \
|
||||||
}
|
}
|
||||||
|
@ -661,9 +659,6 @@ u8 *last_bios_translation_ptr = bios_translation_cache;
|
||||||
translate_invalidate_dcache_one(rom) \
|
translate_invalidate_dcache_one(rom) \
|
||||||
translate_invalidate_dcache_one(ram) \
|
translate_invalidate_dcache_one(ram) \
|
||||||
translate_invalidate_dcache_one(bios) \
|
translate_invalidate_dcache_one(bios) \
|
||||||
/* notaz: tried cleaning dcache ranges, but it doesn't work for every game, \
|
|
||||||
* don't know why */ \
|
|
||||||
warm_cache_op_all(WOP_D_CLEAN); \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define invalidate_icache_region(addr, size) \
|
#define invalidate_icache_region(addr, size) \
|
||||||
|
|
Loading…
Add table
Reference in a new issue