Wiki

Home – Wiki

Welcome to the official Citra user documentation knowns as the wiki.

This page provides a comprehensive resource for understanding and mastering the emulator. Get to know every aspect of Citra and learn how to make the most out of it with our detailed guides.

Usage

You may download a precompiled binary from our website, or you can build it yourself from the source code.

Now, you’ll need to dump the games you want to play with your 3DS.

If you have any save files or extra data on your 3DS that you want to import into Citra, you’ll have to dump them as well.

If you have updates or DLCs on your 3DS that you want to use with Citra, you’ll have to dump them as well.

In order to make some games work, you’ll have to dump some system files from your 3DS.

To understand Citra’s file structure read;

You can find a reference for Citra’s default keyboard bindings below:

citra default controls

Development Information

If you are interested in contributing and/or continuing  with Citra’s code, make use of our development archive below.

3DS Hardware/Software
Homebrew

A list of a variety of homebrew applications and demos can be found on 3DBrew at Homebrew Applications. They can be used for testing Citra if you have no means of dumping and decrypting commercial games. Smea’s Ninjhax Starter Kit contains pre-compiled binaries of some of these applications.

Here are some tools useful for homebrew development:

  • devkitARM – Toolchain geared toward compiling homebrew
  • CTR User Library (ctrulib) – Library for writing usermode arm11 code for the 3DS
  • picasso and nihstro – Assemblers for shader code for the PICA200 GPU used in the 3DS. nihstro also includes a disassembler.
  • Aemstro – Older shader (dis)assembler. Nowadays picasso or nihstro should be preferred.
  • Result code decoder (Python) – This Python script will (hopefully) decode any result codes you might encounter.
  • 3DS Game Database – Contains data on all 3DS games, their title IDs, update versions, etc.
  • Homebrew Libraries and Tools – 3DBrew page with more tools and libraries useful for development.
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.

Archive of 3DS Documentation

For better or worse, there is no unified way of writing and collecting information gathered during research on 3DS software or hardware. This section seeks to gather a list of various places for 3DS documentation.