CPU

Citra contains two CPU cores: an interpreter and a JIT core.

The interpreter is an ARM interpreter called “dyncom”, which was originally taken from a project called SkyEye, and then modified to support the ARMv6 instruction set that the 3DS uses. Dyncom originally supported ARM7 (ARMv5) and partial ARMv6 only. We added in the remaining ARMv6 media instructions and other fixes ourselves to get 3DS emulation as far as it is.

The JIT core used in Citra is a dynamic recompiler called “dynarmic”, developed by @MerryMage, and is capable of recompiling the ARMv6K instruction set to x86_64. The recompiler converts ARMv6 instructions into x86_64 instructions at runtime, injects the resulting chunk of code into RAM, then jumps the host processor to the resulting routine. Instructions that are not implemented by the recompiler fall back into the interpreter. Dynarmic was developed specially for Citra, and was merged into the master branch in September 2016. The core provides a modest 15-20FPS boost in most games, while some games have received a massive 200% speed boost over the interpreter! A full design document for Dynarmic can be found on its github repo.

There are no plans for emulating the ARM9 chip in the 3DS, which is mainly used for security purposes as well as DS games.