Dolphin, the GameCube and Wii emulator - Forums

Full Version: Dolphin gamecube block cache
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

MagicJack

So I was wondering if someone could try and explain to me what the block cache in the emulator is. It seems to be the cause of a lot of lag in the game 007 nightfire for me. I can go in to more detail as to why it is the reason if needed.
The "block cache" you're most likely talking about is internally called the JIT cache, and it stores the result of PPC->X86 code translation + performs branch linking on compiled blocks in order to 1. avoid having to lookup jump destinations through the dispatcher when they're known; 2. avoid having to recompile code when we already have a compiled version of it.

It has to be invalidated either partially or completely at some point. Most of the time, only partially when a icbi/icbz/... instruction is used to clear the instruction cache. Very rarely, it has to be completely cleared (game disables cache, for example).

MagicJack

Okay thanks. Whenever I play Nightfire It starts at 60fps but slowly goes down as more enemies enter into the screen area. It seems after a while of running at 8-15fps, it automatically clears the block cache and the game speeds up instantly back up to 60fps. Is there anything I can do to make it happen more often or is this more a coded thing that isnt really controllable?
It's probably not related and just a consequence of something else.

MagicJack

Okay thanks